From: samhenri <samuel.guimaraes(a)eldorado.org.br>
Moving bootstrap-select js and css to separate folders v2
Signed-off-by: samhenri <samuel.guimaraes(a)eldorado.org.br>
---
configure.ac | 3 +++
ui/libs/bootstrap-select/Makefile.am | 4 +---
ui/libs/bootstrap-select/bootstrap-select.min.js | 8 --------
ui/libs/bootstrap-select/dist/Makefile.am | 20 ++++++++++++++++++++
ui/libs/bootstrap-select/dist/css/Makefile.am | 22 ++++++++++++++++++++++
.../dist/css/bootstrap-select.min.css | 6 ++++++
ui/libs/bootstrap-select/dist/js/Makefile.am | 22 ++++++++++++++++++++++
.../dist/js/bootstrap-select.min.js | 8 ++++++++
8 files changed, 82 insertions(+), 11 deletions(-)
delete mode 100644 ui/libs/bootstrap-select/bootstrap-select.min.js
create mode 100644 ui/libs/bootstrap-select/dist/Makefile.am
create mode 100644 ui/libs/bootstrap-select/dist/css/Makefile.am
create mode 100644 ui/libs/bootstrap-select/dist/css/bootstrap-select.min.css
create mode 100644 ui/libs/bootstrap-select/dist/js/Makefile.am
create mode 100644 ui/libs/bootstrap-select/dist/js/bootstrap-select.min.js
diff --git a/configure.ac b/configure.ac
index 67c3920..a3a0fc2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,9 @@ AC_CONFIG_FILES([
ui/libs/Makefile
ui/libs/bootstrap/Makefile
ui/libs/bootstrap-select/Makefile
+ ui/libs/bootstrap-select/dist/Makefile
+ ui/libs/bootstrap-select/dist/js/Makefile
+ ui/libs/bootstrap-select/dist/css/Makefile
ui/libs/es5-shim/Makefile
ui/libs/jquery/Makefile
ui/libs/jquery-i18n/Makefile
diff --git a/ui/libs/bootstrap-select/Makefile.am b/ui/libs/bootstrap-select/Makefile.am
index f655f1b..2796d01 100644
--- a/ui/libs/bootstrap-select/Makefile.am
+++ b/ui/libs/bootstrap-select/Makefile.am
@@ -17,6 +17,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-bootstrapselectjsdir = $(datadir)/wok/ui/libs/bootstrap-select
-
-dist_bootstrapselectjs_DATA = $(wildcard *.js) $(NULL)
+SUBDIRS = dist
diff --git a/ui/libs/bootstrap-select/bootstrap-select.min.js
b/ui/libs/bootstrap-select/bootstrap-select.min.js
deleted file mode 100644
index d770e9b..0000000
--- a/ui/libs/bootstrap-select/bootstrap-select.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*!
- * Bootstrap-select v1.6.3 (
http://silviomoreto.github.io/bootstrap-select/)
- *
- * Copyright 2013-2014 bootstrap-select
- * Licensed under MIT
(
https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
- */
-!function(a){"use strict";function b(a,b){return
a.toUpperCase().indexOf(b.toUpperCase())>-1}function c(b){var
c=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return
a.each(c,function(){b=b.replace(this.re,this.ch)}),b}function d(a){var
b={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},c="(?:"+Object.keys(b).join("|")+")",d=new
RegExp(c),e=new RegExp(c,"g"),f=null==a?"":""+a;return
d.test(f)?f.replace(e,function(a){return b[a]}):f}function e(b,c){var
d=arguments,e=b,b=d[0],c=d[1];[].shift.apply(d),"undefined"==typeof
b&&(b=e);var g,h=this.each(function(){var
e=a(this);if(e.is("select")){var
h=e.data("selectpicker"),i="object"==typeof
b&&b;if(h){if(i)for(var j in
i)i.hasOwnProperty(j)&&(h.options[j]=i[j])}else{var
k=a.extend({},f.DEFAULTS,a.fn.selectpicker.defaults||{},e.data(),i);e.data("selectpicker",h=new
f(this,k,c))}"string"==typeof b&&(g=h[b]instanceof
Function?h[b].apply(h,d):h.options[b])}});return"undefined"!=typeof
g?g:h}a.expr[":"].icontains=function(c,d,e){return
b(a(c).text(),e[3])},a.expr[":"].aicontains=function(c,d,e){return
b(a(c).data("normalizedText")||a(c).text(),e[3])};var
f=function(b,c,d){d&&(d.stopPropagation(),d.preventDefault()),this.$element=a(b),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=c,null===this.options.title&&(this.options.title=this.$element.attr("title")),this.val=f.prototype.val,this.render=f.prototype.render,this.refresh=f.prototype.refresh,this.setStyle=f.prototype.setStyle,this.selectAll=f.prototype.selectAll,this.deselectAll=f.prototype.deselectAll,this.destroy=f.prototype.remove,this.remove=f.prototype.remove,this.show=f.prototype.show,this.hide=f.prototype.hide,this.init()};f.VERSION="1.6.3",f.DEFAULTS={noneSelectedText:"Nothing
selected",noneResultsText:"No results
match",countSelectedText:function(a){return 1==a?"{0} item
selected":"{0} items selected"},maxOptionsText:function(a,b){var
c=[];return c[0]=1==a?"Limit reached ({n} item max)":"Limit reached ({n}
items max)",c[1]=1==b?"Group limit reached ({n} item max)":"Group
limit reached ({n} items max)",c},selectAllText:"Select
All",deselectAllText:"Deselect All",multipleSeparator:",
",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,searchAccentInsensitive:!1},f.prototype={constructor:f,init:function(){var
b=this,c=this.$element.attr("id");this.$element.hide(),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement),this.$menu=this.$newElement.find(">
.dropdown-menu"),this.$button=this.$newElement.find(">
button"),this.$searchbox=this.$newElement.find("input"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),"undefined"!=typeof
c&&(this.$button.attr("data-id",c),a('label[for="'+c+'"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.liHeight(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile()},createDropdown:function(){var
b=this.multiple?"
show-tick":"",c=this.$element.parent().hasClass("input-group")?"
input-group-btn":"",e=this.autofocus?"
autofocus":"",f=this.$element.parents().hasClass("form-group-lg")?"
btn-lg":this.$element.parents().hasClass("form-group-sm")?"
btn-sm":"",g=this.options.header?'<div
class="popover-title"><button type="button"
class="close"
aria-hidden="true">×</button>'+this.options.header+"</div>":"",h=this.options.liveSearch?'<div
class="bs-searchbox"><input type="text"
class="form-control"
autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":'
placeholder="'+d(this.options.liveSearchPlaceholder)+'"')+"></div>":"",i=this.options.actionsBox?'<div
class="bs-actionsbox"><div class="btn-group
btn-block"><button class="actions-btn bs-select-all btn btn-sm
btn-default">'+this.options.selectAllText+'</button><button
class="actions-btn bs-deselect-all btn btn-sm
btn-default">'+this.options.deselectAllText+"</button></div></div>":"",j='<div
class="btn-group bootstrap-select'+b+c+'"><button
type="button" class="btn dropdown-toggle form-control
selectpicker'+f+'" data-toggle="dropdown"'+e+'><span
class="filter-option pull-left"></span> <span
class="caret"></span></button><div class="dropdown-menu
open">'+g+h+i+'<ul class="dropdown-menu inner selectpicker"
role="menu"></ul></div></div>';return
a(j)},createView:function(){var a=this.createDropdown(),b=this.createLi();return
a.find("ul").append(b),a},reloadLi:function(){this.destroyLi();var
a=this.createLi();this.$menu.find("ul").append(a)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var
b=this,e=[],f=0,g=function(a,b,c){return"<li"+("undefined"!=typeof
c?' class="'+c+'"':"")+("undefined"!=typeof
b|null===b?'
data-original-index="'+b+'"':"")+">"+a+"</li>"},h=function(a,e,f,g){var
h=c(d(a));return'<a tabindex="0"'+("undefined"!=typeof
e?' class="'+e+'"':"")+("undefined"!=typeof
f?' style="'+f+'"':"")+("undefined"!=typeof
g?'data-optgroup="'+g+'"':"")+'
data-normalized-text="'+h+'">'+a+'<span
class="'+b.options.iconBase+" "+b.options.tickIcon+'
check-mark"></span></a>'};return
this.$element.find("option").each(function(){var
c=a(this),d=c.attr("class")||"",i=c.attr("style"),j=c.data("content")?c.data("content"):c.html(),k="undefined"!=typeof
c.data("subtext")?'<small class="muted
text-muted">'+c.data("subtext")+"</small>":"",l="undefined"!=typeof
c.data("icon")?'<span class="'+b.options.iconBase+"
"+c.data("icon")+'"></span>
':"",m=c.is(":disabled")||c.parent().is(":disabled"),n=c.index();if(""!==l&&m&&(l="<span>"+l+"</span>"),c.data("content")||(j=l+'<span
class="text">'+j+k+"</span>"),!b.options.hideDisabled||!m)if(c.parent().is("optgroup")&&c.data("divider")!==!0){if(0===c.index()){f+=1;var
o=c.parent().attr("label"),p="undefined"!=typeof
c.parent().data("subtext")?'<small class="muted
text-muted">'+c.parent().data("subtext")+"</small>":"",q=c.parent().data("icon")?'<span
class="'+b.options.iconBase+"
"+c.parent().data("icon")+'"></span>
':"";o=q+'<span
class="text">'+o+p+"</span>",0!==n&&e.length>0&&e.push(g("",null,"divider")),e.push(g(o,null,"dropdown-header"))}e.push(g(h(j,"opt
"+d,i,f),n))}else
e.push(c.data("divider")===!0?g("",n,"divider"):c.data("hidden")===!0?g(h(j,d,i),n,"hidden
is-hidden"):g(h(j,d,i),n))}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),a(e.join(""))},findLis:function(){return
null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(b){var
c=this;b!==!1&&this.$element.find("option").each(function(b){c.setDisabled(b,a(this).is(":disabled")||a(this).parent().is(":disabled")),c.setSelected(b,a(this).is(":selected"))}),this.tabIndex();var
d=this.options.hideDisabled?":not([disabled])":"",e=this.$element.find("option:selected"+d).map(function(){var
b,d=a(this),e=d.data("icon")&&c.options.showIcon?'<i
class="'+c.options.iconBase+"
"+d.data("icon")+'"></i> ':"";return
b=c.options.showSubtext&&d.attr("data-subtext")&&!c.multiple?'
<small class="muted
text-muted">'+d.data("subtext")+"</small>":"",d.data("content")&&c.options.showContent?d.data("content"):"undefined"!=typeof
d.attr("title")?d.attr("title"):e+d.html()+b}).toArray(),f=this.multiple?e.join(this.options.multipleSeparator):e[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var
g=this.options.selectedTextFormat.split(">");if(g.length>1&&e.length>g[1]||1==g.length&&e.length>=2){d=this.options.hideDisabled?",
[disabled]":"";var
h=this.$element.find("option").not('[data-divider="true"],
[data-hidden="true"]'+d).length,i="function"==typeof
this.options.countSelectedText?this.options.countSelectedText(e.length,h):this.options.countSelectedText;f=i.replace("{0}",e.length.toString()).replace("{1}",h.toString())}}this.options.title=this.$element.attr("title"),"static"==this.options.selectedTextFormat&&(f=this.options.title),f||(f="undefined"!=typeof
this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",a.trim(f.replace(/<[^>]*>?/g,""))),this.$newElement.find(".filter-option").html(f)},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|validate\[.*\]/gi,""));var
c=a?a:this.options.style;"add"==b?this.$button.addClass(c):"remove"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(){if(this.options.size!==!1){var
a=this.$menu.parent().clone().find(">
.dropdown-toggle").prop("autofocus",!1).end().appendTo("body"),b=a.addClass("open").find(">
.dropdown-menu"),c=b.find("li").not(".divider").not(".dropdown-header").filter(":visible").children("a").outerHeight(),d=this.options.header?b.find(".popover-title").outerHeight():0,e=this.options.liveSearch?b.find(".bs-searchbox").outerHeight():0,f=this.options.actionsBox?b.find(".bs-actionsbox").outerHeight():0;a.remove(),this.$newElement.data("liHeight",c).data("headerHeight",d).data("searchHeight",e).data("actionsHeight",f)}},setSize:function(){this.findLis();var
b,c,d,e=this,f=this.$menu,g=f.find(".inner"),h=this.$newElement.outerHeight(),i=this.$newElement.data("liHeight"),j=this.$newElement.data("headerHeight"),k=this.$newElement.data("searchHeight"),l=this.$newElement.data("actionsHeight"),m=this.$lis.filter(".divider").outerHeight(!0),n=parseInt(f.css("padding-top"))+parseInt(f.css("padding-bottom"))+parseInt(f.css("border-top-width"))+parseInt(f.css("border-bottom-width")),o=this.options.hideDisabled?",
.disabled":"",p=a(window),q=n+parseInt(f.css("margin-top"))+parseInt(f.css("margin-bottom"))+2,r=function(){c=e.$newElement.offset().top-p.scrollTop(),d=p.height()-c-h};if(r(),this.options.header&&f.css("padding-top",0),"auto"==this.options.size){var
s=function(){var
a,h=e.$lis.not(".hidden");r(),b=d-q,e.options.dropupAuto&&e.$newElement.toggleClass("dropup",c>d&&b-q<f.height()),e.$newElement.hasClass("dropup")&&(b=c-q),a=h.length+h.filter(".dropdown-header").length>3?3*i+q-2:0,f.css({"max-height":b+"px",overflow:"hidden","min-height":a+j+k+l+"px"}),g.css({"max-height":b-j-k-l-n+"px","overflow-y":"auto","min-height":Math.max(a-n,0)+"px"})};s(),this.$searchbox.off("input.getSize
propertychange.getSize").on("input.getSize
propertychange.getSize",s),a(window).off("resize.getSize").on("resize.getSize",s),a(window).off("scroll.getSize").on("scroll.getSize",s)}else
if(this.options.size&&"auto"!=this.options.size&&f.find("li"+o).length>this.options.size){var
t=this.$lis.not(".divider"+o).find(" >
*").slice(0,this.options.size).last().parent().index(),u=this.$lis.slice(0,t+1).filter(".divider").length;b=i*this.options.size+u*m+n,e.options.dropupAuto&&this.$newElement.toggleClass("dropup",c>d&&b<f.height()),f.css({"max-height":b+j+k+l+"px",overflow:"hidden"}),g.css({"max-height":b-n+"px","overflow-y":"auto"})}},setWidth:function(){if("auto"==this.options.width){this.$menu.css("min-width","0");var
a=this.$newElement.clone().appendTo("body"),b=a.find(">
.dropdown-menu").css("width"),c=a.css("width","auto").find(">
button").css("width");a.remove(),this.$newElement.css("width",Math.max(parseInt(b),parseInt(c))+"px")}else"fit"==this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){var
b,c,d=this,e="<div
/>",f=a(e),g=function(a){f.addClass(a.attr("class").replace(/form-control/gi,"")).toggleClass("dropup",a.hasClass("dropup")),b=a.offset(),c=a.hasClass("dropup")?0:a[0].offsetHeight,f.css({top:b.top+c,left:b.left,width:a[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(){d.isDisabled()||(g(a(this)),f.appendTo(d.options.container),f.toggleClass("open",!a(this).hasClass("open")),f.append(d.$menu))}),a(window).resize(function(){g(d.$newElement)}),a(window).on("scroll",function(){g(d.$newElement)}),a("html").on("click",function(b){a(b.target).closest(d.$newElement).length<1&&f.removeClass("open")})},setSelected:function(a,b){this.findLis(),this.$lis.filter('[data-original-index="'+a+'"]').toggleClass("selected",b)},setDisabled:function(a,b){this.findLis(),b?this.$lis.filter('[data-original-index="'+a+'"]').addClass("disabled").find("a").attr("href","#").attr("tabindex",-1):this.$lis.filter('[data-original-index="'+a+'"]').removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return
this.$element.is(":disabled")},checkDisabled:function(){var
a=this;this.isDisabled()?this.$button.addClass("disabled").attr("tabindex",-1):(this.$button.hasClass("disabled")&&this.$button.removeClass("disabled"),-1==this.$button.attr("tabindex")&&(this.$element.data("tabindex")||this.$button.removeAttr("tabindex"))),this.$button.click(function(){return!a.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var
b=this;this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(a){a.stopPropagation()}),this.$newElement.on("click",function(){b.setSize(),b.options.liveSearch||b.multiple||setTimeout(function(){b.$menu.find(".selected
a").focus()},10)}),this.$menu.on("click","li a",function(c){var
d=a(this),e=d.parent().data("originalIndex"),f=b.$element.val(),g=b.$element.prop("selectedIndex");if(b.multiple&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!d.parent().hasClass("disabled")){var
h=b.$element.find("option"),i=h.eq(e),j=i.prop("selected"),k=i.parent("optgroup"),l=b.options.maxOptions,m=k.data("maxOptions")||!1;if(b.multiple){if(i.prop("selected",!j),b.setSelected(e,!j),d.blur(),l!==!1||m!==!1){var
n=l<h.filter(":selected").length,o=m<k.find("option:selected").length;if(l&&n||m&&o)if(l&&1==l)h.prop("selected",!1),i.prop("selected",!0),b.$menu.find(".selected").removeClass("selected"),b.setSelected(e,!0);else
if(m&&1==m){k.find("option:selected").prop("selected",!1),i.prop("selected",!0);var
p=d.data("optgroup");b.$menu.find(".selected").has('a[data-optgroup="'+p+'"]').removeClass("selected"),b.setSelected(e,!0)}else{var
q="function"==typeof
b.options.maxOptionsText?b.options.maxOptionsText(l,m):b.options.maxOptionsText,r=q[0].replace("{n}",l),s=q[1].replace("{n}",m),t=a('<div
class="notify"></div>');q[2]&&(r=r.replace("{var}",q[2][l>1?0:1]),s=s.replace("{var}",q[2][m>1?0:1])),i.prop("selected",!1),b.$menu.append(t),l&&n&&(t.append(a("<div>"+r+"</div>")),b.$element.trigger("maxReached.bs.select")),m&&o&&(t.append(a("<div>"+s+"</div>")),b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(e,!1)},10),t.delay(750).fadeOut(300,function(){a(this).remove()})}}}else
h.prop("selected",!1),i.prop("selected",!0),b.$menu.find(".selected").removeClass("selected"),b.setSelected(e,!0);b.multiple?b.options.liveSearch&&b.$searchbox.focus():b.$button.focus(),(f!=b.$element.val()&&b.multiple||g!=b.$element.prop("selectedIndex")&&!b.multiple)&&b.$element.change()}}),this.$menu.on("click","li.disabled
a, .popover-title, .popover-title
:not(.close)",function(a){a.currentTarget==this&&(a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus())}),this.$menu.on("click","li.divider,
li.dropdown-header",function(a){a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on("click",".popover-title
.close",function(){b.$button.focus()}),this.$searchbox.on("click",function(a){a.stopPropagation()}),this.$menu.on("click",".actions-btn",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).is(".bs-select-all")?b.selectAll():b.deselectAll(),b.$element.change()}),this.$element.change(function(){b.render(!1)})},liveSearchListener:function(){var
b=this,e=a('<li
class="no-results"></li>');this.$newElement.on("click.dropdown.data-api
touchstart.dropdown.data-api",function(){b.$menu.find(".active").removeClass("active"),b.$searchbox.val()&&(b.$searchbox.val(""),b.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),b.multiple||b.$menu.find(".selected").addClass("active"),setTimeout(function(){b.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api
focus.dropdown.data-api
touchend.dropdown.data-api",function(a){a.stopPropagation()}),this.$searchbox.on("input
propertychange",function(){b.$searchbox.val()?(b.options.searchAccentInsensitive?b.$lis.not(".is-hidden").removeClass("hidden").find("a").not(":aicontains("+c(b.$searchbox.val())+")").parent().addClass("hidden"):b.$lis.not(".is-hidden").removeClass("hidden").find("a").not(":icontains("+b.$searchbox.val()+")").parent().addClass("hidden"),b.$menu.find("li").filter(":visible:not(.no-results)").length?e.parent().length&&e.remove():(e.parent().length&&e.remove(),e.html(b.options.noneResultsText+'
"'+d(b.$searchbox.val())+'"').show(),b.$menu.find("li").last().after(e))):(b.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),b.$menu.find("li.active").removeClass("active"),b.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus(),a(this).focus()})},val:function(a){return"undefined"!=typeof
a?(this.$element.val(a),this.render(),this.$element):this.$element.val()},selectAll:function(){this.findLis(),this.$lis.not(".divider").not(".disabled").not(".selected").filter(":visible").find("a").click()},deselectAll:function(){this.findLis(),this.$lis.not(".divider").not(".disabled").filter(".selected").filter(":visible").find("a").click()},keydown:function(b){var
d,e,f,g,h,i,j,k,l,m=a(this),n=m.is("input")?m.parent().parent():m.parent(),o=n.data("this"),p={32:"
",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(o.options.liveSearch&&(n=m.parent().parent()),o.options.container&&(n=o.$menu),d=a("[role=menu]
li
a",n),l=o.$menu.parent().hasClass("open"),!l&&/([0-9]|[A-z])/.test(String.fromCharCode(b.keyCode))&&(o.options.container?o.$newElement.trigger("click"):(o.setSize(),o.$menu.parent().addClass("open"),l=!0),o.$searchbox.focus()),o.options.liveSearch&&(/(^9$|27)/.test(b.keyCode.toString(10))&&l&&0===o.$menu.find(".active").length&&(b.preventDefault(),o.$menu.parent().removeClass("open"),o.$button.focus()),d=a("[role=menu]
li:not(.divider):not(.dropdown-header):visible",n),m.val()||/(38|40)/.test(b.keyCode.toString(10))||0===d.filter(".active").length&&(d=o.$newElement.find("li").filter(o.options.searchAccentInsensitive?":aicontains("+c(p[b.keyCode])+")":":icontains("+p[b.keyCode]+")"))),d.length){if(/(38|40)/.test(b.keyCode.toString(10)))e=d.index(d.filter(":focus")),g=d.parent(":not(.disabled):visible").first().index(),h=d.parent(":not(.disabled):visible").last().index(),f=d.eq(e).parent().nextAll(":not(.disabled):visible").eq(0).index(),i=d.eq(e).parent().prevAll(":not(.disabled):visible").eq(0).index(),j=d.eq(f).parent().prevAll(":not(.disabled):visible").eq(0).index(),o.options.liveSearch&&(d.each(function(b){a(this).is(":not(.disabled)")&&a(this).data("index",b)}),e=d.index(d.filter(".active")),g=d.filter(":not(.disabled):visible").first().data("index"),h=d.filter(":not(.disabled):visible").last().data("index"),f=d.eq(e).nextAll(":not(.disabled):visible").eq(0).data("index"),i=d.eq(e).prevAll(":not(.disabled):visible").eq(0).data("index"),j=d.eq(f).prevAll(":not(.disabled):visible").eq(0).data("index")),k=m.data("prevIndex"),38==b.keyCode&&(o.options.liveSearch&&(e-=1),e!=j&&e>i&&(e=i),g>e&&(e=g),e==k&&(e=h)),40==b.keyCode&&(o.options.liveSearch&&(e+=1),-1==e&&(e=0),e!=j&&f>e&&(e=f),e>h&&(e=h),e==k&&(e=g)),m.data("prevIndex",e),o.options.liveSearch?(b.preventDefault(),m.is(".dropdown-toggle")||(d.removeClass("active"),d.eq(e).addClass("active").find("a").focus(),m.focus())):d.eq(e).focus();else
if(!m.is("input")){var
q,r,s=[];d.each(function(){a(this).parent().is(":not(.disabled)")&&a.trim(a(this).text().toLowerCase()).substring(0,1)==p[b.keyCode]&&s.push(a(this).parent().index())}),q=a(document).data("keycount"),q++,a(document).data("keycount",q),r=a.trim(a(":focus").text().toLowerCase()).substring(0,1),r!=p[b.keyCode]?(q=1,a(document).data("keycount",q)):q>=s.length&&(a(document).data("keycount",0),q>s.length&&(q=1)),d.eq(s[q-1]).focus()}(/(13|32)/.test(b.keyCode.toString(10))||/(^9$)/.test(b.keyCode.toString(10))&&o.options.selectOnTab)&&l&&(/(32)/.test(b.keyCode.toString(10))||b.preventDefault(),o.options.liveSearch?/(32)/.test(b.keyCode.toString(10))||(o.$menu.find(".active
a").click(),m.focus()):a(":focus").click(),a(document).data("keycount",0)),(/(^9$|27)/.test(b.keyCode.toString(10))&&l&&(o.multiple||o.options.liveSearch)||/(27)/.test(b.keyCode.toString(10))&&!l)&&(o.$menu.parent().removeClass("open"),o.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.reloadLi(),this.render(),this.setWidth(),this.setStyle(),this.checkDisabled(),this.liHeight()},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()}};var
g=a.fn.selectpicker;a.fn.selectpicker=e,a.fn.selectpicker.Constructor=f,a.fn.selectpicker.noConflict=function(){return
a.fn.selectpicker=g,this},a(document).data("keycount",0).on("keydown",".bootstrap-select
[data-toggle=dropdown], .bootstrap-select [role=menu], .bs-searchbox
input",f.prototype.keydown).on("focusin.modal",".bootstrap-select
[data-toggle=dropdown], .bootstrap-select [role=menu], .bs-searchbox
input",function(a){a.stopPropagation()}),a(window).on("load.bs.select.data-api",function(){a(".selectpicker").each(function(){var
b=a(this);e.call(b,b.data())})})}(jQuery);
-//# sourceMappingURL=bootstrap-select.js.map
\ No newline at end of file
diff --git a/ui/libs/bootstrap-select/dist/Makefile.am
b/ui/libs/bootstrap-select/dist/Makefile.am
new file mode 100644
index 0000000..a30b90a
--- /dev/null
+++ b/ui/libs/bootstrap-select/dist/Makefile.am
@@ -0,0 +1,20 @@
+#
+# Project Wok
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# Code derived from Project Kimchi
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SUBDIRS = css js
diff --git a/ui/libs/bootstrap-select/dist/css/Makefile.am
b/ui/libs/bootstrap-select/dist/css/Makefile.am
new file mode 100644
index 0000000..649a4f3
--- /dev/null
+++ b/ui/libs/bootstrap-select/dist/css/Makefile.am
@@ -0,0 +1,22 @@
+#
+# Project Wok
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# Code derived from Project Kimchi
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+bootstrapselectcssdir = $(datadir)/wok/ui/libs/bootstrap-select/dist/css
+
+dist_bootstrapselectcss_DATA = $(wildcard *.css) $(NULL)
diff --git a/ui/libs/bootstrap-select/dist/css/bootstrap-select.min.css
b/ui/libs/bootstrap-select/dist/css/bootstrap-select.min.css
new file mode 100644
index 0000000..1dc6b85
--- /dev/null
+++ b/ui/libs/bootstrap-select/dist/css/bootstrap-select.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap-select v1.6.3 (
http://silviomoreto.github.io/bootstrap-select/)
+ *
+ * Copyright 2013-2014 bootstrap-select
+ * Licensed under MIT
(
https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */.bootstrap-select{width:220px
\0}.bootstrap-select>.btn{width:100%;padding-right:25px}.error .bootstrap-select
.btn{border:1px solid #b94a48}.control-group.error .bootstrap-select
.dropdown-toggle{border-color:#b94a48}.bootstrap-select.fit-width{width:auto!important}.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn){width:220px}.bootstrap-select
.btn:focus{outline:thin dotted #333!important;outline:5px auto
-webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:none}.bootstrap-select.form-control:not([class*=col-]){width:100%}.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*=col-]{float:none;display:inline-block;margin-left:0}.bootstrap-select.btn-group.dropdown-menu-right,.bootstrap-select.btn-group[class*=col-].dropdown-menu-right,.row-fluid
.bootstrap-select.btn-group[class*=col-].dropdown-menu-right{float:right}.form-search
.bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group,.form-horizontal
.bootstrap-select.btn-group,.form-group
.bootstrap-select.btn-group{margin-bottom:0}.form-group-lg
.bootstrap-select.btn-group.form-control,.form-group-sm
.bootstrap-select.btn-group.form-control{padding:0}.form-inline
.bootstrap-select.btn-group .form-control{width:100%}.input-append
.bootstrap-select.btn-group{margin-left:-1px}.input-prepend
.bootstrap-select.btn-group{margin-right:-1px}.bootstrap-select.btn-group>.disabled{cursor:not-allowed}.bootstrap-select.btn-group>.disabled:focus{outline:0!important}.bootstrap-select.btn-group
.btn
.filter-option{display:inline-block;overflow:hidden;width:100%;text-align:left}.bootstrap-select.btn-group
.btn
.caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group[class*=col-]
.btn{width:100%}.bootstrap-select.btn-group
.dropdown-menu{min-width:100%;z-index:1035;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group
.dropdown-menu.inner{position:static;border:0;padding:0;margin:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group
.dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu
li:not(.disabled) a:hover small,.bootstrap-select.btn-group .dropdown-menu
li:not(.disabled) a:focus small,.bootstrap-select.btn-group .dropdown-menu
li.active:not(.disabled) a
small{color:#64b1d8;color:fade(#64b1d8,40%)}.bootstrap-select.btn-group .dropdown-menu
li.disabled a{cursor:not-allowed}.bootstrap-select.btn-group .dropdown-menu li
a{cursor:pointer}.bootstrap-select.btn-group .dropdown-menu li
a.opt{position:relative;padding-left:2.25em}.bootstrap-select.btn-group .dropdown-menu li
a span.check-mark{display:none}.bootstrap-select.btn-group .dropdown-menu li a
span.text{display:inline-block}.bootstrap-select.btn-group .dropdown-menu li
small{padding-left:.5em}.bootstrap-select.btn-group .dropdown-menu
.notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px
5px;background:#f5f5f5;border:1px solid #e3e3e3;-webkit-box-shadow:inset 0 1px 1px
fade(black,5%);box-shadow:inset 0 1px 1px
fade(black,5%);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group
.no-results{padding:3px;background:#f5f5f5;margin:0
5px}.bootstrap-select.btn-group.fit-width .btn
.filter-option{position:static}.bootstrap-select.btn-group.fit-width .btn
.caret{position:static;top:auto;margin-top:-1px}.bootstrap-select.btn-group.show-tick
.dropdown-menu li.selected a
span.check-mark{position:absolute;display:inline-block;right:15px;margin-top:5px}.bootstrap-select.btn-group.show-tick
.dropdown-menu li a
span.text{margin-right:34px}.bootstrap-select.show-menu-arrow.open>.btn{z-index:1036}.bootstrap-select.show-menu-arrow
.dropdown-toggle:before{content:'';border-left:7px solid
transparent;border-right:7px solid
transparent;border-bottom-width:7px;border-bottom-style:solid;border-bottom-color:#ccc;border-bottom-color:fade(#ccc,20%);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow
.dropdown-toggle:after{content:'';border-left:6px solid
transparent;border-right:6px solid transparent;border-bottom:6px solid
#fff;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup
.dropdown-toggle:before{bottom:auto;top:-3px;border-bottom:0;border-top-width:7px;border-top-style:solid;border-top-color:#ccc;border-top-color:fade(#ccc,20%)}.bootstrap-select.show-menu-arrow.dropup
.dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid
#fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right
.dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right
.dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after{display:block}.bs-searchbox,.bs-actionsbox{padding:4px
8px}.bs-actionsbox{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-actionsbox
.btn-group button{width:50%}.bs-searchbox+.bs-actionsbox{padding:0 8px 4px}.bs-searchbox
input.form-control{margin-bottom:0;width:100%}.mobile-device{position:absolute;top:0;left:0;display:block!important;width:100%;height:100%!important;opacity:0}
\ No newline at end of file
diff --git a/ui/libs/bootstrap-select/dist/js/Makefile.am
b/ui/libs/bootstrap-select/dist/js/Makefile.am
new file mode 100644
index 0000000..97b771a
--- /dev/null
+++ b/ui/libs/bootstrap-select/dist/js/Makefile.am
@@ -0,0 +1,22 @@
+#
+# Project Wok
+#
+# Copyright IBM, Corp. 2013-2015
+#
+# Code derived from Project Kimchi
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+bootstrapselectjsdir = $(datadir)/wok/ui/libs/bootstrap-select/dist/js
+
+dist_bootstrapselectjs_DATA = $(wildcard *.js) $(NULL)
diff --git a/ui/libs/bootstrap-select/dist/js/bootstrap-select.min.js
b/ui/libs/bootstrap-select/dist/js/bootstrap-select.min.js
new file mode 100644
index 0000000..d770e9b
--- /dev/null
+++ b/ui/libs/bootstrap-select/dist/js/bootstrap-select.min.js
@@ -0,0 +1,8 @@
+/*!
+ * Bootstrap-select v1.6.3 (
http://silviomoreto.github.io/bootstrap-select/)
+ *
+ * Copyright 2013-2014 bootstrap-select
+ * Licensed under MIT
(
https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a){"use strict";function b(a,b){return
a.toUpperCase().indexOf(b.toUpperCase())>-1}function c(b){var
c=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return
a.each(c,function(){b=b.replace(this.re,this.ch)}),b}function d(a){var
b={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},c="(?:"+Object.keys(b).join("|")+")",d=new
RegExp(c),e=new RegExp(c,"g"),f=null==a?"":""+a;return
d.test(f)?f.replace(e,function(a){return b[a]}):f}function e(b,c){var
d=arguments,e=b,b=d[0],c=d[1];[].shift.apply(d),"undefined"==typeof
b&&(b=e);var g,h=this.each(function(){var
e=a(this);if(e.is("select")){var
h=e.data("selectpicker"),i="object"==typeof
b&&b;if(h){if(i)for(var j in
i)i.hasOwnProperty(j)&&(h.options[j]=i[j])}else{var
k=a.extend({},f.DEFAULTS,a.fn.selectpicker.defaults||{},e.data(),i);e.data("selectpicker",h=new
f(this,k,c))}"string"==typeof b&&(g=h[b]instanceof
Function?h[b].apply(h,d):h.options[b])}});return"undefined"!=typeof
g?g:h}a.expr[":"].icontains=function(c,d,e){return
b(a(c).text(),e[3])},a.expr[":"].aicontains=function(c,d,e){return
b(a(c).data("normalizedText")||a(c).text(),e[3])};var
f=function(b,c,d){d&&(d.stopPropagation(),d.preventDefault()),this.$element=a(b),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=c,null===this.options.title&&(this.options.title=this.$element.attr("title")),this.val=f.prototype.val,this.render=f.prototype.render,this.refresh=f.prototype.refresh,this.setStyle=f.prototype.setStyle,this.selectAll=f.prototype.selectAll,this.deselectAll=f.prototype.deselectAll,this.destroy=f.prototype.remove,this.remove=f.prototype.remove,this.show=f.prototype.show,this.hide=f.prototype.hide,this.init()};f.VERSION="1.6.3",f.DEFAULTS={noneSelectedText:"Nothing
selected",noneResultsText:"No results
match",countSelectedText:function(a){return 1==a?"{0} item
selected":"{0} items selected"},maxOptionsText:function(a,b){var
c=[];return c[0]=1==a?"Limit reached ({n} item max)":"Limit reached ({n}
items max)",c[1]=1==b?"Group limit reached ({n} item max)":"Group
limit reached ({n} items max)",c},selectAllText:"Select
All",deselectAllText:"Deselect All",multipleSeparator:",
",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,searchAccentInsensitive:!1},f.prototype={constructor:f,init:function(){var
b=this,c=this.$element.attr("id");this.$element.hide(),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement),this.$menu=this.$newElement.find(">
.dropdown-menu"),this.$button=this.$newElement.find(">
button"),this.$searchbox=this.$newElement.find("input"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),"undefined"!=typeof
c&&(this.$button.attr("data-id",c),a('label[for="'+c+'"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.liHeight(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile()},createDropdown:function(){var
b=this.multiple?"
show-tick":"",c=this.$element.parent().hasClass("input-group")?"
input-group-btn":"",e=this.autofocus?"
autofocus":"",f=this.$element.parents().hasClass("form-group-lg")?"
btn-lg":this.$element.parents().hasClass("form-group-sm")?"
btn-sm":"",g=this.options.header?'<div
class="popover-title"><button type="button"
class="close"
aria-hidden="true">×</button>'+this.options.header+"</div>":"",h=this.options.liveSearch?'<div
class="bs-searchbox"><input type="text"
class="form-control"
autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":'
placeholder="'+d(this.options.liveSearchPlaceholder)+'"')+"></div>":"",i=this.options.actionsBox?'<div
class="bs-actionsbox"><div class="btn-group
btn-block"><button class="actions-btn bs-select-all btn btn-sm
btn-default">'+this.options.selectAllText+'</button><button
class="actions-btn bs-deselect-all btn btn-sm
btn-default">'+this.options.deselectAllText+"</button></div></div>":"",j='<div
class="btn-group bootstrap-select'+b+c+'"><button
type="button" class="btn dropdown-toggle form-control
selectpicker'+f+'" data-toggle="dropdown"'+e+'><span
class="filter-option pull-left"></span> <span
class="caret"></span></button><div class="dropdown-menu
open">'+g+h+i+'<ul class="dropdown-menu inner selectpicker"
role="menu"></ul></div></div>';return
a(j)},createView:function(){var a=this.createDropdown(),b=this.createLi();return
a.find("ul").append(b),a},reloadLi:function(){this.destroyLi();var
a=this.createLi();this.$menu.find("ul").append(a)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var
b=this,e=[],f=0,g=function(a,b,c){return"<li"+("undefined"!=typeof
c?' class="'+c+'"':"")+("undefined"!=typeof
b|null===b?'
data-original-index="'+b+'"':"")+">"+a+"</li>"},h=function(a,e,f,g){var
h=c(d(a));return'<a tabindex="0"'+("undefined"!=typeof
e?' class="'+e+'"':"")+("undefined"!=typeof
f?' style="'+f+'"':"")+("undefined"!=typeof
g?'data-optgroup="'+g+'"':"")+'
data-normalized-text="'+h+'">'+a+'<span
class="'+b.options.iconBase+" "+b.options.tickIcon+'
check-mark"></span></a>'};return
this.$element.find("option").each(function(){var
c=a(this),d=c.attr("class")||"",i=c.attr("style"),j=c.data("content")?c.data("content"):c.html(),k="undefined"!=typeof
c.data("subtext")?'<small class="muted
text-muted">'+c.data("subtext")+"</small>":"",l="undefined"!=typeof
c.data("icon")?'<span class="'+b.options.iconBase+"
"+c.data("icon")+'"></span>
':"",m=c.is(":disabled")||c.parent().is(":disabled"),n=c.index();if(""!==l&&m&&(l="<span>"+l+"</span>"),c.data("content")||(j=l+'<span
class="text">'+j+k+"</span>"),!b.options.hideDisabled||!m)if(c.parent().is("optgroup")&&c.data("divider")!==!0){if(0===c.index()){f+=1;var
o=c.parent().attr("label"),p="undefined"!=typeof
c.parent().data("subtext")?'<small class="muted
text-muted">'+c.parent().data("subtext")+"</small>":"",q=c.parent().data("icon")?'<span
class="'+b.options.iconBase+"
"+c.parent().data("icon")+'"></span>
':"";o=q+'<span
class="text">'+o+p+"</span>",0!==n&&e.length>0&&e.push(g("",null,"divider")),e.push(g(o,null,"dropdown-header"))}e.push(g(h(j,"opt
"+d,i,f),n))}else
e.push(c.data("divider")===!0?g("",n,"divider"):c.data("hidden")===!0?g(h(j,d,i),n,"hidden
is-hidden"):g(h(j,d,i),n))}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),a(e.join(""))},findLis:function(){return
null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(b){var
c=this;b!==!1&&this.$element.find("option").each(function(b){c.setDisabled(b,a(this).is(":disabled")||a(this).parent().is(":disabled")),c.setSelected(b,a(this).is(":selected"))}),this.tabIndex();var
d=this.options.hideDisabled?":not([disabled])":"",e=this.$element.find("option:selected"+d).map(function(){var
b,d=a(this),e=d.data("icon")&&c.options.showIcon?'<i
class="'+c.options.iconBase+"
"+d.data("icon")+'"></i> ':"";return
b=c.options.showSubtext&&d.attr("data-subtext")&&!c.multiple?'
<small class="muted
text-muted">'+d.data("subtext")+"</small>":"",d.data("content")&&c.options.showContent?d.data("content"):"undefined"!=typeof
d.attr("title")?d.attr("title"):e+d.html()+b}).toArray(),f=this.multiple?e.join(this.options.multipleSeparator):e[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var
g=this.options.selectedTextFormat.split(">");if(g.length>1&&e.length>g[1]||1==g.length&&e.length>=2){d=this.options.hideDisabled?",
[disabled]":"";var
h=this.$element.find("option").not('[data-divider="true"],
[data-hidden="true"]'+d).length,i="function"==typeof
this.options.countSelectedText?this.options.countSelectedText(e.length,h):this.options.countSelectedText;f=i.replace("{0}",e.length.toString()).replace("{1}",h.toString())}}this.options.title=this.$element.attr("title"),"static"==this.options.selectedTextFormat&&(f=this.options.title),f||(f="undefined"!=typeof
this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",a.trim(f.replace(/<[^>]*>?/g,""))),this.$newElement.find(".filter-option").html(f)},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|validate\[.*\]/gi,""));var
c=a?a:this.options.style;"add"==b?this.$button.addClass(c):"remove"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(){if(this.options.size!==!1){var
a=this.$menu.parent().clone().find(">
.dropdown-toggle").prop("autofocus",!1).end().appendTo("body"),b=a.addClass("open").find(">
.dropdown-menu"),c=b.find("li").not(".divider").not(".dropdown-header").filter(":visible").children("a").outerHeight(),d=this.options.header?b.find(".popover-title").outerHeight():0,e=this.options.liveSearch?b.find(".bs-searchbox").outerHeight():0,f=this.options.actionsBox?b.find(".bs-actionsbox").outerHeight():0;a.remove(),this.$newElement.data("liHeight",c).data("headerHeight",d).data("searchHeight",e).data("actionsHeight",f)}},setSize:function(){this.findLis();var
b,c,d,e=this,f=this.$menu,g=f.find(".inner"),h=this.$newElement.outerHeight(),i=this.$newElement.data("liHeight"),j=this.$newElement.data("headerHeight"),k=this.$newElement.data("searchHeight"),l=this.$newElement.data("actionsHeight"),m=this.$lis.filter(".divider").outerHeight(!0),n=parseInt(f.css("padding-top"))+parseInt(f.css("padding-bottom"))+parseInt(f.css("border-top-width"))+parseInt(f.css("border-bottom-width")),o=this.options.hideDisabled?",
.disabled":"",p=a(window),q=n+parseInt(f.css("margin-top"))+parseInt(f.css("margin-bottom"))+2,r=function(){c=e.$newElement.offset().top-p.scrollTop(),d=p.height()-c-h};if(r(),this.options.header&&f.css("padding-top",0),"auto"==this.options.size){var
s=function(){var
a,h=e.$lis.not(".hidden");r(),b=d-q,e.options.dropupAuto&&e.$newElement.toggleClass("dropup",c>d&&b-q<f.height()),e.$newElement.hasClass("dropup")&&(b=c-q),a=h.length+h.filter(".dropdown-header").length>3?3*i+q-2:0,f.css({"max-height":b+"px",overflow:"hidden","min-height":a+j+k+l+"px"}),g.css({"max-height":b-j-k-l-n+"px","overflow-y":"auto","min-height":Math.max(a-n,0)+"px"})};s(),this.$searchbox.off("input.getSize
propertychange.getSize").on("input.getSize
propertychange.getSize",s),a(window).off("resize.getSize").on("resize.getSize",s),a(window).off("scroll.getSize").on("scroll.getSize",s)}else
if(this.options.size&&"auto"!=this.options.size&&f.find("li"+o).length>this.options.size){var
t=this.$lis.not(".divider"+o).find(" >
*").slice(0,this.options.size).last().parent().index(),u=this.$lis.slice(0,t+1).filter(".divider").length;b=i*this.options.size+u*m+n,e.options.dropupAuto&&this.$newElement.toggleClass("dropup",c>d&&b<f.height()),f.css({"max-height":b+j+k+l+"px",overflow:"hidden"}),g.css({"max-height":b-n+"px","overflow-y":"auto"})}},setWidth:function(){if("auto"==this.options.width){this.$menu.css("min-width","0");var
a=this.$newElement.clone().appendTo("body"),b=a.find(">
.dropdown-menu").css("width"),c=a.css("width","auto").find(">
button").css("width");a.remove(),this.$newElement.css("width",Math.max(parseInt(b),parseInt(c))+"px")}else"fit"==this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){var
b,c,d=this,e="<div
/>",f=a(e),g=function(a){f.addClass(a.attr("class").replace(/form-control/gi,"")).toggleClass("dropup",a.hasClass("dropup")),b=a.offset(),c=a.hasClass("dropup")?0:a[0].offsetHeight,f.css({top:b.top+c,left:b.left,width:a[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(){d.isDisabled()||(g(a(this)),f.appendTo(d.options.container),f.toggleClass("open",!a(this).hasClass("open")),f.append(d.$menu))}),a(window).resize(function(){g(d.$newElement)}),a(window).on("scroll",function(){g(d.$newElement)}),a("html").on("click",function(b){a(b.target).closest(d.$newElement).length<1&&f.removeClass("open")})},setSelected:function(a,b){this.findLis(),this.$lis.filter('[data-original-index="'+a+'"]').toggleClass("selected",b)},setDisabled:function(a,b){this.findLis(),b?this.$lis.filter('[data-original-index="'+a+'"]').addClass("disabled").find("a").attr("href","#").attr("tabindex",-1):this.$lis.filter('[data-original-index="'+a+'"]').removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return
this.$element.is(":disabled")},checkDisabled:function(){var
a=this;this.isDisabled()?this.$button.addClass("disabled").attr("tabindex",-1):(this.$button.hasClass("disabled")&&this.$button.removeClass("disabled"),-1==this.$button.attr("tabindex")&&(this.$element.data("tabindex")||this.$button.removeAttr("tabindex"))),this.$button.click(function(){return!a.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var
b=this;this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(a){a.stopPropagation()}),this.$newElement.on("click",function(){b.setSize(),b.options.liveSearch||b.multiple||setTimeout(function(){b.$menu.find(".selected
a").focus()},10)}),this.$menu.on("click","li a",function(c){var
d=a(this),e=d.parent().data("originalIndex"),f=b.$element.val(),g=b.$element.prop("selectedIndex");if(b.multiple&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!d.parent().hasClass("disabled")){var
h=b.$element.find("option"),i=h.eq(e),j=i.prop("selected"),k=i.parent("optgroup"),l=b.options.maxOptions,m=k.data("maxOptions")||!1;if(b.multiple){if(i.prop("selected",!j),b.setSelected(e,!j),d.blur(),l!==!1||m!==!1){var
n=l<h.filter(":selected").length,o=m<k.find("option:selected").length;if(l&&n||m&&o)if(l&&1==l)h.prop("selected",!1),i.prop("selected",!0),b.$menu.find(".selected").removeClass("selected"),b.setSelected(e,!0);else
if(m&&1==m){k.find("option:selected").prop("selected",!1),i.prop("selected",!0);var
p=d.data("optgroup");b.$menu.find(".selected").has('a[data-optgroup="'+p+'"]').removeClass("selected"),b.setSelected(e,!0)}else{var
q="function"==typeof
b.options.maxOptionsText?b.options.maxOptionsText(l,m):b.options.maxOptionsText,r=q[0].replace("{n}",l),s=q[1].replace("{n}",m),t=a('<div
class="notify"></div>');q[2]&&(r=r.replace("{var}",q[2][l>1?0:1]),s=s.replace("{var}",q[2][m>1?0:1])),i.prop("selected",!1),b.$menu.append(t),l&&n&&(t.append(a("<div>"+r+"</div>")),b.$element.trigger("maxReached.bs.select")),m&&o&&(t.append(a("<div>"+s+"</div>")),b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(e,!1)},10),t.delay(750).fadeOut(300,function(){a(this).remove()})}}}else
h.prop("selected",!1),i.prop("selected",!0),b.$menu.find(".selected").removeClass("selected"),b.setSelected(e,!0);b.multiple?b.options.liveSearch&&b.$searchbox.focus():b.$button.focus(),(f!=b.$element.val()&&b.multiple||g!=b.$element.prop("selectedIndex")&&!b.multiple)&&b.$element.change()}}),this.$menu.on("click","li.disabled
a, .popover-title, .popover-title
:not(.close)",function(a){a.currentTarget==this&&(a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus())}),this.$menu.on("click","li.divider,
li.dropdown-header",function(a){a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on("click",".popover-title
.close",function(){b.$button.focus()}),this.$searchbox.on("click",function(a){a.stopPropagation()}),this.$menu.on("click",".actions-btn",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).is(".bs-select-all")?b.selectAll():b.deselectAll(),b.$element.change()}),this.$element.change(function(){b.render(!1)})},liveSearchListener:function(){var
b=this,e=a('<li
class="no-results"></li>');this.$newElement.on("click.dropdown.data-api
touchstart.dropdown.data-api",function(){b.$menu.find(".active").removeClass("active"),b.$searchbox.val()&&(b.$searchbox.val(""),b.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),b.multiple||b.$menu.find(".selected").addClass("active"),setTimeout(function(){b.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api
focus.dropdown.data-api
touchend.dropdown.data-api",function(a){a.stopPropagation()}),this.$searchbox.on("input
propertychange",function(){b.$searchbox.val()?(b.options.searchAccentInsensitive?b.$lis.not(".is-hidden").removeClass("hidden").find("a").not(":aicontains("+c(b.$searchbox.val())+")").parent().addClass("hidden"):b.$lis.not(".is-hidden").removeClass("hidden").find("a").not(":icontains("+b.$searchbox.val()+")").parent().addClass("hidden"),b.$menu.find("li").filter(":visible:not(.no-results)").length?e.parent().length&&e.remove():(e.parent().length&&e.remove(),e.html(b.options.noneResultsText+'
"'+d(b.$searchbox.val())+'"').show(),b.$menu.find("li").last().after(e))):(b.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),b.$menu.find("li.active").removeClass("active"),b.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus(),a(this).focus()})},val:function(a){return"undefined"!=typeof
a?(this.$element.val(a),this.render(),this.$element):this.$element.val()},selectAll:function(){this.findLis(),this.$lis.not(".divider").not(".disabled").not(".selected").filter(":visible").find("a").click()},deselectAll:function(){this.findLis(),this.$lis.not(".divider").not(".disabled").filter(".selected").filter(":visible").find("a").click()},keydown:function(b){var
d,e,f,g,h,i,j,k,l,m=a(this),n=m.is("input")?m.parent().parent():m.parent(),o=n.data("this"),p={32:"
",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(o.options.liveSearch&&(n=m.parent().parent()),o.options.container&&(n=o.$menu),d=a("[role=menu]
li
a",n),l=o.$menu.parent().hasClass("open"),!l&&/([0-9]|[A-z])/.test(String.fromCharCode(b.keyCode))&&(o.options.container?o.$newElement.trigger("click"):(o.setSize(),o.$menu.parent().addClass("open"),l=!0),o.$searchbox.focus()),o.options.liveSearch&&(/(^9$|27)/.test(b.keyCode.toString(10))&&l&&0===o.$menu.find(".active").length&&(b.preventDefault(),o.$menu.parent().removeClass("open"),o.$button.focus()),d=a("[role=menu]
li:not(.divider):not(.dropdown-header):visible",n),m.val()||/(38|40)/.test(b.keyCode.toString(10))||0===d.filter(".active").length&&(d=o.$newElement.find("li").filter(o.options.searchAccentInsensitive?":aicontains("+c(p[b.keyCode])+")":":icontains("+p[b.keyCode]+")"))),d.length){if(/(38|40)/.test(b.keyCode.toString(10)))e=d.index(d.filter(":focus")),g=d.parent(":not(.disabled):visible").first().index(),h=d.parent(":not(.disabled):visible").last().index(),f=d.eq(e).parent().nextAll(":not(.disabled):visible").eq(0).index(),i=d.eq(e).parent().prevAll(":not(.disabled):visible").eq(0).index(),j=d.eq(f).parent().prevAll(":not(.disabled):visible").eq(0).index(),o.options.liveSearch&&(d.each(function(b){a(this).is(":not(.disabled)")&&a(this).data("index",b)}),e=d.index(d.filter(".active")),g=d.filter(":not(.disabled):visible").first().data("index"),h=d.filter(":not(.disabled):visible").last().data("index"),f=d.eq(e).nextAll(":not(.disabled):visible").eq(0).data("index"),i=d.eq(e).prevAll(":not(.disabled):visible").eq(0).data("index"),j=d.eq(f).prevAll(":not(.disabled):visible").eq(0).data("index")),k=m.data("prevIndex"),38==b.keyCode&&(o.options.liveSearch&&(e-=1),e!=j&&e>i&&(e=i),g>e&&(e=g),e==k&&(e=h)),40==b.keyCode&&(o.options.liveSearch&&(e+=1),-1==e&&(e=0),e!=j&&f>e&&(e=f),e>h&&(e=h),e==k&&(e=g)),m.data("prevIndex",e),o.options.liveSearch?(b.preventDefault(),m.is(".dropdown-toggle")||(d.removeClass("active"),d.eq(e).addClass("active").find("a").focus(),m.focus())):d.eq(e).focus();else
if(!m.is("input")){var
q,r,s=[];d.each(function(){a(this).parent().is(":not(.disabled)")&&a.trim(a(this).text().toLowerCase()).substring(0,1)==p[b.keyCode]&&s.push(a(this).parent().index())}),q=a(document).data("keycount"),q++,a(document).data("keycount",q),r=a.trim(a(":focus").text().toLowerCase()).substring(0,1),r!=p[b.keyCode]?(q=1,a(document).data("keycount",q)):q>=s.length&&(a(document).data("keycount",0),q>s.length&&(q=1)),d.eq(s[q-1]).focus()}(/(13|32)/.test(b.keyCode.toString(10))||/(^9$)/.test(b.keyCode.toString(10))&&o.options.selectOnTab)&&l&&(/(32)/.test(b.keyCode.toString(10))||b.preventDefault(),o.options.liveSearch?/(32)/.test(b.keyCode.toString(10))||(o.$menu.find(".active
a").click(),m.focus()):a(":focus").click(),a(document).data("keycount",0)),(/(^9$|27)/.test(b.keyCode.toString(10))&&l&&(o.multiple||o.options.liveSearch)||/(27)/.test(b.keyCode.toString(10))&&!l)&&(o.$menu.parent().removeClass("open"),o.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.reloadLi(),this.render(),this.setWidth(),this.setStyle(),this.checkDisabled(),this.liHeight()},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()}};var
g=a.fn.selectpicker;a.fn.selectpicker=e,a.fn.selectpicker.Constructor=f,a.fn.selectpicker.noConflict=function(){return
a.fn.selectpicker=g,this},a(document).data("keycount",0).on("keydown",".bootstrap-select
[data-toggle=dropdown], .bootstrap-select [role=menu], .bs-searchbox
input",f.prototype.keydown).on("focusin.modal",".bootstrap-select
[data-toggle=dropdown], .bootstrap-select [role=menu], .bs-searchbox
input",function(a){a.stopPropagation()}),a(window).on("load.bs.select.data-api",function(){a(".selectpicker").each(function(){var
b=a(this);e.call(b,b.data())})})}(jQuery);
+//# sourceMappingURL=bootstrap-select.js.map
\ No newline at end of file
--
1.9.3