Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

bump version; added minified version of filter widget

  • Loading branch information...
commit 7cc9bda5da67d82cd8c414d495b70712d5ce66d7 1 parent f957e3f
Eric Hynds authored December 02, 2010
4  CHANGELOG
... ...
@@ -1,12 +1,12 @@
1 1
 jQuery UI MultiSelect Widget Changelog
2 2
 
3  
-Version 1.7pre - TBA
  3
+Version 1.7 - 12/2/2010
4 4
 ==============================================
5 5
 - Modified: completely refactored creation code to be consistent with the official jQuery UI widgets.
6 6
 - Fixed: clicking on an optgroup label now selects the correct option tags on the underlying select.
7 7
 - Fixed: filtering widget now works properly on optgroups (thx Dario).
8 8
 - Fixed: manually triggering click on an input now correctly updates the selectedText.
9  
-- Added: ARIA attributes.
  9
+- Added: ARIA support.
10 10
 - Added: filter widget now uses input type=search for a better experience in WebKit.
11 11
 - Added: various bug fixes, performance optimizations, and unit tests.
12 12
 
2  src/jquery.multiselect.filter.js
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2  
- * jQuery MultiSelect UI Widget Filtering Plugin
  2
+ * jQuery MultiSelect UI Widget Filtering Plugin 1.0
3 3
  * Copyright (c) 2010 Eric Hynds
4 4
  *
5 5
  * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
15  src/jquery.multiselect.filter.min.js
... ...
@@ -0,0 +1,15 @@
  1
+/*
  2
+ * jQuery MultiSelect UI Widget Filtering Plugin 1.0
  3
+ * Copyright (c) 2010 Eric Hynds
  4
+ *
  5
+ * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
  6
+ *
  7
+ * Depends:
  8
+ *   - jQuery UI MultiSelect widget
  9
+ *
  10
+ * Dual licensed under the MIT and GPL licenses:
  11
+ *   http://www.opensource.org/licenses/mit-license.php
  12
+ *   http://www.gnu.org/licenses/gpl.html
  13
+ *
  14
+*/
  15
+(function(c){c.widget("ech.multiselectfilter",{options:{label:"Filter:",width:null,placeholder:"Enter keywords"},_create:function(){var a=this,b=this.options,d=this.instance=c(this.element).data("multiselect");this.header=d.menu.find(".ui-multiselect-header").addClass("ui-multiselect-hasfilter");b=this.wrapper=c('<div class="ui-multiselect-filter">'+(b.label.length?b.label:"")+'<input placeholder="'+b.placeholder+'" type="search"'+(/\d/.test(b.width)?'style="width:'+b.width+'px"':"")+" /></div>").prependTo(this.header); this.inputs=d.menu.find(":checkbox, :radio");this.input=b.find("input").bind("keydown",function(e){e.which===13&&e.preventDefault()}).bind("keyup",c.proxy(a._handler,a)).bind("click",function(){this.value.length||a._handler()});this.updateCache();this.rows=d.menu.find(".ui-multiselect-checkboxes li:not(.ui-multiselect-optgroup-label)");d._toggleChecked=function(e,f){(f&&f.length?f:this.labels.find("input")).not(a.instance._isOpen?":disabled, :hidden":":disabled").attr("checked",e?"checked":"");this.update(); this.element.children().not("disabled").attr("selected",e?"selected":"")}},_handler:function(a){var b=c.trim(this.input[0].value.toLowerCase()),d=this.rows,e=this.inputs,f=this.cache;if(b){d.hide();var h=RegExp(b,"gi");this._trigger("filter",a,c.map(f,function(i,g){if(i.search(h)!==-1){d.eq(g).show();return e.get(g)}return null}))}else d.show()},updateCache:function(){this.cache=this.element.children().map(function(){var a=c(this);if(this.tagName.toLowerCase()==="optgroup")a=a.children();if(!a.val().length)return null; return a.map(function(){return this.innerHTML.toLowerCase()}).get()}).get()},widget:function(){return this.wrapper},destroy:function(){c.Widget.prototype.destroy.call(this);this.input.val("").trigger("keyup");this.wrapper.remove()}})})(jQuery);
2  src/jquery.multiselect.js
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2  
- * jQuery MultiSelect UI Widget 1.7pre
  2
