я установил elFinder в мою открытую корзину, но пытаясь отключить перетаскивание папок в подпапках и копировать / вставлять / вырезать файлы и папки, я видел похожие проблемы, но пока не нашел решения
i установить следующие параметры в image_filemanager.tpl
var elf = $('#elfinder').elfinder({
url : '<?php echo $url; ?>',
height : 700,
allowShortcuts: false,
copyFrom: false,
copyTo: false,
dragUploadAllow: 'false',
/*lang : 'ar',*/
commandsOptions : {
help : { view : ['shortcuts', 'help', 'debug'], helpSource : '' }
},
uiOptions : {
toolbar : [ ['back', 'forward'],['reload'],['home', 'up'],['open', 'download', 'getfile'],['search'],['view', 'sort'],['quicklook'],['info', 'chmod'],['fullscreen'] ],
toolbarExtra : { displayTextLabel: true,},
},
getFileCallback : function(files, fm) {
if(image_source == 'summernote') {
/*var summerNote = 'input-description1';*/
var summerNote = summernote_id;
var range, sel = document.getSelection();
if (sel.rangeCount) {
var img = document.createElement('img');
img.src = files[0].url;
range = sel.getRangeAt(0);
range.insertNode(img);
$('#modal-image').modal('hide');
}
} else {
$('#<?php echo $thumb; ?>').find('img').attr('src', files.tmb);
$('#<?php echo $target; ?>').val(files.path);
$('#modal-image').modal('hide');
}
},
}).elfinder('instance');
и настроить их в разъеме. php
'roots' => array(
// Items volume
array(
'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
'path' => '../files/', // path to files (REQUIRED)
'URL' => dirname($_SERVER['PHP_SELF']) . '/../files/', // URL to files (REQUIRED)
'trashHash' => 't1_Lw', // elFinder's hash of trash folder
'winHashFix' => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
'uploadDeny' => array('all'), // All Mimetypes not allowed to upload
'uploadAllow' => array('image', 'text/plain'),// Mimetype `image` and `text/plain` allowed to upload
'disabled' => array('cut', 'copy', 'paste'),
'uploadOrder' => array('deny', 'allow'), // allowed Mimetype `image` and `text/plain` only
'accessControl' => 'access' // disable and hide dot starting files (OPTIONAL)
),
// Trash volume
array(
'id' => '1',
'driver' => 'Trash',
'path' => '../files/.trash/',
'tmbURL' => dirname($_SERVER['PHP_SELF']) . '/../files/.trash/.tmb/',
'winHashFix' => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
'uploadDeny' => array('all'), // Recomend the same settings as the original volume that uses the trash
'uploadAllow' => array('image', 'text/plain'),// Same as above
'uploadOrder' => array('deny', 'allow'), // Same as above
'accessControl' => 'access', // Same as above
)
)