diff --git a/ui/source/ui.resizable.js b/ui/source/ui.resizable.js index 890c5ad42..6e8907ec1 100644 --- a/ui/source/ui.resizable.js +++ b/ui/source/ui.resizable.js @@ -251,14 +251,14 @@ }, enable: function() { this.element.removeClass("ui-resizable-disabled"); - this.disabled = false; + this.options.disabled = false; }, disable: function() { this.element.addClass("ui-resizable-disabled"); - this.disabled = true; + this.options.disabled = true; }, mouseStart: function(e) { - if(this.disabled) return false; + if(this.options.disabled) return false; var handle = false; for(var i in this.options.handles) { diff --git a/ui/source/ui.selectable.js b/ui/source/ui.selectable.js index 8486e44e2..a27391da6 100644 --- a/ui/source/ui.selectable.js +++ b/ui/source/ui.selectable.js @@ -52,7 +52,7 @@ this.helper = $(document.createElement('div')).css({border:'1px dotted black'}); }, toggle: function() { - if(this.disabled){ + if(this.options.disabled){ this.enable(); } else { this.disable(); @@ -67,18 +67,18 @@ }, enable: function() { this.element.removeClass("ui-selectable-disabled"); - this.disabled = false; + this.options.disabled = false; }, disable: function() { this.element.addClass("ui-selectable-disabled"); - this.disabled = true; + this.options.disabled = true; }, mouseStart: function(e) { var self = this; this.opos = [e.pageX, e.pageY]; - if (this.disabled) + if (this.options.disabled) return; var options = this.options; @@ -133,7 +133,7 @@ var self = this; this.dragged = true; - if (this.disabled) + if (this.options.disabled) return; var options = this.options; diff --git a/ui/source/ui.slider.js b/ui/source/ui.slider.js index a15c917dd..87c1572fb 100644 --- a/ui/source/ui.slider.js +++ b/ui/source/ui.slider.js @@ -49,11 +49,11 @@ }, enable: function() { this.element.removeClass("ui-slider-disabled"); - this.disabled = false; + this.options.disabled = false; }, disable: function() { this.element.addClass("ui-slider-disabled"); - this.disabled = true; + this.options.disabled = true; }, setData: function(key, value) { this.options[key] = value; @@ -162,7 +162,7 @@ if(this == e.target) clickedHandle = true; }); - if (clickedHandle || this.disabled || !(this.currentHandle || this.previousHandle)) + if (clickedHandle || this.options.disabled || !(this.currentHandle || this.previousHandle)) return; // If a previous handle was focussed, focus it again @@ -270,10 +270,10 @@ this.propagate('start', e); - if(!this.disabled) { + if(!this.options.disabled) { if(this.currentHandle) this.blur(this.currentHandle); this.focus(handle,1); - return !this.disabled; + return !this.options.disabled; } }, mouseDrag: function(e) {