|
@@ -1087,12 +1087,16 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
// abstract
|
|
// abstract
|
|
enable: function(enabled) {
|
|
enable: function(enabled) {
|
|
if (enabled === undefined) enabled = true;
|
|
if (enabled === undefined) enabled = true;
|
|
- if (this._enabled === enabled) return false;
|
|
|
|
|
|
+ if (this._enabled === enabled) return;
|
|
this._enabled = enabled;
|
|
this._enabled = enabled;
|
|
|
|
|
|
this.opts.element.prop("disabled", !enabled);
|
|
this.opts.element.prop("disabled", !enabled);
|
|
this.enableInterface();
|
|
this.enableInterface();
|
|
- return true;
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // abstract
|
|
|
|
+ disable: function() {
|
|
|
|
+ this.enable(false);
|
|
},
|
|
},
|
|
|
|
|
|
// abstract
|
|
// abstract
|
|
@@ -3041,7 +3045,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
opts,
|
|
opts,
|
|
select2,
|
|
select2,
|
|
method, value, multiple,
|
|
method, value, multiple,
|
|
- allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "readonly", "positionDropdown", "data", "search"],
|
|
|
|
|
|
+ allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "disable", "readonly", "positionDropdown", "data", "search"],
|
|
valueMethods = ["opened", "isFocused", "container", "dropdown"],
|
|
valueMethods = ["opened", "isFocused", "container", "dropdown"],
|
|
propertyMethods = ["val", "data"],
|
|
propertyMethods = ["val", "data"],
|
|
methodsMap = { search: "externalSearch" };
|
|
methodsMap = { search: "externalSearch" };
|