diff --git a/module/block/control.php b/module/block/control.php
index 0168c3a7f8..3bb43b0046 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -528,7 +528,7 @@ class block extends control
{
$this->app->loadLang('build');
$projects = $this->loadModel('project')->getPairs();
- $this->view->builds = $this->dao->select('t1.*,t2.productName')->from(TABLE_BUILD)->alias('t1')
+ $this->view->builds = $this->dao->select('t1.*, t2.name as productName')->from(TABLE_BUILD)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->where('t1.deleted')->eq('0')
->andWhere('t1.project')->in(array_keys($projects))
diff --git a/module/block/js/dashboard.js b/module/block/js/dashboard.js
index 40f127ade1..b03c30b1c6 100644
--- a/module/block/js/dashboard.js
+++ b/module/block/js/dashboard.js
@@ -51,6 +51,12 @@ function checkEmpty()
$dashboard.find('.dashboard-empty-message').toggleClass('hide', hasBlocks);
}
+/**
+ * Resize block
+ * @param object $event
+ * @access public
+ * @return void
+ */
function resizeBlock(event)
{
var blockID = event.element.find('.panel').data('id');
@@ -60,6 +66,33 @@ function resizeBlock(event)
});
}
+/**
+ * Init table header
+ * @access public
+ * @return void
+ */
+function initTableHeader()
+{
+ $('#dashboard .panel-block').each(function()
+ {
+ var $panel = $(this);
+ var $table = $panel.find('.table:first');
+
+ console.log($table.length, $table.children('thead').length, this);
+ if(!$table.length || !$table.children('thead').length) return;
+ console.log('ok');
+
+ var $header = $panel.children('.table-header-fixed');
+ if(!$header.length)
+ {
+ $header = $('
').css('right', $panel.width() - $table.width() - 2);
+ $header.find('.table').append($table.find('thead').clone());
+ $panel.addClass('with-fixed-header').append($header);
+ var $heading = $panel.children('.panel-heading');
+ if($heading.length) $header.css('top', $heading.outerHeight());
+ }
+ });
+}
$(function()
{
@@ -73,12 +106,14 @@ $(function()
sensitive : true,
panelRemovingTip : config.confirmRemoveBlock,
resizable : true,
- onResize : resizeBlock
+ onResize : resizeBlock,
+ afterRefresh : initTableHeader
});
$dashboard.find('ul.dashboard-actions').addClass('hide').children('li').addClass('right').appendTo($('#modulemenu > .nav'));
$dashboard.find('[data-toggle=tooltip]').tooltip({container: 'body'});
checkEmpty();
+ initTableHeader();
});
diff --git a/module/block/view/dashboard.html.php b/module/block/view/dashboard.html.php
index 96037750a9..e68ffe1f0d 100644
--- a/module/block/view/dashboard.html.php
+++ b/module/block/view/dashboard.html.php
@@ -15,6 +15,7 @@ $jsRoot = $webRoot . "js/";
$themeRoot = $webRoot . "theme/";
if(isset($pageCSS)) css::internal($pageCSS);
?>
+
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index 6b8107eaed..67b3b95f44 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -136,6 +136,9 @@ class upgradeModel extends model
$this->addPriv8_1();
case '8_1':
$this->execSQL($this->getUpgradeFile('8.1'));
+ case '8_1_3':
+ $this->execSQL($this->getUpgradeFile('8.1.3'));
+ $this->addPriv8_2();
default: if(!$this->isError()) $this->setting->updateVersion($this->config->version);
}
@@ -861,6 +864,42 @@ class upgradeModel extends model
$this->dao->replace($privTable)->set('module')->eq('project')->set('method')->eq('kanban')->set('`group`')->eq($group)->exec();
}
+ $groups = $this->dao->select('`group`')->from($privTable)->where('`module`')->eq('user')->andWhere('`method`')->eq('manageContacts')->fetchPairs('group', 'group');
+ foreach($groups as $group)
+ {
+ $this->dao->replace($privTable)->set('module')->eq('my')->set('method')->eq('manageContacts')->set('`group`')->eq($group)->exec();
+ }
+
+ $groups = $this->dao->select('`group`')->from($privTable)->where('`module`')->eq('user')->andWhere('`method`')->eq('deleteContacts')->fetchPairs('group', 'group');
+ foreach($groups as $group)
+ {
+ $this->dao->replace($privTable)->set('module')->eq('my')->set('method')->eq('deleteContacts')->set('`group`')->eq($group)->exec();
+ }
+
+ $groups = $this->dao->select('*')->from($privTable)->where('module')->eq('story')->andWhere('method')->eq('edit')->fetchAll();
+ foreach($groups as $group)
+ {
+ $this->dao->replace($privTable)->set('module')->eq('story')->set('method')->eq('batchChangeModule')->set('`group`')->eq($group)->exec();
+ }
+
+ $groups = $this->dao->select('*')->from($privTable)->where('module')->eq('bug')->andWhere('method')->eq('edit')->fetchAll();
+ foreach($groups as $group)
+ {
+ $this->dao->replace($privTable)->set('module')->eq('bug')->set('method')->eq('batchChangeModule')->set('`group`')->eq($group)->exec();
+ }
+
+ $groups = $this->dao->select('*')->from($privTable)->where('module')->eq('task')->andWhere('method')->eq('edit')->fetchAll();
+ foreach($groups as $group)
+ {
+ $this->dao->replace($privTable)->set('module')->eq('task')->set('method')->eq('batchChangeModule')->set('`group`')->eq($group)->exec();
+ }
+
+ $groups = $this->dao->select('*')->from($privTable)->where('module')->eq('testcase')->andWhere('method')->eq('edit')->fetchAll();
+ foreach($groups as $group)
+ {
+ $this->dao->replace($privTable)->set('module')->eq('testcase')->set('method')->eq('batchChangeModule')->set('`group`')->eq($group)->exec();
+ }
+
return true;
}
diff --git a/www/js/datatable/min.css b/www/js/datatable/min.css
deleted file mode 100644
index 89b154b819..0000000000
--- a/www/js/datatable/min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * ZUI - v1.3.2 - 2015-09-16
- * http://zui.sexy
- * GitHub: https://github.com/easysoft/zui.git
- * Copyright (c) 2015 cnezsoft.com; Licensed MIT
- */.datatable-head,.datatable-rows{display:table;width:100%;table-layout:fixed}.datatable{margin-bottom:20px}.datatable>.datatable-head{-webkit-transition:-webkit-box-shadow .2s;-o-transition:box-shadow .2s;transition:box-shadow .2s}.datatable .table{margin:0;table-layout:fixed}.datatable .table>tbody>tr>td,.datatable .table>thead>tr>th{min-width:20px}.datatable .table>tbody>tr>td.check-btn,.datatable .table>thead>tr>th.check-btn{width:30px;color:#9b9b9b;text-align:center;cursor:pointer}.datatable .table>tbody>tr.hover>td.check-btn,.datatable .table>tbody>tr.active>td.check-btn,.datatable .table>thead>tr>th.check-btn:hover,.datatable .table>tbody>tr>td.check-btn:hover,.datatable .table>thead>tr>th.check-btn.checked,.datatable .table>tbody>tr>td.check-btn.checked{color:#4f4f4f}.datatable .table>thead>tr>th.check-btn.checked>.icon-check-empty:before,.datatable .table>tbody>tr>td.check-btn.checked>.icon-check-empty:before,.datatable .table>tbody>tr.active>td.check-btn>.icon-check-empty:before{content:'\e60d'}.datatable .table>thead>tr>th.col-hover{background-color:#e2e2e2}.datatable .table>tbody>tr>td.col-hover,.datatable .table>tbody>tr.hover>td{background-color:#ebf2f9}.datatable .table>tbody>tr.active.hover td{background-color:#ffdea2}.datatable.head-fixed>.datatable-head{position:fixed;z-index:10000;-webkit-box-shadow:0 1px 4px 0 rgba(0,0,0,.15);box-shadow:0 1px 4px 0 rgba(0,0,0,.15)}.datatable.sortable .datatable-head-span .table>thead>tr>th{overflow:hidden;white-space:nowrap;cursor:pointer}.datatable.sortable .datatable-head-span .table>thead>tr>th.text-center{padding-right:0;padding-left:0}.datatable.sortable .datatable-head-span .table>thead>tr>th:after{display:inline-block;margin-left:5px;font-family:ZenIcon;font-size:14px;font-style:normal;font-weight:400;font-variant:normal;line-height:1;color:gray;text-transform:none;content:'\e6bd';speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.datatable.sortable .datatable-head-span .table>thead>tr>th.sort-down:after{color:#145ccd;content:'\e6b8'}.datatable.sortable .datatable-head-span .table>thead>tr>th.sort-up:after{color:#145ccd;content:'\e6b9'}.datatable.sortable .datatable-head-span .table>thead>tr>th.check-btn:after,.datatable.sortable .datatable-head-span .table>thead>tr>th.sort-disabled:after{display:none}.datatable.sortable .datatable-head-span .table>thead>tr>th.sort-disabled{cursor:default}.datatable-wrapper{position:relative}.datatable-span{display:table-cell;vertical-align:top}.datatable-span.flexarea{overflow:hidden}.datatable-span.flexarea.datatable-head-span.dragging{cursor:move!important}.datatable-span.flexarea .table{position:relative;top:0;left:0}.datatable-span.flexarea .scrolled-shadow{position:absolute;top:0;bottom:0;display:none;width:20px;-webkit-box-shadow:0 0 10px rgba(0,0,0,.15);box-shadow:0 0 10px rgba(0,0,0,.15);opacity:0;-webkit-transition:all .5s cubic-bezier(.175,.885,.32,1);-o-transition:all .5s cubic-bezier(.175,.885,.32,1);transition:all .5s cubic-bezier(.175,.885,.32,1)}.datatable-span.flexarea .scrolled-in-shadow{left:-30px}.datatable-span.flexarea .scrolled-out-shadow{right:-30px}.datatable>.scroll-wrapper{position:relative;width:100%}.datatable .scroll-slide{position:absolute;right:-1px;bottom:0;left:-1px;display:none;height:11px;background:#e5e5e5;background:rgba(128,128,128,.1);border:1px solid #e5e5e5;border-bottom:none;opacity:0;-webkit-transition:opacity .5s,background .3s;-o-transition:opacity .5s,background .3s;transition:opacity .5s,background .3s}.datatable .scroll-slide>.bar{position:absolute;top:0;left:0;min-width:50px;height:10px;cursor:move;background-color:#a6a6a6}.datatable .scroll-slide:hover>.bar{background-color:gray}.datatable .scroll-slide.scroll-pos-out{bottom:-14px;height:15px}.datatable .scroll-slide.scroll-pos-out>.bar{height:14px}.datatable.show-scroll-slide:hover .scroll-slide,.datatable.show-scroll-slide.scrolling .scroll-slide,.datatable.show-scroll-slide:hover .scrolled-shadow,.datatable.show-scroll-slide.scrolling .scrolled-shadow{opacity:1}.datatable.show-scroll-slide .scroll-slide,.datatable.show-scroll-slide .scrolled-shadow{display:block}.datatable.show-scroll-slide.scrolled-in .scrolled-in-shadow{left:-20px}.datatable.show-scroll-slide.scrolled-out .scrolled-out-shadow{right:-20px}
\ No newline at end of file
diff --git a/www/js/datatable/min.js b/www/js/datatable/min.js
deleted file mode 100644
index db67e7586b..0000000000
--- a/www/js/datatable/min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*!
- * ZUI - v1.3.2 - 2015-07-28
- * http://zui.sexy
- * GitHub: https://github.com/easysoft/zui.git
- * Copyright (c) 2015 cnezsoft.com; Licensed MIT
- */
-
-!function(a){"use strict";var b="zui.datatable",c=(a.zui.store,function(c,d){this.name=b,this.$=a(c),this.isTable="TABLE"===this.$[0].tagName,this.firstShow=!0,this.isTable?(this.$table=this.$,this.id="datatable-"+(this.$.attr("id")||a.zui.uuid())):(this.$datatable=this.$.addClass("datatable"),this.$.attr("id")?this.id=this.$.attr("id"):(this.id="datatable-"+a.zui.uuid(),this.$.attr("id",this.id))),this.getOptions(d),this.load(),this.callEvent("ready")});c.DEFAULTS={checkable:!1,checkByClickRow:!0,checkedClass:"active",checkboxName:null,sortable:!1,storage:!0,fixedHeader:!0,fixedHeaderOffset:0,fixedLeftWidth:"30%",fixedRightWidth:"30%",flexHeadDrag:!0,scrollPos:"in",rowHover:!0,colHover:!0,hoverClass:"hover",colHoverClass:"col-hover",mergeRows:!1,minColWidth:20,minFixedLeftWidth:200,minFixedRightWidth:200,minFlexAreaWidth:200},c.prototype.getOptions=function(b){var d=this.$;b=a.extend({},c.DEFAULTS,this.$.data(),b),b.tableClass=b.tableClass||"",b.tableClass=" "+b.tableClass+" table-datatable",a.each(["bordered","condensed","striped","condensed","fixed"],function(a,c){c="table-"+c,d.hasClass(c)&&(b.tableClass+=" "+c)}),(d.hasClass("table-hover")||b.rowHover)&&(b.tableClass+=" table-hover"),this.options=b},c.prototype.load=function(c){var d,e=this.options;if(a.isPlainObject(c))this.data=c;else if("string"==typeof c){var f=a(c);f.length&&(this.$table=f.first(),this.$table.data(b,this),this.isTable=!0),c=null}else c=e.data;if(!c){if(!this.isTable)throw new Error("No data avaliable!");c={cols:[],rows:[]},d=c.cols;var g,h,i,j,k,l,m=c.rows,n=this.$table;n.find("thead > tr:first").children("th").each(function(){h=a(this),d.push(a.extend({text:h.html(),flex:!1||h.hasClass("flex-col"),width:"auto",cssClass:h.attr("class"),css:h.attr("style"),type:"string",ignore:h.hasClass("ignore"),sort:!h.hasClass("sort-disabled"),mergeRows:h.attr("merge-rows")},h.data()))}),n.find("tbody > tr").each(function(){i=a(this),k=a.extend({data:[],checked:!1,cssClass:i.attr("class"),css:i.attr("style"),id:i.attr("id")},i.data()),i.children("td").each(function(){if(j=a(this),l=j.attr("colspan")||1,k.data.push(a.extend({cssClass:j.attr("class"),css:j.attr("style"),text:j.html(),colSpan:l,title:j.attr("title")},j.data())),l>1)for(g=1;l>g;g++)k.data.push({empty:!0})}),m.push(k)});var o=n.find("tfoot");o.length&&(c.footer=a('
').append(o))}c.flexStart=-1,c.flexEnd=-1,d=c.cols,c.colsLength=d.length;for(var g=0;g
=0,c.fixedRight=c.flexEnd>=0&&c.flexEnd0,c.flexStart<0&&c.flexEnd<0&&(c.fixedLeft=!0,c.flexStart=c.colsLength,c.flexEnd=c.colsLength),this.data=c,this.callEvent("afterLoad",{data:c}),this.render()},c.prototype.render=function(){var c,d,e,f,g=this,h=g.$datatable||(g.isTable?a('
'):g.$datatable),i=g.options,j=g.data,k=g.data.cols,l=g.data.rows,m=i.checkable,n='',o='';h.children(".datatable-head, .datatable-rows, .scroll-wrapper").remove(),h.toggleClass("sortable",i.sortable);var p,q,r,s=a('
');for(c=a(" "),e=a(" "),f=a(" "),d=0;d=j.flexStart&&d<=j.flexEnd?f:e,0===d&&m&&p.append(' '),r.ignore||(q=a(" "),q.toggleClass("sort-down","down"===r.sort).toggleClass("sort-up","up"===r.sort).toggleClass("sort-disabled",r.sort===!1),q.addClass(r.cssClass).addClass(r.colClass).html(r.text).attr({"data-index":d,"data-type":r.type,style:r.css}),p.append(q));var t;j.fixedLeft&&(t=a(o),t.addClass("fixed-left").find("table").addClass(i.tableClass).find("thead").append(c),s.append(t)),j.flexArea&&(t=a(o),t.addClass("flexarea").find(".datatable-wrapper").append('
').find("table").addClass(i.tableClass).find("thead").append(f),s.append(t)),j.fixedRight&&(t=a(o),t.addClass("fixed-right").find("table").addClass(i.tableClass).find("thead").append(e),s.append(t)),h.append(s);var u,v,w,x,y,z,A,B,C=a(''),D=l.length;c=a("
"),e=a("
"),f=a("
");for(var E=0;D>E;++E){for(z=l[E],"undefined"==typeof z.id&&(z.id=E),z.index=E,u=a("
"),u.addClass(z.cssClass).toggleClass(i.checkedClass,z.checked).attr({"data-index":E,"data-id":z.id}),v=u.clone(),w=u.clone(),B=z.data.length,d=0;B>d;++d)A=z.data[d],d>0&&A.empty||(p=d
=j.flexStart&&d<=j.flexEnd?v:w,0===d&&m&&(y=a(' '),i.checkboxName&&y.append(' '),p.append(y)),k[d].ignore||(a.isPlainObject(A)?(A.row=E,A.index=d):A={text:A,row:E,index:d},z.data[d]=A,x=a(" "),x.html(A.text).addClass(A.cssClass).addClass(k[d].colClass).attr("colspan",A.colSpan).attr({"data-row":E,"data-index":d,"data-flex":!1,"data-type":k[d].type,style:A.css,title:A.title||""}),p.append(x)));c.append(u),f.append(v),e.append(w)}var F;j.fixedLeft&&(F=a(n),F.addClass("fixed-left").find("table").addClass(i.tableClass).append(c),C.append(F)),j.flexArea&&(F=a(n),F.addClass("flexarea").find(".datatable-wrapper").append('
').find("table").addClass(i.tableClass).append(f),C.append(F)),j.fixedRight&&(F=a(n),F.addClass("fixed-right").find("table").addClass(i.tableClass).append(e),C.append(F)),h.append(C),j.flexArea&&h.append('');var G=h.children(".datatable-footer").detach();j.footer?(h.append(a('').append(j.footer)),j.footer=null):G.length&&h.append(G),g.$datatable=h.data(b,g),g.isTable&&g.firstShow&&(g.$table.attr("data-datatable-id",this.id).hide().after(h),g.firstShow=!1),g.bindEvents(),g.refreshSize(),g.callEvent("render")},c.prototype.bindEvents=function(){var b=this,c=this.data,d=this.options,e=a.zui.store,f=this.$datatable,g=b.$dataSpans=f.children(".datatable-head, .datatable-rows").find(".datatable-span"),h=b.$rowsSpans=f.children(".datatable-rows").children(".datatable-rows-span"),i=b.$headSpans=f.children(".datatable-head").children(".datatable-head-span"),j=b.$cells=g.find("td, th"),k=b.$dataCells=j.filter("td");b.$headCells=j.filter("th");var l=b.$rows=b.$rowsSpans.find(".table > tbody > tr");if(d.rowHover){var m=d.hoverClass;h.on("mouseenter","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m),l.filter('[data-index="'+a(this).addClass(m).closest("tr").data("index")+'"]').addClass(m)}).on("mouseleave","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m)})}if(d.colHover){var n=d.colHoverClass;i.on("mouseenter","th",function(){j.filter("."+n).removeClass(n),j.filter('[data-index="'+a(this).data("index")+'"]').addClass(n)}).on("mouseleave","th",function(){j.filter("."+n).removeClass(n)})}if(c.flexArea){var o,p,q,r,s,t,u,v=f.find(".scroll-slide"),w=f.find(".datatable-span.flexarea"),x=f.find(".datatable-span.fixed-left"),y=f.find(".datatable-span.flexarea .table"),z=v.children(".bar"),A=b.id+"_scrollOffset";b.width=f.width(),f.resize(function(){b.width=f.width()});var B=function(a,b){s=Math.max(0,Math.min(o-p,a)),b||f.addClass("scrolling"),z.css("left",s),u=0-Math.floor((q-o)*s/(o-p)),y.css("left",u),r=s,f.toggleClass("scrolled-in",s>2).toggleClass("scrolled-out",o-p-2>s),d.storage&&e.pageSet(A,s)},C=function(){o=w.width(),v.width(o).css("left",x.width()),q=y.width(),p=Math.floor(o*o/q),z.css("width",p),y.css("min-width",o),f.toggleClass("show-scroll-slide",q>o),t||o===p||(t=!0,B(e.pageGet(A,0),!0)),f.hasClass("size-changing")&&B(s,!0)};w.resize(C),d.storage&&C();var D={move:!1,stopPropagation:!0,drag:function(a){B(z.position().left+a.smallOffset.x*(a.element.hasClass("bar")?1:-1))},finish:function(){f.removeClass("scrolling")}};z.draggable(D),d.flexHeadDrag&&f.find(".datatable-head-span.flexarea").draggable(D),v.mousedown(function(a){var b=a.pageX-v.offset().left;B(b-p/2)})}if(d.checkable){var E,F=b.id+"_checkedStatus",G=d.checkedClass,H=function(){var f=h.first().find(".table > tbody > tr"),g=f.filter("."+G);f.find(".check-row input:checkbox").prop("checked",!1);var j={checkedAll:f.length===g.length&&g.length>0,checks:g.map(function(){return E=a(this).data("id"),d.checkboxName&&a(this).find(".check-row input:checkbox").prop("checked",!0),E}).toArray()};a.each(c.rows,function(b,c){c.checked=a.inArray(c.id,j.checks)>-1}),i.find(".check-all").toggleClass("checked",j.checkedAll),d.storage&&e.pageSet(F,j),b.callEvent("checksChanged",{checks:j})};this.$rowsSpans.on("click",d.checkByClickRow?"tr":".check-row",function(){l.filter('[data-index="'+a(this).closest("tr").data("index")+'"]').toggleClass(G),H()});var I="click.zui.datatable.check-all";if(this.$datatable.off(I).on(I,".check-all",function(){l.toggleClass(G,a(this).toggleClass("checked").hasClass("checked")),H()}).on("click",".check-none",function(){l.toggleClass(G,!1),H()}).on("click",".check-inverse",function(){l.toggleClass(G),H()}),d.storage){var J=e.pageGet(F);J&&(i.find(".check-all").toggleClass("checked",J.checkedAll),J.checkedAll?l.addClass(G):(l.removeClass(G),a.each(J.checks,function(a,b){l.filter('[data-id="'+b+'"]').addClass(G)})),J.checks.length&&H())}}if(d.fixedHeader){var K,L,M,N=f.children(".datatable-head"),O=d.fixedHeaderOffset||a(".navbar.navbar-fixed-top").height()||0,P=function(){K=f.offset().top,M=a(window).scrollTop(),L=f.height(),f.toggleClass("head-fixed",M+O>K&&K+L>M+O),f.hasClass("head-fixed")?N.css({width:f.width(),top:O}):N.attr("style","")};a(window).scroll(P),P()}d.sortable?(i.on("click","th:not(.sort-disabled, .check-btn)",function(){f.hasClass("size-changing")||b.sortTable(a(this))}),d.storage&&b.sortTable()):d.mergeRows&&this.mergeRows()},c.prototype.mergeRows=function(){for(var b=this.$rowsSpans.find(".table > tbody > tr > td"),c=this.data.cols,d=0;d1){var g,h;f.each(function(){var b=a(this);g&&b.html()===g.html()?(h=g.attr("rowspan")||1,"number"!=typeof h&&(h=parseInt(h),isNaN(h)&&(h=1)),g.attr("rowspan",h+1).css("vertical-align","middle"),b.remove()):g=b})}}}},c.prototype.sortTable=function(b){var c=a.zui.store,d=this.options,e=this.id+"_datatableSorter",f=d.storage?c.pageGet(e):null;if(b||(b=f?this.$headCells.filter('[data-index="'+f.index+'"]').addClass("sort-"+f.type):this.$headCells.filter(".sort-up, .sort-down").first()),b.length){var g,h,i,j=this.data,k=j.cols,l=j.rows,m=this.$headCells;g=!b.hasClass("sort-up"),m.removeClass("sort-up sort-down"),b.addClass(g?"sort-up":"sort-down"),i=b.data("index"),g=b.hasClass("sort-up"),a.each(k,function(a,b){a==i||"up"!==b.sort&&"down"!==b.sort?a==i&&(b.sort=g?"up":"down",h=b.type):b.sort=!0});var n,o,p,q=this.$dataCells.filter('[data-index="'+i+'"]');l.sort(function(a,b){return a=a.data[i],b=b.data[i],n=q.filter('[data-row="'+a.row+'"]').text(),o=q.filter('[data-row="'+b.row+'"]').text(),"number"===h?(n=parseFloat(n),o=parseFloat(o)):"date"===h?(n=Date.parse(n),o=Date.parse(o)):(n=n.toLowerCase(),o=o.toLowerCase()),p=n>o?1:o>n?-1:0,g&&(p=-1*p),p});var r,s,t,u=this.$rows,v=[];a.each(l,function(b,c){r=u.filter('[data-index="'+c.index+'"]'),r.each(function(b){t=a(this),s=v[b],s?s.after(t):t.parent().prepend(t),v[b]=t})}),f={index:i,type:g?"up":"down"},d.storage&&c.pageSet(e,f),this.callEvent("sort",{sorter:f})}},c.prototype.refreshSize=function(){var b,c=this.$datatable,d=this.options,e=this.data.rows,f=this.data.cols;c.find(".datatable-span.fixed-left").css("width",d.fixedLeftWidth),c.find(".datatable-span.fixed-right").css("width",d.fixedRightWidth);var g=function(b){var c,d,e=0;return b.css("height","auto"),b.each(function(){c=a(this),d=c.attr("rowspan"),d&&1!=d||(e=Math.max(e,c.outerHeight()))}),e},h=this.$dataCells,i=this.$cells,j=this.$headCells;for(b=0;b tr :checkbox', function(e){checkRow.call(this); e.stopPropagation();}).on('click', 'tbody > tr', checkRow);
+ $('.tablesorter:not(.table-datatable)')
+ .selectable({
+ selector: 'tbody > tr',
+ trigger: 'tbody',
+ start: function(e) {
+ if($(e.target).is(':checkbox')) return false;
+ },
+ select: function(e) {
+ checkRow.call(e.target, true);
+ },
+ unselect: function(e) {
+ checkRow.call(e.target, false);
+ }
+ })
+ .on('click', 'tbody > tr :checkbox', function(e){checkRow.call(this); e.stopPropagation();});
$(document).on('change', '.rows-selector:checkbox', function()
{
var $checkbox = $(this);
- if($checkbox.closest('.datatable').length) return;
+ var $datatable = $checkbox.closest('.datatable');
+ if($datatable.length) {
+ $datatable.find('.check-all.check-btn:first').trigger('click');
+ return;
+ }
var scope = $checkbox.data('scope');
var $target = scope ? $('#' + scope) : $checkbox.closest('.table');
var isChecked = $checkbox.prop('checked');
diff --git a/www/js/zui/min.js b/www/js/zui/min.js
index 8967d5adc9..b2a6702faa 100644
--- a/www/js/zui/min.js
+++ b/www/js/zui/min.js
@@ -1,5 +1,5 @@
/*!
- * ZUI - v1.4.0 - 2016-04-14
+ * ZUI - v1.4.0 - 2016-04-15
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2016 cnezsoft.com; Licensed MIT
@@ -7,6 +7,6 @@
/* Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
-!function(t,e){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var i=0;t.zui({uuid:function(){return 1e3*(new Date).getTime()+i++%1e3},callEvent:function(e,i,o){if(t.isFunction(e)){void 0!==o&&(e=t.proxy(e,o));var n=e(i);return i&&(i.result=n),!(void 0!==n&&!n)}return 1},clientLang:function(){var i,o=e.config;if("undefined"!=typeof o&&o.clientLang)i=o.clientLang;else{var n=t("html").attr("lang");i=n?n:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return i.replace("-","_").toLowerCase()}}),t.fn.callEvent=function(e,i,o){var n=t(this),a=e.indexOf(".zui."),s=e;0>a&&o&&o.name?e+="."+o.name:s=e.substring(0,a);var r=t.Event(e,i);if(void 0===o&&a>0&&(o=n.data(e.substring(a+1))),o&&o.options){var l=o.options[s];t.isFunction(l)&&t.zui.callEvent(o.options[s],r,o)}return n.trigger(s,i),r}}(jQuery,window),function(){"use strict";String.prototype.format||(String.prototype.format=function(t){var e=this;if(arguments.length>0){var i;if(1==arguments.length&&"object"==typeof t)for(var o in t)void 0!==t[o]&&(i=new RegExp("({"+o+"})","g"),e=e.replace(i,t[o]));else for(var n=0;n=e&&i>t}),Date.prototype.isSameYear||(Date.prototype.isSameYear=function(t){return this.getFullYear()===t.getFullYear()})}(),function(t,e){"use strict";var i="localStorage",o=t[i],n=(t.store,"page_"+t.location.pathname+t.location.search),a=function(){this.slience=!0,this.enable=i in t&&t[i]&&t[i].setItem,this.storage=o,this.page=this.get(n,{})};a.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(n);else{var t,i=[];for(t in this.page){var o=this.page[t];null===o&&i.push(t)}for(t=i.length-1;t>=0;t--)delete this.page[i[t]];this.set(n,this.page)}},a.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},a.prototype.pageClear=function(){this.page={},this.pageSave()},a.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},a.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},a.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},a.prototype.length=function(){return this.check()?o.getLength?o.getLength():o.length:0},a.prototype.removeItem=function(t){return o.removeItem(t),this},a.prototype.remove=function(t){return this.removeItem(t)},a.prototype.getItem=function(t){return o.getItem(t)},a.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},a.prototype.key=function(t){return o.key(t)},a.prototype.setItem=function(t,e){return o.setItem(t,e),this},a.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},a.prototype.clear=function(){return o.clear(),this},a.prototype.forEach=function(t){for(var e=o.length-1;e>=0;e--){var i=o.key(e);t(i,this.get(i))}return this},a.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},a.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},a.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new a})}(window,jQuery),function(t,e,i){"use strict";function o(t){if(t=t.toLowerCase(),t&&d.test(t)){var e;if(4===t.length){var i="#";for(e=1;4>e;e+=1)i+=t.slice(e,e+1).concat(t.slice(e,e+1));t=i}var o=[];for(e=1;7>e;e+=2)o.push(parseInt("0x"+t.slice(e,e+2)));return{r:o[0],g:o[1],b:o[2],a:1}}throw new Error("function hexToRgb: Wrong hex string! (hex: "+t+")")}function n(e){return"string"==typeof e&&("transparent"===e.toLowerCase()||p[e.toLowerCase()]||d.test(t.trim(e.toLowerCase())))}function a(t){function e(t){return t=0>t?t+1:t>1?t-1:t,1>6*t?d+(s-d)*t*6:1>2*t?s:2>3*t?d+(s-d)*(2/3-t)*6:d}var i=t.h,o=t.s,n=t.l,a=t.a;i=l(i)%360/360,o=r(l(o)),n=r(l(n)),a=r(l(a));var s=.5>=n?n*(o+1):n+o-n*o,d=2*n-s,p={r:255*e(i+1/3),g:255*e(i),b:255*e(i-1/3),a:a};return p}function s(t,i,o){return void 0===o&&(o=0),void 0===i&&(i=255),e.min(e.max(t,o),i)}function r(t,e){return s(t,e)}function l(t){return"number"==typeof t?t:parseFloat(t)}var d=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,p={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},c=function(t,e,i,n){if(this.r=0,this.g=0,this.b=0,this.a=1,void 0!==n&&(this.a=r(l(n),1)),void 0!==t&&void 0!==e&&void 0!==i)this.r=parseInt(r(l(t),255)),this.g=parseInt(r(l(e),255)),this.b=parseInt(r(l(i),255));else if(void 0!==t){var s=typeof t;if("string"==s)t=t.toLowerCase(),"transparent"===t?this.a=0:p[t]?this.rgb(o(p[t])):this.rgb(o(t));else if("number"==s&&void 0===e)this.r=parseInt(r(t,255)),this.g=this.r,this.b=this.r;else if("object"==s&&t.hasOwnProperty("r"))this.r=parseInt(r(l(t.r),255)),t.hasOwnProperty("g")&&(this.g=parseInt(r(l(t.g),255))),t.hasOwnProperty("b")&&(this.b=parseInt(r(l(t.b),255))),t.hasOwnProperty("a")&&(this.a=r(l(t.a),1));else if("object"==s&&t.hasOwnProperty("h")){var d={h:r(l(t.h),360),s:1,l:1,a:1};t.hasOwnProperty("s")&&(d.s=r(l(t.s),1)),t.hasOwnProperty("l")&&(d.l=r(l(t.l),1)),t.hasOwnProperty("a")&&(d.a=r(l(t.a),1)),this.rgb(a(d))}}};c.prototype.rgb=function(t){if(void 0!==t){if("object"==typeof t)t.hasOwnProperty("r")&&(this.r=parseInt(r(l(t.r),255))),t.hasOwnProperty("g")&&(this.g=parseInt(r(l(t.g),255))),t.hasOwnProperty("b")&&(this.b=parseInt(r(l(t.b),255))),t.hasOwnProperty("a")&&(this.a=r(l(t.a),1));else{var e=parseInt(l(t));this.r=e,this.g=e,this.b=e}return this}return{r:this.r,g:this.g,b:this.b,a:this.a}},c.prototype.hue=function(t){var e=this.toHsl();return void 0===t?e.h:(e.h=r(l(t),360),this.rgb(a(e)),this)},c.prototype.darken=function(t){var e=this.toHsl();return e.l-=t/100,e.l=r(e.l,1),this.rgb(a(e)),this},c.prototype.clone=function(){return new c(this.r,this.g,this.b,this.a)},c.prototype.lighten=function(t){return this.darken(-t)},c.prototype.fade=function(t){return this.a=r(t/100,1),this},c.prototype.spin=function(t){var e=this.toHsl(),i=(e.h+t)%360;return e.h=0>i?360+i:i,this.rgb(a(e)),this},c.prototype.toHsl=function(){var t,i,o=this.r/255,n=this.g/255,a=this.b/255,s=this.a,r=e.max(o,n,a),l=e.min(o,n,a),d=(r+l)/2,p=r-l;if(r===l)t=i=0;else{switch(i=d>.5?p/(2-r-l):p/(r+l),r){case o:t=(n-a)/p+(a>n?6:0);break;case n:t=(a-o)/p+2;break;case a:t=(o-n)/p+4}t/=6}return{h:360*t,s:i,l:d,a:s}},c.prototype.luma=function(){var t=this.r/255,i=this.g/255,o=this.b/255;return t=.03928>=t?t/12.92:e.pow((t+.055)/1.055,2.4),i=.03928>=i?i/12.92:e.pow((i+.055)/1.055,2.4),o=.03928>=o?o/12.92:e.pow((o+.055)/1.055,2.4),.2126*t+.7152*i+.0722*o},c.prototype.saturate=function(t){var e=this.toHsl();return e.s+=t/100,e.s=r(e.s),this.rgb(a(e)),this},c.prototype.desaturate=function(t){return this.saturate(-t)},c.prototype.contrast=function(t,e,i){if(e="undefined"==typeof e?new c(255,255,255,1):new c(e),t="undefined"==typeof t?new c(0,0,0,1):new c(t),this.a<.5)return t;if(i=void 0===i?.43:l(i),t.luma()>e.luma()){var o=e;e=t,t=o}return this.luma()0?this.a<1?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":this.hexStr():"transparent"},c.isColor=n,t.zui({Color:c})}(jQuery,Math,window),function(t){"use strict";var e=0,i=["primary","red","yellow","green","blue","purple","brown","dark"],o={primary:"#3280fc",secondary:"#145ccd",pale:"#ebf2f9",fore:"#353535",back:"#fff",grayDarker:"#222222",grayDark:"#333333",gray:"#808080",grayLight:"#dddddd",grayLighter:"#e5e5e5",grayPale:"#f1f1f1",white:"#fff",black:"#000",red:"#ea644a",yellow:"#f1a325",green:"#38b03f",blue:"#03b8cf",purple:"#8666b8",brown:"#bd7b46",greenPale:"#ddf4df",yellowPale:"#fff0d5",redPale:"#ffe5e0",bluePale:"#ddf3f5",brownPale:"#f7ebe1",purplePale:"#f5eeff",light:"#fff",dark:"#353535",success:"#38b03f",warning:"#f1a325",danger:"#ea644a",info:"#03b8cf",important:"#bd7b46",special:"#8666b8",successPale:"#ddf4df",warningPale:"#fff0d5",dangerPale:"#ffe5e0",infoPale:"#ddf3f5",importantPale:"#f7ebe1",specialPale:"#f5eeff"};o.get=function(n){return("undefined"==typeof n||"random"===n)&&(n=i[e++%i.length]),new t.zui.Color(o[n]?o[n]:n)},t.zui({colorset:o}),t.zui.Color&&t.extend(t.zui.Color,o)}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";var e=function(i,o){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,o),this.isLoading=!1};e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",a=o.data();e+="Text",a.resetText||o.data("resetText",o[n]()),o[n](a[e]||this.options[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},e.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=function(i){return this.each(function(){var o=t(this),n=o.data("zui.button"),a="object"==typeof i&&i;n||o.data("zui.button",n=new e(this,a)),"toggle"==i?n.toggle():i&&n.setState(i)})},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.zui.button.data-api","[data-toggle^=button]",function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle"),e.preventDefault()})}(jQuery),function(t){"use strict";var e={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 了解更多... ',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。了解更多... ',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. Learn more... '},i=function(){var t=this.isIE()||this.isIE10()||!1;if(t)for(var e=10;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};i.prototype.cssHelper=function(){var e=this.ie,i=t("html");i.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&i.addClass("ie-"+e).toggleClass("gt-ie-7 gte-ie-8 support-ie",e>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",8>e).toggleClass("gt-ie-8 gte-ie-9",e>=9).toggleClass("lte-ie-8 lt-ie-9",9>e).toggleClass("gt-ie-9 gte-ie-10",e>=10).toggleClass("lte-ie-9 lt-ie-10",10>e)},i.prototype.tip=function(i){var o=t("#browseHappyTip");o.length||(o=t(''),o.prependTo("body")),o.find(".content").html(i||this.browseHappyTip||e[t.zui.clientLang()||"zh_cn"])},i.prototype.isIE=function(t){if(10===t)return this.isIE10();var e=document.createElement("b");return e.innerHTML="",1===e.getElementsByTagName("i").length},i.prototype.isIE10=function(){return!1},t.zui({browser:new i}),t(function(){t("body").hasClass("disabled-browser-tip")||t.zui.browser.ie&&t.zui.browser.ie<8&&t.zui.browser.tip()})}(jQuery),+function(t){"use strict";var e="zui.collapse",i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.$parent&&this.$parent.find("> .panel > .in");if(o&&o.length){var n=o.data(e);if(n&&n.transitioning)return;o.collapse("hide"),n||o.data(e,null)}var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[a]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return s.call(this);var r=t.camelCase(["scroll",a].join("-"));this.$element.one(t.support.transition.end,t.proxy(s,this)).emulateTransitionEnd(350)[a](this.$element[0][r])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.dimension();this.$element[o](this.$element[o]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[o](0).one(t.support.transition.end,t.proxy(n,this)).emulateTransitionEnd(350):n.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var o=t.fn.collapse;t.fn.collapse=function(o){return this.each(function(){var n=t(this),a=n.data(e),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof o&&o);a||n.data(e,a=new i(this,s)),"string"==typeof o&&a[o]()})},t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(i){var o,n=t(this),a=n.attr("data-target")||i.preventDefault()||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""),s=t(a),r=s.data(e),l=r?"toggle":n.data(),d=n.attr("data-parent"),p=d&&t(d);r&&r.transitioning||(p&&p.find('[data-toggle=collapse][data-parent="'+d+'"]').not(n).addClass("collapsed"),n[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),s.collapse(l)})}(window.jQuery),+function(t){"use strict";function e(){t(n).remove(),t(a).each(function(e){var n=i(t(this));n.hasClass("open")&&(n.trigger(e=t.Event("hide."+o)),e.isDefaultPrevented()||n.removeClass("open").trigger("hidden."+o))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}var o="zui.dropdown",n=".dropdown-backdrop",a="[data-toggle=dropdown]",s=function(e){t(e).on("click."+o,this.toggle)};s.prototype.toggle=function(n){var a=t(this);if(!a.is(".disabled, :disabled")){var s=i(a),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('
').insertAfter(t(this)).on("click",e),s.trigger(n=t.Event("show."+o)),n.isDefaultPrevented())return;s.toggleClass("open").trigger("shown."+o),a.focus()}return!1}},s.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var o=t(this);if(e.preventDefault(),e.stopPropagation(),!o.is(".disabled, :disabled")){var n=i(o),s=n.hasClass("open");if(!s||s&&27==e.keyCode)return 27==e.which&&n.find(a).focus(),o.click();var r=t("[role=menu] li:not(.divider):visible a",n);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l .dropdown-menu > .active").removeClass("active"),e.addClass("active"),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),o&&o()}var a=i.find("> .active"),s=o&&t.support.transition&&a.hasClass("fade");s?a.one(t.support.transition.end,n).emulateTransitionEnd(150):n(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=function(o){return this.each(function(){var n=t(this),a=n.data(e);a||n.data(e,a=new i(this)),"string"==typeof o&&a[o]()})},t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this},t(document).on("click.zui.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),+function(t){"use strict";function e(e,n,a){return this.each(function(){var s=t(this),r=s.data(i),l=t.extend({},o.DEFAULTS,s.data(),"object"==typeof e&&e);r||s.data(i,r=new o(this,l)),"string"==typeof e?r[e](n,a):l.show&&r.show(n,a)})}var i="zui.modal",o=function(e,o){this.options=o,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,"undefined"==typeof this.options.moveable&&(this.options.moveable=this.$element.hasClass("modal-moveable")),this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded."+i)},this))};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"},o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.ajustPosition=function(e){if("undefined"==typeof e&&(e=this.options.position),"undefined"!=typeof e){var o=this.$element.find(".modal-dialog"),n=Math.max(0,(t(window).height()-o.outerHeight())/2),a="fit"==e?2*n/3:"center"==e?n:e;if(o.hasClass("modal-moveable")){var s=null;this.options.rememberPos&&(this.options.rememberPos===!0?s=this.$element.data("modal-pos"):t.zui.store&&(s=t.zui.store.pageGet(i+".rememberPos"))),s||(s={left:Math.max(0,(t(window).width()-o.outerWidth())/2),top:a}),o.css(s)}else o.css("margin-top",a)}},o.prototype.setMoveale=function(){var e=this,o=e.options,n=e.$element.find(".modal-dialog").removeClass("modal-dragged");n.toggleClass("modal-moveable",o.moveable),e.$element.data("modal-moveable-setup")||n.draggable({container:e.$element,handle:".modal-header",before:function(){n.css("margin-top","").addClass("modal-dragged")},finish:function(n){o.rememberPos&&(e.$element.data("modal-pos",n.pos),t.zui.store&&o.rememberPos!==!0&&t.zui.store.pageSet(i+".rememberPos",n.pos))}})},o.prototype.show=function(e,n){var a=this,s=t.Event("show."+i,{relatedTarget:e});a.$element.trigger(s),a.isShown||s.isDefaultPrevented()||(a.isShown=!0,a.options.moveable&&a.setMoveale(),a.checkScrollbar(),a.$body.addClass("modal-open"),a.setScrollbar(),a.escape(),a.$element.on("click.dismiss."+i,'[data-dismiss="modal"]',t.proxy(a.hide,a)),a.backdrop(function(){var s=t.support.transition&&a.$element.hasClass("fade");a.$element.parent().length||a.$element.appendTo(a.$body),a.$element.show().scrollTop(0),s&&a.$element[0].offsetWidth,a.$element.addClass("in").attr("aria-hidden",!1),a.ajustPosition(n),a.enforceFocus();var r=t.Event("shown."+i,{relatedTarget:e});s?a.$element.find(".modal-dialog").one("bsTransitionEnd",function(){a.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(o.TRANSITION_DURATION):a.$element.trigger("focus").trigger(r)}))},o.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide."+i),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),t(document).off("focusin."+i),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+i),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(o.TRANSITION_DURATION):this.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+i).on("focusin."+i,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+i,t.proxy(function(e){if(27==e.which){var o=t.Event("escaping."+i),n=this.$element.triggerHandler(o,"esc");if(void 0!=n&&!n)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+i)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+i)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var n=this,a=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&a;if(this.$backdrop=t('
').appendTo(this.$body),this.$element.on("mousedown.dismiss."+i,t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(o.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(o.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},o.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},o.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},o.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},o.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=o,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click."+i+".data-api",'[data-toggle="modal"]',function(o){var n=t(this),a=n.attr("href"),s=null;try{s=t(n.attr("data-target")||a&&a.replace(/.*(?=#[^\s]+$)/,""))}catch(r){return}if(s.length){var l=s.data(i)?"toggle":t.extend({remote:!/#/.test(a)&&a},s.data(),n.data());n.is("a")&&o.preventDefault(),s.one("show."+i,function(t){t.isDefaultPrevented()||s.one("hidden."+i,function(){n.is(":visible")&&n.trigger("focus")})}),e.call(s,l,this,n.data("position"))}})}(jQuery),+function(t){"use strict";var e=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,o){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o);for(var n=this.options.trigger.split(" "),a=n.length;a--;){var s=n[a];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var r="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this));
-}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(i),i.isDefaultPrevented())return;var o=this.tip();this.setContent(e),this.options.animation&&o.addClass("fade");var n="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,s=a.test(n);s&&(n=n.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(n),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var r=this.getPosition(),l=o[0].offsetWidth,d=o[0].offsetHeight;if(s){var p=this.$element.parent(),c=n,h=document.documentElement.scrollTop||document.body.scrollTop,u="body"==this.options.container?window.innerWidth:p.outerWidth(),f="body"==this.options.container?window.innerHeight:p.outerHeight(),g="body"==this.options.container?0:p.offset().left;n="bottom"==n&&r.top+r.height+d-h>f?"top":"top"==n&&r.top-h-d<0?"bottom":"right"==n&&r.right+l>u?"left":"left"==n&&r.left-l
'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),o=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](o),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,o=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return o?"$next"==o?e.next(".popover"):t(o):!1},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var o=t(this),n=o.data("zui.popover"),a="object"==typeof i&&i;n||o.data("zui.popover",n=new e(this,a)),"string"==typeof i&&n[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),function(t,e,i){"use strict";var o=function(e,i){this.$=t(e),this.options=this.getOptions(i),this.init()};o.DEFAULTS={container:"body",deviation:5,sensorOffsetX:0,sensorOffsetY:0},o.prototype.getOptions=function(e){return e=t.extend({},o.DEFAULTS,this.$.data(),e)},o.prototype.callEvent=function(e,i){return t.zui.callEvent(this.options[e],i,this)},o.prototype.init=function(){this.handleMouseEvents()},o.prototype.handleMouseEvents=function(){var o=this.$,n=this,a=this.options,s="before";this.$triggerTarget=a.trigger?(t.isFunction(a.trigger)?a.trigger(o):o.find(a.trigger)).first():o,this.$triggerTarget.on("mousedown",function(r){function l(e){var s={left:e.pageX,top:e.pageY};if(!(i.abs(s.left-y.left)r&&s.top>l&&s.leftd?r[a?"after":"before"](s):r[a?"before":"after"](s);var p=o.children(n.selector).not(".drag-shadow");i(p),t.zui.callEvent(n.order,{list:p,element:s})}},finish:function(e){n.dragCssClass&&e.element&&e.element.removeClass(n.dragCssClass),t.zui.callEvent(n.finish,{list:o.children(n.selector),element:e.element}),o.removeClass("sortable-sorting")}})},t.fn.sortable=function(e){return this.each(function(){var i=t(this),o=i.data("zui.sortable"),a="object"==typeof e&&e;o?"object"==typeof e&&o.reset():i.data("zui.sortable",o=new n(this,a)),"string"==typeof e&&o[e]()})},t.fn.sortable.Constructor=n}(jQuery,window,document,Math),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):t.bootbox=e(t.jQuery)}(this,function t(e,i){"use strict";function o(t){var e=m[f.locale];return e?e[t]:m.en[t]}function n(t,i,o){t.stopPropagation(),t.preventDefault();var n=e.isFunction(o)&&o.call(i,t)===!1;n||i.modal("hide")}function a(t){var e,i=0;for(e in t)i++;return i}function s(t,i){var o=0;e.each(t,function(t,e){i(t,e,o++)})}function r(t){var i,o;if("object"!=typeof t)throw new Error("Please supply an object of options");if(!t.message)throw new Error("Please specify a message");return t=e.extend({},f,t),t.buttons||(t.buttons={}),i=t.buttons,o=a(i),s(i,function(t,n,a){if(e.isFunction(n)&&(n=i[t]={callback:n}),"object"!==e.type(n))throw new Error("button with key "+t+" must be an object");n.label||(n.label=t),n.className||(2===o&&("ok"===t||"confirm"===t)||1===o?n.className="btn-primary":n.className="btn-default")}),t}function l(t,e){var i=t.length,o={};if(1>i||i>2)throw new Error("Invalid argument length");return 2===i||"string"==typeof t[0]?(o[e[0]]=t[0],o[e[1]]=t[1]):o=t[0],o}function d(t,i,o){return e.extend(!0,{},t,l(i,o))}function p(t,e,i,o){var n={className:"bootbox-"+t,buttons:c.apply(null,e)};return h(d(n,o,i),e)}function c(){for(var t={},e=0,i=arguments.length;i>e;e++){var n=arguments[e],a=n.toLowerCase(),s=n.toUpperCase();t[a]={label:o(s)}}return t}function h(t,e){var o={};return s(e,function(t,e){o[e]=!0}),s(t.buttons,function(t){if(o[t]===i)throw new Error("button key "+t+" is not allowed (options are "+e.join("\n")+")")}),t}var u={dialog:"",header:"",footer:"",closeButton:"× ",form:"",inputs:{text:" ",textarea:"",email:" ",select:" ",checkbox:"
",date:" ",time:" ",number:" ",password:" "}},f={locale:e.zui&&e.zui.clientLang?e.zui.clientLang():"zh_cn",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},g={};g.alert=function(){var t;if(t=p("alert",["ok"],["message","callback"],arguments),t.callback&&!e.isFunction(t.callback))throw new Error("alert requires callback property to be a function when provided");return t.buttons.ok.callback=t.onEscape=function(){return e.isFunction(t.callback)?t.callback.call(this):!0},g.dialog(t)},g.confirm=function(){var t;if(t=p("confirm",["confirm","cancel"],["message","callback"],arguments),t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,!1)},t.buttons.confirm.callback=function(){return t.callback.call(this,!0)},!e.isFunction(t.callback))throw new Error("confirm requires a callback");return g.dialog(t)},g.prompt=function(){var t,o,n,a,r,l,p;if(a=e(u.form),o={className:"bootbox-prompt",buttons:c("cancel","confirm"),value:"",inputType:"text"},t=h(d(o,arguments,["title","callback"]),["confirm","cancel"]),l=t.show===i?!0:t.show,t.message=a,t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,null)},t.buttons.confirm.callback=function(){var i;switch(t.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":i=r.val();break;case"checkbox":var o=r.find("input:checked");i=[],s(o,function(t,o){i.push(e(o).val())})}return t.callback.call(this,i)},t.show=!1,!t.title)throw new Error("prompt requires a title");if(!e.isFunction(t.callback))throw new Error("prompt requires a callback");if(!u.inputs[t.inputType])throw new Error("invalid prompt type");switch(r=e(u.inputs[t.inputType]),t.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":r.val(t.value);break;case"select":var f={};if(p=t.inputOptions||[],!e.isArray(p))throw new Error("Please pass an array of input options");if(!p.length)throw new Error("prompt with select requires options");s(p,function(t,o){var n=r;if(o.value===i||o.text===i)throw new Error("given options in wrong format");o.group&&(f[o.group]||(f[o.group]=e(" ").attr("label",o.group)),n=f[o.group]),n.append(""+o.text+" ")}),s(f,function(t,e){r.append(e)}),r.val(t.value);break;case"checkbox":var m=e.isArray(t.value)?t.value:[t.value];if(p=t.inputOptions||[],!p.length)throw new Error("prompt with checkbox requires options");if(!p[0].value||!p[0].text)throw new Error("given options in wrong format");r=e("
"),s(p,function(i,o){var n=e(u.inputs[t.inputType]);n.find("input").attr("value",o.value),n.find("label").append(o.text),s(m,function(t,e){e===o.value&&n.find("input").prop("checked",!0)}),r.append(n)})}return t.placeholder&&r.attr("placeholder",t.placeholder),t.pattern&&r.attr("pattern",t.pattern),t.maxlength&&r.attr("maxlength",t.maxlength),a.append(r),a.on("submit",function(t){t.preventDefault(),t.stopPropagation(),n.find(".btn-primary").click()}),n=g.dialog(t),n.off("shown.zui.modal"),n.on("shown.zui.modal",function(){r.focus()}),l===!0&&n.modal("show"),n},g.dialog=function(t){t=r(t);var o=e(u.dialog),a=o.find(".modal-dialog"),l=o.find(".modal-body"),d=t.buttons,p="",c={onEscape:t.onEscape};if(e.fn.modal===i)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(s(d,function(t,e){p+=""+e.label+" ",c[t]=e.callback}),l.find(".bootbox-body").html(t.message),t.animate===!0&&o.addClass("fade"),t.className&&o.addClass(t.className),"large"===t.size?a.addClass("modal-lg"):"small"===t.size&&a.addClass("modal-sm"),t.title&&l.before(u.header),t.closeButton){var h=e(u.closeButton);t.title?o.find(".modal-header").prepend(h):h.css("margin-top","-10px").prependTo(l)}return t.title&&o.find(".modal-title").html(t.title),p.length&&(l.after(u.footer),o.find(".modal-footer").html(p)),o.on("hidden.zui.modal",function(t){t.target===this&&o.remove()}),o.on("shown.zui.modal",function(){o.find(".btn-primary:first").focus()}),"static"!==t.backdrop&&o.on("click.dismiss.zui.modal",function(t){o.children(".modal-backdrop").length&&(t.currentTarget=o.children(".modal-backdrop").get(0)),t.target===t.currentTarget&&o.trigger("escape.close.bb")}),o.on("escape.close.bb",function(t){c.onEscape&&n(t,o,c.onEscape)}),o.on("click",".modal-footer button",function(t){var i=e(this).data("bb-handler");n(t,o,c[i])}),o.on("click",".bootbox-close-button",function(t){n(t,o,c.onEscape)}),o.on("keyup",function(t){27===t.which&&o.trigger("escape.close.bb")}),e(t.container).append(o),o.modal({backdrop:t.backdrop?"static":!1,keyboard:!1,show:!1}),t.show&&o.modal("show"),o},g.setDefaults=function(){var t={};2===arguments.length?t[arguments[0]]=arguments[1]:t=arguments[0],e.extend(f,t)},g.hideAll=function(){return e(".bootbox").modal("hide"),g};var m={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return g.addLocale=function(t,i){return e.each(["OK","CANCEL","CONFIRM"],function(t,e){if(!i[e])throw new Error("Please supply a translation for '"+e+"'")}),m[t]={OK:i.OK,CANCEL:i.CANCEL,CONFIRM:i.CONFIRM},g},g.removeLocale=function(t){return delete m[t],g},g.setLocale=function(t){return g.setDefaults("locale",t)},g.init=function(i){return t(i||e)},g}),function(t){"use strict";var e=function(e,i){this.$=t(e),this.options=this.getOptions(i),this.init()};e.DEFAULTS={container:"body",move:!0},e.prototype.getOptions=function(i){return i=t.extend({},e.DEFAULTS,this.$.data(),i)},e.prototype.init=function(){this.handleMouseEvents()},e.prototype.handleMouseEvents=function(){var e,i,o,n,a,s=this.$,r="before",l="drag",d="finish",p=this.options,c=function(l){if(p.hasOwnProperty(r)&&t.isFunction(p[r])){var d=p[r]({event:l,element:s});if(void 0!==d&&!d)return}var c=t(p.container),f=s.offset();i=c.offset(),e={x:l.pageX,y:l.pageY},o={x:l.pageX-f.left+i.left,y:l.pageY-f.top+i.top},n=t.extend({},e),a=!1,s.addClass("drag-ready"),t(document).bind("mousemove",h).bind("mouseup",u),l.preventDefault(),p.stopPropagation&&l.stopPropagation()},h=function(i){a=!0;var r=i.pageX,d=i.pageY,c={left:r-o.x,top:d-o.y};s.removeClass("drag-ready").addClass("dragging"),p.move&&s.css(c),p.hasOwnProperty(l)&&t.isFunction(p[l])&&p[l]({event:i,element:s,startOffset:o,pos:c,offset:{x:r-e.x,y:d-e.y},smallOffset:{x:r-n.x,y:d-n.y}}),n.x=r,n.y=d,p.stopPropagation&&i.stopPropagation()},u=function(i){if(t(document).unbind("mousemove",h).unbind("mouseup",u),!a)return void s.removeClass("drag-ready");var r={left:i.pageX-o.x,top:i.pageY-o.y};s.removeClass("drag-ready").removeClass("dragging"),p.move&&s.css(r),p.hasOwnProperty(d)&&t.isFunction(p[d])&&p[d]({event:i,element:s,pos:r,offset:{x:i.pageX-e.x,y:i.pageY-e.y},smallOffset:{x:i.pageX-n.x,y:i.pageY-n.y}}),i.preventDefault(),p.stopPropagation&&i.stopPropagation()};p.handle?s.on("mousedown",p.handle,c):s.on("mousedown",c)},t.fn.draggable=function(i){return this.each(function(){var o=t(this),n=o.data("zui.draggable"),a="object"==typeof i&&i;n||o.data("zui.draggable",n=new e(this,a)),"string"==typeof i&&n[i]()})},t.fn.draggable.Constructor=e}(jQuery),function(t){"use strict";function e(e,i){if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var o;return t.isArray(e)&&(o={},t.each(e,function(e,i){t.isPlainObject(i)?o[i.action]=i:o[i]=!0}),e=o),t.isPlainObject(e)&&(o={},t.each(e,function(e,i){i&&(o[e]=t.extend({type:e},s[e],t.isPlainObject(i)?i:null))}),e=o),i?t.extend(!0,{},i,e):e}function i(e,i,o){return i=i||e.type,t(o||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var o="zui.tree",n=0,a=function(e,i){this.name=o,this.$=t(e),this.getOptions(i),this._init()},s={sort:{template:' '},add:{template:' '},edit:{template:' '},"delete":{template:' '}};a.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:' '},a.prototype.add=function(e,i){var o,n=t(e);if(n.is("li")?(o=n.children("ul"),o.length||(o=t(""),n.append(o),this._initList(o,n))):o=n,o){var a=this;t.isArray(i)||(i=[i]),t.each(i,function(e,i){var n=t(" ").data(i).appendTo(o);if(i.html)n.html(i.html);else if(t.isFunction(a.options.itemCreator)){var s=a.options.itemCreator(n,i);s!==!0&&n.html(s)}else n.append(t(" ",{href:i.url||"#"}).text(i.title||i.name));a._initItem(n,i.idx||e,o,i),i.children&&a.add(n,i.children)}),this._initList(o)}},a.prototype.remove=function(t){},a.prototype._initList=function(o,n,a,s){var r=this;o.hasClass("tree")?(a=0,n=null):(n=(n||o.closest("li")).addClass("has-list"),n.find(".list-toggle").length||n.prepend(this.options.toggleTemplate),a=a||n.data("idx")),o.attr("data-idx",a||0).children("li:not(.tree-action-item)").each(function(e){r._initItem(t(this),e+1,o)}),s=s||(n?n.data():null);var l=e(s?s.actions:null,this.actions);if(l){if(l.add){var d=o.children("li.tree-action-item");d.length?d.detach().appendTo(o):t(' ').append(i(l.add,"add",l.add.templateInList)).appendTo(o)}l.sort&&o.sortable(t.extend({dragCssClass:"tree-drag-holder",trigger:".sort-handler",selector:"li:not(.tree-action-item)",finish:function(t){r.callEvent("action",{action:l.sort,$list:o,target:t.target,item:s})}},l.sort.options,t.isPlainObject(this.options.sortable)?this.options.sortable:null))}n&&(n.hasClass("open")||s&&s.open)&&n.addClass("open in")},a.prototype._initItem=function(o,n,a,s){if(void 0===n){var r=o.prev("li");n=r.length?r.data("idx")+1:1}if(a=a||o.closest("ul"),o.attr("data-idx",n),!o.data("id")){var l=n;a.hasClass("tree")||(l=a.parent("li").data("id")+"-"+l),o.attr("data-id",l)}s=s||o.data();var d=e(s.actions,this.actions);if(d){var p=o.find(".tree-actions");p.length||(p=t('
').appendTo(o),t.each(d,function(t,e){e&&p.append(i(e,t))}))}var c=o.children("ul");c.length&&this._initList(c,o,n,s)},a.prototype._init=function(){var i=this.options,a=this;this.actions=e(i.actions),this.$.addClass("tree"),i.animate&&this.$.addClass("tree-animate"),this._initList(this.$),i.data&&this.add(this.$,i.data);var s=i.initialState;"preserve"!==s||t.zui&&t.zui.store&&t.zui.store.enable||(s="normal"),"expand"===s?this.expand():"collapse"===s?this.collapse():"preserve"===s&&(this.isPreserve=!0,this.selector=o+"::"+(i.name||"")+"#"+(this.$.attr("id")||n++),this.store=t.zui.store[i.name?"get":"pageGet"](this.selector,{}),this.store.time&&this.$.find("li:not(.tree-action-item)").each(function(){var e=t(this);a[a.store[e.data("id")]?"expand":"collapse"](e,!0,!0)})),this.$.on("click",".list-toggle, a[href=#], .tree-toggle",function(e){var i=t(this).parent("li");a.callEvent("hit",{target:i,item:i.data()}),a.toggle(i),e.preventDefault()}).on("click",".tree-action",function(){var e=t(this),i=e.data();if(i.action&&(i=i.action),"sort"!==i.type){var o=e.closest("li:not(.tree-action-item)");a.callEvent("action",{action:i,target:this,$item:o,item:o.data()})}})},a.prototype.preserve=function(e,i,o){if(this.isPreserve)if(e)i=i||e.data("id"),o=void 0===o?e.hasClass("open"):!1,o?this.store[i]=o:delete this.store[i],this.store.time=new Date,t.zui.store[this.options.name?"set":"pageSet"](this.selector,this.store);else{var n=this;this.store={},this.$.find("li").each(function(){n.store(t(this))})}},a.prototype.expand=function(t,e,i){t?(t.addClass("open"),!e&&this.options.animate?setTimeout(function(){t.addClass("in")},10):t.addClass("in")):t=this.$.find("li.has-list").addClass("open in"),i||this.preserve(t),this.callEvent("expand",t,this)},a.prototype.show=function(t,e,i){if(this.expand(t,e,i),t)for(var o=t.parent("ul");o&&o.length&&!o.hasClass("tree");){var n=o.parent("li");n.length?(this.expand(n,e,i),o=n.parent("ul")):o=!1}},a.prototype.collapse=function(t,e,i){t?!e&&this.options.animate?(t.removeClass("in"),setTimeout(function(){t.removeClass("open")},300)):t.removeClass("open in"):t=this.$.find("li.has-list").removeClass("open in"),i||this.preserve(t),this.callEvent("collapse",t,this)},a.prototype.toggle=function(t){var e=t&&t.hasClass("open")||t===!1||void 0===t&&this.$.find("li.has-list.open").length;this[e?"collapse":"expand"](t)},a.prototype.getOptions=function(e){this.options=t.extend({},a.DEFAULTS,this.$.data(),e),null===this.options.animate&&this.$.hasClass("tree-animate")&&(this.options.animate=!0)},a.prototype.toData=function(e,i){t.isFunction(e)&&(i=e,e=null),e=e||this.$;var o=this;return e.children("li:not(.tree-action-item)").map(function(){var e=t(this),n=e.data();delete n["zui.droppable"];var a=e.children("ul");return a.length&&(n.children=o.toData(a)),t.isFunction(i)?i(n,e):n}).get()},a.prototype.callEvent=function(e,i){var o;return t.isFunction(this.options[e])&&(o=this.options[e](i,this)),this.$.trigger(t.Event(e+"."+this.name,i)),o},t.fn.tree=function(e,i){return this.each(function(){var n=t(this),s=n.data(o),r="object"==typeof e&&e;s||n.data(o,s=new a(this,r)),"string"==typeof e&&s[e](i)})},t.fn.tree.Constructor=a,t(function(){t('[data-ride="tree"]').tree()})}(jQuery),function(t,e){function i(e,n){if(t.isArray(e))return void t.each(e,function(t,e){i(e,n)});var a={};a[e]=o[e],n?t.extend(n,a):t.extend(a)}var o=t.zui;o&&(i(["uuid","callEvent","clientLang","browser","messager","Messager","showMessager","closeModal","ajustModalPosition","ModalTrigger","modalTrigger","store"]),i(["Color","imgReady","messager","Messager","showMessager","closeModal","ajustModalPosition","ModalTrigger","modalTrigger","store"],e))}(jQuery,window),function(t,e){"use strict";function i(e,i){var o=e.data("url");o&&(e.addClass("panel-loading").find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").addClass("icon-spin"),t.ajax({url:o,dataType:"html"}).done(function(o){var n=t(o);n.hasClass("panel")?e.empty().append(n.children()):i?e.find(".panel-body").empty().html(o):e.html(o)}).fail(function(){e.addClass("panel-error")}).always(function(){e.removeClass("panel-loading"),e.find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").removeClass("icon-spin")}))}function o(t,i,o,n){return e.abs((o-t)*(n-i))}function n(t,e,i,o,n,a){return t>=i&&n>=t&&e>=o&&a>=e}function a(t,i,a,s,r,l,d,p){var c=e.max(t,r),h=e.max(i,l),u=e.min(a,d),f=e.min(s,p);return n(c,h,t,i,a,s)&&n(u,f,t,i,a,s)&&n(c,h,r,l,d,p)&&n(u,f,r,l,d,p)?o(c,h,u,f):0}var s=function(e,i){this.$=t(e),this.options=this.getOptions(i),this.draggable=this.$.hasClass("dashboard-draggable")||this.options.draggable,this.init()};s.DEFAULTS={height:360,shadowType:"normal",sensitive:!1,circleShadowSize:100,onlyRefreshBody:!0,resizable:!0,resizeMessage:!0},s.prototype.getOptions=function(e){return e=t.extend({},s.DEFAULTS,this.$.data(),e)},s.prototype.handleRemoveEvent=function(){var e=this.options.afterPanelRemoved,i=this.options.panelRemovingTip;this.$.on("click",".remove-panel",function(){var o=t(this).closest(".panel"),n=o.data("name")||o.find(".panel-heading").text().replace("\n","").replace(/(^\s*)|(\s*$)/g,""),a=o.attr("data-id");(void 0===i||confirm(i.format(n)))&&(o.parent().remove(),e&&t.isFunction(e)&&e(a))})},s.prototype.handleRefreshEvent=function(){var e=this.options.onlyRefreshBody;this.$.on("click",".refresh-panel",function(){var o=t(this).closest(".panel");i(o,e)})},s.prototype.handleDraggable=function(){var i=this.$,n=this.options,s="circle"===n.shadowType,r=n.circleShadowSize,l=r/2,d=n.afterOrdered;this.$.addClass("dashboard-draggable"),this.$.on("mousedown",".panel-actions, .drag-disabled",function(t){t.stopPropagation()});var p;this.$.on("mousedown",".panel-heading, .panel-drag-handler",function(c){function h(i){var s=E.data("mouseOffset");g=i.pageX-s.x,m=i.pageY-s.y,v=g+O,
-b=m+P,E.css({left:g,top:m}),T.find(".dragging-in").removeClass("dragging-in"),C=!1,w=null;var r,l=0;T.children(":not(.dragging-col)").each(function(){var s=t(this);if(s.hasClass("dragging-col-holder"))return C=!n.sensitive||100>l,!0;var d=s.children(".panel"),p=d.offset(),c=d.width(),h=d.height(),u=p.left,f=p.top;if(n.sensitive)u-=z.left,f-=z.top,r=a(g,m,v,b,u,f,u+c,f+h),r>100&&r>l&&r>e.min(o(g,m,v,b),o(u,f,u+c,f+h))/3&&(l=r,w=s);else{var y=i.pageX,$=i.pageY;if(y>u&&$>f&&u+c>y&&f+h>$)return w=s,!1}}),w&&(y&&clearTimeout(y),$=w,y=setTimeout(u,50)),i.preventDefault()}function u(){$&&($.addClass("dragging-in"),C?S.insertAfter($):S.insertBefore($),i.addClass("dashboard-holding"),y=null,$=null)}function f(e){y&&clearTimeout(y);var o=k.data("order");k.parent().insertAfter(S);var n=0,a={};T.children(":not(.dragging-col-holder)").each(function(){var e=t(this).children(".panel");e.data("order",++n),a[e.data("id")||e.attr("id")]=n,e.parent().attr("data-order",n)}),o!=a[k.data("id")||k.attr("id")]&&(T.data("orders",a),d&&t.isFunction(d)&&d(a)),E.remove(),i.removeClass("dashboard-holding"),i.find(".dragging-col").removeClass("dragging-col"),i.find(".panel-dragging").removeClass("panel-dragging"),T.find(".dragging-in").removeClass("dragging-in"),i.removeClass("dashboard-dragging"),t(document).unbind("mousemove",h).unbind("mouseup",f),e.preventDefault()}var g,m,v,b,y,w,C,$,k=t(this).closest(".panel"),x=k.parent(),T=k.closest(".row"),E=k.clone().addClass("panel-dragging-shadow"),D=k.offset(),z=i.offset(),S=T.find(".dragging-col-holder"),O=k.width(),P=k.height();S.length||(S=t('').removeClass("dragging-col").appendTo(T)),p&&S.removeClass(p),S.addClass(p=x.attr("class")),S.insertBefore(x).find(".panel").replaceWith(k.clone().addClass("panel-dragging panel-dragging-holder")),i.addClass("dashboard-dragging"),k.addClass("panel-dragging").parent().addClass("dragging-col"),E.css({left:D.left-z.left,top:D.top-z.top,width:O,height:P}).appendTo(i).data("mouseOffset",{x:c.pageX-D.left+z.left,y:c.pageY-D.top+z.top}),s&&(E.addClass("circle"),setTimeout(function(){E.css({left:c.pageX-z.left-l,top:c.pageY-z.top-l,width:r,height:r}).data("mouseOffset",{x:z.left+l,y:z.top+l})},100)),t(document).bind("mousemove",h).bind("mouseup",f),c.preventDefault()})},s.prototype.handlePanelPadding=function(){this.$.find(".panel-body > table, .panel-body > .list-group").parent().addClass("no-padding")},s.prototype.handlePanelHeight=function(){var i=this.options.height;this.$.children(".row").each(function(){var o=t(this),n=o.find(".panel"),a=o.data("height")||i;"number"!=typeof a&&(a=0,n.each(function(){a=e.max(a,t(this).innerHeight())})),n.css("height",a)})},s.prototype.handleResizeEvent=function(){var i=this.options.onResize,o=this.options.resizeMessage;this.$.on("mousedown",".resize-handle",function(n){var a=t(this).parent().addClass("resizing"),s=a.closest(".row"),r=n.pageX,l=a.width(),d=s.width(),p=e.round(d/l),c=p,h=function(i){var n=i.pageX,s=e.max(1,e.min(12,e.round(12*(l+(n-r))/d)));c!=s&&(a.attr("data-grid",s).css("width",100*s/12+"%"),o&&t.zui.messager&&t.zui.messager.show(e.round(100*s/12)+"% ("+s+"/12)",{scale:!1,placement:"center",icon:"resize-h",fade:!1,close:!1}),c=s),i.preventDefault(),i.stopPropagation()},u=function(n){t.zui.messager&&t.zui.messager.hide(),a.removeClass("resizing");var s=a.attr("data-grid");if(p!==s&&t.isFunction(i)){var r=function(){a.attr("data-grid",p).css("width",null)},l=i({element:a,old:p,grid:s,revert:r});l===!1?r():l!==!0&&o&&t.zui.messager&&t.zui.messager.success(e.round(100*s/12)+"% ("+s+"/12)",{placement:"center",time:1e3})}t("body").off("mousemove.resize",h).off("mouseup.resize",u),n.preventDefault(),n.stopPropagation()};t("body").on("mousemove.resize",h).on("mouseup.resize",u),n.preventDefault(),n.stopPropagation()}).children(".row").children(":not(.dragging-col-holder)").append('
')},s.prototype.init=function(){var e=this.options;if(e.data){var o=t('
');t.each(e.data,function(e,i){var n=t('
',i.colAttrs),a=t('
',i.panelAttrs);if(void 0!==i.content)if(t.isFunction(i.content)){var s=i.content(a);s!==!0&&a.html(s)}else a.html(i.content);o.append(n.append(a.data("url",i.url)))}),this.$.append(o)}this.handlePanelHeight(),this.handlePanelPadding(),this.handleRemoveEvent(),this.handleRefreshEvent(),e.resizable&&this.handleResizeEvent(),this.draggable&&this.handleDraggable();var n=0;this.$.find(".panel").each(function(){var o=t(this);o.data("order",++n),o.attr("id")||o.attr("id","panel"+n),o.attr("data-id")||o.attr("data-id",n),i(o,e.onlyRefreshBody)})},t.fn.dashboard=function(e){return this.each(function(){var i=t(this),o=i.data("zui.dashboard"),n="object"==typeof e&&e;o||i.data("zui.dashboard",o=new s(this,n)),"string"==typeof e&&o[e]()})},t.fn.dashboard.Constructor=s}(jQuery,Math),function(t){"use strict";var e="zui.colorPicker",i='
',o={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},n=function(i,o){this.name=e,this.$=t(i),this.getOptions(o),this.init()};n.DEFAULTS={colors:["#00BCD4","#388E3C","#3280fc","#3F51B5","#9C27B0","#795548","#F57C00","#F44336","#E91E63"],pullMenuRight:!0,wrapper:"btn-wrapper",tileSize:30,lineCount:5,optional:!0,tooltip:"top",icon:"caret-down"},n.prototype.init=function(){var e=this.options,o=this;this.$picker=t(i).addClass(e.wrapper),this.$picker.find(".cp-title").toggle(void 0!==e.title).text(e.title),this.$menu=this.$picker.find(".dropdown-menu").toggleClass("pull-right",e.pullMenuRight),this.$btn=this.$picker.find(".btn.dropdown-toggle"),this.$btn.find(".icon").addClass("icon-"+e.icon),e.btnTip&&this.$picker.attr("data-toggle","tooltip").tooltip({title:e.btnTip,placement:e.tooltip,container:"body"}),this.$.attr("data-provide",null).after(this.$picker),this.colors={},t.each(this.options.colors,function(e,i){if(t.zui.Color.isColor(i)){var n=new t.zui.Color(i);o.colors[n.toCssStr()]=n}}),this.updateColors();var o=this;this.$picker.on("click",".cp-tile",function(){o.setValue(t(this).data("color"))});var n=this.$,a=function(){var i=n.val(),a=t.zui.Color.isColor(i);n.parent().toggleClass("has-error",!(a||e.optional&&""===i)),a?o.setValue(i,!0):e.optional&&""===i?n.tooltip("hide"):n.tooltip("show",e.errorTip)};n.is("input:not([type=hidden])")?(e.tooltip&&n.attr("data-toggle","tooltip").tooltip({trigger:"manual",placement:e.tooltip,tipClass:"tooltip-danger"}),n.on("keyup paste input",a)):n.appendTo(this.$picker),a()},n.prototype.addColor=function(e){var i=e.toCssStr(),o=this.options;this.colors[i]||(this.colors[i]=e);var n=t(' ',{titile:e}).data("color",e).css({color:e.contrast().toCssStr(),background:i,"border-color":e.luma()>.43?"#ccc":"transparent"}).attr("data-color",i);this.$menu.append(t(" ").css({width:o.tileSize,height:o.tileSize}).append(n)),o.optional&&this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu)},n.prototype.updateColors=function(e){var i=(this.$picker,this.$menu.empty()),o=this.options,e=e||this.colors,n=this,a=0;if(t.each(e,function(t,e){n.addColor(e),a++}),o.optional){var s=t(' ').css({width:o.tileSize,height:o.tileSize});this.$menu.append(s),a++}i.css("width",Math.min(a,o.lineCount)*o.tileSize+6)},n.prototype.setValue=function(e,i){var o=this.options;this.$menu.find(".cp-tile.active").removeClass("active");var n=null;if(e){var a=new t.zui.Color(e);n=a.toCssStr().toLowerCase(),this.$btn.css({background:n,color:a.contrast().toCssStr(),borderColor:a.luma()>.43?"#ccc":n}),this.colors[n]||this.addColor(a),i||this.$.val().toLowerCase()===n||this.$.val(n).trigger("change"),this.$menu.find(".cp-tile[data-color="+n+"]").addClass("active"),this.$.tooltip("hide"),this.$.trigger("colorchange",a)}else this.$btn.attr("style",null),i||""===this.$.val()||this.$.val(n).trigger("change"),o.optional&&this.$.tooltip("hide"),this.$menu.find(".cp-tile.empty").addClass("active"),this.$.trigger("colorchange",null);o.updateBorder&&t(o.updateBorder).css("border-color",n),o.updateBackground&&t(o.updateBackground).css("background-color",n),o.updateText&&t(o.updateText).css("color",n)},n.prototype.getOptions=function(e){var i=t.extend({},n.DEFAULTS,this.$.data(),e);"string"==typeof i.colors&&(i.colors=i.colors.split(","));var a=(i.lang||t.zui.clientLang()).toLowerCase();i.errorTip||(i.errorTip=o[a].errorTip),this.options=i},t.fn.colorPicker=function(i){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof i&&i;a||o.data(e,a=new n(this,s)),"string"==typeof i&&a[i]()})},t.fn.colorPicker.Constructor=n,t(function(){t('[data-provide="colorpicker"]').colorPicker()})}(jQuery),function(t,e){"use strict";var i,o=0,n='',a={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},s=function(e,i){var s=this;s.id=o++,i=s.options=t.extend({},a,i),s.message=(i.icon?' ':"")+e,s.$=t(n.format(i)).toggleClass("fade",i.fade).toggleClass("scale",i.scale).attr("id","messager-"+s.id),i.close?s.$.on("click",".close",function(){s.hide()}):s.$.find(".close").remove(),s.$.find(".messager-content").html(s.message),s.$.data("zui.messager",s)};s.prototype.show=function(o){var n=this,a=this.options;i&&(i.id==n.id?n.$.removeClass("in"):i.isShow&&i.hide()),n.hiding&&(clearTimeout(n.hiding),n.hiding=null),o&&(n.message=(a.icon?' ':"")+o,n.$.find(".messager-content").html(n.message)),n.$.appendTo(a.parent).show(),("top"===a.placement||"bottom"===a.placement||"center"===a.placement)&&n.$.css("left",(t(e).width()-n.$.width()-50)/2),("left"===a.placement||"right"===a.placement||"center"===a.placement)&&n.$.css("top",(t(e).height()-n.$.height()-50)/2),n.$.addClass("in"),a.time&&(n.hiding=setTimeout(function(){n.hide()},a.time)),n.isShow=!0,i=n},s.prototype.hide=function(){var t=this;t.$.hasClass("in")&&(t.$.removeClass("in"),setTimeout(function(){t.$.remove()},200)),t.isShow=!1};var r=function(t,e){"string"==typeof e&&(e={type:e});var i=new s(t,e);return i.show(),i},l=function(){t(".messager").each(function(){var e=t(this).data("zui.messager");e&&e.hide&&e.hide()})},d=function(t){return"string"==typeof t?{placement:t}:t};t.zui({Messager:s,showMessager:r,messager:{show:r,hide:l,primary:function(e,i){return r(e,t.extend({type:"primary"},d(i)))},success:function(e,i){return r(e,t.extend({type:"success",icon:"ok-sign"},d(i)))},info:function(e,i){return r(e,t.extend({type:"info",icon:"info-sign"},d(i)))},warning:function(e,i){return r(e,t.extend({type:"warning",icon:"warning-sign"},d(i)))},danger:function(e,i){return r(e,t.extend({type:"danger",icon:"exclamation-sign"},d(i)))},important:function(e,i){return r(e,t.extend({type:"important"},d(i)))},special:function(e,i){return r(e,t.extend({type:"special"},d(i)))}}})}(jQuery,window);
\ No newline at end of file
+!function(t,e){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var i=0;t.zui({uuid:function(){return 1e3*(new Date).getTime()+i++%1e3},callEvent:function(e,i,a){if(t.isFunction(e)){void 0!==a&&(e=t.proxy(e,a));var o=e(i);return i&&(i.result=o),!(void 0!==o&&!o)}return 1},clientLang:function(){var i,a=e.config;if("undefined"!=typeof a&&a.clientLang)i=a.clientLang;else{var o=t("html").attr("lang");i=o?o:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return i.replace("-","_").toLowerCase()}}),t.fn.callEvent=function(e,i,a){var o=t(this),n=e.indexOf(".zui."),s=e;0>n&&a&&a.name?e+="."+a.name:s=e.substring(0,n);var r=t.Event(e,i);if(void 0===a&&n>0&&(a=o.data(e.substring(n+1))),a&&a.options){var l=a.options[s];t.isFunction(l)&&t.zui.callEvent(a.options[s],r,a)}return o.trigger(s,i),r}}(jQuery,window),function(){"use strict";String.prototype.format||(String.prototype.format=function(t){var e=this;if(arguments.length>0){var i;if(1==arguments.length&&"object"==typeof t)for(var a in t)void 0!==t[a]&&(i=new RegExp("({"+a+"})","g"),e=e.replace(i,t[a]));else for(var o=0;o=e&&i>t}),Date.prototype.isSameYear||(Date.prototype.isSameYear=function(t){return this.getFullYear()===t.getFullYear()})}(),function(t,e){"use strict";var i="localStorage",a=t[i],o=(t.store,"page_"+t.location.pathname+t.location.search),n=function(){this.slience=!0,this.enable=i in t&&t[i]&&t[i].setItem,this.storage=a,this.page=this.get(o,{})};n.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(o);else{var t,i=[];for(t in this.page){var a=this.page[t];null===a&&i.push(t)}for(t=i.length-1;t>=0;t--)delete this.page[i[t]];this.set(o,this.page)}},n.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},n.prototype.pageClear=function(){this.page={},this.pageSave()},n.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},n.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},n.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},n.prototype.length=function(){return this.check()?a.getLength?a.getLength():a.length:0},n.prototype.removeItem=function(t){return a.removeItem(t),this},n.prototype.remove=function(t){return this.removeItem(t)},n.prototype.getItem=function(t){return a.getItem(t)},n.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},n.prototype.key=function(t){return a.key(t)},n.prototype.setItem=function(t,e){return a.setItem(t,e),this},n.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},n.prototype.clear=function(){return a.clear(),this},n.prototype.forEach=function(t){for(var e=a.length-1;e>=0;e--){var i=a.key(e);t(i,this.get(i))}return this},n.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},n.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},n.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new n})}(window,jQuery),function(t,e,i){"use strict";function a(t){if(t=t.toLowerCase(),t&&d.test(t)){var e;if(4===t.length){var i="#";for(e=1;4>e;e+=1)i+=t.slice(e,e+1).concat(t.slice(e,e+1));t=i}var a=[];for(e=1;7>e;e+=2)a.push(parseInt("0x"+t.slice(e,e+2)));return{r:a[0],g:a[1],b:a[2],a:1}}throw new Error("function hexToRgb: Wrong hex string! (hex: "+t+")")}function o(e){return"string"==typeof e&&("transparent"===e.toLowerCase()||c[e.toLowerCase()]||d.test(t.trim(e.toLowerCase())))}function n(t){function e(t){return t=0>t?t+1:t>1?t-1:t,1>6*t?d+(s-d)*t*6:1>2*t?s:2>3*t?d+(s-d)*(2/3-t)*6:d}var i=t.h,a=t.s,o=t.l,n=t.a;i=l(i)%360/360,a=r(l(a)),o=r(l(o)),n=r(l(n));var s=.5>=o?o*(a+1):o+a-o*a,d=2*o-s,c={r:255*e(i+1/3),g:255*e(i),b:255*e(i-1/3),a:n};return c}function s(t,i,a){return void 0===a&&(a=0),void 0===i&&(i=255),e.min(e.max(t,a),i)}function r(t,e){return s(t,e)}function l(t){return"number"==typeof t?t:parseFloat(t)}var d=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,c={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},p=function(t,e,i,o){if(this.r=0,this.g=0,this.b=0,this.a=1,void 0!==o&&(this.a=r(l(o),1)),void 0!==t&&void 0!==e&&void 0!==i)this.r=parseInt(r(l(t),255)),this.g=parseInt(r(l(e),255)),this.b=parseInt(r(l(i),255));else if(void 0!==t){var s=typeof t;if("string"==s)t=t.toLowerCase(),"transparent"===t?this.a=0:c[t]?this.rgb(a(c[t])):this.rgb(a(t));else if("number"==s&&void 0===e)this.r=parseInt(r(t,255)),this.g=this.r,this.b=this.r;else if("object"==s&&t.hasOwnProperty("r"))this.r=parseInt(r(l(t.r),255)),t.hasOwnProperty("g")&&(this.g=parseInt(r(l(t.g),255))),t.hasOwnProperty("b")&&(this.b=parseInt(r(l(t.b),255))),t.hasOwnProperty("a")&&(this.a=r(l(t.a),1));else if("object"==s&&t.hasOwnProperty("h")){var d={h:r(l(t.h),360),s:1,l:1,a:1};t.hasOwnProperty("s")&&(d.s=r(l(t.s),1)),t.hasOwnProperty("l")&&(d.l=r(l(t.l),1)),t.hasOwnProperty("a")&&(d.a=r(l(t.a),1)),this.rgb(n(d))}}};p.prototype.rgb=function(t){if(void 0!==t){if("object"==typeof t)t.hasOwnProperty("r")&&(this.r=parseInt(r(l(t.r),255))),t.hasOwnProperty("g")&&(this.g=parseInt(r(l(t.g),255))),t.hasOwnProperty("b")&&(this.b=parseInt(r(l(t.b),255))),t.hasOwnProperty("a")&&(this.a=r(l(t.a),1));else{var e=parseInt(l(t));this.r=e,this.g=e,this.b=e}return this}return{r:this.r,g:this.g,b:this.b,a:this.a}},p.prototype.hue=function(t){var e=this.toHsl();return void 0===t?e.h:(e.h=r(l(t),360),this.rgb(n(e)),this)},p.prototype.darken=function(t){var e=this.toHsl();return e.l-=t/100,e.l=r(e.l,1),this.rgb(n(e)),this},p.prototype.clone=function(){return new p(this.r,this.g,this.b,this.a)},p.prototype.lighten=function(t){return this.darken(-t)},p.prototype.fade=function(t){return this.a=r(t/100,1),this},p.prototype.spin=function(t){var e=this.toHsl(),i=(e.h+t)%360;return e.h=0>i?360+i:i,this.rgb(n(e)),this},p.prototype.toHsl=function(){var t,i,a=this.r/255,o=this.g/255,n=this.b/255,s=this.a,r=e.max(a,o,n),l=e.min(a,o,n),d=(r+l)/2,c=r-l;if(r===l)t=i=0;else{switch(i=d>.5?c/(2-r-l):c/(r+l),r){case a:t=(o-n)/c+(n>o?6:0);break;case o:t=(n-a)/c+2;break;case n:t=(a-o)/c+4}t/=6}return{h:360*t,s:i,l:d,a:s}},p.prototype.luma=function(){var t=this.r/255,i=this.g/255,a=this.b/255;return t=.03928>=t?t/12.92:e.pow((t+.055)/1.055,2.4),i=.03928>=i?i/12.92:e.pow((i+.055)/1.055,2.4),a=.03928>=a?a/12.92:e.pow((a+.055)/1.055,2.4),.2126*t+.7152*i+.0722*a},p.prototype.saturate=function(t){var e=this.toHsl();return e.s+=t/100,e.s=r(e.s),this.rgb(n(e)),this},p.prototype.desaturate=function(t){return this.saturate(-t)},p.prototype.contrast=function(t,e,i){if(e="undefined"==typeof e?new p(255,255,255,1):new p(e),t="undefined"==typeof t?new p(0,0,0,1):new p(t),this.a<.5)return t;if(i=void 0===i?.43:l(i),t.luma()>e.luma()){var a=e;e=t,t=a}return this.luma()0?this.a<1?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":this.hexStr():"transparent"},p.isColor=o,t.zui({Color:p})}(jQuery,Math,window),function(t){"use strict";var e=0,i=["primary","red","yellow","green","blue","purple","brown","dark"],a={primary:"#3280fc",secondary:"#145ccd",pale:"#ebf2f9",fore:"#353535",back:"#fff",grayDarker:"#222222",grayDark:"#333333",gray:"#808080",grayLight:"#dddddd",grayLighter:"#e5e5e5",grayPale:"#f1f1f1",white:"#fff",black:"#000",red:"#ea644a",yellow:"#f1a325",green:"#38b03f",blue:"#03b8cf",purple:"#8666b8",brown:"#bd7b46",greenPale:"#ddf4df",yellowPale:"#fff0d5",redPale:"#ffe5e0",bluePale:"#ddf3f5",brownPale:"#f7ebe1",purplePale:"#f5eeff",light:"#fff",dark:"#353535",success:"#38b03f",warning:"#f1a325",danger:"#ea644a",info:"#03b8cf",important:"#bd7b46",special:"#8666b8",successPale:"#ddf4df",warningPale:"#fff0d5",dangerPale:"#ffe5e0",infoPale:"#ddf3f5",importantPale:"#f7ebe1",specialPale:"#f5eeff"};a.get=function(o){return("undefined"==typeof o||"random"===o)&&(o=i[e++%i.length]),new t.zui.Color(a[o]?a[o]:o)},t.zui({colorset:a}),t.zui.Color&&t.extend(t.zui.Color,a)}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,a=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(a).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";var e=function(i,a){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,a),this.isLoading=!1};e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var i="disabled",a=this.$element,o=a.is("input")?"val":"html",n=a.data();e+="Text",n.resetText||a.data("resetText",a[o]()),a[o](n[e]||this.options[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,a.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,a.removeClass(i).removeAttr(i))},this),0)},e.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=function(i){return this.each(function(){var a=t(this),o=a.data("zui.button"),n="object"==typeof i&&i;o||a.data("zui.button",o=new e(this,n)),"toggle"==i?o.toggle():i&&o.setState(i)})},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.zui.button.data-api","[data-toggle^=button]",function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle"),e.preventDefault()})}(jQuery),function(t){"use strict";var e={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 了解更多... ',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。了解更多... ',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. Learn more... '},i=function(){var t=this.isIE()||this.isIE10()||!1;if(t)for(var e=10;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};i.prototype.cssHelper=function(){var e=this.ie,i=t("html");i.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&i.addClass("ie-"+e).toggleClass("gt-ie-7 gte-ie-8 support-ie",e>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",8>e).toggleClass("gt-ie-8 gte-ie-9",e>=9).toggleClass("lte-ie-8 lt-ie-9",9>e).toggleClass("gt-ie-9 gte-ie-10",e>=10).toggleClass("lte-ie-9 lt-ie-10",10>e)},i.prototype.tip=function(i){var a=t("#browseHappyTip");a.length||(a=t(''),a.prependTo("body")),a.find(".content").html(i||this.browseHappyTip||e[t.zui.clientLang()||"zh_cn"])},i.prototype.isIE=function(t){if(10===t)return this.isIE10();var e=document.createElement("b");return e.innerHTML="",1===e.getElementsByTagName("i").length},i.prototype.isIE10=function(){return!1},t.zui({browser:new i}),t(function(){t("body").hasClass("disabled-browser-tip")||t.zui.browser.ie&&t.zui.browser.ie<8&&t.zui.browser.tip()})}(jQuery),+function(t){"use strict";var e="zui.collapse",i=function(e,a){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,a),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var a=this.$parent&&this.$parent.find("> .panel > .in");if(a&&a.length){var o=a.data(e);if(o&&o.transitioning)return;a.collapse("hide"),o||a.data(e,null)}var n=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[n](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[n]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return s.call(this);var r=t.camelCase(["scroll",n].join("-"));this.$element.one(t.support.transition.end,t.proxy(s,this)).emulateTransitionEnd(350)[n](this.$element[0][r])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var a=this.dimension();this.$element[a](this.$element[a]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[a](0).one(t.support.transition.end,t.proxy(o,this)).emulateTransitionEnd(350):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var a=t.fn.collapse;t.fn.collapse=function(a){return this.each(function(){var o=t(this),n=o.data(e),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof a&&a);n||o.data(e,n=new i(this,s)),"string"==typeof a&&n[a]()})},t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=a,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(i){var a,o=t(this),n=o.attr("data-target")||i.preventDefault()||(a=o.attr("href"))&&a.replace(/.*(?=#[^\s]+$)/,""),s=t(n),r=s.data(e),l=r?"toggle":o.data(),d=o.attr("data-parent"),c=d&&t(d);r&&r.transitioning||(c&&c.find('[data-toggle=collapse][data-parent="'+d+'"]').not(o).addClass("collapsed"),o[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),s.collapse(l)})}(window.jQuery),+function(t){"use strict";function e(){t(o).remove(),t(n).each(function(e){var o=i(t(this));o.hasClass("open")&&(o.trigger(e=t.Event("hide."+a)),e.isDefaultPrevented()||o.removeClass("open").trigger("hidden."+a))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var a=i&&t(i);return a&&a.length?a:e.parent()}var a="zui.dropdown",o=".dropdown-backdrop",n="[data-toggle=dropdown]",s=function(e){t(e).on("click."+a,this.toggle)};s.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=i(n),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('
').insertAfter(t(this)).on("click",e),s.trigger(o=t.Event("show."+a)),o.isDefaultPrevented())return;s.toggleClass("open").trigger("shown."+a),n.focus()}return!1}},s.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var a=t(this);if(e.preventDefault(),e.stopPropagation(),!a.is(".disabled, :disabled")){var o=i(a),s=o.hasClass("open");if(!s||s&&27==e.keyCode)return 27==e.which&&o.find(n).focus(),a.click();var r=t("[role=menu] li:not(.divider):visible a",o);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l .dropdown-menu > .active").removeClass("active"),e.addClass("active"),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),a&&a()}var n=i.find("> .active"),s=a&&t.support.transition&&n.hasClass("fade");s?n.one(t.support.transition.end,o).emulateTransitionEnd(150):o(),n.removeClass("in")};var a=t.fn.tab;t.fn.tab=function(a){return this.each(function(){var o=t(this),n=o.data(e);n||o.data(e,n=new i(this)),"string"==typeof a&&n[a]()})},t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=a,this},t(document).on("click.zui.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),+function(t){"use strict";function e(e,o,n){return this.each(function(){var s=t(this),r=s.data(i),l=t.extend({},a.DEFAULTS,s.data(),"object"==typeof e&&e);r||s.data(i,r=new a(this,l)),"string"==typeof e?r[e](o,n):l.show&&r.show(o,n)})}var i="zui.modal",a=function(e,a){this.options=a,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,"undefined"==typeof this.options.moveable&&(this.options.moveable=this.$element.hasClass("modal-moveable")),this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded."+i)},this))};a.VERSION="3.2.0",a.TRANSITION_DURATION=300,a.BACKDROP_TRANSITION_DURATION=150,a.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"},a.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},a.prototype.ajustPosition=function(e){if("undefined"==typeof e&&(e=this.options.position),"undefined"!=typeof e){var a=this.$element.find(".modal-dialog"),o=Math.max(0,(t(window).height()-a.outerHeight())/2),n="fit"==e?2*o/3:"center"==e?o:e;if(a.hasClass("modal-moveable")){var s=null;this.options.rememberPos&&(this.options.rememberPos===!0?s=this.$element.data("modal-pos"):t.zui.store&&(s=t.zui.store.pageGet(i+".rememberPos"))),s||(s={left:Math.max(0,(t(window).width()-a.outerWidth())/2),top:n}),a.css(s)}else a.css("margin-top",n)}},a.prototype.setMoveale=function(){var e=this,a=e.options,o=e.$element.find(".modal-dialog").removeClass("modal-dragged");o.toggleClass("modal-moveable",a.moveable),e.$element.data("modal-moveable-setup")||o.draggable({container:e.$element,handle:".modal-header",before:function(){o.css("margin-top","").addClass("modal-dragged")},finish:function(o){a.rememberPos&&(e.$element.data("modal-pos",o.pos),t.zui.store&&a.rememberPos!==!0&&t.zui.store.pageSet(i+".rememberPos",o.pos))}})},a.prototype.show=function(e,o){var n=this,s=t.Event("show."+i,{relatedTarget:e});n.$element.trigger(s),n.isShown||s.isDefaultPrevented()||(n.isShown=!0,n.options.moveable&&n.setMoveale(),n.checkScrollbar(),n.$body.addClass("modal-open"),n.setScrollbar(),n.escape(),n.$element.on("click.dismiss."+i,'[data-dismiss="modal"]',t.proxy(n.hide,n)),n.backdrop(function(){var s=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),s&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.ajustPosition(o),n.enforceFocus();var r=t.Event("shown."+i,{relatedTarget:e});s?n.$element.find(".modal-dialog").one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(a.TRANSITION_DURATION):n.$element.trigger("focus").trigger(r)}))},a.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide."+i),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),t(document).off("focusin."+i),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+i),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(a.TRANSITION_DURATION):this.hideModal())},a.prototype.enforceFocus=function(){t(document).off("focusin."+i).on("focusin."+i,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},a.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+i,t.proxy(function(e){if(27==e.which){var a=t.Event("escaping."+i),o=this.$element.triggerHandler(a,"esc");if(void 0!=o&&!o)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+i)},a.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+i)})},a.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},a.prototype.backdrop=function(e){var o=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&n;if(this.$backdrop=t('
').appendTo(this.$body),this.$element.on("mousedown.dismiss."+i,t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){o.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},a.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},a.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},a.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},a.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var o=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=a,t.fn.modal.noConflict=function(){return t.fn.modal=o,this},t(document).on("click."+i+".data-api",'[data-toggle="modal"]',function(a){var o=t(this),n=o.attr("href"),s=null;try{s=t(o.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""))}catch(r){return}if(s.length){var l=s.data(i)?"toggle":t.extend({remote:!/#/.test(n)&&n},s.data(),o.data());o.is("a")&&a.preventDefault(),s.one("show."+i,function(t){t.isDefaultPrevented()||s.one("hidden."+i,function(){o.is(":visible")&&o.trigger("focus")})}),e.call(s,l,this,o.data("position"))}})}(jQuery),+function(t){"use strict";var e=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,a){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(a);for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var r="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this));
+}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,a){i[t]!=a&&(e[t]=a)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(i),i.isDefaultPrevented())return;var a=this.tip();this.setContent(e),this.options.animation&&a.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,n=/\s?auto?\s?/i,s=n.test(o);s&&(o=o.replace(n,"")||"top"),a.detach().css({top:0,left:0,display:"block"}).addClass(o),this.options.container?a.appendTo(this.options.container):a.insertAfter(this.$element);var r=this.getPosition(),l=a[0].offsetWidth,d=a[0].offsetHeight;if(s){var c=this.$element.parent(),p=o,h=document.documentElement.scrollTop||document.body.scrollTop,f="body"==this.options.container?window.innerWidth:c.outerWidth(),u="body"==this.options.container?window.innerHeight:c.outerHeight(),g="body"==this.options.container?0:c.offset().left;o="bottom"==o&&r.top+r.height+d-h>u?"top":"top"==o&&r.top-h-d<0?"bottom":"right"==o&&r.right+l>f?"left":"left"==o&&r.left-l
'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),a=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](a),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,a=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return a?"$next"==a?e.next(".popover"):t(a):!1},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var a=t(this),o=a.data("zui.popover"),n="object"==typeof i&&i;o||a.data("zui.popover",o=new e(this,n)),"string"==typeof i&&o[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),function(t,e,i){"use strict";var a=function(e,i){this.$=t(e),this.options=this.getOptions(i),this.init()};a.DEFAULTS={container:"body",deviation:5,sensorOffsetX:0,sensorOffsetY:0},a.prototype.getOptions=function(e){return e=t.extend({},a.DEFAULTS,this.$.data(),e)},a.prototype.callEvent=function(e,i){return t.zui.callEvent(this.options[e],i,this)},a.prototype.init=function(){this.handleMouseEvents()},a.prototype.handleMouseEvents=function(){var a=this.$,o=this,n=this.options,s="before";this.$triggerTarget=n.trigger?(t.isFunction(n.trigger)?n.trigger(a):a.find(n.trigger)).first():a,this.$triggerTarget.on("mousedown",function(r){function l(e){var s={left:e.pageX,top:e.pageY};if(!(i.abs(s.left-y.left)