Ticket #2474: selectable.patch
File selectable.patch, 1.1 KB (added by , 15 years ago) |
---|
-
ui.selectable.js
5 5 6 6 $.fn.extend({ 7 7 selectable: function(options) { 8 var args = Array.prototype.slice.call(arguments, 1); 9 8 10 return this.each(function() { 9 11 if (typeof options == "string") { 10 12 var select = $.data(this, "selectable"); 11 select[options].apply(select, args);13 if (select) select[options].apply(select, args); 12 14 13 15 } else if(!$.data(this, "selectable")) 14 16 new $.ui.selectable(this, options); … … 21 23 22 24 this.element = $(element); 23 25 24 $.data( this.element, "selectable", this);26 $.data(element, "selectable", this); 25 27 this.element.addClass("ui-selectable"); 26 28 27 29 this.options = $.extend({ … … 91 93 this.element 92 94 .removeClass("ui-selectable ui-selectable-disabled") 93 95 .removeData("selectable") 94 .unbind(".selectable") ;95 this.removeMouseInteraction();96 .unbind(".selectable") 97 .removeMouseInteraction(); 96 98 }, 97 99 enable: function() { 98 100 this.element.removeClass("ui-selectable-disabled");