selectable: removed toggle method as widget factory provides enable/disable methods.

This commit is contained in:
Richard Worth 2008-11-21 04:05:27 +00:00
parent 47f8e9042f
commit 64f6baeaf4
2 changed files with 0 additions and 20 deletions

View File

@ -165,18 +165,6 @@ test("enable", function() {
el.selectable("destroy"); el.selectable("destroy");
}); });
test("toggle", function() {
expect(2);
el = $("#selectable1").selectable({ disabled: true }).selectable("toggle");
equals(el.data("disabled.selectable"), false, "disabled -> enabled");
el.selectable("destroy");
el = $("#selectable1").selectable({ disabled: false }).selectable("toggle");
equals(el.data("disabled.selectable"), true, "enabled -> disabled");
el.selectable("destroy");
});
module("selectable: Callbacks"); module("selectable: Callbacks");
test("start", function() { test("start", function() {

View File

@ -246,14 +246,6 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
this.helper.remove(); this.helper.remove();
return false; return false;
},
toggle: function() {
if(this.options.disabled){
this.enable();
} else {
this.disable();
}
} }
})); }));