mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
selectable: removed toggle method as widget factory provides enable/disable methods.
This commit is contained in:
parent
47f8e9042f
commit
64f6baeaf4
@ -165,18 +165,6 @@ test("enable", function() {
|
||||
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");
|
||||
|
||||
test("start", function() {
|
||||
|
@ -246,14 +246,6 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
|
||||
this.helper.remove();
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
toggle: function() {
|
||||
if(this.options.disabled){
|
||||
this.enable();
|
||||
} else {
|
||||
this.disable();
|
||||
}
|
||||
}
|
||||
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user