Fix drop/drop cascade regression. Fixes #3823

This commit is contained in:
Khushboo Vashi 2018-12-18 09:45:06 +00:00 committed by Dave Page
parent 62bb3ca097
commit 72ba5bdaee

View File

@ -218,10 +218,7 @@ define([
tooltip: gettext('Delete/Drop'),
extraClasses: ['btn-default', 'delete_multiple'],
icon: 'fa fa-lg fa-trash-o',
disabled: _.isFunction(that.canDrop) ?
function() {
return !(that.canDrop.apply(self, arguments));
} : (!that.canDrop),
disabled: (_.isFunction(that.canDrop)) ? !(that.canDrop.apply(self, [data, item])) : (!that.canDrop),
register: function(btn) {
btn.on('click',() => {
onDrop('drop');
@ -235,10 +232,7 @@ define([
tooltip: gettext('Drop Cascade'),
extraClasses: ['btn-default', 'delete_multiple_cascade'],
icon: '',
disabled: _.isFunction(that.canDropCascade) ?
function() {
return !(that.canDropCascade.apply(self, arguments));
} : (!that.canDropCascade),
disabled: (_.isFunction(that.canDropCascade)) ? !(that.canDropCascade.apply(self, [data, item])) : (!that.canDropCascade),
register: function(btn) {
btn.on('click',() => {
onDrop('dropCascade');