mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-07-14 09:03:20 -07:00
Fixes for FM
This commit is contained in:
parent
ec43524083
commit
5d070fc9a5
13 changed files with 274 additions and 1489 deletions
|
@ -556,11 +556,12 @@ input[type="checkbox"] {
|
||||||
.menu div.button { display: none; }
|
.menu div.button { display: none; }
|
||||||
.menu div.button.medium,
|
.menu div.button.medium,
|
||||||
.menu div.button.small { display: inline-block; }
|
.menu div.button.small { display: inline-block; }
|
||||||
.listing li .filename-holder { max-width: 20%; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1080px) {
|
@media (max-width: 1080px) {
|
||||||
|
.listing li .filename-holder { max-width: 36%; }
|
||||||
.listing li .owner { display: none; }
|
.listing li .owner { display: none; }
|
||||||
|
.listing li .mode { display: none; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 890px) {
|
@media (max-width: 890px) {
|
||||||
|
|
|
@ -5,7 +5,6 @@ input.save {
|
||||||
background-color: rgba(247, 165, 48, 0.8);
|
background-color: rgba(247, 165, 48, 0.8);
|
||||||
border: 1px solid #f79b44;
|
border: 1px solid #f79b44;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
/* bottom: 17px;*/
|
|
||||||
top: 9px;
|
top: 9px;
|
||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -32,13 +31,5 @@ input.save:active { border: 1px solid #FFCC00; background-color: #FFCC00; color:
|
||||||
.ace-twilight .ace_gutter-active-line { margin-top: 10px; }
|
.ace-twilight .ace_gutter-active-line { margin-top: 10px; }
|
||||||
|
|
||||||
.ace_gutter-cell { color: #777; }
|
.ace_gutter-cell { color: #777; }
|
||||||
/*
|
|
||||||
.ace_gutter-cell { color: #777; padding: 9px 0px 0px 4px; }
|
|
||||||
.ace_line { padding: 9px 0px 0px 4px; }
|
|
||||||
|
|
||||||
.ace_editor,
|
|
||||||
.ace-twilight .ace_cursor,
|
|
||||||
.ace_text-input { font-size: 17px; }
|
|
||||||
*/
|
|
||||||
|
|
||||||
.ace_editor { font-size: 19px !important; }
|
.ace_editor { font-size: 19px !important; }
|
||||||
|
|
156
web/css/styles.min.css
vendored
156
web/css/styles.min.css
vendored
|
@ -663,7 +663,7 @@ input[type="checkbox"] {
|
||||||
height: 22px;
|
height: 22px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
width: 73px;
|
width: 73px;
|
||||||
margin-left: -11px;
|
margin-left: -2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.l-header {
|
.l-header {
|
||||||
|
@ -746,7 +746,8 @@ input[type="checkbox"] {
|
||||||
float: left;
|
float: left;
|
||||||
color: #a4abad;
|
color: #a4abad;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
padding: 10px 5px;
|
padding: 10px 0 0 10px;
|
||||||
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
.l-profile__username:hover {
|
.l-profile__username:hover {
|
||||||
color: #ffd62e;
|
color: #ffd62e;
|
||||||
|
@ -759,8 +760,8 @@ input[type="checkbox"] {
|
||||||
.l-profile__logout {
|
.l-profile__logout {
|
||||||
float: left;
|
float: left;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
margin-left: 40px;
|
/* margin-left: 40px; */
|
||||||
padding: 10px 5px;
|
padding: 10px 0 0 10px;
|
||||||
}
|
}
|
||||||
.l-profile__logout:hover {
|
.l-profile__logout:hover {
|
||||||
color: #C0E60E;
|
color: #C0E60E;
|
||||||
|
@ -775,6 +776,111 @@ input[type="checkbox"] {
|
||||||
padding: 8px 5px;
|
padding: 8px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.l-profile__notifications {
|
||||||
|
background: url("/images/sprite.png") no-repeat scroll -129px -135px;
|
||||||
|
border-radius: 30px;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
float: left;
|
||||||
|
font-weight: bold;
|
||||||
|
height: 15px;
|
||||||
|
margin-right: 4px;
|
||||||
|
margin-top: 5px;
|
||||||
|
padding: 10px 5px 0;
|
||||||
|
width: 15px;
|
||||||
|
}
|
||||||
|
.l-profile__notifications.active {
|
||||||
|
background-color: #454545;
|
||||||
|
}
|
||||||
|
.l-profile__notifications:hover {
|
||||||
|
background-color: #333;
|
||||||
|
}
|
||||||
|
.l-profile__notifications:active {
|
||||||
|
background-color: #c4da5e;
|
||||||
|
}
|
||||||
|
.l-profile__notifications.updates {
|
||||||
|
background-position: -165px -135px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.l-profile__notifications.updates2 {
|
||||||
|
/* background-position: -202px -135px; */
|
||||||
|
background-position: -202px -157px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-container {
|
||||||
|
background-color: #454545;
|
||||||
|
box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.3);
|
||||||
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-left: 0;
|
||||||
|
position: fixed;
|
||||||
|
top: 34px;
|
||||||
|
width: 351px;
|
||||||
|
z-index: 21;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 0;
|
||||||
|
color: #9E9E9E;
|
||||||
|
}
|
||||||
|
.notification-container li {
|
||||||
|
border-bottom: 1px solid #555;
|
||||||
|
padding: 10px 15px 24px;
|
||||||
|
}
|
||||||
|
.notification-container .mark-seen {
|
||||||
|
background: rgba(0, 0, 0, 0) url("/images/sprite.png") repeat scroll -427px -486px;
|
||||||
|
border: 5px solid #454545;
|
||||||
|
border-radius: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
float: right;
|
||||||
|
height: 9px;
|
||||||
|
margin-right: -8px;
|
||||||
|
margin-top: -3px;
|
||||||
|
width: 9px;
|
||||||
|
}
|
||||||
|
.notification-container .mark-seen:hover {
|
||||||
|
background-color: #333;
|
||||||
|
border-color: #333;
|
||||||
|
}
|
||||||
|
.notification-container .mark-seen:active {
|
||||||
|
background-color: #777;
|
||||||
|
border-color: #777;
|
||||||
|
}
|
||||||
|
.notification-container .title {
|
||||||
|
color: #9e9e9e;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 30px;
|
||||||
|
padding: 0;
|
||||||
|
text-transform: none;
|
||||||
|
float: none;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.notification-container .title a {
|
||||||
|
color: #9e9e9e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-container .unseen .title a,
|
||||||
|
.notification-container .unseen .title {
|
||||||
|
color: #C4DA5E;
|
||||||
|
}
|
||||||
|
.notification-container .unseen .title a:hover {
|
||||||
|
color: #ffcc00;
|
||||||
|
}
|
||||||
|
.notification-container .unseen .title a:active {
|
||||||
|
color: #dacf2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.notification-container a {
|
||||||
|
color: #5ABDB5;/* #eee;*/
|
||||||
|
}
|
||||||
|
.notification-container a:hover {
|
||||||
|
color: #2CA99B;
|
||||||
|
}
|
||||||
|
.notification-container a:active {
|
||||||
|
color: #00C0C0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.l-stat {
|
.l-stat {
|
||||||
|
@ -1406,7 +1512,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
}
|
}
|
||||||
.l-unit__stat-col--left.wide-4 {
|
.l-unit__stat-col--left.wide-4 {
|
||||||
width: 575px;
|
width: 550px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2686,6 +2792,7 @@ form#vstobjects.suspended {
|
||||||
padding: 3px 14px 3px 27px;
|
padding: 3px 14px 3px 27px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
word-break: keep-all;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2838,7 +2945,7 @@ form#vstobjects.suspended {
|
||||||
.description {
|
.description {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 45px;
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
}
|
}
|
||||||
.description ul{
|
.description ul{
|
||||||
|
@ -2857,13 +2964,13 @@ form#vstobjects.suspended {
|
||||||
color: #2c9491;
|
color: #2c9491;
|
||||||
}
|
}
|
||||||
.description a.purchase {
|
.description a.purchase {
|
||||||
color: #86A307;
|
color: #FFF;
|
||||||
background-color: #9fbf0c;
|
background-color: #9fbf0c;
|
||||||
|
border: none;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
color: #fff;
|
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 7px;
|
padding: 7px 15px;;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
@ -2871,6 +2978,30 @@ form#vstobjects.suspended {
|
||||||
background-color: #c0e60f;
|
background-color: #c0e60f;
|
||||||
color: #555;
|
color: #555;
|
||||||
}
|
}
|
||||||
|
.description a.purchase:active {
|
||||||
|
background-color: #D9F210;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.description a.cancel {
|
||||||
|
background-color: #999;
|
||||||
|
border: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 7px 15px;
|
||||||
|
text-transform: capitalize;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.description a.cancel:hover {
|
||||||
|
background-color: #2c9491;
|
||||||
|
}
|
||||||
|
.description a.cancel:active {
|
||||||
|
background-color: #5f9491;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.description .licence {
|
.description .licence {
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
color: #2c9491;
|
color: #2c9491;
|
||||||
|
@ -2887,3 +3018,10 @@ form#vstobjects.suspended {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.description .twoco {
|
||||||
|
font-style: italic;
|
||||||
|
line-height: 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
* jQuery File Upload Plugin PHP Example 5.14
|
|
||||||
* https://github.com/blueimp/jQuery-File-Upload
|
|
||||||
*
|
|
||||||
* Copyright 2010, Sebastian Tschan
|
|
||||||
* https://blueimp.net
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license:
|
|
||||||
* http://www.opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
|
|
||||||
error_reporting(E_ALL | E_STRICT);
|
|
||||||
require('UploadHandler.php');
|
|
||||||
$upload_handler = new UploadHandler();
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
|
||||||
|
|
||||||
// todo: set in session?
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Define a destination
|
|
||||||
//$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'];
|
|
||||||
|
|
||||||
exec (VESTA_CMD . "v-copy-fs-file {$user} {$tempFile} {$targetFile}", $output, $return_var);
|
|
||||||
|
|
||||||
$error = check_return_code($return_var, $output);
|
|
||||||
if ($return_var != 0) {
|
|
||||||
echo '0';
|
|
||||||
} else {
|
|
||||||
echo '1';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
Binary file not shown.
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 49 KiB |
|
@ -238,6 +238,7 @@ VE.navigation.enter_focused = function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
VE.navigation.move_focus_left = function(){
|
VE.navigation.move_focus_left = function(){
|
||||||
var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
|
var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
|
||||||
if(index == -1)
|
if(index == -1)
|
||||||
|
@ -248,6 +249,8 @@ VE.navigation.move_focus_left = function(){
|
||||||
} else {
|
} else {
|
||||||
$($(VE.navigation.state.menu_selector)[0]).addClass('focus');
|
$($(VE.navigation.state.menu_selector)[0]).addClass('focus');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VE.navigation.move_focus_right = function(){
|
VE.navigation.move_focus_right = function(){
|
||||||
|
@ -286,6 +289,71 @@ VE.navigation.switch_menu = function(){
|
||||||
$($(VE.navigation.state.menu_selector)[index]).addClass('focus');
|
$($(VE.navigation.state.menu_selector)[index]).addClass('focus');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
VE.navigation.move_focus_left = function(){
|
||||||
|
var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
|
||||||
|
if(index == -1)
|
||||||
|
index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_active_selector)));
|
||||||
|
|
||||||
|
$(VE.navigation.state.menu_selector).removeClass('focus');
|
||||||
|
|
||||||
|
if(index > 0){
|
||||||
|
$($(VE.navigation.state.menu_selector)[index-1]).addClass('focus');
|
||||||
|
} else {
|
||||||
|
VE.navigation.switch_menu('last');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VE.navigation.move_focus_right = function(){
|
||||||
|
var max_index = $(VE.navigation.state.menu_selector).length-1;
|
||||||
|
var index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_selector+'.focus')));
|
||||||
|
if(index == -1)
|
||||||
|
index = parseInt($(VE.navigation.state.menu_selector).index($(VE.navigation.state.menu_active_selector))) || 0;
|
||||||
|
|
||||||
|
$(VE.navigation.state.menu_selector).removeClass('focus');
|
||||||
|
|
||||||
|
if(index < max_index){
|
||||||
|
$($(VE.navigation.state.menu_selector)[index+1]).addClass('focus');
|
||||||
|
} else {
|
||||||
|
VE.navigation.switch_menu('first');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
VE.navigation.switch_menu = function(position){
|
||||||
|
position = position || 'first'; // last
|
||||||
|
|
||||||
|
if(VE.navigation.state.active_menu == 0){
|
||||||
|
VE.navigation.state.active_menu = 1;
|
||||||
|
VE.navigation.state.menu_selector = '.l-stat__col';
|
||||||
|
VE.navigation.state.menu_active_selector = '.l-stat__col--active';
|
||||||
|
$('.l-menu').removeClass('active');
|
||||||
|
$('.l-stat').addClass('active');
|
||||||
|
|
||||||
|
if(position == 'first'){
|
||||||
|
$($(VE.navigation.state.menu_selector)[0]).addClass('focus');
|
||||||
|
} else {
|
||||||
|
var max_index = $(VE.navigation.state.menu_selector).length-1;
|
||||||
|
$($(VE.navigation.state.menu_selector)[max_index]).addClass('focus');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
VE.navigation.state.active_menu = 0;
|
||||||
|
VE.navigation.state.menu_selector = '.l-menu__item';
|
||||||
|
VE.navigation.state.menu_active_selector = '.l-menu__item--active';
|
||||||
|
$('.l-menu').addClass('active');
|
||||||
|
$('.l-stat').removeClass('active');
|
||||||
|
|
||||||
|
if(position == 'first'){
|
||||||
|
$($(VE.navigation.state.menu_selector)[0]).addClass('focus');
|
||||||
|
} else {
|
||||||
|
var max_index = $(VE.navigation.state.menu_selector).length-1;
|
||||||
|
$($(VE.navigation.state.menu_selector)[max_index]).addClass('focus');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VE.navigation.init = function(){
|
VE.navigation.init = function(){
|
||||||
if($('.l-menu__item.l-menu__item--active').length){
|
if($('.l-menu__item.l-menu__item--active').length){
|
||||||
|
@ -295,7 +363,6 @@ VE.navigation.init = function(){
|
||||||
VE.navigation.state.menu_active_selector = '.l-menu__item--active';
|
VE.navigation.state.menu_active_selector = '.l-menu__item--active';
|
||||||
$('.l-menu').addClass('active');
|
$('.l-menu').addClass('active');
|
||||||
$('.l-stat').removeClass('active');
|
$('.l-stat').removeClass('active');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('.l-stat').addClass('active');
|
$('.l-stat').addClass('active');
|
||||||
}
|
}
|
||||||
|
|
|
@ -663,8 +663,7 @@ FM.generate_listing = function(reply, box) {
|
||||||
tpl.set(':SIZE_VALUE', o.type == 'f' ? FM.humanFileSizeValue(o.size) : ' ');
|
tpl.set(':SIZE_VALUE', o.type == 'f' ? FM.humanFileSizeValue(o.size) : ' ');
|
||||||
tpl.set(':SIZE_UNIT', o.type == 'f' ? FM.humanFileSizeUnit(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(':TIME', (psDate.getFullYear() != new Date().getFullYear()) ? psDate.getFullYear() || "" : time);
|
||||||
tpl.set(':DATE', o.date.trim() != '' ? psDate.format('mmm d') : ' '/*o.date*/);
|
tpl.set(':DATE', o.date.trim() != '' ? App.Constants.FM_TRANSLATED_DATES[psDate.format('mmm')] + psDate.format(' d'): ' '/*o.date*/);
|
||||||
|
|
||||||
|
|
||||||
if (o.name == '..' || o.type == 'd') {
|
if (o.name == '..' || o.type == 'd') {
|
||||||
tpl.set(':SUBMENU_CLASS', 'hidden');
|
tpl.set(':SUBMENU_CLASS', 'hidden');
|
||||||
|
|
|
@ -83,6 +83,6 @@ App.Constants.FM_FILE = '<?=__('File')?>';
|
||||||
App.Constants.FM_ALREADY_EXISTS = '<?=__('already exists')?>';
|
App.Constants.FM_ALREADY_EXISTS = '<?=__('already exists')?>';
|
||||||
App.Constants.FM_CREATE_FILE = '<?=__('Create file')?>';
|
App.Constants.FM_CREATE_FILE = '<?=__('Create file')?>';
|
||||||
App.Constants.FM_CREATE_DIRECTORY = '<?=__('Create directory')?>';
|
App.Constants.FM_CREATE_DIRECTORY = '<?=__('Create directory')?>';
|
||||||
|
App.Constants.FM_TRANSLATED_DATES = {'Jan': '<?=__('Jan')?>', 'Feb': '<?=__('Feb')?>','Mar': '<?=__('Mar')?>','Apr': '<?=__('Apr')?>','May': '<?=__('May')?>','Jun': '<?=__('Jun')?>','Jul': '<?=__('Jul')?>','Aug': '<?=__('Aug')?>','Sep': '<?=__('Sep')?>','Oct': '<?=__('Oct')?>','Nov': '<?=__('Nov')?>','Dec': '<?=__('Dec')?>'};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -86,11 +86,11 @@
|
||||||
<li><span class="key">n</span><?=__('New File')?></li>
|
<li><span class="key">n</span><?=__('New File')?></li>
|
||||||
<li><span class="key">F7</span><?=__('New Folder')?></li>
|
<li><span class="key">F7</span><?=__('New Folder')?></li>
|
||||||
<li><span class="key">d</span><?=__('Download')?></li>
|
<li><span class="key">d</span><?=__('Download')?></li>
|
||||||
<li><span class="key">F2 / <Shift>+F6</span><?=__('Rename')?></li>
|
<li><span class="key">F2 / Shift+F6</span><?=__('Rename')?></li>
|
||||||
<li><span class="key">F5</span><?=__('Copy')?></li>
|
<li><span class="key">F5</span><?=__('Copy')?></li>
|
||||||
<li><span class="key">a</span><?=__('Archive')?></li>
|
<li><span class="key">a</span><?=__('Archive')?></li>
|
||||||
<li><span class="key">F8 / Del</span><?=__('Delete')?></li>
|
<li><span class="key">F8 / Del</span><?=__('Delete')?></li>
|
||||||
<li class="step-top"><span class="key"><Ctrl> + s</span><?=__('Save File (in text editor)')?></li>
|
<li class="step-top"><span class="key">Ctrl + s</span><?=__('Save File (in text editor)')?></li>
|
||||||
<li class="step-top"><span class="key">h</span><?=__('Display/Close shortcuts')?></li>
|
<li class="step-top"><span class="key">h</span><?=__('Display/Close shortcuts')?></li>
|
||||||
<li class="step-top"><span class="key">Esc</span><?=__('Close Popup / Cancel')?></li>
|
<li class="step-top"><span class="key">Esc</span><?=__('Close Popup / Cancel')?></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -99,15 +99,15 @@
|
||||||
<li><span class="key bigger">↓</span><?=__('Move Cursor Down')?></li>
|
<li><span class="key bigger">↓</span><?=__('Move Cursor Down')?></li>
|
||||||
<li><span class="key bigger">←</span><?=__('Switch to Left Tab')?></li>
|
<li><span class="key bigger">←</span><?=__('Switch to Left Tab')?></li>
|
||||||
<li><span class="key bigger">→</span><?=__('Switch to Right Tab')?></li>
|
<li><span class="key bigger">→</span><?=__('Switch to Right Tab')?></li>
|
||||||
<li><span class="key"><Tab></span><?=__('Switch Tab')?></li>
|
<li><span class="key">Tab</span><?=__('Switch Tab')?></li>
|
||||||
<li><span class="key"><Home></span><?=__('Go to the Top of the File List')?></li>
|
<li><span class="key">Home</span><?=__('Go to the Top of the File List')?></li>
|
||||||
<li><span class="key"><End></span><?=__('Go to the Last File')?></li>
|
<li><span class="key">End</span><?=__('Go to the Last File')?></li>
|
||||||
<li class="step-top"><span class="key"><Enter></span><?=__('Open File / Enter Directory')?></li>
|
<li class="step-top"><span class="key">Enter</span><?=__('Open File / Enter Directory')?></li>
|
||||||
<li><span class="key"><Backspace></span><?=__('Go to Parent Directory')?></li>
|
<li><span class="key">Backspace</span><?=__('Go to Parent Directory')?></li>
|
||||||
<li class="step-top"><span class="key"><Insert> / <Space></span><?=__('Select Current File')?></li>
|
<li class="step-top"><span class="key">Insert / Space</span><?=__('Select Current File')?></li>
|
||||||
<li><span class="key"><Shift> + click</span><?=__('Select Bunch of Files')?></li>
|
<li><span class="key">Shift + click</span><?=__('Select Bunch of Files')?></li>
|
||||||
<li><span class="key"><Ctrl> + click</span><?=__('Add File to the Current Selection')?></li>
|
<li><span class="key">Ctrl + click</span><?=__('Add File to the Current Selection')?></li>
|
||||||
<li><span class="key"><Ctrl> + a</span><?=__('Select All Files')?></li>
|
<li><span class="key">Ctrl + a</span><?=__('Select All Files')?></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="note"><?=__('shortcuts are inspired by magnificent GNU <a href="https://www.midnight-commander.org/">Midnight Commander</a> file manager')?></ul>
|
<ul class="note"><?=__('shortcuts are inspired by magnificent GNU <a href="https://www.midnight-commander.org/">Midnight Commander</a> file manager')?></ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -177,19 +177,26 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
shortcut.add("a", function(evt){
|
$(window).bind('keypress', function(evt) {
|
||||||
|
if (evt.charCode == 97) {
|
||||||
|
evt.preventDefault();
|
||||||
if (!evt.ctrlKey && !evt.shiftKey) {
|
if (!evt.ctrlKey && !evt.shiftKey) {
|
||||||
if ($('.l-sort__create-btn')[0]) {
|
if ($('.l-sort__create-btn')[0]) {
|
||||||
location.href=$('.l-sort__create-btn').attr('href');
|
location.href=$('.l-sort__create-btn').attr('href');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
else {
|
||||||
'type': 'keyup',
|
if ($('.l-unit .ch-toggle:eq(0)').attr('checked')) {
|
||||||
'propagate': false,
|
$('.l-unit').removeClass('selected');
|
||||||
'disable_in_input': true,
|
$('.l-unit .ch-toggle').attr('checked', false);
|
||||||
'target': document
|
|
||||||
}
|
}
|
||||||
);
|
else {
|
||||||
|
$('.l-unit').addClass('selected');
|
||||||
|
$('.l-unit .ch-toggle').attr('checked', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
shortcut.add("n", function(evt){
|
shortcut.add("n", function(evt){
|
||||||
if (!evt.ctrlKey && !evt.shiftKey) {
|
if (!evt.ctrlKey && !evt.shiftKey) {
|
||||||
|
@ -205,29 +212,6 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
shortcut.add("Ctrl+m", function(evt){
|
|
||||||
console.log('ctrl+m');
|
|
||||||
}, {
|
|
||||||
'type': 'keyup',
|
|
||||||
'propagate': false,
|
|
||||||
'disable_in_input': true,
|
|
||||||
'target': document
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
shortcut.add("m", function(evt){
|
|
||||||
console.log('m');
|
|
||||||
}, {
|
|
||||||
'type': 'keyup',
|
|
||||||
'propagate': false,
|
|
||||||
'disable_in_input': true,
|
|
||||||
'target': document
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
shortcut.add("a+1", function(){
|
shortcut.add("a+1", function(){
|
||||||
location.href='/add/user/';
|
location.href='/add/user/';
|
||||||
}, {
|
}, {
|
||||||
|
@ -238,9 +222,6 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
shortcut.add("1", function(){
|
shortcut.add("1", function(){
|
||||||
if(VE.tmp.form_changed){
|
if(VE.tmp.form_changed){
|
||||||
VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(1) a').attr('href'));
|
VE.helpers.createConfirmationDialog($('.confirmation-text-redirect'), '', $('.l-stat .l-stat__col:nth-of-type(1) a').attr('href'));
|
||||||
|
@ -393,17 +374,6 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
shortcut.add("Alt", function(){
|
|
||||||
VE.navigation.switch_menu();
|
|
||||||
}, {
|
|
||||||
'type': 'keydown',
|
|
||||||
'propagate': false,
|
|
||||||
'disable_in_input': false,
|
|
||||||
'target': document
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
$('.shortcuts .close').click(function(){
|
$('.shortcuts .close').click(function(){
|
||||||
$('.shortcuts').hide();
|
$('.shortcuts').hide();
|
||||||
});
|
});
|
||||||
|
@ -412,6 +382,14 @@
|
||||||
$('.shortcuts').toggle();
|
$('.shortcuts').toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.l-profile__notifications').click(function(){
|
||||||
|
$('.notification-container').toggle();
|
||||||
|
$('.l-profile__notifications').toggleClass('active');
|
||||||
|
|
||||||
|
left = $('.l-profile__notifications').offset().left - $('.notification-container').outerWidth() + 28;
|
||||||
|
$('.notification-container').css({left: left+'px'});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
VE.navigation.init();
|
VE.navigation.init();
|
||||||
|
|
||||||
|
@ -462,7 +440,7 @@
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li><span class="key">n</span><?=__('Add New object')?></li>
|
<li><span class="key">n</span><?=__('Add New object')?></li>
|
||||||
<li><span class="key"><Ctrl> + Enter</span><?=__('Save Form')?></li>
|
<li><span class="key">Ctrl + Enter</span><?=__('Save Form')?></li>
|
||||||
<li><span class="key">Backspace</span><?=__('Cancel saving form')?></li>
|
<li><span class="key">Backspace</span><?=__('Cancel saving form')?></li>
|
||||||
|
|
||||||
<li class="step-top"><span class="key">1</span><?=__('Go to USER list')?></li>
|
<li class="step-top"><span class="key">1</span><?=__('Go to USER list')?></li>
|
||||||
|
@ -479,8 +457,7 @@
|
||||||
|
|
||||||
<li class="step-top"><span class="key bigger">←</span><?=__('Move backward through top menu')?></li>
|
<li class="step-top"><span class="key bigger">←</span><?=__('Move backward through top menu')?></li>
|
||||||
<li><span class="key bigger">→</span><?=__('Move forward through top menu')?></li>
|
<li><span class="key bigger">→</span><?=__('Move forward through top menu')?></li>
|
||||||
<li><span class="key"><Alt></span><?=__('Switch active menu')?></li>
|
<li><span class="key">Enter</span><?=__('Enter focused element')?></li>
|
||||||
<li><span class="key"><Enter></span><?=__('Enter focused element')?></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -116,7 +116,7 @@ class UploadHandler
|
||||||
// The php.ini settings upload_max_filesize and post_max_size
|
// The php.ini settings upload_max_filesize and post_max_size
|
||||||
// take precedence over the following max_file_size setting:
|
// take precedence over the following max_file_size setting:
|
||||||
'max_file_size' => null,
|
'max_file_size' => null,
|
||||||
'min_file_size' => 1,
|
'min_file_size' => null,
|
||||||
// The maximum number of files for the upload directory:
|
// The maximum number of files for the upload directory:
|
||||||
'max_number_of_files' => null,
|
'max_number_of_files' => null,
|
||||||
// Defines which files are handled as image files:
|
// Defines which files are handled as image files:
|
||||||
|
@ -477,8 +477,16 @@ class UploadHandler
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function sanitizeFileName($file) {
|
||||||
|
$file = preg_replace("/[^a-z0-9\._-]+/", '', $file);
|
||||||
|
|
||||||
|
return $file;
|
||||||
|
}
|
||||||
|
|
||||||
protected function get_unique_filename($file_path, $name, $size, $type, $error,
|
protected function get_unique_filename($file_path, $name, $size, $type, $error,
|
||||||
$index, $content_range) {
|
$index, $content_range) {
|
||||||
|
$name = $this->sanitizeFileName($name);
|
||||||
|
|
||||||
while(is_dir($this->get_upload_path($name))) {
|
while(is_dir($this->get_upload_path($name))) {
|
||||||
$name = $this->upcount_name($name);
|
$name = $this->upcount_name($name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue