Elfinder如何自定义菜单
Elfinder how to customize menu
您好,我正在使用 elfinder,我想删除删除和清空文件夹选项。我该如何删除它。这是我的代码。
<script>
$(function() {
$('#elfinder').elfinder({ // 1st Arg - options
cssAutoLoad : false,// Disable CSS auto loading
baseUrl : './',// Base URL to css/*, js/*
url : 'php/connector.minimal.php',// Connector URL
getFileCallback : function(file) {/* ... */},// Callback when a file is double-clicked
width: '100%',
height: $(window).height() - 20
});
});</script>
试试这个代码:
<script>
$(function() {
$('#elfinder').elfinder(
// 1st Arg - options
{
// Disable CSS auto loading
cssAutoLoad: false,
// Base URL to css/*, js/*
baseUrl: './',
// Connector URL
url: 'php/connector.minimal.php',
// Callback when a file is double-clicked
getFileCallback: function(file) {
// ...
},
uiOptions: {
// toolbar configuration
toolbar: [
['home', 'back', 'forward', 'up', 'reload'],
['mkdir', 'mkfile', 'upload'],
['open', 'download', 'getfile'],
['undo', 'redo'],
['copy', 'cut', 'paste'],
['duplicate', 'rename', 'edit', 'resize', 'chmod'],
['selectall', 'selectnone', 'selectinvert'],
['quicklook', 'info'],
['extract', 'archive'],
['search'],
['view', 'sort'],
['fullscreen']
]
},
contextmenu: {
// navbarfolder menu
navbar: ['open', 'download', '|', 'upload', 'mkdir', '|', 'copy', 'cut', 'paste', 'duplicate', '|', '|', 'rename', '|', 'places', 'info', 'chmod', 'netunmount'],
// current directory menu
cwd: ['undo', 'redo', '|', 'back', 'up', 'reload', '|', 'upload', 'mkdir', 'mkfile', 'paste', '|', '|', 'view', 'sort', 'selectall', 'colwidth', '|', 'info', '|', 'fullscreen', '|'],
// current directory file menu
files: ['getfile', '|', 'open', 'download', 'opendir', 'quicklook', '|', 'upload', 'mkdir', '|', 'copy', 'cut', 'paste', 'duplicate', '|', 'empty', '|', 'rename', 'edit', 'resize', '|', 'archive', 'extract', '|', 'selectall', 'selectinvert', '|', 'places', 'info', 'chmod', 'netunmount']
},
width: '100%',
height: $(window).height() - 20
});
});
</script>
您还可以从 elFinder.options.js 文件自定义菜单。已经在 client configuration 检查中提到了所有内容...!!!
您好,我正在使用 elfinder,我想删除删除和清空文件夹选项。我该如何删除它。这是我的代码。
<script>
$(function() {
$('#elfinder').elfinder({ // 1st Arg - options
cssAutoLoad : false,// Disable CSS auto loading
baseUrl : './',// Base URL to css/*, js/*
url : 'php/connector.minimal.php',// Connector URL
getFileCallback : function(file) {/* ... */},// Callback when a file is double-clicked
width: '100%',
height: $(window).height() - 20
});
});</script>
试试这个代码:
<script>
$(function() {
$('#elfinder').elfinder(
// 1st Arg - options
{
// Disable CSS auto loading
cssAutoLoad: false,
// Base URL to css/*, js/*
baseUrl: './',
// Connector URL
url: 'php/connector.minimal.php',
// Callback when a file is double-clicked
getFileCallback: function(file) {
// ...
},
uiOptions: {
// toolbar configuration
toolbar: [
['home', 'back', 'forward', 'up', 'reload'],
['mkdir', 'mkfile', 'upload'],
['open', 'download', 'getfile'],
['undo', 'redo'],
['copy', 'cut', 'paste'],
['duplicate', 'rename', 'edit', 'resize', 'chmod'],
['selectall', 'selectnone', 'selectinvert'],
['quicklook', 'info'],
['extract', 'archive'],
['search'],
['view', 'sort'],
['fullscreen']
]
},
contextmenu: {
// navbarfolder menu
navbar: ['open', 'download', '|', 'upload', 'mkdir', '|', 'copy', 'cut', 'paste', 'duplicate', '|', '|', 'rename', '|', 'places', 'info', 'chmod', 'netunmount'],
// current directory menu
cwd: ['undo', 'redo', '|', 'back', 'up', 'reload', '|', 'upload', 'mkdir', 'mkfile', 'paste', '|', '|', 'view', 'sort', 'selectall', 'colwidth', '|', 'info', '|', 'fullscreen', '|'],
// current directory file menu
files: ['getfile', '|', 'open', 'download', 'opendir', 'quicklook', '|', 'upload', 'mkdir', '|', 'copy', 'cut', 'paste', 'duplicate', '|', 'empty', '|', 'rename', 'edit', 'resize', '|', 'archive', 'extract', '|', 'selectall', 'selectinvert', '|', 'places', 'info', 'chmod', 'netunmount']
},
width: '100%',
height: $(window).height() - 20
});
});
</script>
您还可以从 elFinder.options.js 文件自定义菜单。已经在 client configuration 检查中提到了所有内容...!!!