Use displayed instead of enabled in filemanager context-menu
This commit is contained in:
@@ -94,19 +94,19 @@ app.controller('FileManagerController', ['$scope', '$timeout', 'Client', functio
|
||||
|
||||
$scope.menuOptions = [
|
||||
{
|
||||
text: 'Extract Here',
|
||||
enabled: function ($itemScope, $event, entry) { return !entry.isDirectory && isArchive(entry.fileName); },
|
||||
click: function ($itemScope, $event, entry) { extract(entry); }
|
||||
}, {
|
||||
text: 'Download',
|
||||
enabled: function ($itemScope, $event, entry) { return !entry.isDirectory; },
|
||||
click: function ($itemScope, $event, entry) { download(entry); }
|
||||
}, {
|
||||
text: 'Rename',
|
||||
click: function ($itemScope, $event, entry) { $scope.renameEntry.show(entry); }
|
||||
}, {
|
||||
text: 'Change Ownership',
|
||||
click: function ($itemScope, $event, entry) { $scope.chownEntry.show(entry); }
|
||||
}, {
|
||||
text: 'Extract Here',
|
||||
displayed: function ($itemScope, $event, entry) { return !entry.isDirectory && isArchive(entry.fileName); },
|
||||
click: function ($itemScope, $event, entry) { extract(entry); }
|
||||
}, {
|
||||
text: 'Download',
|
||||
displayed: function ($itemScope, $event, entry) { return !entry.isDirectory; },
|
||||
click: function ($itemScope, $event, entry) { download(entry); }
|
||||
}, {
|
||||
text: 'Delete',
|
||||
hasTopDivider: true,
|
||||
|
||||
Reference in New Issue
Block a user