Skip to content
Permalink
Browse files

selectable: removed toggle method as widget factory provides enable/d…

…isable methods.
  • Loading branch information
rdworth committed Nov 21, 2008
1 parent 47f8e90 commit 64f6baeaf47bc41ce18b36d97d49a14d5293dbc8
Showing with 0 additions and 20 deletions.
  1. +0 −12 tests/selectable.js
  2. +0 −8 ui/ui.selectable.js
@@ -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();
}
}

}));

0 comments on commit 64f6bae

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