From 29f5cc6aca70744e404d981ad29a32d5becd8988 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Sun, 21 Jun 2015 21:28:01 +0300 Subject: [PATCH 001/264] lowercase on sort_by text --- web/css/styles.min.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/css/styles.min.css b/web/css/styles.min.css index 223fcee6f..79a481217 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -989,7 +989,7 @@ div.l-content > div.l-separator:nth-of-type(4) { } .l-sort-toolbar .sort-by b { - text-transform: uppercase; + text-transform: lowercase; padding-left: 3px; } From 2289b2d8bb0a6de252a46be7adc48d93fd7b577c Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Wed, 1 Jul 2015 01:31:06 +0300 Subject: [PATCH 002/264] added sort-star class --- web/templates/admin/add_cron.html | 1 + web/templates/admin/add_db.html | 1 + web/templates/admin/add_dns.html | 1 + web/templates/admin/add_dns_rec.html | 1 + web/templates/admin/add_firewall.html | 2 + web/templates/admin/add_firewall_banlist.html | 1 + web/templates/admin/add_ip.html | 1 + web/templates/admin/add_mail.html | 1 + web/templates/admin/add_mail_acc.html | 1 + web/templates/admin/add_package.html | 1 + web/templates/admin/add_user.html | 1 + web/templates/admin/add_web.html | 2 + .../admin/edit_backup_exclusions.html | 1 + web/templates/admin/edit_cron.html | 1 + web/templates/admin/edit_db.html | 1 + web/templates/admin/edit_dns.html | 2 +- web/templates/admin/edit_dns_rec.html | 1 + web/templates/admin/edit_firewall.html | 1 + web/templates/admin/edit_ip.html | 1 + web/templates/admin/edit_mail.html | 1 + web/templates/admin/edit_mail_acc.html | 1 + web/templates/admin/edit_package.html | 1 + web/templates/admin/edit_server.html | 1 + web/templates/admin/edit_user.html | 1 + web/templates/admin/edit_web.html | 1 + web/templates/admin/generate_ssl.html | 1 + web/templates/admin/list_cron.html | 4 +- web/templates/admin/list_db.html | 7 +- web/templates/admin/list_dns.html | 3 +- web/templates/admin/list_firewall.html | 3 +- web/templates/admin/list_ip.html | 3 +- web/templates/admin/list_mail.html | 3 +- web/templates/admin/list_mail_acc.html | 3 +- web/templates/admin/list_packages.html | 3 +- web/templates/admin/list_search.html | 25 +- web/templates/admin/list_user.html | 3 +- web/templates/admin/list_web.html | 6 +- web/templates/footer.html | 425 +++++++++++++++++- web/templates/header.html | 141 +----- web/templates/user/edit_dns.html | 1 + web/templates/user/edit_user.html | 1 + web/templates/user/edit_web.html | 1 + web/templates/user/list_cron.html | 3 +- web/templates/user/list_db.html | 3 +- web/templates/user/list_dns.html | 3 +- web/templates/user/list_mail.html | 3 +- web/templates/user/list_mail_acc.html | 3 +- web/templates/user/list_search.html | 22 +- web/templates/user/list_user.html | 3 +- web/templates/user/list_web.html | 3 +- 50 files changed, 525 insertions(+), 179 deletions(-) diff --git a/web/templates/admin/add_cron.html b/web/templates/admin/add_cron.html index 638edba22..1de9aba3f 100644 --- a/web/templates/admin/add_cron.html +++ b/web/templates/admin/add_cron.html @@ -31,6 +31,7 @@ ?>
+ + +
diff --git a/web/templates/admin/add_db.html b/web/templates/admin/add_db.html index bebcb304b..a69a6c140 100644 --- a/web/templates/admin/add_db.html +++ b/web/templates/admin/add_db.html @@ -31,6 +31,7 @@ ?> + + + + + diff --git a/web/templates/header.html b/web/templates/header.html index 16b73ffd1..310efbd08 100644 --- a/web/templates/header.html +++ b/web/templates/header.html @@ -11,11 +11,14 @@ + + - - - - + \ No newline at end of file diff --git a/web/templates/user/edit_dns.html b/web/templates/user/edit_dns.html index 3466228ef..f590ab890 100644 --- a/web/templates/user/edit_dns.html +++ b/web/templates/user/edit_dns.html @@ -31,6 +31,7 @@ ?> + - - + '; + + if($v_ns4) + echo ' + + '; + + if($v_ns5) + echo ' + + '; + + if($v_ns6) + echo ' + + '; + + if($v_ns7) + echo ' + + '; + + if($v_ns8) + echo ' + + '; + ?> + + > + + +
diff --git a/web/templates/user/edit_user.html b/web/templates/user/edit_user.html index aff17cabf..7bdbca7f1 100644 --- a/web/templates/user/edit_user.html +++ b/web/templates/user/edit_user.html @@ -31,6 +31,7 @@ ?> + - + + + + + + + + + + + + + + + diff --git a/web/file_manager/fm_api.php b/web/file_manager/fm_api.php index b8e40fa20..80615df91 100644 --- a/web/file_manager/fm_api.php +++ b/web/file_manager/fm_api.php @@ -27,18 +27,29 @@ $fm->setRootDir($panel[$user]['HOME']); $_REQUEST['action'] = empty($_REQUEST['action']) ? '' : $_REQUEST['action']; switch ($_REQUEST['action']) { + case 'cd': + $dir = $_REQUEST['dir']; + print json_encode($fm->ls($dir)); + break; case 'rename_file': $dir = $_REQUEST['dir']; $item = $_REQUEST['item']; $target_name = $_REQUEST['target_name']; - print json_encode($fm->renameItem($dir, $item, $target_name)); + print json_encode($fm->renameFile($dir, $item, $target_name)); + break; + case 'rename_directory': + $dir = $_REQUEST['dir']; + $item = $_REQUEST['item']; + $target_name = $_REQUEST['target_name']; + + print json_encode($fm->renameDirectory($dir, $item, $target_name)); break; case 'delete_files': $dir = $_REQUEST['dir']; $item = $_REQUEST['item']; - print json_encode($fm->deleteItems($dir, $item)); + print json_encode($fm->deleteItem($dir, $item)); break; case 'create_file': $dir = $_REQUEST['dir']; @@ -50,19 +61,38 @@ switch ($_REQUEST['action']) { $dirname = $_REQUEST['dirname']; print json_encode($fm->createDir($dir, $dirname)); break; - case 'cd': - $dir = $_REQUEST['dir']; - print json_encode($fm->ls($dir)); - break; + case 'open_file': $dir = $_REQUEST['dir']; print json_encode($fm->open_file($dir)); break; - case 'copy_files': + case 'copy_file': $dir = $_REQUEST['dir']; $target_dir = $_REQUEST['dir_target']; $filename = $_REQUEST['filename']; - print json_encode($fm->copyFile($dir, $target_dir, $filename)); + $item = $_REQUEST['item']; + print json_encode($fm->copyFile($item, $dir, $target_dir, $filename)); + break; + case 'copy_directory': + $dir = $_REQUEST['dir']; + $target_dir = $_REQUEST['dir_target']; + $filename = $_REQUEST['filename']; + $item = $_REQUEST['item']; + print json_encode($fm->copyDirectory($item, $dir, $target_dir, $filename)); + break; + case 'unpack_item': + $dir = $_REQUEST['dir']; + $target_dir = $_REQUEST['dir_target']; + $filename = $_REQUEST['filename']; + $item = $_REQUEST['item']; + print json_encode($fm->unpackItem($item, $dir, $target_dir, $filename)); + break; + case 'pack_item': + $dir = $_REQUEST['dir']; + $target_dir = $_REQUEST['dir_target']; + $filename = $_REQUEST['filename']; + $item = $_REQUEST['item']; + print json_encode($fm->packItem($item, $dir, $target_dir, $filename)); break; default: //print json_encode($fm->init()); diff --git a/web/file_manager/fm_core.php b/web/file_manager/fm_core.php index 61871b1bd..67ca31d51 100644 --- a/web/file_manager/fm_core.php +++ b/web/file_manager/fm_core.php @@ -32,7 +32,7 @@ class FileManager { $path = !empty($_REQUEST['dir']) ? $_REQUEST['dir'] : ''; $start_url = !empty($path) ? $this->ROOT_DIR . '/' . $path : $this->ROOT_DIR; $listing = $this->getDirectoryListing($path); - + return $data = array( 'result' => true, 'ROOT_DIR' => $this->ROOT_DIR, @@ -50,11 +50,34 @@ class FileManager { $path = $this->ROOT_DIR . '/' . $path_part; } //var_dump($path);die(); + //$path = str_replace(' ', '\ ', $path); return escapeshellarg($path); } - function deleteItems($dir, $item) { - if (is_readable($item)) { + function deleteItem($dir, $item) { + $dir = $this->formatFullPath($item); + if (is_dir($item)) { + exec (VESTA_CMD . "v-delete-fs-directory {$this->user} {$dir}", $output, $return_var); + } + else { + exec (VESTA_CMD . "v-delete-fs-file {$this->user} {$dir}", $output, $return_var); + } + + $error = self::check_return_code($return_var, $output); + + if (empty($error)) { + return array( + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + + /*if (is_readable($item)) { unlink($item); } if (is_readable($item)) { @@ -65,93 +88,194 @@ class FileManager { } return array( 'result' => true - ); + );*/ } - function copyFile($dir, $target_dir, $filename) { - // todo: checks - // todo: vesta method "create file" - if (empty($dir)) { - $dir = $this->ROOT_DIR; - } + function copyFile($item, $dir, $target_dir, $filename) { + $src = $this->formatFullPath($item); + $dst = $this->formatFullPath($target_dir); + + exec (VESTA_CMD . "v-copy-fs-file {$this->user} {$src} {$dst}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); - if (empty($target_dir)) { - $target_dir = $this->ROOT_DIR; - } - copy($dir . '/' . $filename, $target_dir.'/'.$filename); - - if (!is_readable($target_dir . '/' .$filename)) { + if (empty($error)) { return array( - 'result' => false, - 'message' => 'item was not created' + 'result' => true ); } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + } + + + function copyDirectory($item, $dir, $target_dir, $filename) { + $src = $this->formatFullPath($item); + $dst = $this->formatFullPath($target_dir); + + exec (VESTA_CMD . "v-copy-fs-directory {$this->user} {$src} {$dst}", $output, $return_var); + + + $error = self::check_return_code($return_var, $output); - return array( - 'result' => true, - 'bla' => $target_dir.'/'.$filename, - 'bla2' => $dir . '/' . $filename - ); + if (empty($error)) { + return array( + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + } + + static function check_return_code($return_var, $output) { + if ($return_var != 0) { + $error = implode('
', $output); + return $error; + //if (empty($error)) $error = __('Error code:',$return_var); + //$_SESSION['error_msg'] = $error; + } + + return null; } function createFile($dir, $filename) { - // todo: checks - // todo: vesta method "create file" - if (empty($dir)) { - $dir = $this->ROOT_DIR; - } - file_put_contents($dir . '/' . $filename, ''); + $dir = $this->formatFullPath($dir . '/' . $filename); + + exec (VESTA_CMD . "v-add-fs-file {$this->user} {$dir}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); - if (!is_readable($dir . '/' .$filename)) { + if (empty($error)) { return array( - 'result' => false, - 'message' => 'item was not created' + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error ); } - - return array( - 'result' => true - ); } - function renameItem($dir, $item, $target_name) { - if (empty($dir)) { - $dir = $this->ROOT_DIR; - } - if (is_readable($dir . '/' . $item)) { - rename($dir . '/' . $item, $dir . '/' . $target_name); - } - if (!is_readable($dir . '/' .$target_name)) { + function packItem($item, $dir, $target_dir, $filename) { + $item = $this->formatFullPath($item); + $dst_item = $this->formatFullPath($target_dir); +//print VESTA_CMD . "v-add-fs-archive {$this->user} {$item} {$dst_item}";die(); + exec (VESTA_CMD . "v-add-fs-archive {$this->user} {$item} {$dst_item}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); + + if (empty($error)) { return array( - 'result' => false, - 'message' => 'item was not renamed' + 'result' => true ); } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + } + + function unpackItem($item, $dir, $target_dir, $filename) { + $item = $this->formatFullPath($item); + $dst_item = $this->formatFullPath($target_dir); + + exec (VESTA_CMD . "v-extract-fs-archive {$this->user} {$item} {$dst_item}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); - return array( - 'result' => true - ); + if (empty($error)) { + return array( + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + } + + function renameFile($dir, $item, $target_name) { + $item = $this->formatFullPath($dir . '/' . $item); + $dst_item = $this->formatFullPath($dir . '/' . $target_name); + +// var_dump(VESTA_CMD . "v-move-fs-file {$this->user} {$item} {$dst_item}");die(); + + exec (VESTA_CMD . "v-move-fs-file {$this->user} {$item} {$dst_item}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); + + if (empty($error)) { + return array( + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + } + function renameDirectory($dir, $item, $target_name) { + $item = $this->formatFullPath($dir . $item); + $dst_item = $this->formatFullPath($dir . $target_name); + + if ($item == $dst_item) { + return array( + 'result' => true + ); + } + + + exec (VESTA_CMD . "v-move-fs-directory {$this->user} {$item} {$dst_item}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); + + if (empty($error)) { + return array( + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error + ); + } } function createDir($dir, $dirname) { - // todo: checks - // todo: vesta method "create file" - if (empty($dir)) { - $dir = $this->ROOT_DIR; - } + $dir = $this->formatFullPath($dir . '/' . $dirname); - mkdir($dir . '/' . $dirname); + exec (VESTA_CMD . "v-add-fs-directory {$this->user} {$dir}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); - if (!is_readable($dir . '/' .$dirname)) { + if (empty($error)) { return array( - 'result' => false, - 'message' => 'item was not created' + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error ); } - - return array( - 'result' => true - ); } function getDirectoryListing($dir = '') { diff --git a/web/images/flat_icons.png b/web/images/flat_icons.png index 631f3b3c55405a9eeb6ba8f83c7260dd704afe3d..3b10800029ccd1df931a5fe3a5f5cd978cd45cf8 100644 GIT binary patch literal 12399 zcmaL81yodD)INOa?naPMq@|=&7*J4Bx|^Xvx2m7D2kCOOOU>7~;G9 z{%d{T`(Nu_--SEeb?%*W_T6XieV+a7L!_F@D*{|vTmS$F6kkI$000F6p48ZwU<@+403B&rbG)q0DoK zw+%hEs&wf!Tm@>=xM4}$wIa{v`^*f|-wm_pTk+X8j5@LppgD$!yv$)*ONJ-4o|P61mTuLGll z#v_?1SVw7lw$XL{fbOD%V}aFXF92@lO-~qJl#`PaUPeqZMvjZ9Flay|Y6yj)*-IER zK?dOjk321#RpDlhVZ@2+L!1Q;I^?~rX5H{S!^DV)XRa>b2#HvsorFN0t;B*w&Fs!E zglE0eVv~&0>=(<3K07-HhlQ@G$OtGY=FD`30TnfTl|oiz!U&!)Uc?qPSg!OVU#iYw zq0#l7&<{jSO^xBqS<}(8U)~gE$qD0bKUtD3D>x(rZ@d!|s#TO|F66?AyPm+dz6v`p z1-7+B6t9GG8ru4dm)n{9I0_j!7A7XA1dz&3+E~1^wz0AKo>0x+qUW*TlBnT{!=$f` zFtpXD@ZS6Vjh4MYJd9)Z3Cv|AOFBr{#2RAxj3xOKMrfyJyeuAIxVo{SoRy!jUr|w^ zWgRn%$J3%_MGa@AqgB*`t=_tE^R!*A3GlQW$@blfdhY4gB#ehn3hhrTu}l7lp|{^0 z{1}1D-}s;gN|}tG(G_?+!rWk2g4P#`*kk6_1uU@seA;pfS#L3M@j(H6ZZAx;18Z** z^_Q5*X4D4~hE9HzO`2(nUlqcW%&0Rh%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ajZ%ZDmm_umVA2*}5FHD?-N_p_J0Y1o$`!GIw1}0_jg763Ao*>j$#wmtj32 z>{jMW9aw;Ba1!1ybywu}TG`2Bt%SqJ9o*8D)K@Qyd-JI|nJT+MEi z-x9As+*;6rveYdb|H$s|eKzq|w5H z{UHF&Wlm^jN*Lq;59L&5U+q&+0{{l5t)zGqZ+tb`rXg=7=u=#zgiL>;CQP_%bcU^q zqc$?`UJ;H-z5te(C22 zK$n<5837hA_~$z;)wrE?D{g@X2U@~^^S`_~X22?hH?0>g`SO%lAM<%;`u*LI5c77U zBY0Btk=_vpCs-n3{QTm-!u$VjYuT^$INEGn(di!oRD(~v?B#pf1GQEZBm>u8EGZO) zAHujebu`QXAj%n(I659S*5n%!Ks?s$16LIiw5_I3<|R0ob0E7wu(!TN2Z>ZPmy`bP z0i!;TY;Q=urM79gX8jLLJnkET{}e)ajAM6wi6P|KS7D+z_ra6iXQE;}sF`=KTCONT zi`XEXmG~N+&J8qrucV(Mhn;=`^6Gcoy4?37X(q zz^s+L-PI+6KMHB)%Sr&`1(!f9WKhCG!69wGYB+D@{|^XRS^i>(%>ZA)BV6(zg#CVS z$>vcLba;8QZ+b~%{ZH2|k#5Or8<+qfPzdlR?#2aWuPE)2Ka!*D6Rd;bM3+Wf$pK+G zbBA)p1n=73ej)>Is@)H`N~4YwDMF0MPxEpGe3o~Y!E0|{{HI{};JhFdnVZb%=gr{j zL$xtwWPuP2H#u#Q;ij>avy6;E(?cr||0i diff --git a/web/images/in_progress.gif b/web/images/in_progress.gif new file mode 100644 index 0000000000000000000000000000000000000000..d6819abfb34a3db6ebce765603d607b14e33651e GIT binary patch literal 404 zcmZ?wbhEHb)Mnsj_{hLuWnl3C|Nog&rT|IBe^Smxsfi`2DGKG8B^e5dS&0=n`H3ld znR#jX42nNl7`PZ17!?0=`?-b$J39ur8tEA@GXjNlfS3VfAOn+8OCQJSX*X{)e?H13 zeJ||u>DC8kZ4r?R)6{G4&Dyt|CtcU`diyE8Uq?3owA-;j!N^AxXd>8TMr31bj{uEP z;7?56IIHFOnwrlu67PNQNtrQY{;7pt&RzvNJJ_?&Ze06Pg>MsMs)$s6#HZT6Q+}5p z&C*E81%TGdiiN4(8Lw%U?wsno9F=b>WnG7*rn?>{@R)9v%+M)yIi1FiTcrX vD}VECG@HG3ZvWp+k0+)$$G&~0?NxTdRajt8g3>tw(O*m=3=Gzwa03GX(6yK< literal 0 HcmV?d00001 diff --git a/web/js/app.js b/web/js/app.js index f75ee7806..1a3f18198 100644 --- a/web/js/app.js +++ b/web/js/app.js @@ -800,6 +800,38 @@ App.Ajax.request = function(method, data, callback, onError){ }*/ //App.Helpers.setAjaxBusy(method, data); data = data || {}; + + var prgs = $('.progress-container'); + + switch (method) { + case 'cd': + prgs.find('title').text('Opening dir'); + prgs.show(); + break; + case 'delete_files': + prgs.find('title').text('Deleting'); + prgs.show(); + break; + case 'unpack_item': + prgs.find('title').text('Unpacking'); + prgs.show(); + break; + case 'create_file': + prgs.find('title').text('Creating file'); + prgs.show(); + break; + case 'create_dir': + prgs.find('title').text('Creating directory'); + prgs.show(); + break; + case 'rename_file': + prgs.find('title').text('Renaming file'); + prgs.show(); + break; + default: + + break; + } jQuery.ajax({ url: GLOBAL.ajax_url, @@ -816,6 +848,7 @@ App.Ajax.request = function(method, data, callback, onError){ cache: false, error: function(jqXHR, textStatus, errorThrown) { + prgs.hide(); onError && onError(); if ('undefined' != typeof onError) { fb.error(textStatus); @@ -824,9 +857,11 @@ App.Ajax.request = function(method, data, callback, onError){ complete: function() { //App.Helpers.setAjaxFree(method, data); + prgs.hide(); }, success: function(reply) { + prgs.hide(); //App.Helpers.setAjaxFree(method, data); try { callback && callback(reply); diff --git a/web/js/file_manager.js b/web/js/file_manager.js index c355a7d06..361f111de 100644 --- a/web/js/file_manager.js +++ b/web/js/file_manager.js @@ -1,9 +1,13 @@ var FM = {}; +FM.Env = {}; + GLOBAL.ajax_url = '/file_manager/fm_api.php'; FM.DIR_MARKER = '  /'; +FM.errorMessageTimeout = 3500; + FM.CURRENT_TAB = ''; FM.CURRENT_A_LINE = -1; FM.CURRENT_B_LINE = -1; @@ -32,13 +36,45 @@ FM.IMAGES = {'A':[], 'B': []}; FM.IMG_FILETYPES = 'png, jpg, jpeg, gif'; +FM.SUPPORTED_ARCHIEVES = [ + 'zip', 'tgz', 'tar.gz', + 'gzip', 'tbz', 'tar.bz', + 'gz', 'zip', 'tar', 'rar' +]; + +FM.EDITABLE_FILETYPES = [ + 'txt', 'php', 'js', 'html' +]; + +FM.preselectedItems = {'A': [], 'B': []}; + FM.directoryNotAvailable = function(reply) { alert('Directory not available'); // todo: translate } FM.showError = function(type, message) { - alert(message); + if (FM.isPopupOpened()) { + var ref = FM.getPopupReference(); + if (ref.find('.warning-message').length > 0) { + ref.find('.warning-message').html('

' + message + '

'); + ref.find('.warning-message').show(); + + clearInterval(FM.Env.errorMessageHideTimeout); + FM.Env.errorMessageHideTimeout = + setTimeout(function() { + ref.find('.warning-message').fadeOut(); + }, FM.errorMessageTimeout); + return; + } + } + else { + FM.popupClose(); + var tpl = Tpl.get('popup_alert', 'FM'); + tpl.set(':TEXT', message); + + FM.popupOpen(tpl.finalize()); + } } FM.formatPath = function(dir) { @@ -95,8 +131,8 @@ FM.setActive = function(index, box) { //console.log(pos); var wwh = w_height - w_offset + pos.top; //console.info(wwh); - console.info((pos.top + w_offset) + ' > ' + w_height); - console.log((pos.top + w_offset) > w_height); + //console.info((pos.top + w_offset) + ' > ' + w_height); + //console.log((pos.top + w_offset) > w_height); /* if (pos.top > w_height) { var cur_elm = $(box).find('li.selected').position(); var cur_elm_height = $(box).find('li.selected').height(); @@ -114,6 +150,10 @@ FM.setActive = function(index, box) { FM['CURRENT_' + tab + '_LINE'] = index; FM.CURRENT_TAB = box; + + $(FM.preselectedItems[tab]).each(function(i, index) { + $(box).find('.dir:eq(' + index + ')').addClass('selected'); + }); } FM.setSecondInactive = function(index, box) { @@ -156,7 +196,8 @@ FM.open = function(dir, box, callback) { 'dir': dir }; App.Ajax.request('cd', params, function(reply) { - if (reply.result) { + FM.preselectedItems[tab] = []; + if (reply.result == true) { var html = FM.generate_listing(reply.listing, box); } else { @@ -167,10 +208,31 @@ FM.open = function(dir, box, callback) { var current_pwd = dir.trim() == '' ? FM.ROOT_DIR : dir; - $('.pwd-tab-' + tab).html(current_pwd); + FM.updateTopLevelPathBar(box, tab, current_pwd); + + + var path_a = FM['TAB_A_CURRENT_PATH'] == '' ? FM.ROOT_DIR : FM['TAB_A_CURRENT_PATH']; + var path_b = FM['TAB_B_CURRENT_PATH'] == '' ? FM.ROOT_DIR : FM['TAB_B_CURRENT_PATH']; + var url = '/list/directory/?dir_a='+path_a+'&dir_b='+path_b; + history.pushState({}, null, url); + + }); +} + +FM.updateTopLevelPathBar = function(box, tab, path) { + console.log(path); + var formattedPath = []; + path = path.replace(FM.ROOT_DIR, ''); + formattedPath.push('
'+FM.ROOT_DIR+''); + + $.each(path.split('/'), function(i, part) { + if (part.trim() == '') { + return; + } + formattedPath.push(''+part+''); }); - + $('.pwd-tab-' + tab).html(formattedPath.join('/')); } FM.isItemFile = function(item) { @@ -302,28 +364,58 @@ FM.sortItems = function(items, box) { return sorted; } +FM.isFileEditable = function(src) { + if ('undefined' == typeof src.filetype) { + return false; + } + + if ($.inArray(src.filetype, FM.EDITABLE_FILETYPES) != -1) { + return true; + } + + return false; +} + +FM.editFileFromSubcontext = function(elm) { + var elm = $(elm).hasClass('dir') ? $(elm) : $(elm).closest('.dir'); + var src = $.parseJSON($(elm).find('.source').val()); + + var myWindow = window.open('/edit/file/?path=' + src.full_path, '_blank');//, src.full_path, "width=900, height=700"); +} + +FM.downloadFileFromSubcontext = function(elm) { + var elm = $(elm).hasClass('dir') ? $(elm) : $(elm).closest('.dir'); + var src = $.parseJSON($(elm).find('.source').val()); + + var path = src.full_path; + var win = window.open('/download/file/?path=' + path, '_blank'); + win.focus(); +} + FM.openFile = function(dir, box, elm) { var tab = FM.getTabLetter(box); FM['TAB_'+tab+'_CURRENT_PATH'] = dir; + + var elm = $(elm).hasClass('dir') ? $(elm) : $(elm).closest('.dir'); var src = $.parseJSON($(elm).find('.source').val()); + console.log(elm); + if (FM.isItemPseudo(src)) { + FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]); + } + + if (FM.isFileEditable(src)) { + var myWindow = window.open('/edit/file/?path=' + src.full_path, '_blank');//, src.full_path, "width=900, height=700"); + } + else { + var path = src.full_path; + var win = window.open('/download/file/?path=' + path, '_blank'); + win.focus(); + } + - var myWindow = window.open('/edit/file/?path=' + src.full_path, '_blank');//, src.full_path, "width=900, height=700"); - /*var params = { - 'dir': dir - }; - App.Ajax.request('open_file', params, function(reply) { - if (reply.result) { - - //var html = FM.generate_listing(reply.listing, box); - } - else { - //FM.directoryNotAvailable(reply); - alert('Cannot open file'); - } - });*/ } FM.getTabLetter = function(box) { @@ -335,6 +427,10 @@ FM.getTabLetter = function(box) { return tab; } +FM.toggleSubContextMenu = function(ref) { + $(ref).find('.subcontext-menu').toggleClass('subcontext-menu-hidden'); +} + FM.generate_listing = function(reply, box) { var tab = FM.getTabLetter(box); FM.IMAGES[tab] = []; @@ -361,9 +457,12 @@ FM.generate_listing = function(reply, box) { } reply = FM.sortItems(reply, box); + $(reply).each(function(i, o) { var path = FM.formatPath(FM['TAB_'+tab+'_CURRENT_PATH']+'/'+o.name); var cl_act = o.type == 'd' ? 'onClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"'; + //var cl_act = o.type == 'd' ? 'onDblClick="FM.open(\'' + path + '\', \'' + box + '\')"' : 'onDblClick="FM.openFile(\''+path+'\', \'' + box + '\', this)"'; + //var cl_act = ''; if (o.name == '') { path = FM.formatPath(back_path); @@ -382,14 +481,17 @@ FM.generate_listing = function(reply, box) { var time = o.time.split('.'); time = time[0]; + var psDate = new Date(o.date); + o.full_path = path; - o.filetype = FM.getFileType(o.name); - if(FM.IMG_FILETYPES.indexOf(o.filetype) >= 0 && o.filetype.length > 0) { - FM.IMAGES[tab][FM.IMAGES[tab].length] = {'img': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'thumb': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'id': 'img-'+i}; - cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"'; - } - + o.filetype = FM.getFileType(o.name); + if(FM.IMG_FILETYPES.indexOf(o.filetype) >= 0 && o.filetype.length > 0) { + FM.IMAGES[tab][FM.IMAGES[tab].length] = {'img': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'thumb': "/view/file/?path=/home/admin/"+o.name+"&raw=true", 'id': 'img-'+i}; + cl_act = 'onClick="FM.fotoramaOpen(\'' + tab + '\', \'img-' + i +'\')"'; + } + + var t_index = tab + '_' + i; var tpl = Tpl.get('entry_line', 'FM'); tpl.set(':CL_ACTION_1', cl_act); @@ -397,9 +499,21 @@ FM.generate_listing = function(reply, box) { tpl.set(':NAME', o.name); tpl.set(':PERMISSIONS', o.permissions); tpl.set(':OWNER', o.owner); - tpl.set(':SIZE', o.size); - tpl.set(':TIME', time); - tpl.set(':DATE', o.date); + tpl.set(':SIZE_VALUE', o.type == 'f' ? FM.humanFileSizeValue(o.size) : ' '); + tpl.set(':SIZE_UNIT', o.type == 'f' ? FM.humanFileSizeUnit(o.size) : ' '); + tpl.set(':TIME', (psDate.getFullYear() != new Date().getFullYear()) ? psDate.getFullYear() || "" : time); + tpl.set(':DATE', o.date.trim() != '' ? psDate.format('mmm d') : ' '/*o.date*/); + + + if (o.name == '..' || o.type == 'd') { + tpl.set(':SUBMENU_CLASS', 'hidden'); + } + else { + tpl.set(':SUBMENU_CLASS', ''); + } + /*tpl.set(':index', t_index); + tpl.set(':index1', t_index); + tpl.set(':index2', t_index);*/ if (FM.isItemDir(o)) { tpl.set(':ITEM_TYPE', 'filetype-dir'); @@ -416,17 +530,25 @@ FM.generate_listing = function(reply, box) { FM['CURRENT_'+tab+'_LINE'] = -1; } +FM.toggleCheck = function(uid) { + var ref = $('#check' + uid); + if (ref.length > 0) { + //ref.attr('checked', true); + $(ref).hasClass('checkbox-selected') ? $(ref).addClass('checkbox-selected') : $(ref).removeClass('checkbox-selected'); + } +} + FM.fotoramaOpen = function(tab, img_index) { console.log('index: ' + img_index); $('.fotorama').fotorama({ - nav: 'thumbs', - arrows: true, - click: true, - allowfullscreen: true, - fit: 'scaledown', - thumbfit: 'scaledown', - data: FM.IMAGES[tab] + nav: 'thumbs', + arrows: true, + click: true, + allowfullscreen: true, + fit: 'scaledown', + thumbfit: 'scaledown', + data: FM.IMAGES[tab] }); $('.fotorama').on('fotorama:fullscreenexit', function (e, fotorama) { @@ -437,21 +559,300 @@ FM.fotoramaOpen = function(tab, img_index) { $('.fotorama').fotorama().data('fotorama').show(img_index); } -FM.selectItem = function(item, box) { +FM.bulkOperation = function(ref) { + //console.log(ref); + var box = $(ref).parents('.menu').hasClass('menu-left') ? FM.setTabActive(FM.TAB_A, 'skip_highlights') : FM.setTabActive(FM.TAB_B, 'skip_highlights'); - if (FM.CURRENT_TAB == FM.TAB_A) { - FM.setTabActive(FM.TAB_B); - $(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive'); - $(FM.TAB_A).find('.selected').addClass('selected-inactive'); + var operation = $(ref).val(); + if ('function' == typeof FM[operation]) { + FM[operation] && FM[operation](ref); + } + + $(ref).find('option[value=-1]').attr('selected', true); +} + +FM.checkBulkStatus = function(bulkStatuses, acc) { + var status = false; + var msg = ''; + if (bulkStatuses.length == acc.length) { + $.each(bulkStatuses, function(i, o) { + if (o != true) { + msg += '

'+o+'

'; + } + }); + + if (msg == '') { + status = true; + } + } + + if (status == true) { + $('#popup .results').html(msg); + $('.controls p').replaceWith('

close

'); } else { - FM.setTabActive(FM.TAB_A); + $('#popup .results').html(msg); + $('.controls p').replaceWith('

close

'); + } +} + +FM.bulkPopupClose = function() { + FM.popupClose(); + FM.open(FM['TAB_A_CURRENT_PATH'], FM['TAB_A']); + FM.open(FM['TAB_B_CURRENT_PATH'], FM['TAB_B']); +} + +FM.humanFileSize = function(size) { + var sizes = [' Bytes', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB']; + for (var i = 1; i < sizes.length; i++) { + if (size < Math.pow(1024, i)) return (Math.round((size/Math.pow(1024, i-1))*100)/100) + sizes[i-1]; + } + return size; +} + +FM.humanFileSizeValue = function(size) { + var sizes = ['b', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + for (var i = 1; i < sizes.length; i++) { + if (size < Math.pow(1024, i)) return (Math.round((size/Math.pow(1024, i-1))*100)/100); + } + return size; +} + +FM.humanFileSizeUnit = function(size) { + if (!parseInt(size)) return " "; + + var sizes = ['b', ' kb', ' Mb', ' Gb', ' Tb', ' Pb', ' Eb', ' Zb', ' Yb']; + for (var i = 1; i < sizes.length; i++) { + if (size < Math.pow(1024, i)) return sizes[i-1]; + } + return sizes[i]; +} + + +FM.bulkCopy = function() { + var acc = $(FM.CURRENT_TAB).find('.dir.selected'); + if (acc.length > 0) { + //FM.popupClose(); + + var cfr_html = ''; + + $.each(acc, function(i, o) { + var ref = $(o).parents('.dir'); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (!FM.isItemPseudo(o)) { + cfr_html += '
'+src.name+'
'; + } + }); + + var tpl = Tpl.get('popup_bulk', 'FM'); + tpl.set(':ACTION', 'YOU ARE COPYING'); + tpl.set(':TEXT', cfr_html); + + FM.popupOpen(tpl.finalize()); + + var bulkStatuses = []; + $.each(acc, function(i, o) { + var ref = $(o).parents('.dir'); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + /*if (!FM.isItemPseudo(o)) { + cfr_html += '
'+src.name+'
'; + }*/ + var tab = FM.getTabLetter(FM.CURRENT_TAB); + + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ]; + if (dest == '') { + dest = GLOBAL.ROOT_DIR; + } + + var action = FM.isItemFile(src) ? 'copy_file' : 'copy_directory'; + + var params = { + item: src.full_path, + filename: src.name, + dir: FM['TAB_' + tab + '_CURRENT_PATH'], + dir_target: dest + }; + + App.Ajax.request(action, params, function(reply) { + if (reply.result == true) { + bulkStatuses.push(true); + } + else { + //FM.showError('copy-items', reply.message); + bulkStatuses.push(reply.message); + } + + FM.checkBulkStatus(bulkStatuses, acc); + }); + }); + + } +} + +FM.bulkRemove = function() { + var acc = $(FM.CURRENT_TAB).find('.dir.selected'); + if (acc.length > 0) { + //FM.popupClose(); + + var cfr_html = ''; + + $.each(acc, function(i, o) { + var ref = $(o).parents('.dir'); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + if (!FM.isItemPseudo(o)) { + cfr_html += '
'+src.name+'
'; + } + }); + + var tpl = Tpl.get('popup_bulk', 'FM'); + tpl.set(':ACTION', 'YOU ARE REMOVING'); + tpl.set(':TEXT', cfr_html); + + FM.popupOpen(tpl.finalize()); + + var bulkStatuses = []; + $.each(acc, function(i, o) { + var ref = $(o).parents('.dir'); + var src = $(ref).find('.source').val(); + src = $.parseJSON(src); + + /*if (!FM.isItemPseudo(o)) { + cfr_html += '
'+src.name+'
'; + }*/ + var tab = FM.getTabLetter(FM.CURRENT_TAB); + + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var dest = FM['TAB_' + opposite_tab + '_CURRENT_PATH' ]; + if (dest == '') { + dest = GLOBAL.ROOT_DIR; + } + + var params = { + item: src.full_path, + dir: FM['TAB_' + tab + '_CURRENT_PATH'] + }; + + App.Ajax.request('delete_files', params, function(reply) { + if (reply.result == true) { + bulkStatuses.push(true); + } + else { + //FM.showError('copy-items', reply.message); + bulkStatuses.push(reply.message); + } + + FM.checkBulkStatus(bulkStatuses, acc); + }); + }); + + } +} + +FM.toggleAllItemsSelected = function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + var dir_items = $(FM['TAB_' + tab] ).find('.dir'); + if (selected.length == dir_items.length) { + $(box).find('.dir').removeClass('selected'); + var index = FM['CURRENT_' + tab + '_LINE']; + $(box).find('.dir:eq(' + index + ')').addClass('selected'); + } + else { + $(box).find('.dir').addClass('selected'); + } +} + +FM.selectCurrentElementAndGoToNext = function () { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + + var index = FM['CURRENT_' + tab + '_LINE']; + + if ($.inArray(index, FM.preselectedItems[tab]) != -1) { + FM.preselectedItems[tab] = $.grep(FM.preselectedItems[tab], function(i) { + return i != index; + }); + + $(box).find('.dir:eq(' + index + ')').removeClass('selected'); + //FM.preselectedItems[tab].push(index); + } + else { + $(box).find('.dir:eq(' + index + ')').addClass('selected'); + FM.preselectedItems[tab].push(index); + } + + FM.goDown(); +} + +FM.selectItem = function(item, box) { + //console.log(item); + /*if ($(item).hasClass('ch-toggle')) { + if ($(item).parents('.dir').prev('.dir').length == 0) { + var checked = $(item).parents('.dir').find('.ch-toggle').is(':checked'); + $(item).parents('.listing').find('.ch-toggle').prop('checked', checked); + } + + return; + }*/ + + + + if (FM.CURRENT_TAB == FM.TAB_A) { + FM.setTabActive(FM.TAB_B, 'skip_highlights'); + $(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive'); + // tmp + //$(FM.TAB_A).find('.selected-inactive').removeClass('selected-inactive'); + $(FM.TAB_B).find('.selected').removeClass('selected'); + + //$(FM.TAB_A).find('.selected').addClass('selected-inactive'); + $(FM.TAB_B).find('.selected').addClass('selected-inactive').removeClass('selected'); + } + else { + FM.setTabActive(FM.TAB_A, 'skip_highlights'); $(FM.TAB_A).find('.selected-inactive').removeClass('selected-inactive'); - $(FM.TAB_B).find('.selected').addClass('selected-inactive'); + //$(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive'); + //$(FM.TAB_B).find('.selected').addClass('selected-inactive'); + $(FM.TAB_A).find('.selected').removeClass('selected'); + + $(FM.TAB_A).find('.selected').addClass('selected-inactive').removeClass('selected'); } $(box).find('.active').removeClass('active'); $(box).find('.selected').removeClass('selected'); + + // + // tmp + //$(FM.TAB_A).find('.selected-inactive').removeClass('selected-inactive'); + //$(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive'); + /*if ($(item).hasClass('active')) { $(item).removeClass('active'); } @@ -465,10 +866,115 @@ FM.selectItem = function(item, box) { $(item).addClass('selected'); } + + FM.setTabActive(box); + + var item = $(item).hasClass('dir') ? item : $(item).parents('.dir'); + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var src = $(item).find('.source').val(); + src = $.parseJSON(src); + var tab = FM.getTabLetter(FM.CURRENT_TAB); + if (FM.itemIsArchieve(src)) { + $('.menu-'+tab+' .extract-btn').show(); + } + else { + $('.menu-'+tab+' .extract-btn').hide(); + } + } +FM.isItemPseudo = function(item) { + if (item.name == '.' || item.name == '..') { + return true; + } + return false; +} + +FM.itemIsArchieve = function(item) { + + if ($.inArray(item.filetype, FM.SUPPORTED_ARCHIEVES) != -1) { + return true; + } + + return false; +} + +FM.unpackItem = function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + if (selected.length == 0) { + return alert('No file selected'); + } + + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_SELECTED + ); + } + + if (!FM.itemIsArchieve(src)) { + return FM.displayError( + App.Constants.FM_FILE_TYPE_NOT_SUPPORTED + ); + } + + var dst = FM['TAB_' + tab + '_CURRENT_PATH']; + if (dst == '') { + dst = GLOBAL.ROOT_DIR; + } + + var tpl = Tpl.get('popup_unpack', 'FM'); + tpl.set(':FILENAME', src.name); + tpl.set(':DST_DIRNAME', dst + '/' + src.name + '_extracted'); + FM.popupOpen(tpl.finalize()); +} + +FM.packItem = function() { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + if (selected.length == 0) { + return FM.displayError( + App.Constants.FM_NO_FILE_SELECTED + ); + } + + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + + var dst = FM['TAB_' + tab + '_CURRENT_PATH']; + if (dst == '') { + dst = GLOBAL.ROOT_DIR; + } + + var tpl = Tpl.get('popup_pack', 'FM'); + tpl.set(':FILENAME', src.name); + tpl.set(':DST_DIRNAME', dst + '/' + src.name + '_packed.tar.gz'); + FM.popupOpen(tpl.finalize()); +} + + FM.switchTab = function() { if (FM.CURRENT_TAB == FM.TAB_A) { @@ -489,13 +995,24 @@ FM.switchTab = function() { } } -FM.setTabActive = function(box) { +FM.setTabActive = function(box, action) { FM.CURRENT_TAB = box; $('.window.active').removeClass('active'); $('.listing-left.active').removeClass('active'); $('.listing-right.active').removeClass('active'); $(FM.CURRENT_TAB).addClass('active'); $(FM.CURRENT_TAB).closest('.window').addClass('active'); + + if (action == 'skip_highlights') { + return true; + } + + if (FM.CURRENT_TAB == FM.TAB_A) { + $(FM.TAB_B).find('.selected').addClass('selected-inactive').removeClass('selected'); + } + else { + $(FM.TAB_A).find('.selected').addClass('selected-inactive').removeClass('selected'); + } } FM.confirmRename = function() { @@ -503,7 +1020,9 @@ FM.confirmRename = function() { var box = FM['TAB_' + tab]; var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); if (!selected) { - return alert('No file selected'); + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); } var src = selected.find('.source').val(); @@ -512,23 +1031,27 @@ FM.confirmRename = function() { var target_name = $('#rename-title').val(); if (target_name.trim().length == 0) { - return alert('Cannot be renamed.'); + return FM.displayError( + App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY + ); } + + var action = FM.isItemFile(src) ? 'rename_file' : 'rename_directory'; var params = { item: src.name, target_name: target_name, - dir: FM['TAB_' + tab + '_CURRENT_PATH'] + dir: FM['TAB_' + tab + '_CURRENT_PATH'] + '/' }; - App.Ajax.request('rename_file', params, function(reply) { - if (reply.result) { + App.Ajax.request(action, params, function(reply) { + if (reply.result == true) { + FM.popupClose(); FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); } else { FM.showError('rename-items', reply.message); } - FM.popupClose(); }); } @@ -536,44 +1059,189 @@ FM.renameItems = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); if (selected.length == 0) { - return alert('No file selected'); + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); } var src = selected.find('.source').val(); src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } var tpl = Tpl.get('popup_rename', 'FM'); tpl.set(':FILENAME', src.name); + tpl.set(':NEW_NAME', src.name); FM.popupOpen(tpl.finalize()); - /*var tab = FM.getTabLetter(FM.CURRENT_TAB); - var box = FM.CURRENT_TAB; - - var delete_list = $(box).find('.active'); - if (delete_list.length == 0) { - return FM.showError('hint', 'No selected items'); - } - - $(delete_list).each(function(i, o) { - var opt = $(o).find('.source').val(); - opt = $.parseJSON(opt); - prompt('Rename "' + opt.name + '" to:'); - });*/ } FM.popupOpen = function(html) { - $('
').attr('id', 'popup').html(html).flayer(); + $('
').attr('id', 'popup').html(html).flayer({ + afterStart: function(elm) { + elm.find('input[type="text"]:first').focus(); + } + }); } FM.popupClose = function() { + clearTimeout(FM.Env.errorMessageHideTimeout); return $('#popup').flayer_close(); } FM.copyItems = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + if (selected.length == 0) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + if (selected.length > 1) { // multi operation + return FM.bulkCopy(); + } + + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + var dst = FM['TAB_' + opposite_tab + '_CURRENT_PATH']; + if (dst == '') { + dst = GLOBAL.ROOT_DIR; + } + + var tpl = Tpl.get('popup_copy', 'FM'); + tpl.set(':SRC_FILENAME', src.full_path); + tpl.set(':DST_FILENAME', dst + '/' + src.name); + FM.popupOpen(tpl.finalize()); +} + +FM.confirmUnpackItem = function () { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + if (selected.length == 0) { + return FM.displayError( + App.Constants.FM_NO_FILE_SELECTED + ); + } + + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_SELECTED + ); + } + + if (!FM.itemIsArchieve(src)) { + return FM.displayError( + App.Constants.FM_FILE_TYPE_NOT_SUPPORTED + ); + } + + var dst = FM['TAB_' + tab + '_CURRENT_PATH']; + if (dst == '') { + dst = GLOBAL.ROOT_DIR; + } + + var params = { + item: src.full_path, + filename: src.name, + dir: FM['TAB_' + tab + '_CURRENT_PATH'], + dir_target: $('#unpack-destination').val() + }; + + App.Ajax.request('unpack_item', params, function(reply) { + if (reply.result == true) { + FM.popupClose(); + FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]); + FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); + } + else { + FM.showError('unpack_item', reply.message); + } + }); +} + +FM.confirmPackItem = function () { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + if (selected.length == 0) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + var src = selected.find('.source').val(); + src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var dst = FM['TAB_' + tab + '_CURRENT_PATH']; + if (dst == '') { + dst = GLOBAL.ROOT_DIR; + } + + var params = { + item: src.full_path, + filename: src.name, + dir: FM['TAB_' + tab + '_CURRENT_PATH'], + dir_target: $('#pack-destination').val() + }; + + + App.Ajax.request('pack_item', params, function(reply) { + if (reply.result == true) { + FM.popupClose(); + FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]); + FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); + } + else { + FM.showError('unpack_item', reply.message); + } + }); +} + +FM.confirmCopyItems = function () { + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); if (!selected) { - return alert('No file selected'); + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); } var opposite_tab = 'A'; @@ -583,24 +1251,36 @@ FM.copyItems = function() { var src = selected.find('.source').val(); src = $.parseJSON(src); - console.log(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } + + var dest = $('#copy_dest').val(); + if (dest == '') { + dest = GLOBAL.ROOT_DIR; + } + + var action = FM.isItemFile(src) ? 'copy_file' : 'copy_directory'; var params = { item: src.full_path, filename: src.name, dir: FM['TAB_' + tab + '_CURRENT_PATH'], - dir_target: FM['TAB_' + opposite_tab + '_CURRENT_PATH'] + dir_target: dest }; - App.Ajax.request('copy_files', params, function(reply) { - if (reply.result) { + App.Ajax.request(action, params, function(reply) { + if (reply.result == true) { + FM.popupClose(); FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]); FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); } else { - FM.showError('delete-items', reply.message); + FM.showError('copy-items', reply.message); } - //FM.popupClose(); }); } @@ -608,14 +1288,24 @@ FM.downloadFiles = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); if (!selected) { - return alert('No file selected'); + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); } var src = selected.find('.source').val(); src = $.parseJSON(src); - - if (src.type != 'f') { - return alert('Only files can be dosnloaded in this version'); + + if (FM.isItemPseudo(src) || FM.isItemDir(src)) { + alert('Folder downloads are in progress atm'); + } + + if (FM.isItemPseudo(src)) { + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } } var path = src.full_path; @@ -633,11 +1323,19 @@ FM.confirmDelete = function() { var box = FM['TAB_' + tab]; var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); if (!selected) { - return alert('No file selected'); + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); } var src = selected.find('.source').val(); src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } var params = { item: src.full_path, @@ -645,13 +1343,13 @@ FM.confirmDelete = function() { }; App.Ajax.request('delete_files', params, function(reply) { - if (reply.result) { + if (reply.result == true) { + FM.popupClose(); FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); } else { FM.showError('delete-items', reply.message); } - FM.popupClose(); }); } @@ -659,62 +1357,66 @@ FM.deleteItems = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); if (selected.length == 0) { - return alert('No file selected'); + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); } + if (selected.length > 1) { // multi operation + return FM.bulkRemove(); + } + + + var src = selected.find('.source').val(); src = $.parseJSON(src); + + if (FM.isItemPseudo(src)) { + return FM.displayError( + App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED + ); + } var tpl = Tpl.get('popup_delete', 'FM'); tpl.set(':FILENAME', src.name); FM.popupOpen(tpl.finalize()); - - - /*var tab = FM.getTabLetter(FM.CURRENT_TAB); - var confirmed = confirm(App.i18n.ARE_YOU_SURE); - var box = FM.CURRENT_TAB; - - var delete_list = $(box).find('.selected'); - if (delete_list.length == 0) { - return FM.showError('hint', 'No selected items'); - } - - var params = { - items: [], - dir: FM['TAB_' + tab + '_CURRENT_PATH'] - }; - $(delete_list).each(function(i, opt){ - var opt = $(o).find('.source').val(); - opt = $.parseJSON(opt); - params.items.push(opt.name); - }); - - App.Ajax.request('delete_files', params, function(reply) { - if (reply.result) { - FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); - } - else { - FM.showError('delete-items', reply.message); - } - });*/ } +FM.displayError = function(msg) { + if (FM.isPopupOpened()) { + var ref = FM.getPopupReference(); + if (ref.find('.warning-message').length > 0) { + ref.find('.warning-message').html('

' + msg + '

'); + ref.find('.warning-message').show(); + + clearInterval(FM.Env.errorMessageHideTimeout); + FM.Env.errorMessageHideTimeout = + setTimeout(function() { + ref.find('.warning-message').fadeOut(); + }, FM.errorMessageTimeout); + return; + } + } + + FM.popupClose(); + var tpl = Tpl.get('popup_alert', 'FM'); + tpl.set(':TEXT', msg); + + FM.popupOpen(tpl.finalize()); + //return alert(msg); +} + FM.confirmCreateDir = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; - /*var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); - if (!selected) { - return alert('No file selected'); - } - - var src = selected.find('.source').val(); - src = $.parseJSON(src);*/ var dirname = $('#rename-title').val(); if (dirname.trim().length == 0) { - return alert('Cannot be created.'); + return FM.displayError( + App.Constants.FM_DIRECTORY_NAME_CANNOT_BE_EMPTY + ); } var params = { @@ -723,13 +1425,13 @@ FM.confirmCreateDir = function() { }; App.Ajax.request('create_dir', params, function(reply) { - if (reply.result) { + if (reply.result == true) { + FM.popupClose(); FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); } else { - FM.showError('create-file', reply.message); + FM.showError('create-dir', reply.message); } - FM.popupClose(); }); } @@ -738,44 +1440,18 @@ FM.createDir = function() { var tpl = Tpl.get('popup_create_dir', 'FM'); FM.popupOpen(tpl.finalize()); - /*var dirname = prompt('Enter dir name:'); - if (dirname.trim() != '') { - - var box = FM.CURRENT_TAB; - var tab = FM.getTabLetter(box); - var params = { - 'dirname': dirname, - 'dir': FM['TAB_' + tab + '_CURRENT_PATH'] - }; - App.Ajax.request('create_dir', params, function(reply) { - if (reply.result) { - FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); - } - else { - FM.showError('create-dir', reply.message); - } - }); - } - else { - FM.showError('dirname-empty', 'Dirname cannot be empty'); - }*/ } FM.confirmCreateFile = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; - /*var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); - if (!selected) { - return alert('No file selected'); - } - - var src = selected.find('.source').val(); - src = $.parseJSON(src);*/ var filename = $('#rename-title').val(); if (filename.trim().length == 0) { - return alert('Cannot be created.'); + return FM.displayError( + App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY + ); } var params = { @@ -784,13 +1460,13 @@ FM.confirmCreateFile = function() { }; App.Ajax.request('create_file', params, function(reply) { - if (reply.result) { + if (reply.result == true) { + FM.popupClose(); FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); } else { FM.showError('create-file', reply.message); } - FM.popupClose(); }); } @@ -799,27 +1475,6 @@ FM.createFile = function() { var tpl = Tpl.get('popup_create_file', 'FM'); FM.popupOpen(tpl.finalize()); - /*var filename = prompt('Enter file name:'); - if (filename.trim() != '') { - - var box = FM.CURRENT_TAB; - var tab = FM.getTabLetter(box); - var params = { - 'filename': filename, - 'dir': FM['TAB_' + tab + '_CURRENT_PATH'] - }; - App.Ajax.request('create_file', params, function(reply) { - if (reply.result) { - FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); - } - else { - FM.showError('create-file', reply.message); - } - }); - } - else { - FM.showError('filename-empty', 'Filename cannot be empty'); - }*/ } FM.showOrderBox = function(elm, tab) { @@ -885,12 +1540,47 @@ FM.reOrderList = function(elm){ FM.open(path, tab); } +FM.isPopupOpened = function() { + var ref = $('#popup'); + if (ref.length > 0) { + return true; + } + + return false; +} + +FM.getPopupReference = function() { + var ref = $('#popup'); + + return ref; +} + +FM.handlePopupSubmit = function() { + try { + var method = $('#popup').find('.ok').attr('onClick'); + if (method) { + method = method.replace('\(\);', '').replace('FM.', ''); + if ('function' == typeof FM[method]) { + FM[method](); + } + } + } + catch(e) { + + } +} + +FM.handlePopupCancel = function() { + FM.popupClose(); +} + FM.init(); $(document).ready(function() { + $('.progress-container').hide(); //return alert('statechange: Back'); /*$(document).bind('keydown.up', function() { @@ -915,6 +1605,17 @@ $(document).ready(function() { $('.window ul').outerHeight(hgt); + shortcut.add("Esc",function() { + if (FM.isPopupOpened()) { + return FM.handlePopupCancel(); + } + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + shortcut.add("Down",function() { FM.goDown(); },{ @@ -941,8 +1642,39 @@ $(document).ready(function() { 'disable_in_input': false, 'target': document }); + + shortcut.add("Space",function() { + FM.selectCurrentElementAndGoToNext(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + + shortcut.add("Insert",function() { + FM.selectCurrentElementAndGoToNext(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + + + shortcut.add("ctrl+a",function() { + FM.toggleAllItemsSelected(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); shortcut.add("Enter",function() { + if (FM.isPopupOpened()) { + return FM.handlePopupSubmit(); + } var tab = FM.getTabLetter(FM.CURRENT_TAB); var elm = $(FM.CURRENT_TAB).find('.dir:eq('+FM['CURRENT_'+tab+'_LINE']+')'); @@ -964,6 +1696,8 @@ $(document).ready(function() { }); + + /* is jQuery .live() has been removed in version 1.9 onwards $(FM.TAB_A + ' .dir').live('click', function(evt) { FM.selectItem(evt.target, FM.TAB_A); @@ -973,12 +1707,19 @@ $(document).ready(function() { }); */ - $(FM.TAB_A).on('click', '.dir', function(evt) { + /*$(FM.TAB_A).on('click', '.dir', function(evt) { + //console.log(evt); + if (evt.ctrlKey || evt.metaKey || evt.altKey) { + return; + } FM.selectItem(evt.target, FM.TAB_A); }); $(FM.TAB_B).on('click', '.dir', function(evt) { + if (evt.ctrlKey || evt.metaKey || evt.altKey) { + return; + } FM.selectItem(evt.target, FM.TAB_B); - }); + });*/ $(FM.TAB_A_MENU).on('click', '.sort-by', function(evt){ FM.showOrderBox($(evt.target), FM.TAB_A); @@ -996,6 +1737,10 @@ $(document).ready(function() { $(evt.target).closest('.warning-box').hide(); }); + $('.menu-A .extract-btn').hide(); + $('.menu-B .extract-btn').hide(); + + }); diff --git a/web/js/floating_layer.js b/web/js/floating_layer.js index b0af2a903..84f6c91f7 100644 --- a/web/js/floating_layer.js +++ b/web/js/floating_layer.js @@ -2,7 +2,12 @@ { jQuery.fn.flayer_close = function() { - jQuery(this).flayer.close(); + try { + jQuery(this).flayer.close(); + } + catch (e) { + fb.error(e); + } } jQuery.fn.flayer = function(params) { @@ -15,8 +20,9 @@ id : 'floating-box', className : 'floating-box-class', zIndex : 5000, - beforeStart : function(){}, - beforeEnd : function(){}, + beforeStart : function() {}, + beforeEnd : function() {}, + afterStart: function() {}, close : null, closeClass : 'close-floating-layer', outerClose : false, @@ -207,6 +213,7 @@ jQuery(ref.content).append(jQuery(elm).removeClass('hidden')); start_ovservers(); jQuery(ref.container).removeClass('hidden').css({'display':'block'}); + config.afterStart(elm); } // diff --git a/web/js/i18n.js.php b/web/js/i18n.js.php index 7fe3b6192..dcf372709 100644 --- a/web/js/i18n.js.php +++ b/web/js/i18n.js.php @@ -46,3 +46,10 @@ if (!function_exists('__')) { App.i18n.ARE_YOU_SURE = ''; App.Constants.UNLIM_TRANSLATED_VALUE = ''; + +App.Constants.FM_DIRECTORY_NAME_CANNOT_BE_EMPTY = ''; +App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY = ''; +App.Constants.FM_NO_FILE_SELECTED = ''; +App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED = ''; +App.Constants.FM_FILE_TYPE_NOT_SUPPORTED = ''; + diff --git a/web/js/templates.js b/web/js/templates.js index 21b8dbef2..9cc360b1d 100644 --- a/web/js/templates.js +++ b/web/js/templates.js @@ -7,31 +7,65 @@ App.Templates.html = { hint: [''] }, // file manager + // + +//\ + FM: { entry_line: ['
  • \ - \ + \ + \ \ \ ~!:NAME~!\ ~!:PERMISSIONS~!\ ~!:OWNER~!\ - ~!:SIZE~!\ + ~!:SIZE_UNIT~!\ + ~!:SIZE_VALUE~!\ ~!:DATE~!\ ~!:TIME~!\ + ••• \ +
    • Download
    • Edit
    \ +
    \
  • '], + popup_alert: [''], + popup_bulk: [''], popup_delete: [''], - popup_rename_: ['
    \ -
    Rename file "~!:FILENAME~!"
    \ - \ -
    \ + popup_copy: [''], + popup_rename: ['
    \ +
    Original name: "~!:FILENAME~!"
    \ + \ +
    \ +
    \ + \
    \
    \

    cancel

    \ @@ -43,15 +77,33 @@ App.Templates.html = {
    \
    '], - popup_rename: ['
    \ -
    Extract archive "~!:FILENAME~!" to "~!:DIRNAME~!"
    \ -
    \ + popup_pack: ['
    \ +
    Pack "~!:FILENAME~!" into:
    \
    \ - \ + \
    \ +
    \ + \
    \

    cancel

    \ -

    Extract

    \ +

    Pack

    \ +
    \ +
    '], + + popup_unpack: ['
    \ +
    Extract archive "~!:FILENAME~!" to:
    \ +
    \ + \ +
    \ +
    \ + \ +
    \ +

    cancel

    \ +

    Extract

    \
    \
    '], @@ -59,7 +111,7 @@ App.Templates.html = { popup_create_file: ['
    \
    Create file
    \ \ -
    \ +
    \
    \ \
    \ @@ -71,7 +123,7 @@ App.Templates.html = { popup_create_dir: ['
    \
    Create directory
    \ \ -
    \ +
    \
    \ \
    \ @@ -79,6 +131,12 @@ App.Templates.html = {

    cancel

    \

    create

    \
    \ +
    '], + popup_no_file_selected: ['
    \ +
    Please select a file
    \ +
    \ +

    ok

    \ +
    \
    '] } }; diff --git a/web/templates/file_manager/main.php b/web/templates/file_manager/main.php index c2cfe315d..426cf4e96 100644 --- a/web/templates/file_manager/main.php +++ b/web/templates/file_manager/main.php @@ -16,19 +16,19 @@
    -
    + +
    '.$dir.''; } ?> */ ?>
    -
    delete
    delete
    - + delete +
    + + delete +
    + + delete +
    + + delete +
    + + delete +
    + + delete +
    + Add one more Name Server +
    @@ -339,3 +387,33 @@ + \ No newline at end of file diff --git a/web/templates/admin/edit_user.html b/web/templates/admin/edit_user.html index 1a41af01e..c85e7c222 100644 --- a/web/templates/admin/edit_user.html +++ b/web/templates/admin/edit_user.html @@ -182,24 +182,72 @@ + + + '; + + if($v_ns4) + echo ' + + '; + + if($v_ns5) + echo ' + + '; + + if($v_ns6) + echo ' + + '; + + if($v_ns7) + echo ' + + '; + + if($v_ns8) + echo ' + + '; + ?> + + > + + + +
    - > + delete
    - > + delete
    + + delete +
    + + delete +
    + + delete +
    + + delete +
    + + delete +
    + + delete +
    + Add one more Name Server +
    @@ -215,4 +263,34 @@
    - \ No newline at end of file + + \ No newline at end of file diff --git a/web/templates/footer.html b/web/templates/footer.html index 59b99ec9e..3f7079c34 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -115,14 +115,25 @@ if(l_unit.hasClass('l-unit--starred')){ // removing star - $.removeCookie(l_unit.attr('uniq-id')); - l_unit.removeClass('l-unit--starred'); + + $.ajax({ + method: "POST", + url: "/delete/favorite/index.php", + data: { v_section: l_unit.attr('v_section'), v_unit_id: l_unit.attr('v_unit_id') } + }); + l_unit.attr({'sort-star': 0}); + l_unit.removeClass('l-unit--starred'); } else{ - $.cookie(l_unit.attr('uniq-id'), 1, {expires: 3650, path: '/'}); - l_unit.addClass('l-unit--starred'); + $.ajax({ + method: "POST", + url: "/add/favorite/index.php", + data: { v_unit_id: l_unit.attr('v_unit_id'), v_section: l_unit.attr('v_section') } + }); + l_unit.attr({'sort-star': 1}); + l_unit.addClass('l-unit--starred'); } }); @@ -456,7 +467,8 @@ VE.core.register(); if (location.href.search(/list/) != -1) { - var shift_select_ref = $('body').finderSelect({children: '.l-unit', + var shift_select_ref = $('body').finderSelect({ + children: '.l-unit', 'onFinish': function(evt) { var ref = $(evt.target); $('.l-content').find('.l-unit .ch-toggle').attr('checked', false); diff --git a/web/templates/header.html b/web/templates/header.html index ce0995f1d..ab11d821d 100644 --- a/web/templates/header.html +++ b/web/templates/header.html @@ -61,4 +61,4 @@ - \ No newline at end of file + From 9d2ebe561a8f304b0fbef91301129d77e154c998 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 28 Sep 2015 02:01:19 +0300 Subject: [PATCH 069/264] file manager stuff --- web/css/file_manager.css | 118 ++++++---- web/edit/package/index.php | 12 + web/edit/user/index.php | 25 ++- web/file_manager/fm_api.php | 2 - web/inc/main.php | 26 +++ web/js/file_manager.js | 278 +++++++++++++++++++++--- web/js/i18n.js.php | 7 +- web/js/jquery.finder.js | 4 +- web/js/templates.js | 21 +- web/list/directory/index.php | 15 +- web/templates/file_manager/main.php | 4 + web/templates/file_manager/tab_menu.php | 2 +- 12 files changed, 419 insertions(+), 95 deletions(-) diff --git a/web/css/file_manager.css b/web/css/file_manager.css index 9770b537a..3a43db98a 100644 --- a/web/css/file_manager.css +++ b/web/css/file_manager.css @@ -2,15 +2,17 @@ body { margin: 0; padding: 0; } .hidden { display: none; } .l-logo { + background-color: #7B7B7B; background-image: url("/images/sprite.png"); - background-position: -118px -59px; + background-position: -117px -57px; background-repeat: no-repeat; + border: 9px solid #7B7B7B; display: inline-block; float: left; height: 22px; - margin-left: 10px; - margin-top: 11px; - width: 73px; + margin-left: 0; + margin-top: 0; + width: 59px; } #main{ display: inline-block; font-family: Arial; font-size: 15px; color: #777; width: 100%; } @@ -18,10 +20,13 @@ body { margin: 0; padding: 0; } .window { display: inline-block; float: left; /*border: 1px solid #eee;*/ width: 50%; height: 100%; background-color: #ececec; /*background: url(/images/background-dots.png) #ececec;*/ } .window.active { background: #fff; } -.pwd { background-color: #7b7b7b; height: 28px; padding: 12px 0 0 17px; color: #eee; font-size: 14px; } -.window.active .pwd { background-color: #333; } +.window.active .l-logo { background-color: #333; border-color: #333; } + + +.pwd { background-color: #7b7b7b; height: 28px; padding: 12px 0 0 17px; color: #eee; font-size: 14px; overflow: hidden; } +.window.active .pwd { background-color: #333; box-shadow: -2px 0 5px -3px rgba(0, 0, 0, 0.7); } .window.active .pwd a { color: #FFF; } -.pwd a { color: #CFCFCF; margin-right: 6px; padding: 0 7px; cursor: pointer; text-decoration: none; } +.pwd a { color: #CFCFCF; cursor: pointer; text-decoration: none; } .window.active .pwd a:hover, .pwd a:hover { color: #FFCC00; } @@ -57,10 +62,14 @@ body { margin: 0; padding: 0; } .menu div.button.disabled:hover, -.menu div.button { cursor: pointer; transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; box-shadow: none; color: #999 -} +.menu div.button { cursor: pointer; transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1) 0s; box-shadow: none; color: #999; } .window.active .menu div.button:hover, -.menu div.button:hover { text-decoration: none; color: #1FB9CA; border-radius: 0; } +.menu div.button:hover { text-decoration: none; color: #1FB9CA; } + +.window.active .menu div.button.del:hover, +.menu div.button.del:hover { color: #FF5A5A; } + + .menu div.button.disabled:hover, .menu div.button.disabled { opacity: 0.5; cursor: default; text-decoration: none; } @@ -92,7 +101,7 @@ body { margin: 0; padding: 0; } .menu .not-writable:hover { border: 1px solid #E2E2E0; } ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; border-left: 1px solid #DDDDDD; overflow: auto; } -.listing li { color: #999999; display: block; height: 32px; margin: 1px 0 0; line-height: 30px; border: 1px solid transparent; } +.listing li { color: #999999; display: block; height: 34px; margin: 1px 0 0; line-height: 30px; padding: 0; } .listing li span { display: inline-block; float: right; } .listing li .marker { width: 4px; float: left; height: 100%; margin-right: 31px; } .listing li.back { } @@ -100,8 +109,8 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b /* .listing li .icon { background: url("/images/document.png") no-repeat scroll -2px 6px; float: left; margin-left: -17px; width: 13px; height: 24px; }*/ -.listing li .icon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px/*-97px -100px*/; float: left; margin-left: -17px; width: 31px; height: 31px; } -.listing li .icon.filetype-dir { background: url("/images/flat_icons.png") no-repeat scroll -24px -99px /*-99px 0px 25px -69px */; } +.listing li .icon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; float: left; margin-left: -17px; width: 31px; height: 31px; margin-top: 1px; } +.listing li .icon.filetype-dir { background: url("/images/flat_icons.png") no-repeat scroll -24px -98px; } .listing li .icon.filetype-tif, .listing li .icon.filetype-gif, @@ -113,7 +122,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .listing li .icon.filetype-yuv, .listing li .icon.filetype-ai, .listing li .icon.filetype-svg, -.listing li .icon.filetype-png { background: url("/images/flat_icons.png") no-repeat scroll -138px -69px; } +.listing li .icon.filetype-png { background: url("/images/flat_icons.png") no-repeat scroll -138px -68px; } .listing li .icon.filetype-txt, .listing li .icon.filetype-csv, @@ -125,12 +134,12 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .listing li .icon.filetype-ppt, .listing li .icon.filetype-sdf, .listing li .icon.filetype-vcf, -.listing li .icon.filetype-db { background: url("/images/flat_icons.png") no-repeat scroll -97px -150px; } +.listing li .icon.filetype-db { background: url("/images/flat_icons.png") no-repeat scroll -97px -149px; } .listing li .icon.filetype-xlr, .listing li .icon.filetype-xls, -.listing li .icon.filetype-xlsx { background: url("/images/flat_icons.png") no-repeat scroll -138px -147px; } +.listing li .icon.filetype-xlsx { background: url("/images/flat_icons.png") no-repeat scroll -138px -146px; } .listing li .icon.filetype-jar, .listing li .icon.filetype-tar, @@ -144,12 +153,12 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .listing li .icon.filetype-sitx, .listing li .icon.filetype-zip, .listing li .icon.filetype-zipx, -.listing li .icon.filetype-jar { background: url("/images/flat_icons.png") no-repeat scroll -176px -34px; } +.listing li .icon.filetype-jar { background: url("/images/flat_icons.png") no-repeat scroll -176px -33px; } .listing li .icon.filetype-fnt, .listing li .icon.filetype-otf, .listing li .icon.filetype-ttf, -.listing li .icon.filetype-fon { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; } +.listing li .icon.filetype-fon { background: url("/images/flat_icons.png") no-repeat scroll -97px -99px; } .listing li .icon.filetype-3g2, .listing li .icon.filetype-3gp, @@ -164,7 +173,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .listing li .icon.filetype-rm, .listing li .icon.filetype-swf, .listing li .icon.filetype-vob, -.listing li .icon.filetype-wmv { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; } +.listing li .icon.filetype-wmv { background: url("/images/flat_icons.png") no-repeat scroll -97px -99px; } .listing li .icon.filetype-aif, .listing li .icon.filetype-iff, @@ -175,23 +184,23 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .listing li .icon.filetype-mpa, .listing li .icon.filetype-ra, .listing li .icon.filetype-wav, -.listing li .icon.filetype-wma { background: url("/images/flat_icons.png") no-repeat scroll -97px -100px; } +.listing li .icon.filetype-wma { background: url("/images/flat_icons.png") no-repeat scroll -97px -99px; } .listing li .icon.filetype-rtf, .listing li .icon.filetype-doc, -.listing li .icon.filetype-docx { background: url("/images/flat_icons.png") no-repeat scroll -138px -123px; } -.listing li .icon.filetype-pdf { background: url("/images/flat_icons.png") no-repeat scroll -138px -96px; } +.listing li .icon.filetype-docx { background: url("/images/flat_icons.png") no-repeat scroll -138px -122px; } +.listing li .icon.filetype-pdf { background: url("/images/flat_icons.png") no-repeat scroll -138px -95px; } -.listing li .icon.filetype-js { background: url("/images/flat_icons.png") no-repeat scroll -138px -204px; } -.listing li .icon.filetype-css { background: url("/images/flat_icons.png") no-repeat scroll -138px -254px; } -.listing li .icon.filetype-php { background: url("/images/flat_icons.png") no-repeat scroll -138px -179px; } +.listing li .icon.filetype-js { background: url("/images/flat_icons.png") no-repeat scroll -138px -203px; } +.listing li .icon.filetype-css { background: url("/images/flat_icons.png") no-repeat scroll -138px -253px; } +.listing li .icon.filetype-php { background: url("/images/flat_icons.png") no-repeat scroll -138px -178px; } .listing li .icon.filetype-html, .listing li .icon.filetype-htm, -.listing li .icon.filetype-xhtml { background: url("/images/flat_icons.png") no-repeat scroll -138px -228px; } +.listing li .icon.filetype-xhtml { background: url("/images/flat_icons.png") no-repeat scroll -138px -227px; } -.listing li .filename { color: #555; cursor: pointer; height: 32px; max-width: 40%; overflow: hidden; float: left; padding: 0 7px 0 7px; border-radius: 3px; transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s; } +.listing li .filename { color: #555; cursor: pointer; height: 32px; max-width: 40%; overflow: hidden; float: left; padding: 2px 7px 0 7px; border-radius: 3px; transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s; -webkit-transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) 0s; } /* .listing li .filename { background: url("/images/folder_.png") no-repeat scroll -2px 6px; color: #555; cursor: pointer; float: left; margin-left: -27px; padding-left: 19px; }*/ .listing li .filename:hover { color: #333; background-color: #D1D0CF; } @@ -202,48 +211,62 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .listing li.active.selected .filename:hover { color: #FFF; background-color: #60A885; } */ .listing li .filename a { color: #7D7D7D; text-decoration: none; } -.listing li .mode { width: 51px; font-size: 11px; } -.listing li .owner { width: 11%; font-style: italic; color: #81A64F; font-size: 12px; } -.listing li .size-value { width: 70px; color: #44a8b3; font-size: 12px; padding-right: 7px; text-align: right; } -.listing li .size-unit { width: 30px; font-size: 11px; font-weight: bold; color: #A7A7A7; text-align: left; } -.listing li .date { width: 50px; font-size: 11px; } -.listing li .time { width: 50px; font-size: 11px; } +.listing li .mode { width: 51px; font-size: 11px; padding-top: 2px; } +.listing li .owner { width: 11%; font-style: italic; color: #81A64F; font-size: 12px; padding-top: 2px; } +.listing li .size-value { width: 70px; color: #44a8b3; font-size: 12px; padding-right: 7px; text-align: right; padding-top: 2px; } +.listing li .size-unit { width: 30px; font-size: 11px; font-weight: bold; color: #A7A7A7; text-align: left; padding-top: 2px; } +.listing li .date { width: 50px; font-size: 11px; padding-top: 2px; } +.listing li .time { width: 50px; font-size: 11px; padding-top: 2px; } +.window.active .listing li.selected .mode { color: #7F7550; } +.window.active .listing li.selected .owner { /* color: #7F7550; */ } +.window.active .listing li.selected .size-value { color: #7F7550; } +.window.active .listing li.selected .size-unit { color: #7F7550; } +.window.active .listing li.selected .date { color: #7F7550; } +.window.active .listing li.selected .time { color: #7F7550; } + + +/* .listing li.selected-inactive.selected { background-color: #e9e9e9; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; } .listing li.selected-inactive .mode, .listing li.selected-inactive .time, .listing li.selected-inactive .date { color: #999 !important; } -.window.active .listing li.selected.active { background-color: #73CAA0; } +*/ -.listing li.selected { background-color: #777 /*#7FD5D9*/; } +.listing li.selected { background-color: #DEDEDE; } .listing.active li.selected { background-color: #ffd437 /*#7FD5D9*/; } .listing li.selected .filename:hover { color: #333; background-color: #F0B607; } -.listing li.selected-inactive.selected.active { background-color: #dfc891; border-top: 1px solid #cdb885; border-bottom: 1px solid #cdb885; } -.listing li.active { background-color: #e7cf96; } -.window.active .listing li.active { background-color: #ffe06c; } -.listing li.active .filename{ color: #31775A; } +/* ///.listing li.selected-inactive.selected.active { background-color: #dfc891; border-top: 1px solid #cdb885; border-bottom: 1px solid #cdb885; }*/ + +/* .listing li.selected .filename { color: #333; } .listing li.selected .date, .listing li.selected .mode, .listing li.selected .time { color: #777; } .listing li.selected .owner { color: #31775A; } .listing li.selected .size { color: #31775A; } +*/ +.window.active .listing li.active { background-color: #FFDC5A; } +.window.active .listing li.active .marker { background-color: #C2A84B; } +.listing li.active { background-color: #DEDEDE; } +.listing li.active .marker { background-color: #C2C2C2; } -.listing li.selected.active .filename { color: #fff29c; } +/* ///.listing li.selected.active .filename { color: #fff29c; } */ .listing li.selected.active .marker { background-color: #3a8a96; } -.listing li.selected-inactive .marker { background-color: #7FD5D9; } -.listing li.selected-inactive .filename { color: #54A9A9; } +.listing li.selected-inactive { background-color: #DEDEDE; } +/*///.listing li.selected-inactive .marker { background-color: #7FD5D9; } +.listing li.selected-inactive .filename { color: #54A9A9; } */ .listing li .filename a:hover { color: #3399FF; } .listing li:hover { background-color: #E5E5E5; cursor: pointer; } -.listing li.active:hover { background-color: #FFD63F; } +.window.active .listing li.active:hover { background-color: #FFE570; } .listing li.selected:hover { background-color: /*#89E6EA*/#FFE570; } -.listing li.selected.active:hover { background-color: #77D1A6; } +.listing li.selected.active:hover { background-color: #FFE570; } @@ -358,10 +381,13 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b .warning-box { width: 60%; background-color: #ff9f89; border-bottom: 5px solid #ff6c6e; color: #FFF; font-family: arial; margin-left: auto; margin-right: auto; padding-bottom: 30px; margin-bottom: 50px; left: 20%; position: absolute; top: 0; box-shadow: 0 2px 11px 0 rgba(0, 0, 0, 0.5); } .warning-box.inform { background-color: #72c5b2; border-color: #019174; } +.warning-box.reload { width: 100px; background-color: #333; border-color: #222; z-index: 5000; left: 45%; opacity: 0.9; padding: 17px 27px; border-radius: 0 0 6px 6px; border: none; opacity: 0.9; } .warning-box .message { width: 100%; padding: 30px 0 5px; text-align: center; font-size: 14px; text-transform: uppercase; font-weight: bold; } +.warning-box.reload .message-small { color: #ccc; } +.warning-box.reload .message-small span { color: #72C5B2; font-weight: bold; } .warning-box .message-small { width: 100%; text-align: center; font-size: 13px; color: #9D3407; } .warning-box.inform .message-small { color: #555; } -.warning-box .close { width: 30px; height: 30px; top: 5px; right: -5px; background-color: #FFF; float: right; cursor: pointer; background: url("/images/flat_icons.png") repeat scroll -258px -174px; } +.warning-box .close { width: 30px; height: 30px; top: 5px; right: -5px; background-color: #FFF; float: right; cursor: pointer; background: url("/images/flat_icons.png") repeat scroll -382px -174px; } .warning-box .close:hover { background-color: #DC5D5F; } .warning-box.inform .close:hover { background-color: #019174; } @@ -432,7 +458,7 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px; b } .progress-container .progress-elm .progress { - background: #ebebeb url("/images/progress.gif") no-repeat scroll -60px 0; + background: #ebebeb url("/images/progress.gif") no-repeat scroll 0px 0; border-color: #8a9079; border-radius: 3px; color: transparent; diff --git a/web/edit/package/index.php b/web/edit/package/index.php index 5662d19c9..e8ecaf686 100644 --- a/web/edit/package/index.php +++ b/web/edit/package/index.php @@ -50,6 +50,10 @@ $v_ns1 = $nameservers[0]; $v_ns2 = $nameservers[1]; $v_ns3 = $nameservers[2]; $v_ns4 = $nameservers[3]; +$v_ns5 = $nameservers[4]; +$v_ns6 = $nameservers[5]; +$v_ns7 = $nameservers[6]; +$v_ns8 = $nameservers[7]; $v_backups = $data[$v_package]['BACKUPS']; $v_date = $data[$v_package]['DATE']; $v_time = $data[$v_package]['TIME']; @@ -155,9 +159,17 @@ if (!empty($_POST['save'])) { $v_ns2 = trim($_POST['v_ns2'], '.'); $v_ns3 = trim($_POST['v_ns3'], '.'); $v_ns4 = trim($_POST['v_ns4'], '.'); + $v_ns5 = trim($_POST['v_ns5'], '.'); + $v_ns6 = trim($_POST['v_ns6'], '.'); + $v_ns7 = trim($_POST['v_ns7'], '.'); + $v_ns8 = trim($_POST['v_ns8'], '.'); $v_ns = $v_ns1.",".$v_ns2; if (!empty($v_ns3)) $v_ns .= ",".$v_ns3; if (!empty($v_ns4)) $v_ns .= ",".$v_ns4; + if (!empty($v_ns5)) $v_ns .= ",".$v_ns5; + if (!empty($v_ns6)) $v_ns .= ",".$v_ns6; + if (!empty($v_ns7)) $v_ns .= ",".$v_ns7; + if (!empty($v_ns8)) $v_ns .= ",".$v_ns8; $v_ns = escapeshellarg($v_ns); $v_time = escapeshellarg(date('H:i:s')); $v_date = escapeshellarg(date('Y-m-d')); diff --git a/web/edit/user/index.php b/web/edit/user/index.php index fcb16072b..83d0c8663 100644 --- a/web/edit/user/index.php +++ b/web/edit/user/index.php @@ -43,6 +43,11 @@ $v_ns1 = $nameservers[0]; $v_ns2 = $nameservers[1]; $v_ns3 = $nameservers[2]; $v_ns4 = $nameservers[3]; +$v_ns5 = $nameservers[4]; +$v_ns6 = $nameservers[5]; +$v_ns7 = $nameservers[6]; +$v_ns8 = $nameservers[7]; + $v_suspended = $data[$v_username]['SUSPENDED']; if ( $v_suspended == 'yes' ) { $v_status = 'suspended'; @@ -142,17 +147,35 @@ if (!empty($_POST['save'])) { } // Change NameServers - if (($v_ns1 != $_POST['v_ns1']) || ($v_ns2 != $_POST['v_ns2']) || ($v_ns3 != $_POST['v_ns3']) || ($v_ns4 != $_POST['v_ns4']) && (empty($_SESSION['error_msg']))) { + if (($v_ns1 != $_POST['v_ns1']) || ($v_ns2 != $_POST['v_ns2']) || ($v_ns3 != $_POST['v_ns3']) || ($v_ns4 != $_POST['v_ns4']) || ($v_ns5 != $_POST['v_ns5']) + || ($v_ns6 != $_POST['v_ns6']) || ($v_ns7 != $_POST['v_ns7']) || ($v_ns8 != $_POST['v_ns8']) && (empty($_SESSION['error_msg']))) { $v_ns1 = escapeshellarg($_POST['v_ns1']); $v_ns2 = escapeshellarg($_POST['v_ns2']); $v_ns3 = escapeshellarg($_POST['v_ns3']); $v_ns4 = escapeshellarg($_POST['v_ns4']); + $v_ns5 = escapeshellarg($_POST['v_ns5']); + $v_ns6 = escapeshellarg($_POST['v_ns6']); + $v_ns7 = escapeshellarg($_POST['v_ns7']); + $v_ns8 = escapeshellarg($_POST['v_ns8']); $ns_cmd = VESTA_CMD."v-change-user-ns ".$v_username." ".$v_ns1." ".$v_ns2; if (!empty($_POST['v_ns3'])) $ns_cmd = $ns_cmd." ".$v_ns3; if (!empty($_POST['v_ns4'])) $ns_cmd = $ns_cmd." ".$v_ns4; + if (!empty($_POST['v_ns5'])) $ns_cmd = $ns_cmd." ".$v_ns5; + if (!empty($_POST['v_ns6'])) $ns_cmd = $ns_cmd." ".$v_ns6; + if (!empty($_POST['v_ns7'])) $ns_cmd = $ns_cmd." ".$v_ns7; + if (!empty($_POST['v_ns8'])) $ns_cmd = $ns_cmd." ".$v_ns8; exec ($ns_cmd, $output, $return_var); check_return_code($return_var,$output); unset($output); + + $v_ns1 = str_replace("'","", $v_ns1); + $v_ns2 = str_replace("'","", $v_ns2); + $v_ns3 = str_replace("'","", $v_ns3); + $v_ns4 = str_replace("'","", $v_ns4); + $v_ns5 = str_replace("'","", $v_ns5); + $v_ns6 = str_replace("'","", $v_ns6); + $v_ns7 = str_replace("'","", $v_ns7); + $v_ns8 = str_replace("'","", $v_ns8); } // Set success message diff --git a/web/file_manager/fm_api.php b/web/file_manager/fm_api.php index f4fc28b2f..92acfa282 100644 --- a/web/file_manager/fm_api.php +++ b/web/file_manager/fm_api.php @@ -4,8 +4,6 @@ //error_reporting(NULL); -session_start(); - include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); include($_SERVER['DOCUMENT_ROOT']."/file_manager/fm_core.php"); diff --git a/web/inc/main.php b/web/inc/main.php index ae103cf26..87894c7b4 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -1,4 +1,5 @@ $favourite){ + $favourites[$key] = array(); + + $items = explode(',', $favourite); + foreach($items as $item){ + if($item) + $favourites[$key][trim($item)] = 1; + } + } + + $_SESSION['favourites'] = $favourites; +} + + function check_error($return_var) { if ( $return_var > 0 ) { @@ -144,6 +169,7 @@ function humanize_time($usage) { $usage = $usage / 60; if ( $usage > 24 ) { $usage = $usage / 24; + $usage = number_format($usage); if ( $usage == 1 ) { $usage = $usage." ".__('day'); diff --git a/web/js/file_manager.js b/web/js/file_manager.js index 2702b92d2..008d13bc5 100644 --- a/web/js/file_manager.js +++ b/web/js/file_manager.js @@ -29,11 +29,16 @@ FM.ORDER_BOX_B = $('.context-menu.sort-order.tab-b'); FM.ORDER_TAB_A = 'type_asc'; FM.ORDER_TAB_B = 'type_asc'; +FM.Env.RELOAD_IN_TIME = false; + + FM.TAB_A_CURRENT_PATH = GLOBAL.TAB_A__PATH; FM.TAB_B_CURRENT_PATH = GLOBAL.TAB_B_PATH; FM.IMAGES = {'A':[], 'B': []}; +FM.RELOAD_IN_TIME_SECONDS = 3; + FM.IMG_FILETYPES = 'png, jpg, jpeg, gif'; FM.SUPPORTED_ARCHIEVES = [ @@ -91,6 +96,7 @@ FM.showError = function(type, message) { setTimeout(function() { ref.find('.warning-message').fadeOut(); }, FM.errorMessageTimeout); + return; } } @@ -98,7 +104,7 @@ FM.showError = function(type, message) { FM.popupClose(); var tpl = Tpl.get('popup_alert', 'FM'); tpl.set(':TEXT', message); - + FM.popupOpen(tpl.finalize()); } } @@ -147,6 +153,10 @@ FM.setActive = function(index, box) { var tab = FM.getTabLetter(box); $(box + ' .selected').removeClass('selected'); $(box).find('li.dir:eq('+index+')').addClass('selected'); + + $(box + ' .active').removeClass('active'); + $(box).find('li.dir:eq('+index+')').addClass('active'); + //$(box).find('li:eq('+index+')').addClass('selected'); //var w_h = $(window).height() - 100; var w_offset = $(box).scrollTop(); @@ -173,6 +183,9 @@ FM.setActive = function(index, box) { $(box).scrollTo(w_offset + cur_elm.top - w_height/2 + cur_elm_height/2); //} + + + FM['CURRENT_' + tab + '_LINE'] = index; FM.CURRENT_TAB = box; @@ -180,6 +193,21 @@ FM.setActive = function(index, box) { $(FM.preselectedItems[tab]).each(function(i, index) { $(box).find('.dir:eq(' + index + ')').addClass('selected'); }); + + + var src = $(box).find('.dir:eq('+index+')').find('.source').val(); + src = $.parseJSON(src); + var tab = FM.getTabLetter(FM.CURRENT_TAB); + + if (FM.itemIsArchieve(src)) { + if($('.menu-'+tab+' .archive.button').first().is(':visible')) + $('.menu-'+tab+' .extract-btn').first().show(); + else + $('.menu-'+tab+' .extract-btn.small').show(); + } + else { + $('.menu-'+tab+' .extract-btn').hide(); + } } FM.setSecondInactive = function(index, box) { @@ -190,7 +218,29 @@ FM.setSecondInactive = function(index, box) { FM.BG_TAB = box; } +FM.goBackwards = function() { + if (FM.isPopupOpened()) { + return; + } + + var tab = FM.getTabLetter(FM.CURRENT_TAB); + var box = FM['TAB_' + tab]; + $(box).find('.dir:eq(0)').find('.source').val(); + + var src = $.parseJSON($(box).find('.dir:eq(0)').find('.source').val()); + var dir = src.full_path; + + FM.open(dir, box); +} + FM.goToTop = function() { + if (FM.isPopupOpened()) { + return; + } + if (FM.isPopupOpened()) { + return; + } + var tab = FM.getTabLetter(FM.CURRENT_TAB); var index = 0; @@ -198,6 +248,9 @@ FM.goToTop = function() { } FM.goToBottom = function() { + if (FM.isPopupOpened()) { + return; + } var tab = FM.getTabLetter(FM.CURRENT_TAB); var index = $(FM.CURRENT_TAB).find('.dir').length - 1; @@ -205,22 +258,35 @@ FM.goToBottom = function() { } FM.goUp = function() { + if (FM.isPopupOpened()) { + return; + } var tab = FM.getTabLetter(FM.CURRENT_TAB); var index = FM['CURRENT_' + tab + '_LINE']; index -= 1; - if (index < 0) { + /*if (index < 0) { index = $(FM.CURRENT_TAB).find('li.dir').length - 1; + }*/ + if (index < 0) { + index = 0; } - + FM.setActive(index, FM.CURRENT_TAB); } FM.goDown = function() { + if (FM.isPopupOpened()) { + return; + } + var tab = FM.getTabLetter(FM.CURRENT_TAB); var index = FM['CURRENT_' + tab + '_LINE']; index += 1; - if (index > ($(FM.CURRENT_TAB).find('li.dir').length - 1)) { + /*if (index > ($(FM.CURRENT_TAB).find('li.dir').length - 1)) { index = 0; + }*/ + if (index > ($(FM.CURRENT_TAB).find('li.dir').length - 1)) { + index = $(FM.CURRENT_TAB).find('li.dir').length - 1; } FM.setActive(index, FM.CURRENT_TAB); @@ -236,7 +302,7 @@ FM.open = function(dir, box, callback) { 'dir': dir }; App.Ajax.request('cd', params, function(reply) { - var tab = FM.getTabLetter(FM.CURRENT_TAB); + //var tab = FM.getTabLetter(FM.CURRENT_TAB); FM.preselectedItems[tab] = []; if (reply.result == true) { var html = FM.generate_listing(reply.listing, box); @@ -264,19 +330,20 @@ FM.open = function(dir, box, callback) { } FM.updateTopLevelPathBar = function(box, tab, path) { - console.log(path); + var formattedPath = []; path = path.replace(FM.ROOT_DIR, ''); formattedPath.push(''+FM.ROOT_DIR+''); - + $.each(path.split('/'), function(i, part) { if (part.trim() == '') { return; } + console.log("part - " + part); formattedPath.push(''+part+''); }); - - $('.pwd-tab-' + tab).html(formattedPath.join('/')); + + $('.pwd-tab-' + tab).html(formattedPath.join(' / ')); } FM.isItemFile = function(item) { @@ -607,7 +674,6 @@ FM.toggleCheck = function(uid) { } FM.fotoramaOpen = function(tab, img_index) { - console.log('index: ' + img_index); $('.fotorama').fotorama({ nav: 'thumbs', @@ -860,6 +926,9 @@ FM.toggleAllItemsSelected = function() { } FM.selectCurrentElementAndGoToNext = function () { + if (FM.isPopupOpened()) { + return; + } var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; @@ -946,6 +1015,7 @@ FM.selectItem = function(item, box) { var src = $(item).find('.source').val(); src = $.parseJSON(src); var tab = FM.getTabLetter(FM.CURRENT_TAB); + if (FM.itemIsArchieve(src)) { $('.menu-'+tab+' .extract-btn').show(); } @@ -1046,6 +1116,10 @@ FM.packItem = function() { FM.switchTab = function() { + if (FM.isPopupOpened()) { + return; + } + if (FM.CURRENT_TAB == FM.TAB_A) { FM.setTabActive(FM.TAB_B); $(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive'); @@ -1154,7 +1228,12 @@ FM.renameItems = function() { FM.popupOpen(tpl.finalize()); } +FM.isPopupOpened = function() { + return $('#popup').length > 0 ? true : false; +} + FM.popupOpen = function(html) { + //$('#popup').flayer_close(); $('
    ').attr('id', 'popup').html(html).flayer({ afterStart: function(elm) { elm.find('input[type="text"]:first').focus(); @@ -1482,6 +1561,31 @@ FM.displayError = function(msg) { //return alert(msg); } +FM.triggerRefreshActionTrick = function() { + // reload-in-time + $('#reload-in-time').remove(); + FM.Env.RELOAD_IN_TIME = true; + var tpl = Tpl.get('reload_in_time', 'FM'); + //tpl.set(':TIME_LEFT', FM.RELOAD_IN_TIME_SECONDS + 1); + + $('body').append(tpl.finalize()); + + var ref = $('#reload-in-time').find('.reload-in-time-counter'); + + var timeleft = FM.RELOAD_IN_TIME_SECONDS; + FM.Env.reload_in_time_interval = + setInterval(function() { + if (timeleft <= 0) { + clearInterval(FM.Env.reload_in_time_interval); + $('#reload-in-time').remove(); + FM.Env.RELOAD_IN_TIME = false; + } + //ref.text(timeleft); + timeleft -= 1; + }, 1000); +} + + FM.confirmCreateDir = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; @@ -1680,7 +1784,7 @@ $(document).ready(function() { },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); @@ -1689,35 +1793,40 @@ $(document).ready(function() { },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); shortcut.add("Left",function() { - FM.setTabActive(FM.TAB_A); + if (!FM.isPopupOpened()) { + FM.setTabActive(FM.TAB_A); - var tab = FM.getTabLetter(FM.CURRENT_TAB); - if (FM['CURRENT_' + tab + '_LINE'] == -1) { - FM.setActive(0, FM.CURRENT_TAB); - } + var tab = FM.getTabLetter(FM.CURRENT_TAB); + if (FM['CURRENT_' + tab + '_LINE'] == -1) { + FM.setActive(0, FM.CURRENT_TAB); + } + } },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); shortcut.add("Right",function() { - FM.setTabActive(FM.TAB_B); + if (!FM.isPopupOpened()) { + FM.setTabActive(FM.TAB_B); + + var tab = FM.getTabLetter(FM.CURRENT_TAB); + if (FM['CURRENT_' + tab + '_LINE'] == -1) { + FM.setActive(0, FM.CURRENT_TAB); + } + } - var tab = FM.getTabLetter(FM.CURRENT_TAB); - if (FM['CURRENT_' + tab + '_LINE'] == -1) { - FM.setActive(0, FM.CURRENT_TAB); - } },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); @@ -1726,7 +1835,7 @@ $(document).ready(function() { },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); @@ -1735,7 +1844,7 @@ $(document).ready(function() { },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); @@ -1744,7 +1853,7 @@ $(document).ready(function() { },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); @@ -1753,7 +1862,7 @@ $(document).ready(function() { },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); @@ -1762,7 +1871,7 @@ $(document).ready(function() { },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); @@ -1772,7 +1881,7 @@ $(document).ready(function() { },{ 'type': 'keydown', 'propagate': false, - 'disable_in_input': false, + 'disable_in_input': true, 'target': document }); @@ -1800,6 +1909,115 @@ $(document).ready(function() { 'target': document }); + shortcut.add("n",function() { + FM.createFile(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + }); + shortcut.add("F7",function() { + FM.createDir(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + shortcut.add("F8",function() { + FM.deleteItems(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + shortcut.add("Delete",function() { + FM.deleteItems(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + }); + shortcut.add("shift+F6",function() { + FM.renameItems(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + shortcut.add("F2",function() { + FM.renameItems(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + shortcut.add("F5",function() { + if (FM.Env.RELOAD_IN_TIME == true) { + location.reload(); + return; + } + else { + FM.copyItems(); + FM.triggerRefreshActionTrick(); + } + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': false, + 'target': document + }); + shortcut.add("a",function() { + FM.packItem(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + }); + + shortcut.add("u",function() { +/// TODO upload file FM.uploadFile(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + }); + + shortcut.add("d",function() { + FM.downloadFiles(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + }); + shortcut.add("Backspace",function() { + FM.goBackwards(); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + }); + /*shortcut.add("Y",function() { + if (FM.Env.RELOAD_IN_TIME == true) { + location.reload(); + } + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + });*/ + + diff --git a/web/js/i18n.js.php b/web/js/i18n.js.php index 500b98f0c..0ca35378f 100644 --- a/web/js/i18n.js.php +++ b/web/js/i18n.js.php @@ -62,7 +62,8 @@ App.Constants.FM_RENAME = ''; App.Constants.FM_DELETE = ''; App.Constants.FM_EXTRACT = ''; App.Constants.FM_CREATE = ''; -App.Constants.FM_PACK = ''; +App.Constants.FM_PACK = ''; +App.Constants.FM_PACK_BUTTON = ''; App.Constants.FM_OK = ''; App.Constants.FM_YOU_ARE_COPYING = ''; App.Constants.FM_YOU_ARE_REMOVING = ''; @@ -70,12 +71,12 @@ App.Constants.FM_YOU_ARE_REMOVING = ''; App.Constants.FM_CONFIRM_DELETE = ''; App.Constants.FM_INTO_KEYWORD = ''; -App.Constants.FM_EXISTING_FILES_WILL_BE_DELETED = ''; +App.Constants.FM_EXISTING_FILES_WILL_BE_REPLACED= ''; App.Constants.FM_ORIGINAL_NAME = ''; App.Constants.FM_FILE = ''; App.Constants.FM_ALREADY_EXISTS = ''; -App.Constants.FM_EXTRACT = ''; App.Constants.FM_CREATE_FILE = ''; +App.Constants.FM_CREATE_DIRECTORY = ''; diff --git a/web/js/jquery.finder.js b/web/js/jquery.finder.js index fdf6a2979..745013700 100644 --- a/web/js/jquery.finder.js +++ b/web/js/jquery.finder.js @@ -203,10 +203,10 @@ }, selectAll: function(p,o) { p.on('mouseover', function(){ - d.on("keydown", turnOff); + //d.on("keydown", turnOff); }); p.on('mouseout', function(){ - d.off("keydown", turnOff); + //d.off("keydown", turnOff); }); function turnOff(e) { diff --git a/web/js/templates.js b/web/js/templates.js index dd33f790e..df0ad188e 100644 --- a/web/js/templates.js +++ b/web/js/templates.js @@ -12,6 +12,13 @@ App.Templates.html = { //\ FM: { + reload_in_time: [ + //'
    If you want to reload, hit key "Y" to reload.
    You have ~!:TIME_LEFT~!s. to do this.
    Hurry up!
    ' + '
    \ + \ +
    Hit F5 to reload the page
    \ +
    ' + ], entry_line: ['
  • \ \ \ @@ -50,18 +57,18 @@ App.Templates.html = {
  • \ '], popup_copy: [''], popup_rename: ['
    \ -
    '+App.Constants.FM_ORIGINAL_NAME+': "~!:FILENAME~!"
    \ +
    '+App.Constants.FM_RENAME+': "~!:FILENAME~!"
    \ \
    \
    \ @@ -73,12 +80,12 @@ App.Templates.html = {
    \
    \

    '+App.Constants.FM_CANCEL+'

    \ -

    '+App.Constants.FM_Rename+'

    \ +

    '+App.Constants.FM_RENAME+'

    \
    \
    '], popup_pack: ['
    \ -
    '+App.Constants.FM_PACK+' "~!:FILENAME~!" '+App.Constants.FM_INTO_KEYWORD+':
    \ +
    '+App.Constants.FM_PACK+' "~!:FILENAME~!"
    \
    \ \
    \ @@ -88,7 +95,7 @@ App.Templates.html = {
    \
    \

    '+App.Constants.FM_CANCEL+'

    \ -

    '+App.Constants.FM_PACK+'

    \ +

    '+App.Constants.FM_PACK_BUTTON+'

    \
    \ '], @@ -121,7 +128,7 @@ App.Templates.html = { \ '], popup_create_dir: ['
    \ -
    Create directory
    \ +
    '+App.Constants.FM_CREATE_DIRECTORY+'
    \ \
    \
    \ diff --git a/web/list/directory/index.php b/web/list/directory/index.php index 4c8a0795b..96c0cf51c 100644 --- a/web/list/directory/index.php +++ b/web/list/directory/index.php @@ -1,9 +1,17 @@ GLOBAL.START_DIR_A = "' . $path_a $GLOBAL_JS .= ''; $GLOBAL_JS .= ''; + // Footer -include($_SERVER['DOCUMENT_ROOT'].'/templates/file_manager/main.php'); +include($_SERVER['DOCUMENT_ROOT'].'/templates/file_manager/main.php'); \ No newline at end of file diff --git a/web/templates/file_manager/main.php b/web/templates/file_manager/main.php index 426cf4e96..1e1dea2f3 100644 --- a/web/templates/file_manager/main.php +++ b/web/templates/file_manager/main.php @@ -250,6 +250,10 @@
    writing the reading text at the reading write writing the reading text at the reading write!
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Username:william.cage@
    Password:******
    IMAP hostname:
    IMAP port:143
    IMAP security:STARTTLS
    IMAP auth method:Normal password
    SMTP hostname
    SMTP port:587
    SMTP security:STARTTLS
    SMTP auth method:Normal password
    +
    +
    From 1ce7c69383165959eb72d2251a5295d98c4ecdfc Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 28 Sep 2015 02:02:13 +0300 Subject: [PATCH 071/264] multiple name servers --- web/templates/admin/add_package.html | 97 +++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 10 deletions(-) diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html index 722b3d663..ec4e675c3 100644 --- a/web/templates/admin/add_package.html +++ b/web/templates/admin/add_package.html @@ -22,6 +22,8 @@
    delete delete - - - + delete + + '; + + if($v_ns4) + echo ' + + + delete + + '; + + if($v_ns5) + echo ' + + + delete + + '; + + if($v_ns6) + echo ' + + + delete + + '; + + if($v_ns7) + echo ' + + + delete + + '; + + if($v_ns8) + echo ' + + + delete + + '; + ?> + > + + Add one more Name Server + + @@ -334,3 +381,33 @@ + \ No newline at end of file From 687f36688a29bb39e6db74fafae2ac321f497419 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 29 Sep 2015 14:25:28 +0300 Subject: [PATCH 072/264] File Manager update --- web/js/file_manager.js | 21 ++++++++++++++------- web/js/i18n.js.php | 1 + web/templates/file_manager/main.php | 8 ++++++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/web/js/file_manager.js b/web/js/file_manager.js index 008d13bc5..d6b935015 100644 --- a/web/js/file_manager.js +++ b/web/js/file_manager.js @@ -339,7 +339,6 @@ FM.updateTopLevelPathBar = function(box, tab, path) { if (part.trim() == '') { return; } - console.log("part - " + part); formattedPath.push(''+part+''); }); @@ -1043,9 +1042,12 @@ FM.itemIsArchieve = function(item) { FM.unpackItem = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; - var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + var selected = $(FM['TAB_' + tab] ).find('.dir.active'); if (selected.length == 0) { - return alert('No file selected'); + //return alert('No file selected'); + return FM.displayError( + App.Constants.FM_NO_FILE_SELECTED + ); } @@ -1078,7 +1080,7 @@ FM.unpackItem = function() { FM.packItem = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; - var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + var selected = $(FM['TAB_' + tab] ).find('.dir.active'); if (selected.length == 0) { return FM.displayError( App.Constants.FM_NO_FILE_SELECTED @@ -1206,7 +1208,7 @@ FM.confirmRename = function() { FM.renameItems = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); - var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + var selected = $(FM['TAB_' + tab] ).find('.dir.active'); if (selected.length == 0) { return FM.displayError( App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED @@ -1440,7 +1442,7 @@ FM.confirmCopyItems = function () { FM.downloadFiles = function() { var tab = FM.getTabLetter(FM.CURRENT_TAB); - var selected = $(FM['TAB_' + tab] ).find('.dir.selected'); + var selected = $(FM['TAB_' + tab] ).find('.dir.active'); if (!selected) { return FM.displayError( App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED @@ -1451,7 +1453,10 @@ FM.downloadFiles = function() { src = $.parseJSON(src); if (FM.isItemPseudo(src) || FM.isItemDir(src)) { - alert('Folder downloads are in progress atm'); + //alert('Folder downloads are in progress atm'); + return FM.displayError( + App.Constants.FM_DIRECTORY_DOWNLOAD_NOT_READY + ); } if (FM.isItemPseudo(src)) { @@ -1769,6 +1774,8 @@ $(document).ready(function() { shortcut.add("Esc",function() { + FM.Env.RELOAD_IN_TIME = false; + $('#reload-in-time').remove(); if (FM.isPopupOpened()) { return FM.handlePopupCancel(); } diff --git a/web/js/i18n.js.php b/web/js/i18n.js.php index 0ca35378f..dc7952341 100644 --- a/web/js/i18n.js.php +++ b/web/js/i18n.js.php @@ -52,6 +52,7 @@ App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY = ''; App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED = ''; App.Constants.FM_FILE_TYPE_NOT_SUPPORTED = ''; +App.Constants.FM_DIRECTORY_DOWNLOAD_NOT_READY = ''; App.Constants.FM_DIRECTORY_NOT_AVAILABLE = ''; App.Constants.FM_DONE = ''; diff --git a/web/templates/file_manager/main.php b/web/templates/file_manager/main.php index 1e1dea2f3..8a533a028 100644 --- a/web/templates/file_manager/main.php +++ b/web/templates/file_manager/main.php @@ -449,23 +449,27 @@ $(".listing-left").selectable({ selected: function (event, ui) { FM.setTabActive(FM.TAB_A, 'skip_highlights'); - $(".listing-left .selected").each(function(i, o) { + $(".listing-left .selected, .listing-left .ui-selectee").each(function(i, o) { if (!$(o).hasClass('ui-selected')) { $(o).removeClass('selected'); + $(o).removeClass('active'); } }); $(ui.selected).addClass('selected'); + $(ui.selected).addClass('active'); checkIfArchive(ui.selected); $(".listing-left .ui-selected").addClass('selected'); }, unselected: function (event, ui) { - $(".listing-left .selected").each(function(i, o) { + $(".listing-left .selected, .listing-left .ui-selectee").each(function(i, o) { if (!$(o).hasClass('ui-selected')) { $(o).removeClass('selected'); + $(o).removeClass('active'); } }); FM.setTabActive(FM.TAB_A, 'skip_highlights'); $(ui.unselected).removeClass('selected'); + $(ui.selected).addClass('active'); } }); $(".listing-right").selectable({ From 51125fc904ad7f77b45dfadd7d29800697c6dc4d Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 29 Sep 2015 17:59:04 +0300 Subject: [PATCH 073/264] fix for symlinked /tmp dir --- web/login/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/login/index.php b/web/login/index.php index 461f1f92e..0c9e48fa9 100644 --- a/web/login/index.php +++ b/web/login/index.php @@ -35,7 +35,7 @@ if (isset($_POST['user']) && isset($_POST['password'])) { $v_user = escapeshellarg($_POST['user']); // Send password via tmp file - $v_password = tempnam("/tmp","vst"); + $v_password = exec('mktemp -p /tmp'); $fp = fopen($v_password, "w"); fwrite($fp, $_POST['password']."\n"); fclose($fp); From a320b1f32c834d0f3e111713091d45216df22d87 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Tue, 29 Sep 2015 22:24:22 +0300 Subject: [PATCH 074/264] hotkeys for filemanager --- web/js/file_manager.js | 68 ++++++++++++++----- web/templates/file_manager/main.php | 100 +++++++++++++++++++++++++--- 2 files changed, 143 insertions(+), 25 deletions(-) diff --git a/web/js/file_manager.js b/web/js/file_manager.js index d6b935015..4501fd591 100644 --- a/web/js/file_manager.js +++ b/web/js/file_manager.js @@ -292,6 +292,32 @@ FM.goDown = function() { FM.setActive(index, FM.CURRENT_TAB); } +// reloads provided tab +// reloads opposite tab if its needed +FM.openAndSync = function(dir, box, callback) { + var tab = FM.getTabLetter(box); + + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + var oppositeSyncNeeded = false; + + if (FM.TAB_A_CURRENT_PATH == FM.TAB_B_CURRENT_PATH) { + oppositeSyncNeeded = true; + } + + + if (oppositeSyncNeeded) { + FM.open(dir, FM['TAB_' + opposite_tab], callback); + return FM.open(dir, box, callback); + } + else { + return FM.open(dir, box, callback); + } +} + FM.open = function(dir, box, callback) { var tab = FM.getTabLetter(box); @@ -662,7 +688,14 @@ FM.generate_listing = function(reply, box) { $(box).html(acc.done()); - FM['CURRENT_'+tab+'_LINE'] = -1; + //////// + /*if (FM['CURRENT_'+tab+'_LINE'] > -1 && $(box).find('.dir:eq(' + FM['CURRENT_'+tab+'_LINE'] + ')').lrngth > 0) { + + } + else { + FM['CURRENT_'+tab+'_LINE'] = -1; + }*/ + FM['CURRENT_'+tab+'_LINE'] = -1; } FM.toggleCheck = function(uid) { @@ -1111,7 +1144,7 @@ FM.packItem = function() { var tpl = Tpl.get('popup_pack', 'FM'); tpl.set(':FILENAME', src.name); - tpl.set(':DST_DIRNAME', dst + '/' + src.name + '_packed.tar.gz'); + tpl.set(':DST_DIRNAME', dst + '/' + src.name + '.tar.gz'); FM.popupOpen(tpl.finalize()); } @@ -1198,7 +1231,7 @@ FM.confirmRename = function() { App.Ajax.request(action, params, function(reply) { if (reply.result == true) { FM.popupClose(); - FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); } else { FM.showError('rename-items', reply.message); @@ -1235,6 +1268,7 @@ FM.isPopupOpened = function() { } FM.popupOpen = function(html) { + FM.popupClose(); //$('#popup').flayer_close(); $('
    ').attr('id', 'popup').html(html).flayer({ afterStart: function(elm) { @@ -1432,7 +1466,7 @@ FM.confirmCopyItems = function () { if (reply.result == true) { FM.popupClose(); // FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], FM['TAB_' + tab]); - FM.open(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); + FM.openAndSync(FM['TAB_' + opposite_tab + '_CURRENT_PATH'], FM['TAB_' + opposite_tab]); } else { FM.showError('copy-items', reply.message); @@ -1504,7 +1538,7 @@ FM.confirmDelete = function() { App.Ajax.request('delete_files', params, function(reply) { if (reply.result == true) { FM.popupClose(); - FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); } else { FM.showError('delete-items', reply.message); @@ -1611,7 +1645,7 @@ FM.confirmCreateDir = function() { App.Ajax.request('create_dir', params, function(reply) { if (reply.result == true) { FM.popupClose(); - FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); } else { FM.showError('create-dir', reply.message); @@ -1646,7 +1680,7 @@ FM.confirmCreateFile = function() { App.Ajax.request('create_file', params, function(reply) { if (reply.result == true) { FM.popupClose(); - FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); } else { FM.showError('create-file', reply.message); @@ -1948,6 +1982,7 @@ $(document).ready(function() { 'disable_in_input': true, 'target': document }); + shortcut.add("shift+F6",function() { FM.renameItems(); },{ @@ -1988,14 +2023,7 @@ $(document).ready(function() { 'target': document }); - shortcut.add("u",function() { -/// TODO upload file FM.uploadFile(); - },{ - 'type': 'keydown', - 'propagate': false, - 'disable_in_input': true, - 'target': document - }); + shortcut.add("d",function() { FM.downloadFiles(); @@ -2025,7 +2053,15 @@ $(document).ready(function() { });*/ - + shortcut.add("u",function() { + var tab_letter = FM.getTabLetter(FM.CURRENT_TAB); + $('#file_upload_'+tab_letter).trigger('click'); + },{ + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + }); /* is jQuery .live() has been removed in version 1.9 onwards diff --git a/web/templates/file_manager/main.php b/web/templates/file_manager/main.php index 8a533a028..634e7fc12 100644 --- a/web/templates/file_manager/main.php +++ b/web/templates/file_manager/main.php @@ -380,16 +380,16 @@ var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; - FM.open(FM['TAB_' + tab + '_CURRENT_PATH'], box); - + FM.openAndSync(FM['TAB_' + tab + '_CURRENT_PATH'], box); + //$('.file-upload-button-' + tab).removeClass('progress'); $('.file-upload-button-' + tab).addClass('done'); - + setTimeout(function() { $('.file-upload-button-' + tab).removeClass('progress'); $('.file-upload-button-' + tab).removeClass('done'); }, 2000); - + $('.file-upload-button-' + tab).css('background-position', '-96px 0'); }, progressall: function (e, data) { @@ -448,7 +448,34 @@ $(".listing-left").selectable({ selected: function (event, ui) { - FM.setTabActive(FM.TAB_A, 'skip_highlights'); + //console.log(ui); + //console.log($(".listing-left .selected")); + FM.setTabActive(FM.TAB_A, 'skip_highlights'); + + $(".listing-left .active").removeClass('active'); + + $(".listing-left .selected").each(function(i, o) { + if (!$(o).hasClass('ui-selected')) { + $(o).removeClass('selected'); + $(o).removeClass('active'); + } + }); + $(ui.selected).addClass('selected'); + $(ui.selected).addClass('active'); + + + //$(ui.selected).addClass('active'); + checkIfArchive(ui.selected); + $(".listing-left .ui-selected").addClass('selected'); + + if ($(".listing-left .active").length > 0) { + FM['CURRENT_A_LINE'] = $(".listing-left .active").index(); + } + else { + FM['CURRENT_A_LINE'] = 0; + } + + /*FM.setTabActive(FM.TAB_A, 'skip_highlights'); $(".listing-left .selected, .listing-left .ui-selectee").each(function(i, o) { if (!$(o).hasClass('ui-selected')) { $(o).removeClass('selected'); @@ -458,10 +485,22 @@ $(ui.selected).addClass('selected'); $(ui.selected).addClass('active'); checkIfArchive(ui.selected); - $(".listing-left .ui-selected").addClass('selected'); + $(".listing-left .ui-selected").addClass('selected');*/ }, unselected: function (event, ui) { - $(".listing-left .selected, .listing-left .ui-selectee").each(function(i, o) { + FM.setTabActive(FM.TAB_A, 'skip_highlights'); + + $(ui.unselected).removeClass('selected'); + $(ui.unselected).removeClass('active'); + + if ($(".listing-left .active").length > 0) { + FM['CURRENT_A_LINE'] = $(".listing-left .active").index(); + } + else { + FM['CURRENT_A_LINE'] = 0; + } + + /*$(".listing-left .selected, .listing-left .ui-selectee").each(function(i, o) { if (!$(o).hasClass('ui-selected')) { $(o).removeClass('selected'); $(o).removeClass('active'); @@ -469,10 +508,53 @@ }); FM.setTabActive(FM.TAB_A, 'skip_highlights'); $(ui.unselected).removeClass('selected'); - $(ui.selected).addClass('active'); + $(ui.selected).addClass('active');*/ } }); $(".listing-right").selectable({ + selected: function (event, ui) { + FM.setTabActive(FM.TAB_B, 'skip_highlights'); + + $(".listing-right .active").removeClass('active'); + + $(".listing-right .selected").each(function(i, o) { + if (!$(o).hasClass('ui-selected')) { + $(o).removeClass('selected'); + $(o).removeClass('active'); + } + }); + $(ui.selected).addClass('selected'); + $(ui.selected).addClass('active'); + + + //$(ui.selected).addClass('active'); + checkIfArchive(ui.selected); + $(".listing-right .ui-selected").addClass('selected'); + + + if ($(".listing-right .active").length > 0) { + FM['CURRENT_B_LINE'] = $(".listing-right .active").index(); + } + else { + FM['CURRENT_B_LINE'] = 0; + } + + }, + unselected: function (event, ui) { + FM.setTabActive(FM.TAB_B, 'skip_highlights'); + + $(ui.unselected).removeClass('selected'); + $(ui.unselected).removeClass('active'); + + if ($(".listing-right .active").length > 0) { + FM['CURRENT_B_LINE'] = $(".listing-right .active").index(); + } + else { + FM['CURRENT_B_LINE'] = 0; + } + } + }); + /*$(".listing-right").selectable({ selected: function (event, ui) { $(".listing-left .selected").each(function(i, o) { if (!$(o).hasClass('ui-selected')) { @@ -493,7 +575,7 @@ FM.setTabActive(FM.TAB_B, 'skip_highlights'); $(ui.unselected).removeClass('selected'); } - }); + });*/ }); From 362efbe902f5b00b58591b4c82b7aff0136e0176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serta=C3=A7=20=C3=87EL=C4=B0K?= Date: Sat, 3 Oct 2015 02:45:43 +0300 Subject: [PATCH 075/264] Update v-update-user-quota --- bin/v-update-user-quota | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-update-user-quota b/bin/v-update-user-quota index 85330e450..013ee3869 100755 --- a/bin/v-update-user-quota +++ b/bin/v-update-user-quota @@ -33,7 +33,7 @@ is_object_valid 'user' 'USER' "$user" # Updating disk quota quota=$(get_user_value '$DISK_QUOTA') soft=$((quota * 1000)) -hard=$((quota + 50000)) +hard=$((soft + 50000)) # Searching home mount point mnt=$(df -P /home |awk '{print $6}' |tail -n1) From b6dd534b60e20b7300031f72da367cb6c97920f7 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 5 Oct 2015 23:31:53 +0300 Subject: [PATCH 076/264] fix for caching template --- bin/v-add-web-domain | 4 ++-- bin/v-backup-user | 6 +++--- func/domain.sh | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index 3fabd59f7..58d48e55c 100755 --- a/bin/v-add-web-domain +++ b/bin/v-add-web-domain @@ -188,8 +188,8 @@ if [ ! -z "$PROXY_SYSTEM" ]; then if [ -z "$(grep "$conf" $proxy_conf)" ]; then echo "include $conf;" >> $proxy_conf fi - if [ -x $WEBTPL/$PROXY_SYSTEM/$template.sh ]; then - $WEBTPL/$PROXY_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot + if [ -x $WEBTPL/$PROXY_SYSTEM/$proxy.sh ]; then + $WEBTPL/$PROXY_SYSTEM/$proxy.sh $user $domain $ip $HOMEDIR $docroot fi fi diff --git a/bin/v-backup-user b/bin/v-backup-user index 859ff67d1..dd86cea77 100755 --- a/bin/v-backup-user +++ b/bin/v-backup-user @@ -227,7 +227,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then # Backup files cd $HOMEDIR/$user/web/$domain - find . ${fargs[@]} -type f -print0 |\ + find . ${fargs[@]} -type f -or -type l -print0 |\ tar -cpf $tmpdir/web/$domain/domain_data.tar --null -T - # Backup empty folders @@ -490,7 +490,7 @@ if [ "$USER" != '*' ]; then IFS=$'\n' set -f i=0 - for udir in $(ls |egrep -v "conf|web|dns|mail"); do + for udir in $(ls -a |egrep -v "conf|web|dns|mail|^\.\.$|^\.$"); do check_exl=$(echo -e "${USER//,/\n}" |grep "^$udir$") if [ -z "$check_exl" ]; then ((i ++)) @@ -499,7 +499,7 @@ if [ "$USER" != '*' ]; then msg="$msg\n$(date "+%F %T") adding directory $udir" # Backup files - find ./$udir ${fargs[@]} -type f -print0 |\ + find ./$udir ${fargs[@]} -type f -or -type l -print0 |\ tar -cpf $tmpdir/user_dir/$udir.tar --null -T - # Backup empty folders diff --git a/func/domain.sh b/func/domain.sh index ec520b729..43eae6c1d 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -11,11 +11,11 @@ is_web_template_valid() { # Proxy template check is_proxy_template_valid() { - template=$1 - t="$WEBTPL/$PROXY_SYSTEM/$template.tpl" - s="$WEBTPL/$PROXY_SYSTEM/$template.stpl" + proxy=$1 + t="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl" + s="$WEBTPL/$PROXY_SYSTEM/$proxy.stpl" if [ ! -e $t ] || [ ! -e $s ]; then - echo "Error: proxy template $template not found" + echo "Error: proxy template $proxy not found" log_event "$E_NOTEXIST" "$EVENT" exit $E_NOTEXIST fi From 52db853acf7923cb113d99107956e72f7f0de245 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 5 Oct 2015 23:32:25 +0300 Subject: [PATCH 077/264] FileManger stuff --- bin/v-check-fs-permission | 54 ++++++++ web/css/styles.min.css | 53 ++++++++ web/edit/file/index.php | 101 ++++++++++++-- web/file_manager/fm_api.php | 4 + web/file_manager/fm_core.php | 41 ++++++ web/file_manager/upload_file.php | 43 +++--- web/js/file_manager.js | 194 +++++++++++++-------------- web/login/index.php | 3 + web/templates/admin/edit_server.html | 29 +++- web/templates/file_manager/main.php | 4 + web/view/file/index.php | 22 ++- 11 files changed, 417 insertions(+), 131 deletions(-) create mode 100755 bin/v-check-fs-permission diff --git a/bin/v-check-fs-permission b/bin/v-check-fs-permission new file mode 100755 index 000000000..59e491cf3 --- /dev/null +++ b/bin/v-check-fs-permission @@ -0,0 +1,54 @@ +#!/bin/bash +# info: open file +# options: USER FILE +# +# The function opens/reads files on the file system + +user=$1 +src_file=$2 + +# Checking arguments +if [ -z "$src_file" ]; then + echo "Usage: USER FILE" + exit 1 +fi + +# Checking vesta user +if [ ! -e "$VESTA/data/users/$user" ]; then + echo "Error: vesta user $user doesn't exist" + exit 3 +fi + +# Checking user homedir +homedir=$(grep "^$user:" /etc/passwd | cut -f 6 -d :) +if [ -z $homedir ]; then + echo "Error: user home directory doesn't exist" + exit 12 +fi + +# Checking path +if [ ! -z "$src_file" ]; then + rpath=$(readlink -f "$src_file") + if [ -z "$(echo $rpath |egrep "^/tmp|^$homedir")" ]; then + echo "Error: invalid source path $src_file" + exit 2 + fi +fi + +# Reading file +#sudo -u $user cat "$src_file" 2>/dev/null +#if [ $? -ne 0 ]; then +# echo "Error: file $src_file was not opened" +# exit 3 +#fi + +# Checking if file has readable permission +if [[ ! -r $src_file ]] +then +# echo "File is readable" +#else + echo "Cannot read file" +fi + +# Exiting +exit diff --git a/web/css/styles.min.css b/web/css/styles.min.css index b0b348984..df532d8c2 100644 --- a/web/css/styles.min.css +++ b/web/css/styles.min.css @@ -2787,3 +2787,56 @@ form#vstobjects.suspended { text-align: right; width: 140px; } + +.description { + font-weight: normal; + line-height: 25px; + padding-bottom: 20px; + margin-left: 50px; +} +.description ul{ + margin-top: 15px; + list-style: none; + padding-left: 0; +} + +.description li{ + margin: 10px 0; +} + +.description a { + line-height: 30px; + text-decoration: underline; + color: #2c9491; +} +.description a.purchase { + color: #86A307; + background-color: #9fbf0c; + border-radius: 3px; + color: #fff; + font-size: 13px; + font-weight: bold; + padding: 7px; + text-transform: capitalize; + text-decoration: none; +} +.description a.purchase:hover { + background-color: #c0e60f; + color: #555; +} +.description .licence { + padding: 20px 0; + color: #2c9491; +} + +.description .licence input { + margin-left: 17px; + width: 137px; +} + +.description span { + font-style: italic; + line-height: 45px; + padding-top: 20px; +} + diff --git a/web/edit/file/index.php b/web/edit/file/index.php index 8b3f49a00..ea90079cc 100644 --- a/web/edit/file/index.php +++ b/web/edit/file/index.php @@ -3,6 +3,17 @@ session_start(); include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); /* +if (empty($panel)) { + $command = VESTA_CMD."v-list-user '".$user."' 'json'"; + exec ($command, $output, $return_var); + if ( $return_var > 0 ) { + header("Location: /error/"); + exit; + } + $panel = json_decode(implode('', $output), true); +} +*/ +/* // Check user session if ((!isset($_SESSION['user'])) && (!defined('NO_AUTH_REQUIRED'))) { $_SESSION['request_uri'] = $_SERVER['REQUEST_URI']; @@ -23,13 +34,15 @@ if ((!isset($_SESSION['user'])) && (!defined('NO_AUTH_REQUIRED'))) { + + + -
    + + - + diff --git a/web/file_manager/fm_api.php b/web/file_manager/fm_api.php index 92acfa282..f4629794f 100644 --- a/web/file_manager/fm_api.php +++ b/web/file_manager/fm_api.php @@ -97,6 +97,10 @@ switch ($_REQUEST['action']) { $item = $_REQUEST['item']; print json_encode($fm->packItem($item, $dir, $target_dir, $filename)); break; + case 'backup': + $path = $_REQUEST['path']; + print json_encode($fm->backupItem($path)); + break; default: //print json_encode($fm->init()); break; diff --git a/web/file_manager/fm_core.php b/web/file_manager/fm_core.php index fb827d481..1b3c09f91 100644 --- a/web/file_manager/fm_core.php +++ b/web/file_manager/fm_core.php @@ -206,6 +206,47 @@ class FileManager { ); } } + + function backupItem($item) { + + $src_item = $this->formatFullPath($item); + + $dst_item_name = $item . '~' . date('Ymd_His'); + + $dst_item = $this->formatFullPath($dst_item_name); + +//print VESTA_CMD . "v-add-fs-archive {$this->user} {$item} {$dst_item}";die(); + exec (VESTA_CMD . "v-copy-fs-file {$this->user} {$src_item} {$dst_item}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); + + if (empty($error)) { + return array( + 'result' => true, + 'filename' => $dst_item_name + ); + } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + + $error = self::check_return_code($return_var, $output); + + if (empty($error)) { + return array( + 'result' => true + ); + } + else { + return array( + 'result' => false, + 'message' => $error + ); + } + } function unpackItem($item, $dir, $target_dir, $filename) { $item = $this->formatFullPath($item); diff --git a/web/file_manager/upload_file.php b/web/file_manager/upload_file.php index f3970985c..16fa7c5fa 100644 --- a/web/file_manager/upload_file.php +++ b/web/file_manager/upload_file.php @@ -1,25 +1,38 @@ 0 ) { + header("Location: /error/"); + exit; + } + $panel = json_decode(implode('', $output), true); +} + + // Define a destination -$targetFolder = '/home/admin/'; // Relative to the root +//$targetFolder = '/home/admin/'; // Relative to the root +$targetFolder = $panel[$user]['HOME']; // Relative to the root $verifyToken = md5('unique_salt' . $_POST['timestamp']); if (!empty($_FILES) && $_POST['token'] == $verifyToken) { - $tempFile = $_FILES['Filedata']['tmp_name']; - $targetPath = $targetFolder; - $targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name']; - - // Validate the file type - //$fileTypes = array('jpg','jpeg','gif','png'); // File extensions - //$fileParts = pathinfo($_FILES['Filedata']['name']); - - //if (in_array($fileParts['extension'],$fileTypes)) { - move_uploaded_file($tempFile,$targetFile); - echo '1'; - //} else { - // echo 'Invalid file type.'; -// } + $tempFile = $_FILES['Filedata']['tmp_name']; + $targetPath = $targetFolder; + $targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name']; + + exec (VESTA_CMD . "v-copy-fs-file {$user} {$tempFile} {$targetFile}", $output, $return_var); + + $error = self::check_return_code($return_var, $output); + if ($return_var != 0) { + echo '0'; + } else { + echo '1'; + } } ?> diff --git a/web/js/file_manager.js b/web/js/file_manager.js index 4501fd591..f7093c427 100644 --- a/web/js/file_manager.js +++ b/web/js/file_manager.js @@ -56,7 +56,7 @@ FM.EDITABLE_MIMETYPES = [ 'application/epp+xml', 'application/javascript', 'application/json', - 'application/jsonml+json ', + 'application/jsonml+json ', 'application/lost+xml', 'application/marc', 'application/msword', @@ -219,9 +219,9 @@ FM.setSecondInactive = function(index, box) { } FM.goBackwards = function() { - if (FM.isPopupOpened()) { - return; - } + if (FM.isPopupOpened()) { + return; + } var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; @@ -234,13 +234,13 @@ FM.goBackwards = function() { } FM.goToTop = function() { - if (FM.isPopupOpened()) { - return; - } - if (FM.isPopupOpened()) { - return; - } - + if (FM.isPopupOpened()) { + return; + } + if (FM.isPopupOpened()) { + return; + } + var tab = FM.getTabLetter(FM.CURRENT_TAB); var index = 0; @@ -248,9 +248,9 @@ FM.goToTop = function() { } FM.goToBottom = function() { - if (FM.isPopupOpened()) { - return; - } + if (FM.isPopupOpened()) { + return; + } var tab = FM.getTabLetter(FM.CURRENT_TAB); var index = $(FM.CURRENT_TAB).find('.dir').length - 1; @@ -258,9 +258,9 @@ FM.goToBottom = function() { } FM.goUp = function() { - if (FM.isPopupOpened()) { - return; - } + if (FM.isPopupOpened()) { + return; + } var tab = FM.getTabLetter(FM.CURRENT_TAB); var index = FM['CURRENT_' + tab + '_LINE']; index -= 1; @@ -275,10 +275,10 @@ FM.goUp = function() { } FM.goDown = function() { - if (FM.isPopupOpened()) { - return; - } - + if (FM.isPopupOpened()) { + return; + } + var tab = FM.getTabLetter(FM.CURRENT_TAB); var index = FM['CURRENT_' + tab + '_LINE']; index += 1; @@ -295,27 +295,27 @@ FM.goDown = function() { // reloads provided tab // reloads opposite tab if its needed FM.openAndSync = function(dir, box, callback) { - var tab = FM.getTabLetter(box); + var tab = FM.getTabLetter(box); - var opposite_tab = 'A'; - if (tab == 'A') { - opposite_tab = 'B'; - } - - var oppositeSyncNeeded = false; + var opposite_tab = 'A'; + if (tab == 'A') { + opposite_tab = 'B'; + } + + var oppositeSyncNeeded = false; - if (FM.TAB_A_CURRENT_PATH == FM.TAB_B_CURRENT_PATH) { - oppositeSyncNeeded = true; - } + if (FM.TAB_A_CURRENT_PATH == FM.TAB_B_CURRENT_PATH) { + oppositeSyncNeeded = true; + } - if (oppositeSyncNeeded) { - FM.open(dir, FM['TAB_' + opposite_tab], callback); - return FM.open(dir, box, callback); - } - else { - return FM.open(dir, box, callback); - } + if (oppositeSyncNeeded) { + FM.open(dir, FM['TAB_' + opposite_tab], callback); + return FM.open(dir, box, callback); + } + else { + return FM.open(dir, box, callback); + } } @@ -690,12 +690,12 @@ FM.generate_listing = function(reply, box) { //////// /*if (FM['CURRENT_'+tab+'_LINE'] > -1 && $(box).find('.dir:eq(' + FM['CURRENT_'+tab+'_LINE'] + ')').lrngth > 0) { - - } - else { - FM['CURRENT_'+tab+'_LINE'] = -1; - }*/ - FM['CURRENT_'+tab+'_LINE'] = -1; + + } + else { + FM['CURRENT_'+tab+'_LINE'] = -1; + }*/ + FM['CURRENT_'+tab+'_LINE'] = -1; } FM.toggleCheck = function(uid) { @@ -958,9 +958,9 @@ FM.toggleAllItemsSelected = function() { } FM.selectCurrentElementAndGoToNext = function () { - if (FM.isPopupOpened()) { - return; - } + if (FM.isPopupOpened()) { + return; + } var tab = FM.getTabLetter(FM.CURRENT_TAB); var box = FM['TAB_' + tab]; @@ -1106,7 +1106,7 @@ FM.unpackItem = function() { var tpl = Tpl.get('popup_unpack', 'FM'); tpl.set(':FILENAME', src.name); - tpl.set(':DST_DIRNAME', dst + '/' + src.name + '_extracted'); + tpl.set(':DST_DIRNAME', dst + '/' + src.name); FM.popupOpen(tpl.finalize()); } @@ -1151,10 +1151,10 @@ FM.packItem = function() { FM.switchTab = function() { - if (FM.isPopupOpened()) { - return; - } - + if (FM.isPopupOpened()) { + return; + } + if (FM.CURRENT_TAB == FM.TAB_A) { FM.setTabActive(FM.TAB_B); $(FM.TAB_B).find('.selected-inactive').removeClass('selected-inactive'); @@ -1264,12 +1264,12 @@ FM.renameItems = function() { } FM.isPopupOpened = function() { - return $('#popup').length > 0 ? true : false; + return $('#popup').length > 0 ? true : false; } FM.popupOpen = function(html) { - FM.popupClose(); - //$('#popup').flayer_close(); + FM.popupClose(); + //$('#popup').flayer_close(); $('
    ').attr('id', 'popup').html(html).flayer({ afterStart: function(elm) { elm.find('input[type="text"]:first').focus(); @@ -1601,12 +1601,12 @@ FM.displayError = function(msg) { } FM.triggerRefreshActionTrick = function() { - // reload-in-time - $('#reload-in-time').remove(); - FM.Env.RELOAD_IN_TIME = true; - var tpl = Tpl.get('reload_in_time', 'FM'); - //tpl.set(':TIME_LEFT', FM.RELOAD_IN_TIME_SECONDS + 1); - + // reload-in-time + $('#reload-in-time').remove(); + FM.Env.RELOAD_IN_TIME = true; + var tpl = Tpl.get('reload_in_time', 'FM'); + //tpl.set(':TIME_LEFT', FM.RELOAD_IN_TIME_SECONDS + 1); + $('body').append(tpl.finalize()); var ref = $('#reload-in-time').find('.reload-in-time-counter'); @@ -1614,14 +1614,14 @@ FM.triggerRefreshActionTrick = function() { var timeleft = FM.RELOAD_IN_TIME_SECONDS; FM.Env.reload_in_time_interval = setInterval(function() { - if (timeleft <= 0) { - clearInterval(FM.Env.reload_in_time_interval); - $('#reload-in-time').remove(); - FM.Env.RELOAD_IN_TIME = false; - } - //ref.text(timeleft); - timeleft -= 1; - }, 1000); + if (timeleft <= 0) { + clearInterval(FM.Env.reload_in_time_interval); + $('#reload-in-time').remove(); + FM.Env.RELOAD_IN_TIME = false; + } + //ref.text(timeleft); + timeleft -= 1; + }, 1000); } @@ -1808,7 +1808,7 @@ $(document).ready(function() { shortcut.add("Esc",function() { - FM.Env.RELOAD_IN_TIME = false; + FM.Env.RELOAD_IN_TIME = false; $('#reload-in-time').remove(); if (FM.isPopupOpened()) { return FM.handlePopupCancel(); @@ -1839,14 +1839,14 @@ $(document).ready(function() { }); shortcut.add("Left",function() { - if (!FM.isPopupOpened()) { - FM.setTabActive(FM.TAB_A); + if (!FM.isPopupOpened()) { + FM.setTabActive(FM.TAB_A); - var tab = FM.getTabLetter(FM.CURRENT_TAB); - if (FM['CURRENT_' + tab + '_LINE'] == -1) { - FM.setActive(0, FM.CURRENT_TAB); - } - } + var tab = FM.getTabLetter(FM.CURRENT_TAB); + if (FM['CURRENT_' + tab + '_LINE'] == -1) { + FM.setActive(0, FM.CURRENT_TAB); + } + } },{ 'type': 'keydown', 'propagate': false, @@ -1855,14 +1855,14 @@ $(document).ready(function() { }); shortcut.add("Right",function() { - if (!FM.isPopupOpened()) { - FM.setTabActive(FM.TAB_B); + if (!FM.isPopupOpened()) { + FM.setTabActive(FM.TAB_B); - var tab = FM.getTabLetter(FM.CURRENT_TAB); - if (FM['CURRENT_' + tab + '_LINE'] == -1) { - FM.setActive(0, FM.CURRENT_TAB); - } - } + var tab = FM.getTabLetter(FM.CURRENT_TAB); + if (FM['CURRENT_' + tab + '_LINE'] == -1) { + FM.setActive(0, FM.CURRENT_TAB); + } + } },{ 'type': 'keydown', @@ -2000,14 +2000,14 @@ $(document).ready(function() { 'target': document }); shortcut.add("F5",function() { - if (FM.Env.RELOAD_IN_TIME == true) { - location.reload(); - return; - } - else { - FM.copyItems(); - FM.triggerRefreshActionTrick(); - } + if (FM.Env.RELOAD_IN_TIME == true) { + location.reload(); + return; + } + else { + FM.copyItems(); + FM.triggerRefreshActionTrick(); + } },{ 'type': 'keydown', 'propagate': false, @@ -2043,8 +2043,8 @@ $(document).ready(function() { }); /*shortcut.add("Y",function() { if (FM.Env.RELOAD_IN_TIME == true) { - location.reload(); - } + location.reload(); + } },{ 'type': 'keydown', 'propagate': false, @@ -2053,9 +2053,9 @@ $(document).ready(function() { });*/ - shortcut.add("u",function() { - var tab_letter = FM.getTabLetter(FM.CURRENT_TAB); - $('#file_upload_'+tab_letter).trigger('click'); + shortcut.add("u",function() { + var tab_letter = FM.getTabLetter(FM.CURRENT_TAB); + $('#file_upload_'+tab_letter).trigger('click'); },{ 'type': 'keydown', 'propagate': false, diff --git a/web/login/index.php b/web/login/index.php index 0c9e48fa9..23790033e 100644 --- a/web/login/index.php +++ b/web/login/index.php @@ -3,9 +3,12 @@ define('NO_AUTH_REQUIRED',true); + // Main include include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); +//echo $_SESSION['request_uri']; + $TAB = 'LOGIN'; diff --git a/web/templates/admin/edit_server.html b/web/templates/admin/edit_server.html index 484fbafe6..8886717b2 100644 --- a/web/templates/admin/edit_server.html +++ b/web/templates/admin/edit_server.html @@ -684,8 +684,21 @@


    +
    @@ -700,7 +713,7 @@ - + @@ -708,4 +721,16 @@ -
    \ No newline at end of file + + + \ No newline at end of file diff --git a/web/templates/file_manager/main.php b/web/templates/file_manager/main.php index 634e7fc12..20fb1c107 100644 --- a/web/templates/file_manager/main.php +++ b/web/templates/file_manager/main.php @@ -474,6 +474,8 @@ else { FM['CURRENT_A_LINE'] = 0; } + + FM.preselectedItems.A = []; /*FM.setTabActive(FM.TAB_A, 'skip_highlights'); $(".listing-left .selected, .listing-left .ui-selectee").each(function(i, o) { @@ -538,6 +540,8 @@ else { FM['CURRENT_B_LINE'] = 0; } + + FM.preselectedItems.B = []; }, unselected: function (event, ui) { diff --git a/web/view/file/index.php b/web/view/file/index.php index 40e314920..2e8fd58f7 100644 --- a/web/view/file/index.php +++ b/web/view/file/index.php @@ -1,7 +1,17 @@ - fotorama - - - + + +
    - + class="fotoram" data-fit="scaledown" data-allowfullscreen="true" data-nav="false"> +
    From 897606631355a64e96fb8bbf41d951de78c29df9 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Mon, 5 Oct 2015 23:33:01 +0300 Subject: [PATCH 078/264] uniq databases during restore --- bin/v-restore-user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-restore-user b/bin/v-restore-user index efdb21e25..33d5cdfe2 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -649,7 +649,7 @@ if [ "$db" != 'no' ]; then # Create domain list db_list=$(tar -tf $BACKUP/$backup | grep "^./db" |\ - grep db.conf | cut -f 3 -d '/') + grep db.conf | cut -f 3 -d '/' |sort -u) if [ ! -z "$db" ]; then db_include_list=$(mktemp) for db_include in ${db//,/ }; do From 70a8f75f1b880ccbd31dfdf52f5927f870a8c397 Mon Sep 17 00:00:00 2001 From: Daniel Ting Date: Thu, 8 Oct 2015 19:10:59 +1100 Subject: [PATCH 079/264] Update SSL Ciphers To fix RC4 immediate deprecation by major web browsers. Using old configuration results in "Insecure Certificate" errors. Strong Ciphers via CloudFlare (https://github.com/cloudflare/sslconfig/blob/master/conf). Excluded CloudFlare's use of ChaCha cipher due to compatibility patch required. Info Source: https://tools.ietf.org/html/rfc7465 https://www.pcicomplianceguide.org/pci-dss-v3-1-and-ssl-what-you-should-do-now/ https://blog.digicert.com/major-browsers-announce-rc4-deprecation/ --- src/rpm/conf/nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpm/conf/nginx.conf b/src/rpm/conf/nginx.conf index 4fea24365..9d4ffbfd6 100644 --- a/src/rpm/conf/nginx.conf +++ b/src/rpm/conf/nginx.conf @@ -37,7 +37,8 @@ http { # SSL PCI Compliance - ssl_ciphers RC4:HIGH:!aNULL:!MD5:!kEDH; + ssl_protocols TLSv1.2 TLSv1.1 TLSv1; + ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; ssl_session_cache shared:SSL:10m; ssl_prefer_server_ciphers on; From 4049a319a65413ada5c7f42b34dc5031fd3924c9 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 8 Oct 2015 15:07:53 +0300 Subject: [PATCH 080/264] FileManager stuff --- web/edit/file/index.php | 28 ++- web/file_manager/upload_file.php | 2 +- web/inc/i18n/ar.php | 46 +++++ web/inc/i18n/bs.php | 46 +++++ web/inc/i18n/cn.php | 46 +++++ web/inc/i18n/cz.php | 46 +++++ web/inc/i18n/de.php | 46 +++++ web/inc/i18n/el.php | 45 +++++ web/inc/i18n/en.php | 46 +++++ web/inc/i18n/es.php | 45 +++++ web/inc/i18n/fi.php | 45 +++++ web/inc/i18n/fr.php | 45 +++++ web/inc/i18n/hu.php | 45 +++++ web/inc/i18n/id.php | 45 +++++ web/inc/i18n/it.php | 45 +++++ web/inc/i18n/nl.php | 45 +++++ web/inc/i18n/no.php | 45 +++++ web/inc/i18n/pt.php | 45 +++++ web/inc/i18n/ro.php | 45 +++++ web/inc/i18n/ru.php | 45 +++++ web/inc/i18n/se.php | 45 +++++ web/inc/i18n/tr.php | 45 +++++ web/inc/i18n/tw.php | 45 +++++ web/inc/i18n/ua.php | 45 +++++ web/js/i18n.js.php | 64 ++++--- web/js/templates.js | 8 +- web/templates/file_manager/main.php | 242 ++---------------------- web/templates/file_manager/tab_menu.php | 47 ++--- 28 files changed, 1090 insertions(+), 297 deletions(-) diff --git a/web/edit/file/index.php b/web/edit/file/index.php index ea90079cc..7620d3db0 100644 --- a/web/edit/file/index.php +++ b/web/edit/file/index.php @@ -2,6 +2,8 @@ session_start(); include($_SERVER['DOCUMENT_ROOT']."/inc/main.php"); + +$user = $_SESSION['user']; /* if (empty($panel)) { $command = VESTA_CMD."v-list-user '".$user."' 'json'"; @@ -56,7 +58,16 @@ if ((!isset($_SESSION['user'])) && (!defined('NO_AUTH_REQUIRED'))) { $f = fopen ($fn, 'w+'); fwrite($f, $_POST['contents']); if ($f) { - copy($fn, $path); + //copy($fn, $path); + exec (VESTA_CMD . "v-copy-fs-file {$user} {$fn} {$path}", $output, $return_var); + + $error = check_return_code($return_var, $output); + if ($return_var != 0) { + var_dump(VESTA_CMD . "v-copy-fs-file {$user} {$fn} {$path}"); + var_dump($path); + var_dump($output); + die('

    Error while saving file

    ');//echo '0'; + } } unlink($fn); } @@ -65,13 +76,24 @@ if ((!isset($_SESSION['user'])) && (!defined('NO_AUTH_REQUIRED'))) { // $content = file_get_contents($path); // v-open-fs-file - exec (VESTA_CMD . "v-open-fs-file {$user} {$path}", $content, $return_var); + + //print file_get_contents($path); + exec (VESTA_CMD . "v-check-fs-permission {$user} {$path}", $content, $return_var); + + if ($return_var != 0) { + print 'Error while opening file'; // todo: handle this more styled + exit; + } + + + /*exec (VESTA_CMD . "v-open-fs-file {$user} {$path}", $content, $return_var); if ($return_var != 0) { print 'Error while opening file'; // todo: handle this more styled exit; } - $content = implode("\n", $content); + $content = implode("\n", $content);*/ + $content = file_get_contents($path); } } else { diff --git a/web/file_manager/upload_file.php b/web/file_manager/upload_file.php index 16fa7c5fa..7bfaca70e 100644 --- a/web/file_manager/upload_file.php +++ b/web/file_manager/upload_file.php @@ -27,7 +27,7 @@ if (!empty($_FILES) && $_POST['token'] == $verifyToken) { exec (VESTA_CMD . "v-copy-fs-file {$user} {$tempFile} {$targetFile}", $output, $return_var); - $error = self::check_return_code($return_var, $output); + $error = check_return_code($return_var, $output); if ($return_var != 0) { echo '0'; } else { diff --git a/web/inc/i18n/ar.php b/web/inc/i18n/ar.php index b43c098f6..5bc781497 100644 --- a/web/inc/i18n/ar.php +++ b/web/inc/i18n/ar.php @@ -499,4 +499,50 @@ $LANG['ar'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + + ); \ No newline at end of file diff --git a/web/inc/i18n/bs.php b/web/inc/i18n/bs.php index e32bbd7a4..795af1bdb 100644 --- a/web/inc/i18n/bs.php +++ b/web/inc/i18n/bs.php @@ -495,4 +495,50 @@ $LANG['bs'] = array( 'Date' => 'Datum', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + + ); \ No newline at end of file diff --git a/web/inc/i18n/cn.php b/web/inc/i18n/cn.php index e602e8585..e1c2446d7 100644 --- a/web/inc/i18n/cn.php +++ b/web/inc/i18n/cn.php @@ -500,4 +500,50 @@ $LANG['cn'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + + ); \ No newline at end of file diff --git a/web/inc/i18n/cz.php b/web/inc/i18n/cz.php index 468c18f32..7a1d94482 100644 --- a/web/inc/i18n/cz.php +++ b/web/inc/i18n/cz.php @@ -501,4 +501,50 @@ $LANG['cz'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + + ); \ No newline at end of file diff --git a/web/inc/i18n/de.php b/web/inc/i18n/de.php index 46dc9a8b5..116217192 100644 --- a/web/inc/i18n/de.php +++ b/web/inc/i18n/de.php @@ -499,4 +499,50 @@ $LANG['de'] = array( 'Date' => 'Datum', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + + ); \ No newline at end of file diff --git a/web/inc/i18n/el.php b/web/inc/i18n/el.php index 28de3e3ac..b6de95967 100644 --- a/web/inc/i18n/el.php +++ b/web/inc/i18n/el.php @@ -501,4 +501,49 @@ $LANG['el'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/en.php b/web/inc/i18n/en.php index 48e7dd86b..3b9b469a7 100644 --- a/web/inc/i18n/en.php +++ b/web/inc/i18n/en.php @@ -500,4 +500,50 @@ $LANG['en'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/es.php b/web/inc/i18n/es.php index f2d44ba2b..6902a6853 100644 --- a/web/inc/i18n/es.php +++ b/web/inc/i18n/es.php @@ -500,4 +500,49 @@ $LANG['es'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/fi.php b/web/inc/i18n/fi.php index ac05de6ae..299eff03c 100644 --- a/web/inc/i18n/fi.php +++ b/web/inc/i18n/fi.php @@ -504,4 +504,49 @@ $LANG['fi'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/fr.php b/web/inc/i18n/fr.php index ad79a3477..adfd7a0b1 100644 --- a/web/inc/i18n/fr.php +++ b/web/inc/i18n/fr.php @@ -502,4 +502,49 @@ $LANG['fr'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/hu.php b/web/inc/i18n/hu.php index f4efe1788..3d5979fc9 100644 --- a/web/inc/i18n/hu.php +++ b/web/inc/i18n/hu.php @@ -502,4 +502,49 @@ $LANG['hu'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/id.php b/web/inc/i18n/id.php index 3fdb6a192..87ad75bd9 100644 --- a/web/inc/i18n/id.php +++ b/web/inc/i18n/id.php @@ -503,4 +503,49 @@ $LANG['id'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/it.php b/web/inc/i18n/it.php index 1a8590bcb..f5b8797ad 100644 --- a/web/inc/i18n/it.php +++ b/web/inc/i18n/it.php @@ -501,4 +501,49 @@ $LANG['it'] = array( 'Date' => 'Data', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/nl.php b/web/inc/i18n/nl.php index 15f03a0d1..40e3fde6e 100644 --- a/web/inc/i18n/nl.php +++ b/web/inc/i18n/nl.php @@ -501,4 +501,49 @@ $LANG['nl'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/no.php b/web/inc/i18n/no.php index f2bb0b8a7..52a2db7b7 100644 --- a/web/inc/i18n/no.php +++ b/web/inc/i18n/no.php @@ -501,4 +501,49 @@ $LANG['no'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/pt.php b/web/inc/i18n/pt.php index b038cbd15..0b10004e9 100644 --- a/web/inc/i18n/pt.php +++ b/web/inc/i18n/pt.php @@ -500,4 +500,49 @@ $LANG['pt'] = array( 'Date' => 'Data', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); diff --git a/web/inc/i18n/ro.php b/web/inc/i18n/ro.php index 4de396fc5..cdd4f0128 100644 --- a/web/inc/i18n/ro.php +++ b/web/inc/i18n/ro.php @@ -502,4 +502,49 @@ $LANG['ro'] = array( 'Date' => 'Data', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/ru.php b/web/inc/i18n/ru.php index 4266d3cfd..760837f2c 100644 --- a/web/inc/i18n/ru.php +++ b/web/inc/i18n/ru.php @@ -502,4 +502,49 @@ $LANG['ru'] = array( 'Date' => 'Дата', 'Starred' => 'Избранные', 'Name' => 'Имя', + + 'File Manager' => 'Файлы', + 'type' => 'тип', + 'size' => 'размер', + 'date' => 'дата', + 'name' => 'имя', + 'Initializing' => 'В процессе', + 'UPLOAD' => 'ЗАГРУЗИТЬ', + 'NEW FILE' => 'ФАЙЛ', + 'NEW DIR' => 'ПАПКА', + 'DELETE' => 'УДАЛИТЬ', + 'RENAME' => 'ПЕРЕИМЕНОВАТЬ', + 'COPY' => 'КОПИЯ', + 'ARCHIVE' => 'АРХИВ', + 'EXTRACT' => 'РАСПАКОВАТЬ', + 'DOWNLOAD' => 'СКАЧАТЬ', + 'Hit' => 'Нажмите', + 'to reload the page' => 'чтобы перегрузить страницу', + 'Directory name cannot be empty' => 'Название директории не может быть пустым', + 'File name cannot be empty' => 'Название файла не может быть пустым', + 'No file selected' => 'Ничего не выбрано', + 'No file or folder selected' => 'Не выбрано ни одного файла или папки', + 'File type not supported' => 'Данный тип файла не поддерживается', + 'Directory download not available in current version' => 'В этой версии панели загрузка папок ещё не поддерживается', + 'Directory not available' => 'Папка недоступна', + 'Done' => 'Готово', + 'Close' => 'Закрыть', + 'Copy' => 'Скопировать', + 'Cancel' => 'Отмена', + 'Rename' => 'Переименовать', + 'Delete' => 'Удалить', + 'Extract' => 'Распаковать', + 'Create' => 'Создать', + 'Compress' => 'Запаковать', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Вы уверены, что хотите скопировать', + 'Are you sure you want to delete' => 'Вы уверены, что хотите удалить', + 'into' => 'в', + 'existing files will be replaced' => 'существующие файлы будут перезаписаны', + 'Original name' => 'Оригинальное имя', + 'File' => 'Файл', + 'already exists' => 'уже существует', + 'Create file' => 'Создать файл', + 'Create directory' => 'Создать папку', + ); \ No newline at end of file diff --git a/web/inc/i18n/se.php b/web/inc/i18n/se.php index af5461743..be8fae3aa 100644 --- a/web/inc/i18n/se.php +++ b/web/inc/i18n/se.php @@ -498,4 +498,49 @@ $LANG['se'] = array( 'Date' => 'Datum', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/tr.php b/web/inc/i18n/tr.php index a95a2bdfb..5d3618803 100644 --- a/web/inc/i18n/tr.php +++ b/web/inc/i18n/tr.php @@ -500,4 +500,49 @@ $LANG['tr'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/tw.php b/web/inc/i18n/tw.php index 8cb4d1eed..509ef315d 100644 --- a/web/inc/i18n/tw.php +++ b/web/inc/i18n/tw.php @@ -500,4 +500,49 @@ $LANG['tw'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/inc/i18n/ua.php b/web/inc/i18n/ua.php index 1c827cc32..e51d0b474 100644 --- a/web/inc/i18n/ua.php +++ b/web/inc/i18n/ua.php @@ -502,4 +502,49 @@ $LANG['ua'] = array( 'Date' => 'Date', 'Starred' => 'Starred', 'Name' => 'Name', + + 'File Manager' => 'File Manager', + 'type' => 'type', + 'size' => 'size', + 'date' => 'date', + 'name' => 'name', + 'Initializing' => 'Initializing', + 'UPLOAD' => 'UPLOAD', + 'NEW FILE' => 'NEW FILE', + 'NEW DIR' => 'NEW DIR', + 'DELETE' => 'DELETE', + 'RENAME' => 'RENAME', + 'COPY' => 'COPY', + 'ARCHIVE' => 'ARCHIVE', + 'EXTRACT' => 'EXTRACT', + 'DOWNLOAD' => 'DOWNLOAD', + 'Hit' => 'Hit', + 'to reload the page' => 'to reload the page', + 'Directory name cannot be empty' => 'Directory name cannot be empty', + 'File name cannot be empty' => 'File name cannot be empty', + 'No file selected' => 'No file selected', + 'No file or folder selected' => 'No file or folder selected', + 'File type not supported' => 'File type not supported', + 'Directory download not available in current version' => 'Directory download not available in current version', + 'Directory not available' => 'Directory not available', + 'Done' => 'Done', + 'Close' => 'Close', + 'Copy' => 'Copy', + 'Cancel' => 'Cancel', + 'Rename' => 'Rename', + 'Delete' => 'Delete', + 'Extract' => 'Extract', + 'Create' => 'Create', + 'Compress' => 'Compress', + 'OK' => 'OK', + 'Are you sure you want to copy' => 'Are you sure you want to copy', + 'Are you sure you want to delete' => 'Are you sure you want to delete', + 'into' => 'into', + 'existing files will be replaced' => 'existing files will be replaced', + 'Original name' => 'Original name', + 'File' => 'File', + 'already exists' => 'already exists', + 'Create file' => 'Create file', + 'Create directory' => 'Create directory', + ); \ No newline at end of file diff --git a/web/js/i18n.js.php b/web/js/i18n.js.php index dc7952341..e9a43aec8 100644 --- a/web/js/i18n.js.php +++ b/web/js/i18n.js.php @@ -44,40 +44,42 @@ if (!function_exists('__')) { } ?> -App.i18n.ARE_YOU_SURE = ''; -App.Constants.UNLIM_TRANSLATED_VALUE = ''; +App.i18n.ARE_YOU_SURE = ''; +App.Constants.UNLIM_TRANSLATED_VALUE = ''; -App.Constants.FM_DIRECTORY_NAME_CANNOT_BE_EMPTY = ''; -App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY = ''; -App.Constants.FM_NO_FILE_SELECTED = ''; -App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED = ''; -App.Constants.FM_FILE_TYPE_NOT_SUPPORTED = ''; -App.Constants.FM_DIRECTORY_DOWNLOAD_NOT_READY = ''; +App.Constants.FM_HIT = ''; +App.Constants.FM_TO_RELOAD_THE_PAGE = '' +App.Constants.FM_DIRECTORY_NAME_CANNOT_BE_EMPTY = ''; +App.Constants.FM_FILE_NAME_CANNOT_BE_EMPTY = ''; +App.Constants.FM_NO_FILE_SELECTED = ''; +App.Constants.FM_NO_FILE_OR_DIRECTORY_SELECTED = ''; +App.Constants.FM_FILE_TYPE_NOT_SUPPORTED = ''; +App.Constants.FM_DIRECTORY_DOWNLOAD_NOT_READY = ''; -App.Constants.FM_DIRECTORY_NOT_AVAILABLE = ''; -App.Constants.FM_DONE = ''; -App.Constants.FM_CLOSE = ''; -App.Constants.FM_COPY = ''; -App.Constants.FM_CANCEL = ''; -App.Constants.FM_RENAME = ''; -App.Constants.FM_DELETE = ''; -App.Constants.FM_EXTRACT = ''; -App.Constants.FM_CREATE = ''; -App.Constants.FM_PACK = ''; -App.Constants.FM_PACK_BUTTON = ''; -App.Constants.FM_OK = ''; -App.Constants.FM_YOU_ARE_COPYING = ''; -App.Constants.FM_YOU_ARE_REMOVING = ''; +App.Constants.FM_DIRECTORY_NOT_AVAILABLE = ''; +App.Constants.FM_DONE = ''; +App.Constants.FM_CLOSE = ''; +App.Constants.FM_COPY = ''; +App.Constants.FM_CANCEL = ''; +App.Constants.FM_RENAME = ''; +App.Constants.FM_DELETE = ''; +App.Constants.FM_EXTRACT = ''; +App.Constants.FM_CREATE = ''; +App.Constants.FM_PACK = ''; +App.Constants.FM_PACK_BUTTON = ''; +App.Constants.FM_OK = ''; +App.Constants.FM_YOU_ARE_COPYING = ''; +App.Constants.FM_YOU_ARE_REMOVING = ''; -App.Constants.FM_CONFIRM_COPY = ''; -App.Constants.FM_CONFIRM_DELETE = ''; -App.Constants.FM_INTO_KEYWORD = ''; -App.Constants.FM_EXISTING_FILES_WILL_BE_REPLACED= ''; -App.Constants.FM_ORIGINAL_NAME = ''; -App.Constants.FM_FILE = ''; -App.Constants.FM_ALREADY_EXISTS = ''; -App.Constants.FM_CREATE_FILE = ''; -App.Constants.FM_CREATE_DIRECTORY = ''; +App.Constants.FM_CONFIRM_COPY = ''; +App.Constants.FM_CONFIRM_DELETE = ''; +App.Constants.FM_INTO_KEYWORD = ''; +App.Constants.FM_EXISTING_FILES_WILL_BE_REPLACED= ''; +App.Constants.FM_ORIGINAL_NAME = ''; +App.Constants.FM_FILE = ''; +App.Constants.FM_ALREADY_EXISTS = ''; +App.Constants.FM_CREATE_FILE = ''; +App.Constants.FM_CREATE_DIRECTORY = ''; diff --git a/web/js/templates.js b/web/js/templates.js index df0ad188e..905fa5692 100644 --- a/web/js/templates.js +++ b/web/js/templates.js @@ -9,14 +9,10 @@ App.Templates.html = { // file manager // -//\ - FM: { reload_in_time: [ - //'
    If you want to reload, hit key "Y" to reload.
    You have ~!:TIME_LEFT~!s. to do this.
    Hurry up!
    ' '
    \ - \ -
    Hit F5 to reload the page
    \ +
    '+App.Constants.FM_HIT+' F5 '+App.Constants.FM_TO_RELOAD_THE_PAGE+'
    \
    ' ], entry_line: ['
  • \ @@ -38,7 +34,7 @@ App.Templates.html = { popup_alert: [''], popup_bulk: ['
  • \ \ \ @@ -37,14 +37,33 @@ App.Templates.html = {

    '+App.Constants.FM_CLOSE+'

    \ \ '], - popup_bulk: [''],*/ popup_delete: ['