Skip to content
Permalink
Browse files

resizable,selectable,slider: changed this.disabled to this.options.di…

…sabled (fixes #2552)
  • Loading branch information
Paul Bakaus
Paul Bakaus committed May 25, 2008
1 parent a4aa144 commit 620ed3329559fd3641ef27c15b0c03632ca34ca0
Showing with 13 additions and 13 deletions.
  1. +3 −3 ui/source/ui.resizable.js
  2. +5 −5 ui/source/ui.selectable.js
  3. +5 −5 ui/source/ui.slider.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) {
@@ -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;
@@ -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) {

0 comments on commit 620ed33

Please sign in to comment.
You can’t perform that action at this time.