+ * jQuery MultiSelect UI Widget 1.7
3 3
  * Copyright (c) 2010 Eric Hynds
4 4
  *
5 5
  * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
4  src/jquery.multiselect.min.js
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2  
- * jQuery MultiSelect UI Widget 1.6
  2
+ * jQuery MultiSelect UI Widget 1.7
3 3
  * Copyright (c) 2010 Eric Hynds
4 4
  *
5 5
  * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
@@ -17,4 +17,4 @@
17 17
  *   http://www.gnu.org/licenses/gpl.html
18 18
  *
19 19
 */
20  
-(function(e){var o=0;e.widget("ech.multiselect",{options:{header:true,height:175,minWidth:225,classes:"",checkAllText:"Check all",uncheckAllText:"Uncheck all",noneSelectedText:"Select options",selectedText:"# selected",selectedList:0,show:"",hide:"",autoOpen:false,multiple:true,position:{}},_create:function(){var b=this.element,a=this.options,c=[],d=[],i=b.attr("title"),f=b.attr("id")||o++;this.speed=e.fx.speeds._default;this._isOpen=false;c.push('<button type="button" class="ui-multiselect ui-widget ui-state-default ui-corner-all'); a.classes.length&&c.push(" "+a.classes);c.push('"');i.length&&c.push(' title="'+i+'"');c.push('><span class="ui-icon ui-icon-triangle-2-n-s"></span><span>'+a.noneSelectedText+"</span></button>");c.push('<div class="ui-multiselect-menu ui-widget ui-widget-content ui-corner-all '+(a.classes.length?a.classes:"")+'">');c.push('<div class="ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix">');c.push('<ul class="ui-helper-reset">');if(a.header===true&&a.multiple){c.push('<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>'+ a.checkAllText+"</span></a></li>");c.push('<li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>'+a.uncheckAllText+"</span></a></li>")}else typeof a.header==="string"&&c.push("<li>"+a.header+"</li>");c.push('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon ui-icon-circle-close"></span></a></li>');c.push("</ul>");c.push("</div>");c.push('<ul class="ui-multiselect-checkboxes ui-helper-reset">');b.find("option").each(function(g){var h= e(this),l=h.html(),m=this.value;g=this.id||"ui-multiselect-"+f+"-option-"+g;var j=h.parent(),k=h.is(":disabled"),n=["ui-corner-all"];if(j.is("optgroup")){j=j.attr("label");if(e.inArray(j,d)===-1){c.push('<li class="ui-multiselect-optgroup-label"><a href="#">'+j+"</a></li>");d.push(j)}}if(m.length>0){k&&n.push("ui-state-disabled");c.push('<li class="'+(k?"ui-multiselect-disabled":"")+'">');c.push('<label for="'+g+'" class="'+n.join(" ")+'"><input id="'+g+'" name="multiselect_'+f+'" type="'+(a.multiple? "checkbox":"radio")+'" value="'+m+'" title="'+l+'"');h.is(":selected")&&c.push(' checked="checked"');k&&c.push(' disabled="disabled"');c.push(" />"+l+"</label></li>")}});c.push("</ul></div>");this.button=b.hide().after(c.join("")).next("button");this.menu=this.button.next("div.ui-multiselect-menu");this.labels=this.menu.find("label");this.buttonlabel=this.button.find("span").eq(-1);this._setButtonWidth();this._setMenuWidth();this._bindEvents();this.button[0].defaultValue=this.update()},_init:function(){this.options.header|| this.menu.find("div.ui-multiselect-header").hide();this.options.autoOpen&&this.open();this.element.is(":disabled")&&this.disable()},_bindEvents:function(){function b(){a[a._isOpen?"close":"open"]();return false}var a=this,c=this.button;c.find("span").bind("click.multiselect",b);c.bind({click:b,keypress:function(d){switch(d.keyCode){case 27:case 38:case 37:a.close();break;case 39:case 40:a.open()}},mouseenter:function(){c.hasClass("ui-state-disabled")||e(this).addClass("ui-state-hover")},mouseleave:function(){e(this).removeClass("ui-state-hover")}, focus:function(){c.hasClass("ui-state-disabled")||e(this).addClass("ui-state-focus")},blur:function(){e(this).removeClass("ui-state-focus")}});this.menu.find("div.ui-multiselect-header a").bind("click.multiselect",function(d){e(this).hasClass("ui-multiselect-close")?a.close():a[e(this).hasClass("ui-multiselect-all")?"checkAll":"uncheckAll"]();d.preventDefault()}).end().find("li.ui-multiselect-optgroup-label a").bind("click.multiselect",function(d){var i=e(this),f=i.parent().nextUntil("li.ui-multiselect-optgroup-label").find("input:visible"); a._toggleChecked(f.filter(":checked").length!==f.length,f);a._trigger("optgrouptoggle",d,{inputs:f.get(),label:i.parent().text(),checked:f[0].checked});d.preventDefault()}).end().delegate("label","mouseenter",function(){if(!e(this).hasClass("ui-state-disabled")){a.labels.removeClass("ui-state-hover");e(this).addClass("ui-state-hover").find("input").focus()}}).delegate("label","keydown",function(d){switch(d.keyCode){case 9:case 27:a.close();break;case 38:case 40:case 37:case 39:a._traverse(d.keyCode, this);d.preventDefault();break;case 13:d.preventDefault();e(this).find("input").trigger("click")}}).delegate(":checkbox, :radio","click",function(d){var i=e(this),f=this.value,g=this.checked,h=a.element.find("option");if(i.is(":disabled")||a._trigger("click",d,{value:f,text:this.title,checked:g})===false)d.preventDefault();else{a.options.multiple||h.not(function(){return this.value===f}).removeAttr("selected");h.filter(function(){return this.value===f}).attr("selected",g?"selected":"");a.update(!d.originalEvent? g?-1:1:0)}});e(document).bind("click.multiselect",function(d){d=e(d.target);a._isOpen&&!d.closest("div.ui-multiselect-menu").length&&!d.is("button.ui-multiselect")&&a.close()});this.element.closest("form").bind("reset",function(){setTimeout(e.proxy(a,"update"),1)})},_setButtonWidth:function(){var b=this.element.outerWidth(),a=this.options;if(/\d/.test(a.minWidth)&&b<a.minWidth)b=a.minWidth;this.button.width(b)},_setMenuWidth:function(){var b=this.menu,a=this.button.outerWidth()-parseInt(b.css("padding-left"), 10)-parseInt(b.css("padding-right"),10)-parseInt(b.css("border-right-width"),10)-parseInt(b.css("border-left-width"),10);b.width(a||this.button.outerWidth())},_traverse:function(b,a){var c=e(a),d=b===38||b===37?true:false;c=c.parent()[d?"prevAll":"nextAll"]("li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)")[d?"last":"first"]();if(c.length)c.find("label").trigger("mouseover");else{c=this.menu.find("ul:last");this.menu.find("label")[d?"last":"first"]().trigger("mouseover");c.scrollTop(d? c.height():0)}},_toggleChecked:function(b,a){(a&&a.length?a:this.labels.find("input")).not(":disabled").attr("checked",b?"checked":"");this.update();this.element.find("option").not(":disabled").attr("selected",b?"selected":"")},_toggleDisabled:function(b){this.button.attr("disabled",b?"disabled":"")[b?"addClass":"removeClass"]("ui-state-disabled");this.menu.find("input").attr("disabled",b?"disabled":"").parent()[b?"addClass":"removeClass"]("ui-state-disabled");this.element.attr("disabled",b?"disabled": "")},update:function(){var b=this.options,a=this.labels.find("input"),c=a.filter(":checked"),d=c.length;b=d===0?b.noneSelectedText:e.isFunction(b.selectedText)?b.selectedText.call(this,d,a.length,c.get()):/\d/.test(b.selectedList)&&b.selectedList>0&&d<=b.selectedList?c.map(function(){return this.title}).get().join(", "):b.selectedText.replace("#",d).replace("#",a.length);this.buttonlabel.html(b);return b},open:function(){var b=this.button,a=this.menu,c=this.speed,d=this.options;if(!(this._trigger("beforeopen")=== false||b.hasClass("ui-state-disabled")||this._isOpen)){e(":ech-multiselect").not(this.element).each(function(){var h=e(this);h.multiselect("isOpen")&&h.multiselect("close")});var i=a.find("ul:last"),f=d.show,g=b.position();if(e.isArray(d.show)){f=d.show[0];c=d.show[1]||this.speed}i.scrollTop(0).height(d.height);if(e.ui.position&&!e.isEmptyObject(d.position)){d.position.of=d.position.of||b;a.show().position(d.position).hide().show(f,c)}else a.css({top:g.top+b.outerHeight(),left:g.left}).show(f,c); this.labels.eq(0).trigger("mouseover").trigger("mouseenter").find("input").trigger("focus");b.addClass("ui-state-active");this._isOpen=true;this._trigger("open")}},close:function(){if(this._trigger("beforeclose")!==false){var b=this.options,a=b.hide,c=this.speed;if(e.isArray(b.hide)){a=b.hide[0];c=b.hide[1]||this.speed}this.menu.hide(a,c);this.button.removeClass("ui-state-active").trigger("blur").trigger("mouseleave");this._trigger("close");this._isOpen=false}},enable:function(){this._toggleDisabled(false)}, disable:function(){this._toggleDisabled(true)},checkAll:function(){this._toggleChecked(true);this._trigger("checkAll")},uncheckAll:function(){this._toggleChecked(false);this._trigger("uncheckAll")},getChecked:function(){return this.menu.find("input").filter(":checked")},destroy:function(){e.Widget.prototype.destroy.call(this);this.button.remove();this.menu.remove();this.element.show();return this},isOpen:function(){return this._isOpen},widget:function(){return this.menu},_setOption:function(b,a){var c= this.menu;switch(b){case "header":c.find("div.ui-multiselect-header")[a?"show":"hide"]();break;case "checkAllText":c.find("a.ui-multiselect-all span").eq(-1).text(a);break;case "uncheckAllText":c.find("a.ui-multiselect-none span").eq(-1).text(a);break;case "height":c.find("ul:last").height(parseInt(a,10));break;case "minWidth":this.options[b]=parseInt(a,10);this._setButtonWidth();this._setMenuWidth();break;case "selectedText":case "selectedList":case "noneSelectedText":this.options[b]=a;this.update(); break;case "classes":c.add(this.button).removeClass(this.options.classes).addClass(a)}e.Widget.prototype._setOption.apply(this,arguments)}})})(jQuery);
  20
