Fixed the canDrop function of the node menus does not get called during

enable/disable menu checks.

Tweaked a little bit by Ashesh.
pull/3/head
Surinder Kumar 2016-05-14 01:09:59 +05:30 committed by Ashesh Vashi
parent b22d73ec46
commit cc91a538e0
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
applies: ['object', 'context'], callback: 'delete_obj',
priority: 3, label: '{{ _("Delete/Drop") }}',
data: {'url': 'drop'}, icon: 'fa fa-trash',
enable: _.isFunction(self.canDrop) ? !!self.canDrop.apply(self, arguments) : (!!self.canDrop)
enable: _.isFunction(self.canDrop) ?
function() {
return !!(self.canDrop.apply(self, arguments));
} : (!!self.canDrop)
}]);
if (self.canDropCascade) {
pgAdmin.Browser.add_menus([{