resizable,selectable,slider: changed this.disabled to this.options.disabled (fixes #2552)

This commit is contained in:
Paul Bakaus 2008-05-25 14:24:02 +00:00
parent a4aa144c3b
commit 620ed33295
3 changed files with 13 additions and 13 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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) {