+(function(d,q){var r=0;d.widget("ech.multiselect",{options:{header:true,height:175,minWidth:225,classes:"",checkAllText:"Check all",uncheckAllText:"Uncheck all",noneSelectedText:"Select options",selectedText:"# selected",selectedList:0,show:"",hide:"",autoOpen:false,multiple:true,position:{}},_create:function(){var b=this.element.hide(),a=this.options,e=[],c=b.attr("id")||r++;this.speed=d.fx.speeds._default;this._isOpen=false;var g=(this.button=d('<button type="button"><span class="ui-icon ui-icon-triangle-2-n-s"></span></button>')).addClass("ui-multiselect ui-widget ui-state-default ui-corner-all").addClass(a.classes).attr({title:b.attr("title"), "aria-haspopup":true}).insertAfter(b);(this.buttonlabel=d("<span></span>")).html(a.noneSelectedText).appendTo(g);var f=(this.menu=d("<div />")).addClass("ui-multiselect-menu ui-widget ui-widget-content ui-corner-all").addClass(a.classes).insertAfter(g),h=(this.header=d("<div />")).addClass("ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix").appendTo(f);d("<ul />").addClass("ui-helper-reset").html(function(){return a.header===true?'<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>'+ a.checkAllText+'</span></a></li><li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>'+a.uncheckAllText+"</span></a></li>":typeof a.header==="string"?"<li>"+a.header+"</li>":""}).append('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon ui-icon-circle-close"></span></a></li>').appendTo(h);var i=(this.checkboxContainer=d("<ul />")).addClass("ui-multiselect-checkboxes ui-helper-reset").appendTo(f);b.find("option").each(function(k){var l= d(this),o=l.html(),p=this.value;k=this.id||"ui-multiselect-"+c+"-option-"+k;var j=l.parent(),m=l.is(":disabled"),n=["ui-corner-all"];if(j.is("optgroup")){j=j.attr("label");if(d.inArray(j,e)===-1){d('<li><a href="#">'+j+"</a></li>").addClass("ui-multiselect-optgroup-label").appendTo(i);e.push(j)}}if(p.length>0){m&&n.push("ui-state-disabled");j=d("<li />").addClass(m?"ui-multiselect-disabled":"").appendTo(i);n=d("<label />").attr("for",k).addClass(n.join(" ")).appendTo(j);d('<input type="'+(a.multiple? "checkbox":"radio")+'" '+(l.is(":selected")?'checked="checked"':"")+'" name="multiselect_'+c+'" />').attr({id:k,title:o,disabled:m,"aria-disabled":m}).val(p).appendTo(n).after("<span>"+o+"</span>")}});this.labels=f.find("label");if(!a.multiple)this.radios=f.find(":radio");this._setButtonWidth();this._setMenuWidth();this._bindEvents();g[0].defaultValue=this.update()},_init:function(){if(this.options.header===false||this.options.multiple===false)this.header.hide();this.options.autoOpen&&this.open(); this.element.is(":disabled")&&this.disable()},_bindEvents:function(){function b(){a[a._isOpen?"close":"open"]();return false}var a=this,e=this.button;e.find("span").bind("click.multiselect",b);e.bind({click:b,keypress:function(c){switch(c.which){case 27:case 38:case 37:a.close();break;case 39:case 40:a.open()}},mouseenter:function(){e.hasClass("ui-state-disabled")||d(this).addClass("ui-state-hover")},mouseleave:function(){d(this).removeClass("ui-state-hover")},focus:function(){e.hasClass("ui-state-disabled")|| d(this).addClass("ui-state-focus")},blur:function(){d(this).removeClass("ui-state-focus")}});this.header.delegate("a","click.multiselect",function(c){d(this).hasClass("ui-multiselect-close")?a.close():a[d(this).hasClass("ui-multiselect-all")?"checkAll":"uncheckAll"]();c.preventDefault()});this.menu.delegate("li.ui-multiselect-optgroup-label a","click.multiselect",function(c){var g=d(this),f=g.parent().nextUntil("li.ui-multiselect-optgroup-label").find("input:visible:not(:disabled)");a._toggleChecked(f.filter(":checked").length!== f.length,f);a._trigger("optgrouptoggle",c,{inputs:f.get(),label:g.parent().text(),checked:f[0].checked});c.preventDefault()}).delegate("label","mouseenter",function(){if(!d(this).hasClass("ui-state-disabled")){a.labels.removeClass("ui-state-hover");d(this).addClass("ui-state-hover").find("input").focus()}}).delegate("label","keydown",function(c){switch(c.which){case 9:case 27:a.close();break;case 38:case 40:case 37:case 39:a._traverse(c.which,this);c.preventDefault();break;case 13:c.preventDefault(); d(this).find("input").trigger("click")}}).delegate(":checkbox, :radio","click",function(c){var g=d(this),f=this.value,h=this.checked,i=a.element.find("option");if(g.is(":disabled")||a._trigger("click",c,{value:f,text:this.title,checked:h})===false)c.preventDefault();else{a.options.multiple||i.not(function(){return this.value===f}).removeAttr("selected");g.attr("aria-selected",h);i.filter(function(){return this.value===f}).attr("selected",h?"selected":"");a.update(!c.originalEvent?h?-1:1:0)}});d(document).bind("click.multiselect", function(c){var g=d(c.target);a._isOpen&&!d.contains(a.menu[0],c.target)&&!g.is("button.ui-multiselect")&&a.close()});d(this.element[0].form).bind("reset",function(){setTimeout(function(){a.update()},10)})},_setButtonWidth:function(){var b=this.element.outerWidth(),a=this.options;if(/\d/.test(a.minWidth)&&b<a.minWidth)b=a.minWidth;this.button.width(b)},_setMenuWidth:function(){var b=this.menu,a=this.button.outerWidth()-parseInt(b.css("padding-left"),10)-parseInt(b.css("padding-right"),10)-parseInt(b.css("border-right-width"), 10)-parseInt(b.css("border-left-width"),10);b.width(a||this.button.outerWidth())},_traverse:function(b,a){var e=d(a),c=b===38||b===37;e=e.parent()[c?"prevAll":"nextAll"]("li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)")[c?"last":"first"]();if(e.length)e.find("label").trigger("mouseover");else{e=this.menu.find("ul:last");this.menu.find("label")[c?"last":"first"]().trigger("mouseover");e.scrollTop(c?e.height():0)}},_toggleChecked:function(b,a){var e=a&&a.length?a:this.labels.find("input"); e.not(":disabled").attr({checked:b,"aria-selected":b});this.update();var c=e.map(function(){return this.value}).get();this.element.find("option").filter(function(){return!this.disabled&&d.inArray(this.value,c)>-1}).attr({selected:b,"aria-selected":b})},_toggleDisabled:function(b){this.button.attr({disabled:b,"aria-disabled":b})[b?"addClass":"removeClass"]("ui-state-disabled");this.menu.find("input").attr({disabled:b,"aria-disabled":b}).parent()[b?"addClass":"removeClass"]("ui-state-disabled");this.element.attr({disabled:b, "aria-disabled":b})},update:function(b){if(b===q)b=0;var a=this.options,e=this.labels.find("input"),c=e.filter(":checked");b=c.length+b;a=b===0?a.noneSelectedText:d.isFunction(a.selectedText)?a.selectedText.call(this,b,e.length,c.get()):/\d/.test(a.selectedList)&&a.selectedList>0&&b<=a.selectedList?c.map(function(){return this.title}).get().join(", "):a.selectedText.replace("#",b).replace("#",e.length);this.buttonlabel.html(a);return a},open:function(){var b=this.button,a=this.menu,e=this.speed,c= this.options;if(!(this._trigger("beforeopen")===false||b.hasClass("ui-state-disabled")||this._isOpen)){d(":ech-multiselect").not(this.element).each(function(){var i=d(this);i.multiselect("isOpen")&&i.multiselect("close")});var g=a.find("ul:last"),f=c.show,h=b.position();if(d.isArray(c.show)){f=c.show[0];e=c.show[1]||this.speed}g.scrollTop(0).height(c.height);if(d.ui.position&&!d.isEmptyObject(c.position)){c.position.of=c.position.of||b;a.show().position(c.position).hide().show(f,e)}else a.css({top:h.top+ b.outerHeight(),left:h.left}).show(f,e);this.labels.eq(0).trigger("mouseover").trigger("mouseenter").find("input").trigger("focus");b.addClass("ui-state-active");this._isOpen=true;this._trigger("open")}},close:function(){if(this._trigger("beforeclose")!==false){var b=this.options,a=b.hide,e=this.speed;if(d.isArray(b.hide)){a=b.hide[0];e=b.hide[1]||this.speed}this.menu.hide(a,e);this.button.removeClass("ui-state-active").trigger("blur").trigger("mouseleave");this._trigger("close");this._isOpen=false}}, enable:function(){this._toggleDisabled(false)},disable:function(){this._toggleDisabled(true)},checkAll:function(){this._toggleChecked(true);this._trigger("checkAll")},uncheckAll:function(){this._toggleChecked(false);this._trigger("uncheckAll")},getChecked:function(){return this.menu.find("input").filter(":checked")},destroy:function(){d.Widget.prototype.destroy.call(this);this.button.remove();this.menu.remove();this.element.show();return this},isOpen:function(){return this._isOpen},widget:function(){return this.menu}, _setOption:function(b,a){var e=this.menu;switch(b){case "header":e.find("div.ui-multiselect-header")[a?"show":"hide"]();break;case "checkAllText":e.find("a.ui-multiselect-all span").eq(-1).text(a);break;case "uncheckAllText":e.find("a.ui-multiselect-none span").eq(-1).text(a);break;case "height":e.find("ul:last").height(parseInt(a,10));break;case "minWidth":this.options[b]=parseInt(a,10);this._setButtonWidth();this._setMenuWidth();break;case "selectedText":case "selectedList":case "noneSelectedText":this.options[b]= a;this.update();break;case "classes":e.add(this.button).removeClass(this.options.classes).addClass(a)}d.Widget.prototype._setOption.apply(this,arguments)}})})(jQuery);

0 notes on commit 7cc9bda

Please sign in to comment.
Something went wrong with that request. Please try again.