From 71ea418b9b3f7a13a648d045c79bda560148b4cf Mon Sep 17 00:00:00 2001 From: Brian Reavis Date: Thu, 4 Jul 2013 19:04:10 -0700 Subject: [PATCH] Released 0.6.3. --- bower.json | 2 +- selectize.css | 2 +- selectize.jquery.json | 2 +- selectize.js | 10 +++++++++- selectize.min.js | 40 ++++++++++++++++++++-------------------- 5 files changed, 32 insertions(+), 24 deletions(-) diff --git a/bower.json b/bower.json index 6fcc5b89c..c4f0a3067 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "name": "selectize", "keywords": ["select", "ui", "form", "input", "control", "autocomplete", "tagging", "tag"], "description": "Selectize is a jQuery-based custom ').appendTo(c).attr("tabindex",d);e=g("
").addClass(this.settings.dropdownClass).hide().appendTo(b); h=g("
").addClass(this.settings.dropdownContentClass).appendTo(e);b.css({width:this.$input[0].style.width,display:this.$input.css("display")});this.plugins.length&&b.addClass("plugin-"+this.plugins.join(" plugin-"));k=this.settings.mode;b.toggleClass("single","single"===k);b.toggleClass("multi","multi"===k);(null===this.settings.maxItems||1c&&(e=d,d=c,c=e);for(;d<=c;d++)e=this.$control[0].childNodes[d],-1===this.$activeItems.indexOf(e)&&(g(e).addClass("active"), -this.$activeItems.push(e));b.preventDefault()}else"mousedown"===c&&this.isCtrlDown||"keydown"===c&&this.isShiftDown?a.hasClass("active")?(c=this.$activeItems.indexOf(a[0]),this.$activeItems.splice(c,1),a.removeClass("active")):this.$activeItems.push(a.addClass("active")[0]):(g(this.$activeItems).removeClass("active"),this.$activeItems=[a.addClass("active")[0]]);this.isFocused=!!this.$activeItems.length||this.isInputFocused}else g(this.$activeItems).removeClass("active"),this.$activeItems=[],this.isFocused= -this.isInputFocused};f.prototype.setActiveOption=function(a,b,c){var d,e,h;this.$activeOption&&this.$activeOption.removeClass("active");this.$activeOption=null;a=g(a);a.length&&(this.$activeOption=a.addClass("active"),b||!q(b))&&(a=this.$dropdown.height(),d=this.$activeOption.outerHeight(!0),b=this.$dropdown.scrollTop()||0,e=this.$activeOption.offset().top-this.$dropdown.offset().top+b,h=e-a+d,e+d>a-b?this.$dropdown.stop().animate({scrollTop:h},c?this.settings.scrollDuration:0):ec&&(e=d,d=c,c=e);for(;d<=c;d++)e=this.$control[0].childNodes[d], +-1===this.$activeItems.indexOf(e)&&(g(e).addClass("active"),this.$activeItems.push(e));b.preventDefault()}else"mousedown"===c&&this.isCtrlDown||"keydown"===c&&this.isShiftDown?a.hasClass("active")?(c=this.$activeItems.indexOf(a[0]),this.$activeItems.splice(c,1),a.removeClass("active")):this.$activeItems.push(a.addClass("active")[0]):(g(this.$activeItems).removeClass("active"),this.$activeItems=[a.addClass("active")[0]]);this.isFocused=!!this.$activeItems.length||this.isInputFocused}else g(this.$activeItems).removeClass("active"), +this.$activeItems=[],this.isFocused=this.isInputFocused};f.prototype.setActiveOption=function(a,b,c){var d,e,h;this.$activeOption&&this.$activeOption.removeClass("active");this.$activeOption=null;a=g(a);a.length&&(this.$activeOption=a.addClass("active"),b||!q(b))&&(a=this.$dropdown.height(),d=this.$activeOption.outerHeight(!0),b=this.$dropdown.scrollTop()||0,e=this.$activeOption.offset().top-this.$dropdown.offset().top+b,h=e-a+d,e+d>a-b?this.$dropdown.stop().animate({scrollTop:h},c?this.settings.scrollDuration: +0):ee?1*b:e>d?-1*b:0}}())}this.currentResults=h}else h=g.extend(!0,{},this.currentResults);return this.prepareResults(h,b)};f.prototype.prepareResults=function(a,b){if(this.settings.hideSelected)for(var c=a.items.length- 1;0<=c;c--)-1!==this.items.indexOf(String(a.items[c].value))&&a.items.splice(c,1);a.total=a.items.length;"number"===typeof b.limit&&(a.items=a.items.slice(0,b.limit));return a};f.prototype.refreshOptions=function(a){"undefined"===typeof a&&(a=!0);var b,c,d,e,h,k,f,m=this.$control_input.val(),n=this.search(m,{}),l,p=this.$dropdown_content;c=n.items.length;"number"===typeof this.settings.maxOptions&&(c=Math.min(c,this.settings.maxOptions));d={};if(this.settings.optgroupOrder)for(e=this.settings.optgroupOrder, b=0;b