diff --git a/core/modules/widgets/droppable.js b/core/modules/widgets/droppable.js index 87a130f39..c9878930d 100644 --- a/core/modules/widgets/droppable.js +++ b/core/modules/widgets/droppable.js @@ -50,6 +50,8 @@ DroppableWidget.prototype.render = function(parent,nextSibling) { {name: "dragleave", handlerObject: this, handlerMethod: "handleDragLeaveEvent"}, {name: "drop", handlerObject: this, handlerMethod: "handleDropEvent"} ]); + } else { + $tw.utils.addClass(this.domNode,this.disabledClass); } // Insert element parent.insertBefore(domNode,nextSibling); @@ -145,6 +147,7 @@ DroppableWidget.prototype.execute = function() { this.droppableEffect = this.getAttribute("effect","copy"); this.droppableTag = this.getAttribute("tag"); this.droppableEnable = (this.getAttribute("enable") || "yes") === "yes"; + this.disabledClass = this.getAttribute("disabledClass",""); // Make child widgets this.makeChildWidgets(); }; @@ -160,7 +163,7 @@ Selectively refreshes the widget if needed. Returns true if the widget or any of */ DroppableWidget.prototype.refresh = function(changedTiddlers) { var changedAttributes = this.computeAttributes(); - if(changedAttributes.tag || changedAttributes.enable) { + if(changedAttributes.tag || changedAttributes.enable || changedAttributes.disabledClass || changedAttributes.actions || changedAttributes.effect) { this.refreshSelf(); return true; } else if(changedAttributes["class"]) { @@ -171,4 +174,4 @@ DroppableWidget.prototype.refresh = function(changedTiddlers) { exports.droppable = DroppableWidget; -})(); +})(); \ No newline at end of file