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
parent
b22d73ec46
commit
cc91a538e0
|
@ -89,7 +89,10 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, pgBrowser, Backform) {
|
||||||
applies: ['object', 'context'], callback: 'delete_obj',
|
applies: ['object', 'context'], callback: 'delete_obj',
|
||||||
priority: 3, label: '{{ _("Delete/Drop") }}',
|
priority: 3, label: '{{ _("Delete/Drop") }}',
|
||||||
data: {'url': 'drop'}, icon: 'fa fa-trash',
|
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) {
|
if (self.canDropCascade) {
|
||||||
pgAdmin.Browser.add_menus([{
|
pgAdmin.Browser.add_menus([{
|
||||||
|
|
Loading…
Reference in New Issue