-
-
+
+
+
-
task->report->select;?>
+
task->report->select;?>
-
-
-
-
-
- task->report->common;?>
-
- report->typeList as $type => $typeName):?>
-
-
-
- report->notice->help?>
-
-
-
- $chartOption):?>
-
-
-
-
task->report->charts[$chartType];?>
-
-
-
-
-
-
-
-
- task->report->$chartType->item;?>
- task->report->value;?>
- report->percent;?>
-
-
-
- $data):?>
-
-
- name;?>
- value;?>
- percent * 100) . '%';?>
-
-
-
-
-
-
-
+
+
+
+ report->typeList as $type => $typeName):?>
+ " . $typeName, '', "class='btn btn-link " . ($type == $chartType ? 'btn-active-line' : '') . "'")?>
-
+
report->notice->help;?>
+
+ $chartOption):?>
+
+
+
+
task->report->charts[$chartType];?>
+
+
+
+
+
+
+
+
+ task->report->$chartType->item;?>
+ task->report->value;?>
+ report->percent;?>
+
+
+
+ $data):?>
+
+
+ name;?>
+ value;?>
+ percent * 100) . '%';?>
+
+
+
+
+
+
+
+
diff --git a/www/js/zui/min.js b/www/js/zui/min.js
index 61823c98bb..7c9dbf9bbb 100644
--- a/www/js/zui/min.js
+++ b/www/js/zui/min.js
@@ -55,5 +55,5 @@ function(){var t,e,i,s,n,a={}.hasOwnProperty,o=function(t,e){function i(){this.c
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
-!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).closest("form").ajaxSubmit(i))}function i(e){var i=e.target,s=t(i);if(!s.is("[type=submit],[type=image]")){var n=s.closest("[type=submit]");if(0===n.length)return;i=n[0]}var a=i.form;if(a.clk=i,"image"===i.type)if(void 0!==e.offsetX)a.clk_x=e.offsetX,a.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var o=s.offset();a.clk_x=e.pageX-o.left,a.clk_y=e.pageY-o.top}else a.clk_x=e.pageX-i.offsetLeft,a.clk_y=e.pageY-i.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function s(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var n=/\r?\n/g,a={};a.fileapi=void 0!==t('
').get(0).files,a.formdata=void 0!==window.FormData;var o=!!t.fn.prop;t.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e,i,n,r){function l(i){var s,n,a=t.param(i,e.traditional).split("&"),o=a.length,r=[];for(s=0;s
',T).val(d.extraData[l].value).appendTo(C)[0]):o.push(h(' ',T).val(d.extraData[l]).appendTo(C)[0]));d.iframeTarget||g.appendTo(S),m.attachEvent?m.attachEvent("onload",r):m.addEventListener("load",r,!1),setTimeout(t,15);try{C.submit()}catch(h){document.createElement("form").submit.apply(C)}}finally{C.setAttribute("action",i),C.setAttribute("enctype",a),e?C.setAttribute("target",e):p.removeAttr("target"),h(o).remove()}}function r(t){if(!y.aborted&&!$){if((z=n(m))||(s("cannot access response document"),t=M),t===D&&y)return y.abort("timeout"),void k.reject(y,"timeout");if(t===M&&y)return y.abort("server abort"),void k.reject(y,"error","server abort");if(z&&z.location.href!==d.iframeSrc||_){m.detachEvent?m.detachEvent("onload",r):m.removeEventListener("load",r,!1);var e,i="success";try{if(_)throw"timeout";var a="xml"===d.dataType||z.XMLDocument||v.isXMLDoc(z);if(s("isXml="+a),!a&&window.opera&&(null===z.body||!z.body.innerHTML)&&--E)return s("requeing onLoad callback, DOM not available"),void setTimeout(r,250);var o=z.body?z.body:z.documentElement;y.responseText=o?o.innerHTML:null,y.responseXML=z.XMLDocument?z.XMLDocument:z,a&&(d.dataType="xml"),y.getResponseHeader=function(t){return{"content-type":d.dataType}[t.toLowerCase()]},o&&(y.status=Number(o.getAttribute("status"))||y.status,y.statusText=o.getAttribute("statusText")||y.statusText);var l=(d.dataType||"").toLowerCase(),h=/(json|script|text)/.test(l);if(h||d.textarea){var c=z.getElementsByTagName("textarea")[0];if(c)y.responseText=c.value,y.status=Number(c.getAttribute("status"))||y.status,y.statusText=c.getAttribute("statusText")||y.statusText;else if(h){var p=z.getElementsByTagName("pre")[0],f=z.getElementsByTagName("body")[0];p?y.responseText=p.textContent?p.textContent:p.innerText:f&&(y.responseText=f.textContent?f.textContent:f.innerText)}}else"xml"===l&&!y.responseXML&&y.responseText&&(y.responseXML=I(y.responseText));try{L=U(y,l,d)}catch(v){i="parsererror",y.error=e=v||i}}catch(v){s("error caught: ",v),i="error",y.error=e=v||i}y.aborted&&(s("upload aborted"),i=null),y.status&&(i=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===i?(d.success&&d.success.call(d.context,L,"success",y),k.resolve(y.responseText,"success",y),u&&v.event.trigger("ajaxSuccess",[y,d])):i&&(void 0===e&&(e=y.statusText),d.error&&d.error.call(d.context,y,i,e),k.reject(y,"error",e),u&&v.event.trigger("ajaxError",[y,d,e])),u&&v.event.trigger("ajaxComplete",[y,d]),u&&!--v.active&&v.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,y,i),$=!0,d.timeout&&clearTimeout(x),setTimeout(function(){d.iframeTarget?g.attr("src",d.iframeSrc):g.remove(),y.responseXML=null},100)}}}var l,h,d,u,f,g,m,y,b,w,_,x,C=p[0],k=t.Deferred();if(k.abort=function(t){y.abort(t)},i)for(h=0;h ',T)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=g[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var e="timeout"===t?"timeout":"aborted";s("aborting upload... "+e),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(i){}g.attr("src",d.iframeSrc),y.error=e,d.error&&d.error.call(d.context,y,e,t),u&&i.event.trigger("ajaxError",[y,d,e]),d.complete&&d.complete.call(d.context,y,e)}},(u=d.global)&&0==t.active++&&t.event.trigger("ajaxStart"),u&&t.event.trigger("ajaxSend",[y,d]),d.beforeSend&&!1===d.beforeSend.call(d.context,y,d))return d.global&&t.active--,k.reject(),k;if(y.aborted)return k.reject(),k;(b=C.clk)&&(w=b.name)&&!b.disabled&&(d.extraData=d.extraData||{},d.extraData[w]=b.value,"image"===b.type&&(d.extraData[w+".x"]=C.clk_x,d.extraData[w+".y"]=C.clk_y));var D=1,M=2,P=t("meta[name=csrf-token]").attr("content"),F=t("meta[name=csrf-param]").attr("content");F&&P&&(d.extraData=d.extraData||{},d.extraData[F]=P),d.forceSync?a():setTimeout(a,10);var L,z,$,E=50,I=t.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!==e.documentElement.nodeName?e:null},A=t.parseJSON||function(t){return window.eval("("+t+")")},U=function(e,i,s){var n=e.getResponseHeader("content-type")||"",a=("xml"===i||!i)&&n.indexOf("xml")>=0,o=a?e.responseXML:e.responseText;return a&&"parsererror"===o.documentElement.nodeName&&t.error&&t.error("parsererror"),s&&s.dataFilter&&(o=s.dataFilter(o,i)),"string"==typeof o&&(("json"===i||!i)&&n.indexOf("json")>=0?o=A(o):("script"===i||!i)&&n.indexOf("javascript")>=0&&t.globalEval(o)),o};return k}if(!this.length)return s("ajaxSubmit: skipping submit process - no element selected"),this;var c,d,u,p=this;"function"==typeof e?e={success:e}:"string"==typeof e||!1===e&&arguments.length>0?(e={url:e,data:i,dataType:n},"function"==typeof r&&(e.success=r)):void 0===e&&(e={}),c=e.method||e.type||this.attr2("method"),(u=(u="string"==typeof(d=e.url||this.attr2("action"))?t.trim(d):"")||window.location.href||"")&&(u=(u.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:u,success:t.ajaxSettings.success,type:c||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var f={};if(this.trigger("form-pre-serialize",[this,e,f]),f.veto)return s("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&!1===e.beforeSerialize(this,e))return s("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var g=e.traditional;void 0===g&&(g=t.ajaxSettings.traditional);var m,v=[],y=this.formToArray(e.semantic,v,e.filtering);if(e.data){var b=t.isFunction(e.data)?e.data(y):e.data;e.extraData=b,m=t.param(b,g)}if(e.beforeSubmit&&!1===e.beforeSubmit(y,this,e))return s("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[y,this,e,f]),f.veto)return s("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var w=t.param(y,g);m&&(w=w?w+"&"+m:m),"GET"===e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+w,e.data=null):e.data=w;var _=[];if(e.resetForm&&_.push(function(){p.resetForm()}),e.clearForm&&_.push(function(){p.clearForm(e.includeHidden)}),!e.dataType&&e.target){var x=e.success||function(){};_.push(function(i,s,n){var a=arguments,o=e.replaceTarget?"replaceWith":"html";t(e.target)[o](i).each(function(){x.apply(this,a)})})}else e.success&&(t.isArray(e.success)?t.merge(_,e.success):_.push(e.success));if(e.success=function(t,i,s){for(var n=e.context||this,a=0,o=_.length;a0,S="multipart/form-data",D=p.attr("enctype")===S||p.attr("encoding")===S,M=a.fileapi&&a.formdata;s("fileAPI :"+M);var P,F=(T||D)&&!M;!1!==e.iframe&&(e.iframe||F)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){P=h(y)}):P=h(y):P=(T||D)&&M?function(i){for(var s=new FormData,n=0;n0)&&(n={url:n,data:a,dataType:o},"function"==typeof r&&(n.success=r)),n=n||{},n.delegation=n.delegation&&t.isFunction(t.fn.on),!n.delegation&&0===this.length){var l={s:this.selector,c:this.context};return!t.isReady&&l.s?(s("DOM not ready, queuing ajaxForm"),t(function(){t(l.s,l.c).ajaxForm(n)}),this):(s("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return n.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,n,e).on("click.form-plugin",this.selector,n,i),this):this.ajaxFormUnbind().on("submit.form-plugin",n,e).on("click.form-plugin",n,i)},t.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i,s){var n=[];if(0===this.length)return n;var o,r=this[0],l=this.attr("id"),h=e||void 0===r.elements?r.getElementsByTagName("*"):r.elements;if(h&&(h=t.makeArray(h)),l&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=t(':input[form="'+l+'"]').get()).length&&(h=(h||[]).concat(o)),!h||!h.length)return n;t.isFunction(s)&&(h=t.map(h,s));var c,d,u,p,f,g,m;for(c=0,g=h.length;c '},add:{template:' '},edit:{template:' '},"delete":{template:' '}};a.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:' '},a.prototype.add=function(e,i,s,n,a){var o,r=t(e),l=this.options;if(r.is("li")?(o=r.children("ul"),o.length||(o=t(""),r.append(o),this._initList(o,r))):o=r,o){var h=this;t.isArray(i)||(i=[i]),t.each(i,function(e,i){var s=t(" ").data(i).appendTo(o);void 0!==i.id&&s.attr("data-id",i.id);var n=l.itemWrapper?t(l.itemWrapper===!0?'
':l.itemWrapper).appendTo(s):s;if(i.html)n.html(i.html);else if(t.isFunction(h.options.itemCreator)){var a=h.options.itemCreator(s,i);a!==!0&&a!==!1&&n.html(a)}else i.url?n.append(t(" ",{href:i.url}).text(i.title||i.name)):n.append(t(" ").text(i.title||i.name));h._initItem(s,i.idx||e,o,i),i.children&&i.children.length&&h.add(s,i.children)}),this._initList(o),s&&!o.hasClass("tree")&&h.expand(o.parent("li"),n,a)}},a.prototype.reload=function(e){var i=this;e&&(i.$.empty(),i.add(i.$,e)),i.isPreserve&&i.store.time&&i.$.find("li:not(.tree-action-item)").each(function(){var e=t(this);i[i.store[e.data("id")]?"expand":"collapse"](e,!0,!0)})},a.prototype._initList=function(s,n,a,o){var r=this;s.hasClass("tree")?(a=0,n=null):(n=(n||s.closest("li")).addClass("has-list"),n.find(".list-toggle").length||n.prepend(this.options.toggleTemplate),a=a||n.data("idx"));var l=s.attr("data-idx",a||0).children("li:not(.tree-action-item)").each(function(e){r._initItem(t(this),e+1,s)});1!==l.length||l.find("ul").length||l.addClass("tree-single-item"),o=o||(n?n.data():null);var h=e(o?o.actions:null,this.actions);if(h){if(h.add&&h.add.templateInList!==!1){var c=s.children("li.tree-action-item");c.length?c.detach().appendTo(s):t(' ').append(i(h.add,"add",h.add.templateInList)).appendTo(s)}h.sort&&s.sortable(t.extend({dragCssClass:"tree-drag-holder",trigger:".sort-handler",selector:"li:not(.tree-action-item)",finish:function(t){r.callEvent("action",{action:h.sort,$list:s,target:t.target,item:o})}},h.sort.options,t.isPlainObject(this.options.sortable)?this.options.sortable:null))}n&&(n.hasClass("open")||o&&o.open)&&n.addClass("open in")},a.prototype._initItem=function(s,n,a,o){if(void 0===n){var r=s.prev("li");n=r.length?r.data("idx")+1:1}if(a=a||s.closest("ul"),s.attr("data-idx",n).removeClass("tree-single-item"),!s.data("id")){var l=n;a.hasClass("tree")||(l=a.parent("li").data("id")+"-"+l),s.attr("data-id",l)}o=o||s.data();var h=e(o.actions,this.actions);if(h){var c=s.find(".tree-actions");c.length||(c=t('
').appendTo(this.options.itemWrapper?s.find(".tree-item-wrapper"):s),t.each(h,function(t,e){e&&c.append(i(e,t))}))}var d=s.children("ul");d.length&&this._initList(d,s,n,o)},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.$);var o=i.initialState,r=t.zui&&t.zui.store&&t.zui.store.enable;r&&(this.selector=s+"::"+(i.name||"")+"#"+(this.$.attr("id")||n++),this.store=t.zui.store[i.name?"get":"pageGet"](this.selector,{})),"preserve"===o&&(r?this.isPreserve=!0:this.options.initialState=o="normal"),this.reload(i.data),r&&(this.isPreserve=!0),"expand"===o?this.expand():"collapse"===o&&this.collapse(),this.$.on("click",'.list-toggle,a[href="#"],.tree-toggle',function(e){var i=t(this),s=i.parent("li");a.callEvent("hit",{target:s,item:s.data()}),a.toggle(s),i.is("a")&&e.preventDefault()}).on("click",".tree-action",function(){var e=t(this),i=e.data();if(i.action&&(i=i.action),"sort"!==i.type){var s=e.closest("li:not(.tree-action-item)");a.callEvent("action",{action:i,target:this,$item:s,item:s.data()})}})},a.prototype.preserve=function(e,i,s){if(this.isPreserve)if(e)i=i||e.data("id"),s=void 0===s&&e.hasClass("open"),s?this.store[i]=s:delete this.store[i],this.store.time=(new Date).getTime(),t.zui.store[this.options.name?"set":"pageSet"](this.selector,this.store);else{var n=this;this.store={},this.$.find("li").each(function(){n.preserve(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(e,i,s){var n=this;e.each(function(){var e=t(this);if(n.expand(e,i,s),e)for(var a=e.parent("ul");a&&a.length&&!a.hasClass("tree");){var o=a.parent("li");o.length?(n.expand(o,i,s),a=o.parent("ul")):a=!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 s=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=s.toData(a)),t.isFunction(i)?i(n,e):n}).get()},a.prototype.callEvent=function(e,i){var s;return t.isFunction(this.options[e])&&(s=this.options[e](i,this)),this.$.trigger(t.Event(e+"."+this.name,i)),s},t.fn.tree=function(e,i){return this.each(function(){var n=t(this),o=n.data(s),r="object"==typeof e&&e;o||n.data(s,o=new a(this,r)),"string"==typeof e&&o[e](i)})},t.fn.tree.Constructor=a,t(function(){t('[data-ride="tree"]').tree()})}(jQuery),function(t){"use strict";var e="zui.colorPicker",i='
',s={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},n=function(i,s){this.name=e,this.$=t(i),this.getOptions(s),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",updateBtn:"auto"},n.prototype.init=function(){var e=this,s=e.options,n=e.$,a=n.parent(),o=!1;a.hasClass("colorpicker")?e.$picker=a:(e.$picker=t(s.template||i),o=!0),e.$picker.addClass(s.wrapper).find(".cp-title").toggle(void 0!==s.title).text(s.title),e.$menu=e.$picker.find(".dropdown-menu").toggleClass("pull-right",s.pullMenuRight),e.$btn=e.$picker.find(".btn.dropdown-toggle"),e.$btn.find(".ic").addClass("icon-"+s.icon),s.btnTip&&e.$picker.attr("data-toggle","tooltip").tooltip({title:s.btnTip,placement:s.tooltip,container:"body"}),n.attr("data-provide",null),o&&n.after(e.$picker),e.colors={},t.each(s.colors,function(i,s){if(t.zui.Color.isColor(s)){var n=new t.zui.Color(s);e.colors[n.toCssStr()]=n}}),e.updateColors(),e.$picker.on("click",".cp-tile",function(){e.setValue(t(this).data("color"))});var r=function(){var i=n.val(),a=t.zui.Color.isColor(i);n.parent().toggleClass("has-error",!(a||s.optional&&""===i)),a?e.setValue(i,!0):s.optional&&""===i?n.tooltip("hide"):n.is(":focus")||n.tooltip("show",s.errorTip)};n.is("input:not([type=hidden])")?(s.tooltip&&n.attr("data-toggle","tooltip").tooltip({trigger:"manual",placement:s.tooltip,tipClass:"tooltip-danger",container:"body"}),n.on("keyup paste input change",r)):n.appendTo(e.$picker),r()},n.prototype.addColor=function(e){e instanceof t.zui.Color||(e=new t.zui.Color(e));var i=e.toCssStr(),s=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:s.tileSize,height:s.tileSize}).append(n)),s.optional&&this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu)},n.prototype.updateColors=function(e){var i=(this.$picker,this.$menu.children("li:not(.heading)").remove()),s=this.options,e=e||this.colors,n=this,a=0;if(t.each(e,function(t,e){n.addColor(e),a++}),s.optional){var o=t(' ').css({width:s.tileSize,height:s.tileSize});this.$menu.append(o),a++}i.css("width",Math.min(a,s.lineCount)*s.tileSize+6)},n.prototype.setValue=function(e,i){var s=this,n=s.options,a=s.$btn;s.$menu.find(".cp-tile.active").removeClass("active");var o="",r=n.updateBtn;if("auto"===r){var l=a.find(".color-bar");r=!l.length||function(t){l.css("background",t||"")}}if(e){var h=new t.zui.Color(e);o=h.toCssStr().toLowerCase(),r&&(t.isFunction(r)?r(o,a,s):a.css({background:o,color:h.contrast().toCssStr(),borderColor:h.luma()>.43?"#ccc":o})),s.colors[o]||s.addColor(h),i||s.$.val().toLowerCase()===o||s.$.val(o).trigger("change"),s.$menu.find('.cp-tile[data-color="'+o+'"]').addClass("active"),s.$.tooltip("hide"),s.$.trigger("colorchange",h)}else r&&(t.isFunction(r)?r(null,a,s):a.attr("style",null)),i||""===s.$.val()||s.$.val(o).trigger("change"),n.optional&&s.$.tooltip("hide"),s.$menu.find(".cp-tile.empty").addClass("active"),s.$.trigger("colorchange",null);n.updateBorder&&t(n.updateBorder).css("border-color",o),n.updateBackground&&t(n.updateBackground).css("background-color",o),n.updateColor&&t(n.updateColor).css("color",o),n.updateText&&t(n.updateText).text(o)},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=s[a].errorTip),t.fn.tooltip||(i.btnTip=!1),this.options=i},t.fn.colorPicker=function(i){return this.each(function(){var s=t(this),a=s.data(e),o="object"==typeof i&&i;a||s.data(e,a=new n(this,o)),"string"==typeof i&&a[i]()})},t.fn.colorPicker.Constructor=n,t(function(){t('[data-provide="colorpicker"]').colorPicker()})}(jQuery),function(t,e){function i(t){return t===e&&(t=s++),n[t%n.length]}var s=0,n=["#00a9fc","#ff5d5d","#fdc137","#00da88","#7ec5ff","#8666b8","#bd7b46","#ff9100","#ff3d00","#f57f17","#00e5ff","#00b0ff","#2979ff","#3d5afe","#651fff","#d500f9","#f50057","#ff1744"];jQuery.fn.tableChart=function(){t(this).each(function(){var e=t(this),s=e.data(),n=s.chart||"pie",a=t(s.target);if(a.length){var o=null;if("pie"===n){s=t.extend({scaleShowLabels:!0,scaleLabel:"<%=label%>: <%=value%>"},s);var r=[],l=e.find("tbody > tr").each(function(e){var s=t(this),n=i(e);s.attr("data-id",e).find(".chart-color-dot").css("color",n),r.push({label:s.find(".chart-label").text(),value:parseInt(s.find(".chart-value").text()),color:n,id:e})});r.length>1?s.scaleLabelPlacement="outside":1===r.length&&(s.scaleLabelPlacement="inside",r.push({label:"",value:r[0].value/2e3,color:"#fff",showLabel:!1})),o=a.pieChart(r,s),a.on("mousemove",function(t){var e=o.getSegmentsAtEvent(t);l.removeClass("active"),e.length&&l.filter('[data-id="'+e[0].id+'"]').addClass("active")})}else if("bar"===n){var h=[],c={label:e.find("thead .chart-label").text(),color:i(),data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);h.push(i.find(".chart-label").text()),c.data.push(parseInt(i.find(".chart-value").text()))}),r={labels:h,datasets:[c]};h.length&&(s.barValueSpacing=5),o=a.barChart(r,s)}else if("line"===n){var h=[],c={label:e.find("thead .chart-label").text(),color:i(),data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);h.push(i.find(".chart-label").text()),c.data.push(parseInt(i.find(".chart-value").text()))}),r={labels:h,datasets:[c]};h.length&&(s.barValueSpacing=5),o=a.lineChart(r,s)}null!==o&&e.data("zui.chart",o)}})},jQuery.fn.progressPie=function(i){t(this).each(function(){var s=t(this),n=s.is("canvas")?s:s.find("canvas"),a=t.extend({value:0,color:"#4CAF50",backColor:"#ddd",doughnut:!0,doughnutSize:85,width:20,height:20,showTip:!1,name:"",tipTemplate:"<%=value%>%",animation:!1},i,s.data()),o=n.length;o||(n=t("").appendTo(s)),n.attr("width")!==e?a.width=n.attr("width"):n.attr("width",a.width),n.attr("height")!==e?a.height=n.attr("height"):n.attr("height",a.height),o||8!=t.zui.browser.ie||G_vmlCanvasManager.initElement(n[0]),a.value=Math.max(0,Math.min(100,a.value));var r=[{value:a.value,label:a.name,color:a.color},{value:100-a.value,label:"",color:a.backColor}];n[a.doughnut?"doughnutChart":"pieChart"](r,t.extend({segmentShowStroke:!1,animation:a.animation,showTooltips:a.showTip,tooltipTemplate:a.tipTemplate,percentageInnerCutout:a.doughnutSize},a.chartOptions))})},t(function(){t(".table-chart").tableChart();var e=t(".progress-pie");e.length>100?setTimeout(function(){e.progressPie()},1e3):e.progressPie()})}(jQuery,void 0),function(t){jQuery.fn.sparkline=function(e){t(this).each(function(){var i=t(this),s=t.extend({values:i.attr("values"),width:i.width()-4,height:i.height()-4},i.data(),e),n=s.height,a=[],o=s.width,r=s.values.split(","),l=0;for(var h in r){var c=parseFloat(r[h]);NaN!=c&&(a.push(c),l=Math.max(c,l))}var d=Math.min(l,30),u=(Math.ceil(l/d),Math.min(o,Math.max(10,a.length*o/30))),p=i.children("canvas");p.length||(i.append(' '),p=i.children("canvas")),p.attr("width",u).attr("height",n);var f={labels:a,datasets:[{fillColor:"rgba(0,0,255,0.05)",strokeColor:"#0054EC",pointColor:"rgba(255,136,0,1)",pointStrokeColor:"#fff",data:a}]},g={animation:!0,scaleOverride:!0,scaleStepWidth:Math.ceil(l/10),scaleSteps:10,scaleStartValue:0,showScale:!1,showTooltips:!1,pointDot:!1,scaleShowGridLines:!1,datasetStrokeWidth:1},m=t(p).lineChart(f,g);i.data("sparklineChart",m)})},t(function(){t(".sparkline").sparkline()})}(jQuery),function(t){t(function(){t.fn.fixedDate=function(){return t(this).each(function(){var e=t(this);e.offset().top+200>t(document.body).height()&&e.attr("data-picker-position","top-right"),"0000-00-00"==e.val()&&e.focus(function(){"0000-00-00"==e.val()&&e.val("").datetimepicker("update")}).blur(function(){""==e.val()&&e.val("0000-00-00")})})};var e={language:t("html").attr("lang"),weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:2,forceParse:0,showMeridian:1,format:"yyyy-mm-dd hh:ii",startDate:"1970-1-1"},i=t.extend({},e,{minView:2,format:"yyyy-mm-dd"}),s=t.extend({},e,{startView:1,minView:0,maxView:1,format:"hh:ii"});t(".datepicker-wrapper").click(function(){t(this).find(".form-date, .form-datetime, .form-time").datetimepicker("show").focus()}),window.datepickerOptions=e,t.fn.datepicker=function(e){return this.datetimepicker(t.extend({},i,e))},t.fn.timepicker=function(e){return this.datetimepicker(t.extend({},s,e));
-},t.fn.datepickerAll=function(){return this.find(".form-datetime").fixedDate().datetimepicker(e),this.find(".form-date").fixedDate().datepicker(),this.find(".form-time").fixedDate().timepicker(),this},t("body").datepickerAll()})}(jQuery),function(t){var e=function(e,i){i=t.extend({idStart:0,idEnd:9,chosen:!0,datetimepicker:!0,colorPicker:!0,hotkeys:!0},i,e.data());var s=e.find(".template");!s.length&&i.template&&(s=t(i.template));var n=0,a=0,o=function(t){t.is("select.chosen")?t.next(".chosen-container").find("input").focus():t.focus()},r=function(t){var i=e.find("[data-ctrl-index]:focus,.chosen-container-active").first();if(i.length){if(i.is(".chosen-container-active")){if(i.hasClass("chosen-with-drop")&&("down"===t||"up"===t))return;i=i.prev("select.chosen")}var s=i.data("ctrlIndex"),r=i.closest("tr").data("row");"down"===t?r0?r-=1:r=a-1:"left"===t?s>0?s-=1:s=n-1:"right"===t&&(s ").html(r);l.attr("data-row",e).addClass(s.attr("class")).removeClass("template"),i.rowCreator&&i.rowCreator(l,e,i),o?o.after(l):h.append(l),t.fn.chosen&&i.chosen&&l.find(".chosen").chosen(t.isPlainObject(i.chosen)?i.chosen:null),t.fn.datetimepicker&&i.datetimepicker&&l.datepickerAll(t.isPlainObject(i.datetimepicker)?i.datetimepicker:null),t.fn.colorPicker&&i.colorPicker&&l.find("input.colorpicker").colorPicker(t.isPlainObject(i.colorPicker)?i.colorPicker:null);var d=0;return l.find('input[type!="hidden"],textarea,select').each(function(){var e=t(this);e.parent().hasClass("chosen-search")||e.attr("data-ctrl-index",d++)}),n=Math.max(n,d),l};t.extend(l,{createRow:d,template:c});for(var u=i.idStart;u<=i.idEnd;++u)d(u)}e.on("click",".btn-copy",function(){var e=t(this),i=t(e.data("copyFrom")).val(),s=t(e.data("copyTo")).val(i).addClass("highlight");setTimeout(function(){s.removeClass("highlight")},2e3)}),i.hotkeys&&t(document).on("keydown",function(t){var e={"Ctrl+#37":"left","Ctrl+#39":"right","#38":"up","#40":"down","Ctrl+#38":"up","Ctrl+#40":"down"},i=[];t.ctrlKey&&i.push("Ctrl"),i.push("#"+t.keyCode);var s=e[i.join("+")];s&&(r(s),t.ctrlKey&&(t.stopPropagation(),t.preventDefault()))}),e.data("zui.batchActionForm",l)};t.fn.batchActionForm=function(i){return this.each(function(){e(t(this),i)})}}(jQuery),function(t,e){"use strict";var i="zui.table",s={zh_cn:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1} "},zh_tw:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1} "},en:{selectedItems:"Seleted {0} items",attrTotal:"{0} total {1} "}},n=function(e,a){var o=this;o.name=i;var r=o.$=t(e);a=o.options=t.extend({},n.DEFAULTS,this.$.data(),a);var l=a.lang||"zh_cn";o.lang=t.isPlainObject(l)?t.extend(!0,{},s[l.lang||t.zui.clientLang()],l):s[l];var h=o.$table=r.is("table")?r:r.find("table");o.$header=h.find("thead"),o.$footer=r.find(".table-footer");var c=o.$form=r.is("form")?r:r.find("form");a.checkable&&(r.on("click",".check-all",function(){o.checkAll(!t(this).hasClass("checked"))}).on("click","tbody>tr",function(){o.checkRow(t(this))}).on("click",'tbody input[type="checkbox"]',function(e){e.stopPropagation();var i=t(this);o.checkRow(i.closest("tr"),i.is(":checked"))}).on("click","tbody a,.btn",function(t){t.stopPropagation()}),a.selectable&&r.selectable(t.extend({},{selector:"tbody>tr",selectClass:"",trigger:".c-id",clickBehavior:"multi",listenClick:!1,select:function(t){o.checkRow(t.target,!0)},unselect:function(t){o.checkRow(t.target,!1)},rangeStyle:{border:"1px solid #006af1",backgroundColor:"rgba(50, 128, 252, 0.2)",borderRadius:"2px"}},t.isPlainObject(a.selectable)?a.selectable:null))),c.length&&(a.ajaxForm?c.ajaxForm(t.isPlainObject(a.ajaxForm)?a.ajaxForm:null):c.on("click","[data-form-action]",function(){c.attr("action",t(this).data("formAction")).submit()})),(a.fixFooter||a.fixHeader)&&(o.pageFooterHeight=t("#footer").outerHeight(),o.updateFixUI(),t(window).on("scroll resize",function(){o.updateFixUI()})),o.$statistic=r.find(".table-statistic"),o.defaultStatistic=o.$statistic.html(),o.updateStatistic()};n.prototype.updateStatistic=function(){var i=this,s=i.$statistic;if(s.length){i.defaultStatistic===e&&(i.defaultStatistic=s.html());var n=i.statisticCols;if(!n&&n!==!1){n={};var a=!1;i.$header.find("th").each(function(e){var i=t(this),s=i.data("statistic");s&&(a=!0,n[e]={format:s,name:i.text()})}),i.statisticCols=!!a&&n}var o=0;n&&t.each(n,function(t){n[t].total=0,n[t].checkedTotal=0}),i.$tbody.children("tr").each(function(e){var i=t(this),s=i.hasClass("checked"),a=i.children("td");s&&o++,n&&t.each(n,function(t){var e=parseFloat(a.eq(t).text());isNaN(e)&&(e=0),n[t].total+=e,s&&(n[t].checkedTotal+=e)})});var r=[];if(o)r.push(i.lang.selectedItems.format(o));else if(i.defaultStatistic)return void s.html(i.defaultStatistic);n&&t.each(n,function(t){var e=n[t],s=e[o?"checkedTotal":"total"];e.format&&(s=e.format.format(s)),r.push(i.lang.attrTotal.format(e.name,s))}),s.html(r.join(", "))}},n.prototype.updateFixUI=function(t){var e=this,i=(new Date).getTime();return!t&&(e.lastUpdateCall&&clearTimeout(e.lastUpdateCall),!e.lastUpdateTime||i-e.lastUpdateTime<100)?void(e.lastUpdateCall=setTimeout(function(){e.updateFixUI(!0)},30)):(e.lastUpdateTime=i,e.lastUpdateCall&&(clearTimeout(e.lastUpdateCall),e.lastUpdateCall=null),e.options.fixHeader&&e.fixHeader(),void(e.options.fixFooter&&e.fixFooter()))},n.prototype.fixHeader=function(){var e=this,i=e.$header,s=i[0].getBoundingClientRect(),n=e.options.fixFooter,a=t.isFunction(n)?n(s,i):s.top<("number"==typeof n?n:-5),o=e.$.find("table.fixed-header-copy");if(a){o.length||(o=t('').addClass(e.$table.attr("class")).append(i.clone()).insertAfter(e.$table)),o.css({top:0,left:s.left,position:"fixed",width:s.width});var r=o.find("th");i.find("th").each(function(e){r.eq(e).css("width",t(this).outerWidth())})}else o.remove()},n.prototype.fixFooter=function(){var e=this,i=e.$footer,s=e.$.find("tbody")[0].getBoundingClientRect(),n=e.options.fixFooter;i.toggleClass("fixed-footer",!!a);var a=t.isFunction(n)?n(s,i):s.bottom>window.innerHeight-50-("number"==typeof n?n:e.pageFooterHeight||5);i.toggleClass("fixed-footer",!!a),a?i.css({bottom:e.pageFooterHeight,left:s.left,width:s.width}):i.css({width:""})},n.prototype.checkAll=function(e){var i=this,s=i.$.find("tbody>tr");s.each(function(){i.checkRow(t(this),e,!0)}),i.updateCheckUI()},n.prototype.checkRow=function(t,i,s){var n=t.find('input[type="checkbox"]');i===e&&(i=!n.is(":checked")),t.toggleClass("checked",i),n.prop("checked",i),s||this.updateCheckUI()},n.prototype.updateCheckUI=function(){var e=this.$.find("tbody>tr"),i=!1,s=null,n=0,a=!1,o=e.length;e.each(function(e){var r=t(this);a=r.hasClass("checked"),r.toggleClass("row-check-begin",a&&!i),s&&s.toggleClass("row-check-end",!a&&i),a&&(n+=1),s=r,i=a,o===e+1&&r.toggleClass("row-check-end",a)}),this.$.toggleClass("has-row-checked",n>0).find(".check-all").toggleClass("checked",n===o),this.updateStatistic()},n.DEFAULTS={checkable:!0,ajaxForm:!1,selectable:!0,fixHeader:!0,fixFooter:!0},t.fn.table=function(e){return this.each(function(){var s=t(this),a=s.data(i),o="object"==typeof e&&e;a||s.data(i,a=new n(this,o)),"string"==typeof e&&a[e]()})},n.NAME=i,t.fn.table.Constructor=n,t(function(){t('[data-ride="table"]').table()})}(jQuery,void 0),function(t,e,i){t.fn._ajaxForm=t.fn.ajaxForm;var s={timeout:e.config?e.config.timeout:0,dataType:"json",errControlStyle:{borderColor:"#D2322D"}},n="";t.fn.enableForm=function(e){return e===i&&(e=!0),this.each(function(){var i=t(this);i.find('[type="submit"]').attr("disabled",e?null:"disabled"),i.hasClass("load-indicator")&&i.toggleClass("loading",!e)})};var a=function(e,i,s){"string"==typeof i&&(s=i,i=null),s=s||"show",t.zui.messager?t.zui.messager[s](e,i):alert(e)};t.ajaxForm=function(o,r){var l=t(o);if(l.length>1)return l.each(function(){t.ajaxForm(this,r)});t.isFunction(r)&&(r={complete:r}),r=t.extend({},s,l.data(),r);var h=r.beforeSubmit,c=r.error,d=r.success,u=r.finish;delete r.finish,delete r.success,delete r.onError,delete r.beforeSubmit;var p=r.errControlStyle;delete r.errControlStyle,r=t.extend({beforeSubmit:function(s,a,o){if(l.enableForm(!1),(h&&h(s,a,o))!==!1){var c={},d=a.find('[type="file"]');c.fileapi=d.length&&d[0].files!==i,c.formdata=e.FormData!==i;var u=c.fileapi&&a.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),p=u.length,f="multipart/form-data",g=a.attr("enctype")==f||a.attr("encoding")==f,m=c.fileapi&&c.formdata,v=(p||g)&&!m;v&&(""==n&&(n=r.url),r.url!=n&&(r.url=n),r.url=r.url.indexOf("&")>=0?r.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":r.url+"?HTTP_X_REQUESTED_WITH=XMLHttpRequest")}},success:function(i,s,n){if(l.enableForm(),(d&&d(i,s,n,l))!==!1){try{"string"==typeof i&&(i=JSON.parse(i))}catch(o){}if("object"!=typeof i)return i?alert(i):a("No response.","danger");var h=r.responser?t(r.responser):l.find(".form-responser");h.length||(h=t("#responser"));var c=i.message;if("success"===i.result){if(c){var f=l.find('[type="submit"]'),g=!1;f.length&&(f.popover({container:"body",trigger:"manual",content:c,tipClass:"popover-in-modal popover-success text-success",placement:i.placement||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){f.popover("destroy")},r.popoverTime||2e3),g=!0),h.length&&(h.html(''+c+" ").show().delay(3e3).fadeOut(100),g=!0),g||a(c,"success")}if(u)return u(i,!0,l);if((r.closeModal||i.closeModal)&&setTimeout(t.zui.closeModal,r.closeModalTime||2e3),i.callback){var m=e[i.callback];if(t.isFunction(m)&&m()===!1)return}var v=r.locate||i.locate;if(v)if("loadInModal"==v){var y=t(".modal");setTimeout(function(){y.load(y.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else{var b="reload"==v?e.location.href:v;setTimeout(function(){e.location.href=b},1200)}var w=r.ajaxReload||i.ajaxReload;if(w){var _=t(w);_.length&&_.load(e.location.href+" "+w,function(){_.find('[data-toggle="modal"]').modalTrigger()})}}else{if("string"==typeof c)h.length?h.html(''+c+" ").show().delay(3e3).fadeOut(100):a(c,"danger");else if("object"==typeof c){var x=!1,C=[];t.each(c,function(e,i){var s=t.isArray(i)?i.join(";"):i,n=t("#"+e);if(!n.length)return void C.push(s);var a=e+"Label",o=t("#"+a);if(!o.length){var r=n.closest(".input-group").length;o=t('
').appendTo(r?n.closest(".input-group").parent():n.parent())}o.empty().append(s),n.css(p).addClass("has-error");var l=function(){var e=t("#"+a);if(e.length)return e.remove(),n.removeAttr("style").removeClass("has-error"),!0};n.on("change input mousedown",l);var h=t("#"+e+"_chosen");h.length&&h.find(".chosen-single").css(p).addClass("has-error").on("mousedown",function(){l()===!0&&t(this).removeAttr("style").removeClass("has-error")}),x||(n.focus(),x=!0)}),C.length&&a(C.join(";"),"danger")}if(u)return u(i,!1,l)}}},error:function(t,i,s){if((c&&c(t,i,s,l))!==!1){l.enableForm();var n="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+s;a(n,"danger")}}},r),l._ajaxForm(r),l.on("click","[data-form-action]",function(){l.attr("action",t(this).data("formAction")).submit()})},t.fn.ajaxForm=function(e){return this.each(function(){t.ajaxForm(this,e)})},t.fn.setInputRequired=function(){return this.each(function(){var e=t(this),i=e.parent();i.is(".input-control")?i.addClass("required"):e.is(".chosen")&&e.next(".chosen-container").addClass("required")})},t(function(){t('.form-ajax,form[data-type="ajax"]').ajaxForm(),t("input[required],select[required]").setInputRequired()})}(jQuery,window,void 0),function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i ').append(a)),e.$menu.append(a),e.$menu.removeClass("loading")},error:function(){e.$menu.removeClass("loading").append('
'+(i.errorText||window.lang&&window.lang.timeout)+"
")}},i.ajax))},s.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoView({behavior:"smooth"})},s.prototype.getItems=function(){return this.$.find(this.options.selector)},s.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},s.prototype.search=function(e){var s=this,n=void 0===e||null===e||""===e,a=s.getItems().removeClass("active");if(n)a.removeClass("hidden");else{var o=t.trim(e).split(" ");a.each(function(){var e=t(this),s=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(o,s))})}s.scrollTo(a.not(".hidden").first().addClass("active"))},s.DEFAULTS={selector:".list-group a",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof i&&i;a||n.data(e,a=new s(this,o)),"string"==typeof i&&a[i]()})},s.NAME=e,t.fn.searchList.Constructor=s,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(s,n){var a=this;a.name=e;a.$=t(s);n=a.options=t.extend({},i.DEFAULTS,this.$.data(),n),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),""!==t&&"0"!==t&&this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,s=e.$wrapper;if(!s){if(i.wrapper)s=t(i.wrapper);else{var n=e.$.next();s=n.hasClass(".label-selector")?n:t('
')}s.parent().length||e.$.after(s),e.$wrapper=s,s.on("click",".label",function(){e.select(t(this).data("value"))})}s.empty();var a=e.$.val();e.$.children("option").each(function(){var e=t(this),n={label:e.text(),value:e.val()},o=t(i.labelTemplate||'
');i.labelCreator?o=i.labelCreator(o):(o.data("option",n).attr("data-value",n.value),""!==n.value&&"0"!==n.value||n.label?o.text(n.label).toggleClass("active",a===n.value):o.addClass("empty").append('
')),s.append(o)})},i.DEFAULTS={},t.fn.labelSelector=function(s){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof s&&s;a||n.data(e,a=new i(this,o)),"string"==typeof s&&a[s]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput";const i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776};var s=t.formatBytes=function(t,e,s){return void 0===e&&(e=2),s||(s=t
o.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(o.fileSizeError.format(s(o.fileMaxSize)))),r.update()}),r.update()};a.prototype.getFile=function(){return this.$input.prop("files")[0]},a.prototype.update=function(t){var e=this,i=e.$,n=e.getFile(),a=!n;i.toggleClass("normal",!a).toggleClass("empty",a),n?(e.oldName=n.name,i.find(".file-title").text(n.name).attr("title",n.name),i.find(".file-size").text(s(n.size)),i.find(".file-editbox").val(n.name).attr("size",n.name.length),e.options.onSelect&&e.options.onSelect(n,e)):i.find(".file-editbox").val("")},a.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var s=t(this),n=s.data(e),o="object"==typeof i&&i;n||s.data(e,n=new a(this,o)),"string"==typeof i&&n[i]()})},a.NAME=e,t.fn.fileInput.Constructor=a,t(function(){t('[data-provide="fileInput"]').fileInput()});var o=function(i,s){var n=this;n.name=e;var a=n.$=t(i);s=n.options=t.extend({},o.DEFAULTS,this.$.data(),s),n.$template=a.find(".file-input").detach(),n.add()};o.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},o.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(i){return this.each(function(){var s=t(this),n=s.data(e),a="object"==typeof i&&i;n||s.data(e,n=new o(this,a)),"string"==typeof i&&n[i]()})},o.NAME=e,t.fn.fileInputList.Constructor=o,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(t,e,s,n,a){if(n||(n=config.defaultView),a||(a=!1),s)for(s=s.split("&"),i=0;i'+d+"")}}t.val()||(time=e(a.format("hh:mm")),time=time-time%10+10,t.val(s(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var o=t(this),r=t.extend({},i,o.data()),l=o.find('[name="begin"],.control-time-begin'),h=o.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(o.find(".hide-empty-begin").toggleClass("hide",!t),t){const i=s(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(o.data("timeSpanControlInit")){if(r.begin){const d=n(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){const u=n(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),a(l,r.begin),a(h,r.end),o.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:s,initTimeSelect:a,createTime:n},t.fn.blockTodoes=function(){return this.each(function(){var e=t(this),i=e.find("form"),s=i.find('[name="title"]'),n=function(t){void 0===t&&(t=!e.hasClass("show-form")),e.toggleClass("show-form",t),t&&setTimeout(function(){s.focus()},50)};e.on("click",".todo-form-trigger",function(){n(t(this).data("trigger"))}),i.timeSpanControl({onChange:function(t){t.trigger("chosen:updated")}})})},t(function(){t(".block-todoes").blockTodoes()});var o=t("#searchTypeMenu"),r=t("#searchType"),l=function(e){e||(e=r.val()),e=e||"bug",r.val(e),o.find("li.selected").removeClass("selected");var i=o.find('a[data-value="'+e+'"]'),s=i.text();i.parent().addClass("selected"),t("#searchTypeName").text(s)};l(),o.on("click","a[data-value]",function(){l(t(this).data("value"))}),t.chosenDefaultOptions={disable_search_threshold:1,width:"100%",allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0},t.chosenSimpleOptions=t.extend({},t.chosenDefaultOptions,{disable_search_threshold:6}),t.fn._chosen=t.fn.chosen,t.fn.chosen=function(e){return this.each(function(){var i=t(this);return i._chosen(t.extend({},i.hasClass("chosen-simple")?t.chosenSimpleOptions:t.chosenDefaultOptions,e))})},t(function(){t(".chosen").each(function(){var e=t(this);e.closest(".template").length||e.chosen()})}),t.extend(t.fn.pager.Constructor.DEFAULTS,{maxNavCount:8,prevIcon:"icon-angle-left",nextIcon:"icon-angle-right",navEllipsisItem:"…",menuDirection:"dropup",pageSizeOptions:[5,10,15,20,25,30,35,40,45,50,100,200,500,1e3,2e3],elements:["total_text","size_menu","prev_icon","nav","next_icon"],onPageChange:function(t,e){console.log("onPageChange",t,e),t.recPerPage!==e.recPerPage&&(window.location.href=this.createLink())}}),t.zui.Messager.DEFAULTS.cssClass="messagger-zt",t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var h=function(e,i){var s=t(e);i=t.extend({},s.data(),i);var n=s.find(".histories-list"),a=!0,o=!1;s.on("click",".btn-reverse",function(){n.children("li").reverseOrder(),a=!a,t(this).find(".icon").toggleClass("icon-arrow-up",a).toggleClass("icon-arrow-down",!a)}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");o=!o,e.toggleClass("icon-plus",!o).toggleClass("icon-minus",o),n.children("li").toggleClass("show-changes",o)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),s=e.find(".icon"),n=s.hasClass("icon-code");s.toggleClass("icon-code",!n).toggleClass("icon-text",n),e.attr("title",n?i.original:i.textdiff),e.closest("li").toggleClass("show-original",n)}),n.find(".btn-strip").attr("title",i.original);var r=s.find(".modal-comment").modal({show:!1,backdrop:!1,position:function(t){var e=n[0].getBoundingClientRect(),i=t.$element.find(".modal-dialog"),s=i.outerWidth(),a=i.outerHeight();return{top:Math.min(window.innerHeight-a,e.top-40),left:e.left+e.width-s,margin:0}}});s.on("click",".btn-comment",function(){r.modal("toggle")}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=s.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,s){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})};t.fn.histories=function(t){return this.each(function(){h(this,t)})},t(function(){t(".histories").histories()});var c=0,d=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var s=t("main");if(void 0===e)e=s.hasClass("hide-sidebar");else if(e&&!s.hasClass("hide-sidebar"))return;s.toggleClass("hide-sidebar",!e),clearTimeout(c),e&&(i.addClass("showing"),c=setTimeout(function(){i.removeClass("showing")},210)),t.zui.store.set(d,e)}};var u=function(){var e=t("#sidebar");if(e.length&&!e.data("init")){d="sidebar:"+(e.data("id")||config.module+"/"+config.method);var i=t("main");i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var s=t.zui.store.get(d,e.data("hide")!==!1);return e.addClass("no-animate"),t.toggleSidebar(s),setTimeout(function(){e.removeClass("no-animate")},500),e.data("init",1),!0}};u()||t(u),t.toggleQueryBox=function(e){var i=t("#queryBox");i.length&&(void 0===e&&(e=!i.hasClass("show")),i.toggleClass("show",!!e),i.data("init")||(i.addClass("load-indicator loading").data("init",1),t.get(t.createLink("search","buildForm"),function(t){i.html(t).removeClass("loading")})),t(".querybox-toggle").toggleClass("querybox-opened",e))},t(function(){var e=t("#queryBox");e.length&&(t(document).on("click",".querybox-toggle",function(){t.toggleQueryBox()}),e.hasClass("show")&&t.toggleQueryBox(!0))}),t.extend(t.fn.colorPicker.Constructor.DEFAULTS,{colors:["#3DA7F5","#75C941","#2DBDB2","#797EC9","#FFAF38","#FF4E3E"]}),t("a.iframe").modalTrigger({type:"iframe"});var p=function(){var e,i,s=t(this),n=t.extend({limitSize:40,suffix:"…"},s.data()),a=s.text();if(a.length>n.limitSize){e=a,i=a.substr(0,n.limitSize)+n.suffix,s.text(i).addClass("limit-text-on");var o=n.toggleBtn?t(n.toggleBtn):s.next(".text-limit-toggle");o.text(o.data("textExpand")),o.on("click",function(){var t=s.toggleClass("limit-text-on").hasClass("limit-text-on");s.text(t?i:e),o.text(o.data(t?"textExpand":"textCollapse"))})}};t.fn.textLimit=function(){return this.each(p)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e){t(e).scroll(function(){var e=t(this).find(".table-fixed-head").size()>0;if(!e&&(t(this).css("position","relative"),1==t(this).find("table").size())){var i=""+t(this).find("table thead").html()+"
";t(this).prepend(i);var s=t(this).find("table.table-fixed-head");s.addClass(t(this).find("table:last").attr("class"));var n=t(this).find("table:last thead th");s.find("thead th").each(function(t){s.find("thead th").eq(t).width(n.eq(t).width())})}t(this).find("table.table-fixed-head").css("top",t(this).scrollTop())})}}(jQuery);
\ No newline at end of file
+!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).closest("form").ajaxSubmit(i))}function i(e){var i=e.target,s=t(i);if(!s.is("[type=submit],[type=image]")){var n=s.closest("[type=submit]");if(0===n.length)return;i=n[0]}var a=i.form;if(a.clk=i,"image"===i.type)if(void 0!==e.offsetX)a.clk_x=e.offsetX,a.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var o=s.offset();a.clk_x=e.pageX-o.left,a.clk_y=e.pageY-o.top}else a.clk_x=e.pageX-i.offsetLeft,a.clk_y=e.pageY-i.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function s(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var n=/\r?\n/g,a={};a.fileapi=void 0!==t(' ').get(0).files,a.formdata=void 0!==window.FormData;var o=!!t.fn.prop;t.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e,i,n,r){function l(i){var s,n,a=t.param(i,e.traditional).split("&"),o=a.length,r=[];for(s=0;s',T).val(d.extraData[l].value).appendTo(C)[0]):o.push(h(' ',T).val(d.extraData[l]).appendTo(C)[0]));d.iframeTarget||g.appendTo(S),m.attachEvent?m.attachEvent("onload",r):m.addEventListener("load",r,!1),setTimeout(t,15);try{C.submit()}catch(h){document.createElement("form").submit.apply(C)}}finally{C.setAttribute("action",i),C.setAttribute("enctype",a),e?C.setAttribute("target",e):p.removeAttr("target"),h(o).remove()}}function r(t){if(!y.aborted&&!$){if((z=n(m))||(s("cannot access response document"),t=M),t===D&&y)return y.abort("timeout"),void k.reject(y,"timeout");if(t===M&&y)return y.abort("server abort"),void k.reject(y,"error","server abort");if(z&&z.location.href!==d.iframeSrc||_){m.detachEvent?m.detachEvent("onload",r):m.removeEventListener("load",r,!1);var e,i="success";try{if(_)throw"timeout";var a="xml"===d.dataType||z.XMLDocument||v.isXMLDoc(z);if(s("isXml="+a),!a&&window.opera&&(null===z.body||!z.body.innerHTML)&&--E)return s("requeing onLoad callback, DOM not available"),void setTimeout(r,250);var o=z.body?z.body:z.documentElement;y.responseText=o?o.innerHTML:null,y.responseXML=z.XMLDocument?z.XMLDocument:z,a&&(d.dataType="xml"),y.getResponseHeader=function(t){return{"content-type":d.dataType}[t.toLowerCase()]},o&&(y.status=Number(o.getAttribute("status"))||y.status,y.statusText=o.getAttribute("statusText")||y.statusText);var l=(d.dataType||"").toLowerCase(),h=/(json|script|text)/.test(l);if(h||d.textarea){var c=z.getElementsByTagName("textarea")[0];if(c)y.responseText=c.value,y.status=Number(c.getAttribute("status"))||y.status,y.statusText=c.getAttribute("statusText")||y.statusText;else if(h){var p=z.getElementsByTagName("pre")[0],f=z.getElementsByTagName("body")[0];p?y.responseText=p.textContent?p.textContent:p.innerText:f&&(y.responseText=f.textContent?f.textContent:f.innerText)}}else"xml"===l&&!y.responseXML&&y.responseText&&(y.responseXML=I(y.responseText));try{L=U(y,l,d)}catch(v){i="parsererror",y.error=e=v||i}}catch(v){s("error caught: ",v),i="error",y.error=e=v||i}y.aborted&&(s("upload aborted"),i=null),y.status&&(i=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===i?(d.success&&d.success.call(d.context,L,"success",y),k.resolve(y.responseText,"success",y),u&&v.event.trigger("ajaxSuccess",[y,d])):i&&(void 0===e&&(e=y.statusText),d.error&&d.error.call(d.context,y,i,e),k.reject(y,"error",e),u&&v.event.trigger("ajaxError",[y,d,e])),u&&v.event.trigger("ajaxComplete",[y,d]),u&&!--v.active&&v.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,y,i),$=!0,d.timeout&&clearTimeout(x),setTimeout(function(){d.iframeTarget?g.attr("src",d.iframeSrc):g.remove(),y.responseXML=null},100)}}}var l,h,d,u,f,g,m,y,b,w,_,x,C=p[0],k=t.Deferred();if(k.abort=function(t){y.abort(t)},i)for(h=0;h ',T)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=g[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var e="timeout"===t?"timeout":"aborted";s("aborting upload... "+e),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(i){}g.attr("src",d.iframeSrc),y.error=e,d.error&&d.error.call(d.context,y,e,t),u&&i.event.trigger("ajaxError",[y,d,e]),d.complete&&d.complete.call(d.context,y,e)}},(u=d.global)&&0==t.active++&&t.event.trigger("ajaxStart"),u&&t.event.trigger("ajaxSend",[y,d]),d.beforeSend&&!1===d.beforeSend.call(d.context,y,d))return d.global&&t.active--,k.reject(),k;if(y.aborted)return k.reject(),k;(b=C.clk)&&(w=b.name)&&!b.disabled&&(d.extraData=d.extraData||{},d.extraData[w]=b.value,"image"===b.type&&(d.extraData[w+".x"]=C.clk_x,d.extraData[w+".y"]=C.clk_y));var D=1,M=2,P=t("meta[name=csrf-token]").attr("content"),F=t("meta[name=csrf-param]").attr("content");F&&P&&(d.extraData=d.extraData||{},d.extraData[F]=P),d.forceSync?a():setTimeout(a,10);var L,z,$,E=50,I=t.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!==e.documentElement.nodeName?e:null},A=t.parseJSON||function(t){return window.eval("("+t+")")},U=function(e,i,s){var n=e.getResponseHeader("content-type")||"",a=("xml"===i||!i)&&n.indexOf("xml")>=0,o=a?e.responseXML:e.responseText;return a&&"parsererror"===o.documentElement.nodeName&&t.error&&t.error("parsererror"),s&&s.dataFilter&&(o=s.dataFilter(o,i)),"string"==typeof o&&(("json"===i||!i)&&n.indexOf("json")>=0?o=A(o):("script"===i||!i)&&n.indexOf("javascript")>=0&&t.globalEval(o)),o};return k}if(!this.length)return s("ajaxSubmit: skipping submit process - no element selected"),this;var c,d,u,p=this;"function"==typeof e?e={success:e}:"string"==typeof e||!1===e&&arguments.length>0?(e={url:e,data:i,dataType:n},"function"==typeof r&&(e.success=r)):void 0===e&&(e={}),c=e.method||e.type||this.attr2("method"),(u=(u="string"==typeof(d=e.url||this.attr2("action"))?t.trim(d):"")||window.location.href||"")&&(u=(u.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:u,success:t.ajaxSettings.success,type:c||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var f={};if(this.trigger("form-pre-serialize",[this,e,f]),f.veto)return s("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&!1===e.beforeSerialize(this,e))return s("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var g=e.traditional;void 0===g&&(g=t.ajaxSettings.traditional);var m,v=[],y=this.formToArray(e.semantic,v,e.filtering);if(e.data){var b=t.isFunction(e.data)?e.data(y):e.data;e.extraData=b,m=t.param(b,g)}if(e.beforeSubmit&&!1===e.beforeSubmit(y,this,e))return s("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[y,this,e,f]),f.veto)return s("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var w=t.param(y,g);m&&(w=w?w+"&"+m:m),"GET"===e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+w,e.data=null):e.data=w;var _=[];if(e.resetForm&&_.push(function(){p.resetForm()}),e.clearForm&&_.push(function(){p.clearForm(e.includeHidden)}),!e.dataType&&e.target){var x=e.success||function(){};_.push(function(i,s,n){var a=arguments,o=e.replaceTarget?"replaceWith":"html";t(e.target)[o](i).each(function(){x.apply(this,a)})})}else e.success&&(t.isArray(e.success)?t.merge(_,e.success):_.push(e.success));if(e.success=function(t,i,s){for(var n=e.context||this,a=0,o=_.length;a0,S="multipart/form-data",D=p.attr("enctype")===S||p.attr("encoding")===S,M=a.fileapi&&a.formdata;s("fileAPI :"+M);var P,F=(T||D)&&!M;!1!==e.iframe&&(e.iframe||F)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){P=h(y)}):P=h(y):P=(T||D)&&M?function(i){for(var s=new FormData,n=0;n0)&&(n={url:n,data:a,dataType:o},"function"==typeof r&&(n.success=r)),n=n||{},n.delegation=n.delegation&&t.isFunction(t.fn.on),!n.delegation&&0===this.length){var l={s:this.selector,c:this.context};return!t.isReady&&l.s?(s("DOM not ready, queuing ajaxForm"),t(function(){t(l.s,l.c).ajaxForm(n)}),this):(s("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return n.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,n,e).on("click.form-plugin",this.selector,n,i),this):this.ajaxFormUnbind().on("submit.form-plugin",n,e).on("click.form-plugin",n,i)},t.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i,s){var n=[];if(0===this.length)return n;var o,r=this[0],l=this.attr("id"),h=e||void 0===r.elements?r.getElementsByTagName("*"):r.elements;if(h&&(h=t.makeArray(h)),l&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=t(':input[form="'+l+'"]').get()).length&&(h=(h||[]).concat(o)),!h||!h.length)return n;t.isFunction(s)&&(h=t.map(h,s));var c,d,u,p,f,g,m;for(c=0,g=h.length;c '},add:{template:' '},edit:{template:' '},"delete":{template:' '}};a.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:' '},a.prototype.add=function(e,i,s,n,a){var o,r=t(e),l=this.options;if(r.is("li")?(o=r.children("ul"),o.length||(o=t(""),r.append(o),this._initList(o,r))):o=r,o){var h=this;t.isArray(i)||(i=[i]),t.each(i,function(e,i){var s=t(" ").data(i).appendTo(o);void 0!==i.id&&s.attr("data-id",i.id);var n=l.itemWrapper?t(l.itemWrapper===!0?'
':l.itemWrapper).appendTo(s):s;if(i.html)n.html(i.html);else if(t.isFunction(h.options.itemCreator)){var a=h.options.itemCreator(s,i);a!==!0&&a!==!1&&n.html(a)}else i.url?n.append(t(" ",{href:i.url}).text(i.title||i.name)):n.append(t(" ").text(i.title||i.name));h._initItem(s,i.idx||e,o,i),i.children&&i.children.length&&h.add(s,i.children)}),this._initList(o),s&&!o.hasClass("tree")&&h.expand(o.parent("li"),n,a)}},a.prototype.reload=function(e){var i=this;e&&(i.$.empty(),i.add(i.$,e)),i.isPreserve&&i.store.time&&i.$.find("li:not(.tree-action-item)").each(function(){var e=t(this);i[i.store[e.data("id")]?"expand":"collapse"](e,!0,!0)})},a.prototype._initList=function(s,n,a,o){var r=this;s.hasClass("tree")?(a=0,n=null):(n=(n||s.closest("li")).addClass("has-list"),n.find(".list-toggle").length||n.prepend(this.options.toggleTemplate),a=a||n.data("idx"));var l=s.attr("data-idx",a||0).children("li:not(.tree-action-item)").each(function(e){r._initItem(t(this),e+1,s)});1!==l.length||l.find("ul").length||l.addClass("tree-single-item"),o=o||(n?n.data():null);var h=e(o?o.actions:null,this.actions);if(h){if(h.add&&h.add.templateInList!==!1){var c=s.children("li.tree-action-item");c.length?c.detach().appendTo(s):t(' ').append(i(h.add,"add",h.add.templateInList)).appendTo(s)}h.sort&&s.sortable(t.extend({dragCssClass:"tree-drag-holder",trigger:".sort-handler",selector:"li:not(.tree-action-item)",finish:function(t){r.callEvent("action",{action:h.sort,$list:s,target:t.target,item:o})}},h.sort.options,t.isPlainObject(this.options.sortable)?this.options.sortable:null))}n&&(n.hasClass("open")||o&&o.open)&&n.addClass("open in")},a.prototype._initItem=function(s,n,a,o){if(void 0===n){var r=s.prev("li");n=r.length?r.data("idx")+1:1}if(a=a||s.closest("ul"),s.attr("data-idx",n).removeClass("tree-single-item"),!s.data("id")){var l=n;a.hasClass("tree")||(l=a.parent("li").data("id")+"-"+l),s.attr("data-id",l)}o=o||s.data();var h=e(o.actions,this.actions);if(h){var c=s.find(".tree-actions");c.length||(c=t('
').appendTo(this.options.itemWrapper?s.find(".tree-item-wrapper"):s),t.each(h,function(t,e){e&&c.append(i(e,t))}))}var d=s.children("ul");d.length&&this._initList(d,s,n,o)},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.$);var o=i.initialState,r=t.zui&&t.zui.store&&t.zui.store.enable;r&&(this.selector=s+"::"+(i.name||"")+"#"+(this.$.attr("id")||n++),this.store=t.zui.store[i.name?"get":"pageGet"](this.selector,{})),"preserve"===o&&(r?this.isPreserve=!0:this.options.initialState=o="normal"),this.reload(i.data),r&&(this.isPreserve=!0),"expand"===o?this.expand():"collapse"===o&&this.collapse(),this.$.on("click",'.list-toggle,a[href="#"],.tree-toggle',function(e){var i=t(this),s=i.parent("li");a.callEvent("hit",{target:s,item:s.data()}),a.toggle(s),i.is("a")&&e.preventDefault()}).on("click",".tree-action",function(){var e=t(this),i=e.data();if(i.action&&(i=i.action),"sort"!==i.type){var s=e.closest("li:not(.tree-action-item)");a.callEvent("action",{action:i,target:this,$item:s,item:s.data()})}})},a.prototype.preserve=function(e,i,s){if(this.isPreserve)if(e)i=i||e.data("id"),s=void 0===s&&e.hasClass("open"),s?this.store[i]=s:delete this.store[i],this.store.time=(new Date).getTime(),t.zui.store[this.options.name?"set":"pageSet"](this.selector,this.store);else{var n=this;this.store={},this.$.find("li").each(function(){n.preserve(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(e,i,s){var n=this;e.each(function(){var e=t(this);if(n.expand(e,i,s),e)for(var a=e.parent("ul");a&&a.length&&!a.hasClass("tree");){var o=a.parent("li");o.length?(n.expand(o,i,s),a=o.parent("ul")):a=!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 s=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=s.toData(a)),t.isFunction(i)?i(n,e):n}).get()},a.prototype.callEvent=function(e,i){var s;return t.isFunction(this.options[e])&&(s=this.options[e](i,this)),this.$.trigger(t.Event(e+"."+this.name,i)),s},t.fn.tree=function(e,i){return this.each(function(){var n=t(this),o=n.data(s),r="object"==typeof e&&e;o||n.data(s,o=new a(this,r)),"string"==typeof e&&o[e](i)})},t.fn.tree.Constructor=a,t(function(){t('[data-ride="tree"]').tree()})}(jQuery),function(t){"use strict";var e="zui.colorPicker",i='
',s={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},n=function(i,s){this.name=e,this.$=t(i),this.getOptions(s),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",updateBtn:"auto"},n.prototype.init=function(){var e=this,s=e.options,n=e.$,a=n.parent(),o=!1;a.hasClass("colorpicker")?e.$picker=a:(e.$picker=t(s.template||i),o=!0),e.$picker.addClass(s.wrapper).find(".cp-title").toggle(void 0!==s.title).text(s.title),e.$menu=e.$picker.find(".dropdown-menu").toggleClass("pull-right",s.pullMenuRight),e.$btn=e.$picker.find(".btn.dropdown-toggle"),e.$btn.find(".ic").addClass("icon-"+s.icon),s.btnTip&&e.$picker.attr("data-toggle","tooltip").tooltip({title:s.btnTip,placement:s.tooltip,container:"body"}),n.attr("data-provide",null),o&&n.after(e.$picker),e.colors={},t.each(s.colors,function(i,s){if(t.zui.Color.isColor(s)){var n=new t.zui.Color(s);e.colors[n.toCssStr()]=n}}),e.updateColors(),e.$picker.on("click",".cp-tile",function(){e.setValue(t(this).data("color"))});var r=function(){var i=n.val(),a=t.zui.Color.isColor(i);n.parent().toggleClass("has-error",!(a||s.optional&&""===i)),a?e.setValue(i,!0):s.optional&&""===i?n.tooltip("hide"):n.is(":focus")||n.tooltip("show",s.errorTip)};n.is("input:not([type=hidden])")?(s.tooltip&&n.attr("data-toggle","tooltip").tooltip({trigger:"manual",placement:s.tooltip,tipClass:"tooltip-danger",container:"body"}),n.on("keyup paste input change",r)):n.appendTo(e.$picker),r()},n.prototype.addColor=function(e){e instanceof t.zui.Color||(e=new t.zui.Color(e));var i=e.toCssStr(),s=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:s.tileSize,height:s.tileSize}).append(n)),s.optional&&this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu)},n.prototype.updateColors=function(e){var i=(this.$picker,this.$menu.children("li:not(.heading)").remove()),s=this.options,e=e||this.colors,n=this,a=0;if(t.each(e,function(t,e){n.addColor(e),a++}),s.optional){var o=t(' ').css({width:s.tileSize,height:s.tileSize});this.$menu.append(o),a++}i.css("width",Math.min(a,s.lineCount)*s.tileSize+6)},n.prototype.setValue=function(e,i){var s=this,n=s.options,a=s.$btn;s.$menu.find(".cp-tile.active").removeClass("active");var o="",r=n.updateBtn;if("auto"===r){var l=a.find(".color-bar");r=!l.length||function(t){l.css("background",t||"")}}if(e){var h=new t.zui.Color(e);o=h.toCssStr().toLowerCase(),r&&(t.isFunction(r)?r(o,a,s):a.css({background:o,color:h.contrast().toCssStr(),borderColor:h.luma()>.43?"#ccc":o})),s.colors[o]||s.addColor(h),i||s.$.val().toLowerCase()===o||s.$.val(o).trigger("change"),s.$menu.find('.cp-tile[data-color="'+o+'"]').addClass("active"),s.$.tooltip("hide"),s.$.trigger("colorchange",h)}else r&&(t.isFunction(r)?r(null,a,s):a.attr("style",null)),i||""===s.$.val()||s.$.val(o).trigger("change"),n.optional&&s.$.tooltip("hide"),s.$menu.find(".cp-tile.empty").addClass("active"),s.$.trigger("colorchange",null);n.updateBorder&&t(n.updateBorder).css("border-color",o),n.updateBackground&&t(n.updateBackground).css("background-color",o),n.updateColor&&t(n.updateColor).css("color",o),n.updateText&&t(n.updateText).text(o)},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=s[a].errorTip),t.fn.tooltip||(i.btnTip=!1),this.options=i},t.fn.colorPicker=function(i){return this.each(function(){var s=t(this),a=s.data(e),o="object"==typeof i&&i;a||s.data(e,a=new n(this,o)),"string"==typeof i&&a[i]()})},t.fn.colorPicker.Constructor=n,t(function(){t('[data-provide="colorpicker"]').colorPicker()})}(jQuery),function(t,e){function i(t){return t===e&&(t=s+=2),n[t%n.length]}var s=0,n=["#00a9fc","#ff5d5d","#fdc137","#00da88","#7ec5ff","#8666b8","#bd7b46","#ff9100","#ff3d00","#f57f17","#00e5ff","#00b0ff","#2979ff","#3d5afe","#651fff","#d500f9","#f50057","#ff1744"];jQuery.fn.tableChart=function(){t(this).each(function(){var e=t(this),s=e.data(),n=s.chart||"pie",a=t(s.target);if(a.length){var o=null;if("pie"===n){s=t.extend({scaleShowLabels:!0,scaleLabel:"<%=label%>: <%=value%>"},s);var r=[],l=e.find("tbody > tr").each(function(e){var s=t(this),n=i();s.attr("data-id",e).find(".chart-color-dot").css("background",n),r.push({label:s.find(".chart-label").text(),value:parseInt(s.find(".chart-value").text()),color:n,id:e})});r.length>1?s.scaleLabelPlacement="outside":1===r.length&&(s.scaleLabelPlacement="inside",r.push({label:"",value:r[0].value/2e3,color:"#fff",showLabel:!1})),o=a.pieChart(r,s),a.on("mousemove",function(t){var e=o.getSegmentsAtEvent(t);l.removeClass("active"),e.length&&l.filter('[data-id="'+e[0].id+'"]').addClass("active")})}else if("bar"===n){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(parseInt(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(s.barValueSpacing=5),o=a.barChart(r,s)}else if("line"===n){var h=i(),c=[],d={label:e.find("thead .chart-label").text(),color:h,data:[]},l=e.find("tbody > tr").each(function(e){var i=t(this);c.push(i.find(".chart-label").text()),d.data.push(parseInt(i.find(".chart-value").text())),i.find(".chart-color-dot").css("background",h)}),r={labels:c,datasets:[d]};c.length&&(s.barValueSpacing=5),o=a.lineChart(r,s)}null!==o&&e.data("zui.chart",o)}})},jQuery.fn.progressPie=function(i){t(this).each(function(){var s=t(this),n=s.is("canvas")?s:s.find("canvas"),a=t.extend({value:0,color:"#4CAF50",backColor:"#ddd",doughnut:!0,doughnutSize:85,width:20,height:20,showTip:!1,name:"",tipTemplate:"<%=value%>%",animation:!1},i,s.data()),o=n.length;o||(n=t("").appendTo(s)),n.attr("width")!==e?a.width=n.attr("width"):n.attr("width",a.width),n.attr("height")!==e?a.height=n.attr("height"):n.attr("height",a.height),o||8!=t.zui.browser.ie||G_vmlCanvasManager.initElement(n[0]),a.value=Math.max(0,Math.min(100,a.value));var r=[{value:a.value,label:a.name,color:a.color},{value:100-a.value,label:"",color:a.backColor}];n[a.doughnut?"doughnutChart":"pieChart"](r,t.extend({segmentShowStroke:!1,animation:a.animation,showTooltips:a.showTip,tooltipTemplate:a.tipTemplate,percentageInnerCutout:a.doughnutSize},a.chartOptions))})},t(function(){t(".table-chart").tableChart();var e=t(".progress-pie");e.length>100?setTimeout(function(){e.progressPie()},1e3):e.progressPie()})}(jQuery,void 0),function(t){jQuery.fn.sparkline=function(e){t(this).each(function(){var i=t(this),s=t.extend({values:i.attr("values"),width:i.width()-4,height:i.height()-4},i.data(),e),n=s.height,a=[],o=s.width,r=s.values.split(","),l=0;for(var h in r){var c=parseFloat(r[h]);NaN!=c&&(a.push(c),l=Math.max(c,l))}var d=Math.min(l,30),u=(Math.ceil(l/d),Math.min(o,Math.max(10,a.length*o/30))),p=i.children("canvas");p.length||(i.append(' '),p=i.children("canvas")),p.attr("width",u).attr("height",n);var f={labels:a,datasets:[{fillColor:"rgba(0,0,255,0.05)",strokeColor:"#0054EC",pointColor:"rgba(255,136,0,1)",pointStrokeColor:"#fff",data:a}]},g={animation:!0,scaleOverride:!0,scaleStepWidth:Math.ceil(l/10),scaleSteps:10,scaleStartValue:0,showScale:!1,showTooltips:!1,pointDot:!1,scaleShowGridLines:!1,datasetStrokeWidth:1},m=t(p).lineChart(f,g);i.data("sparklineChart",m)})},t(function(){t(".sparkline").sparkline()})}(jQuery),function(t){t(function(){t.fn.fixedDate=function(){return t(this).each(function(){var e=t(this);e.offset().top+200>t(document.body).height()&&e.attr("data-picker-position","top-right"),"0000-00-00"==e.val()&&e.focus(function(){"0000-00-00"==e.val()&&e.val("").datetimepicker("update")}).blur(function(){""==e.val()&&e.val("0000-00-00")})})};var e={language:t("html").attr("lang"),weekStart:1,todayBtn:1,autoclose:1,todayHighlight:1,startView:2,forceParse:0,showMeridian:1,format:"yyyy-mm-dd hh:ii",startDate:"1970-1-1"},i=t.extend({},e,{minView:2,format:"yyyy-mm-dd"}),s=t.extend({},e,{startView:1,minView:0,maxView:1,format:"hh:ii"});t(".datepicker-wrapper").click(function(){t(this).find(".form-date, .form-datetime, .form-time").datetimepicker("show").focus()}),window.datepickerOptions=e,t.fn.datepicker=function(e){
+return this.datetimepicker(t.extend({},i,e))},t.fn.timepicker=function(e){return this.datetimepicker(t.extend({},s,e))},t.fn.datepickerAll=function(){return this.find(".form-datetime").fixedDate().datetimepicker(e),this.find(".form-date").fixedDate().datepicker(),this.find(".form-time").fixedDate().timepicker(),this},t("body").datepickerAll()})}(jQuery),function(t){var e=function(e,i){i=t.extend({idStart:0,idEnd:9,chosen:!0,datetimepicker:!0,colorPicker:!0,hotkeys:!0},i,e.data());var s=e.find(".template");!s.length&&i.template&&(s=t(i.template));var n=0,a=0,o=function(t){t.is("select.chosen")?t.next(".chosen-container").find("input").focus():t.focus()},r=function(t){var i=e.find("[data-ctrl-index]:focus,.chosen-container-active").first();if(i.length){if(i.is(".chosen-container-active")){if(i.hasClass("chosen-with-drop")&&("down"===t||"up"===t))return;i=i.prev("select.chosen")}var s=i.data("ctrlIndex"),r=i.closest("tr").data("row");"down"===t?r0?r-=1:r=a-1:"left"===t?s>0?s-=1:s=n-1:"right"===t&&(s ").html(r);l.attr("data-row",e).addClass(s.attr("class")).removeClass("template"),i.rowCreator&&i.rowCreator(l,e,i),o?o.after(l):h.append(l),t.fn.chosen&&i.chosen&&l.find(".chosen").chosen(t.isPlainObject(i.chosen)?i.chosen:null),t.fn.datetimepicker&&i.datetimepicker&&l.datepickerAll(t.isPlainObject(i.datetimepicker)?i.datetimepicker:null),t.fn.colorPicker&&i.colorPicker&&l.find("input.colorpicker").colorPicker(t.isPlainObject(i.colorPicker)?i.colorPicker:null);var d=0;return l.find('input[type!="hidden"],textarea,select').each(function(){var e=t(this);e.parent().hasClass("chosen-search")||e.attr("data-ctrl-index",d++)}),n=Math.max(n,d),l};t.extend(l,{createRow:d,template:c});for(var u=i.idStart;u<=i.idEnd;++u)d(u)}e.on("click",".btn-copy",function(){var e=t(this),i=t(e.data("copyFrom")).val(),s=t(e.data("copyTo")).val(i).addClass("highlight");setTimeout(function(){s.removeClass("highlight")},2e3)}),i.hotkeys&&t(document).on("keydown",function(t){var e={"Ctrl+#37":"left","Ctrl+#39":"right","#38":"up","#40":"down","Ctrl+#38":"up","Ctrl+#40":"down"},i=[];t.ctrlKey&&i.push("Ctrl"),i.push("#"+t.keyCode);var s=e[i.join("+")];s&&(r(s),t.ctrlKey&&(t.stopPropagation(),t.preventDefault()))}),e.data("zui.batchActionForm",l)};t.fn.batchActionForm=function(i){return this.each(function(){e(t(this),i)})}}(jQuery),function(t,e){"use strict";var i="zui.table",s={zh_cn:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1} "},zh_tw:{selectedItems:"已选择 {0} 项",attrTotal:"{0}总计 {1} "},en:{selectedItems:"Seleted {0} items",attrTotal:"{0} total {1} "}},n=function(e,a){var o=this;o.name=i;var r=o.$=t(e);a=o.options=t.extend({},n.DEFAULTS,this.$.data(),a);var l=a.lang||"zh_cn";o.lang=t.isPlainObject(l)?t.extend(!0,{},s[l.lang||t.zui.clientLang()],l):s[l];var h=o.$table=r.is("table")?r:r.find("table");o.$header=h.find("thead"),o.$footer=r.find(".table-footer");var c=o.$form=r.is("form")?r:r.find("form");a.checkable&&(r.on("click",".check-all",function(){o.checkAll(!t(this).hasClass("checked"))}).on("click","tbody>tr",function(){o.checkRow(t(this))}).on("click",'tbody input[type="checkbox"]',function(e){e.stopPropagation();var i=t(this);o.checkRow(i.closest("tr"),i.is(":checked"))}).on("click","tbody a,.btn",function(t){t.stopPropagation()}),a.selectable&&r.selectable(t.extend({},{selector:"tbody>tr",selectClass:"",trigger:".c-id",clickBehavior:"multi",listenClick:!1,select:function(t){o.checkRow(t.target,!0)},unselect:function(t){o.checkRow(t.target,!1)},rangeStyle:{border:"1px solid #006af1",backgroundColor:"rgba(50, 128, 252, 0.2)",borderRadius:"2px"}},t.isPlainObject(a.selectable)?a.selectable:null))),c.length&&(a.ajaxForm?c.ajaxForm(t.isPlainObject(a.ajaxForm)?a.ajaxForm:null):c.on("click","[data-form-action]",function(){c.attr("action",t(this).data("formAction")).submit()})),(a.fixFooter||a.fixHeader)&&(o.pageFooterHeight=t("#footer").outerHeight(),o.updateFixUI(),t(window).on("scroll resize",function(){o.updateFixUI()})),o.$statistic=r.find(".table-statistic"),o.defaultStatistic=o.$statistic.html(),o.updateStatistic()};n.prototype.updateStatistic=function(){var i=this,s=i.$statistic;if(s.length){i.defaultStatistic===e&&(i.defaultStatistic=s.html());var n=i.statisticCols;if(!n&&n!==!1){n={};var a=!1;i.$header.find("th").each(function(e){var i=t(this),s=i.data("statistic");s&&(a=!0,n[e]={format:s,name:i.text()})}),i.statisticCols=!!a&&n}var o=0;n&&t.each(n,function(t){n[t].total=0,n[t].checkedTotal=0}),i.$tbody.children("tr").each(function(e){var i=t(this),s=i.hasClass("checked"),a=i.children("td");s&&o++,n&&t.each(n,function(t){var e=parseFloat(a.eq(t).text());isNaN(e)&&(e=0),n[t].total+=e,s&&(n[t].checkedTotal+=e)})});var r=[];if(o)r.push(i.lang.selectedItems.format(o));else if(i.defaultStatistic)return void s.html(i.defaultStatistic);n&&t.each(n,function(t){var e=n[t],s=e[o?"checkedTotal":"total"];e.format&&(s=e.format.format(s)),r.push(i.lang.attrTotal.format(e.name,s))}),s.html(r.join(", "))}},n.prototype.updateFixUI=function(t){var e=this,i=(new Date).getTime();return!t&&(e.lastUpdateCall&&clearTimeout(e.lastUpdateCall),!e.lastUpdateTime||i-e.lastUpdateTime<100)?void(e.lastUpdateCall=setTimeout(function(){e.updateFixUI(!0)},30)):(e.lastUpdateTime=i,e.lastUpdateCall&&(clearTimeout(e.lastUpdateCall),e.lastUpdateCall=null),e.options.fixHeader&&e.fixHeader(),void(e.options.fixFooter&&e.fixFooter()))},n.prototype.fixHeader=function(){var e=this,i=e.$header,s=i[0].getBoundingClientRect(),n=e.options.fixFooter,a=t.isFunction(n)?n(s,i):s.top<("number"==typeof n?n:-5),o=e.$.find("table.fixed-header-copy");if(a){o.length||(o=t('').addClass(e.$table.attr("class")).append(i.clone()).insertAfter(e.$table)),o.css({top:0,left:s.left,position:"fixed",width:s.width});var r=o.find("th");i.find("th").each(function(e){r.eq(e).css("width",t(this).outerWidth())})}else o.remove()},n.prototype.fixFooter=function(){var e=this,i=e.$footer,s=e.$.find("tbody")[0].getBoundingClientRect(),n=e.options.fixFooter;i.toggleClass("fixed-footer",!!a);var a=t.isFunction(n)?n(s,i):s.bottom>window.innerHeight-50-("number"==typeof n?n:e.pageFooterHeight||5);i.toggleClass("fixed-footer",!!a),a?i.css({bottom:e.pageFooterHeight,left:s.left,width:s.width}):i.css({width:""})},n.prototype.checkAll=function(e){var i=this,s=i.$.find("tbody>tr");s.each(function(){i.checkRow(t(this),e,!0)}),i.updateCheckUI()},n.prototype.checkRow=function(t,i,s){var n=t.find('input[type="checkbox"]');i===e&&(i=!n.is(":checked")),t.toggleClass("checked",i),n.prop("checked",i),s||this.updateCheckUI()},n.prototype.updateCheckUI=function(){var e=this.$.find("tbody>tr"),i=!1,s=null,n=0,a=!1,o=e.length;e.each(function(e){var r=t(this);a=r.hasClass("checked"),r.toggleClass("row-check-begin",a&&!i),s&&s.toggleClass("row-check-end",!a&&i),a&&(n+=1),s=r,i=a,o===e+1&&r.toggleClass("row-check-end",a)}),this.$.toggleClass("has-row-checked",n>0).find(".check-all").toggleClass("checked",n===o),this.updateStatistic()},n.DEFAULTS={checkable:!0,ajaxForm:!1,selectable:!0,fixHeader:!0,fixFooter:!0},t.fn.table=function(e){return this.each(function(){var s=t(this),a=s.data(i),o="object"==typeof e&&e;a||s.data(i,a=new n(this,o)),"string"==typeof e&&a[e]()})},n.NAME=i,t.fn.table.Constructor=n,t(function(){t('[data-ride="table"]').table()})}(jQuery,void 0),function(t,e,i){t.fn._ajaxForm=t.fn.ajaxForm;var s={timeout:e.config?e.config.timeout:0,dataType:"json",errControlStyle:{borderColor:"#D2322D"}},n="";t.fn.enableForm=function(e){return e===i&&(e=!0),this.each(function(){var i=t(this);i.find('[type="submit"]').attr("disabled",e?null:"disabled"),i.hasClass("load-indicator")&&i.toggleClass("loading",!e)})};var a=function(e,i,s){"string"==typeof i&&(s=i,i=null),s=s||"show",t.zui.messager?t.zui.messager[s](e,i):alert(e)};t.ajaxForm=function(o,r){var l=t(o);if(l.length>1)return l.each(function(){t.ajaxForm(this,r)});t.isFunction(r)&&(r={complete:r}),r=t.extend({},s,l.data(),r);var h=r.beforeSubmit,c=r.error,d=r.success,u=r.finish;delete r.finish,delete r.success,delete r.onError,delete r.beforeSubmit;var p=r.errControlStyle;delete r.errControlStyle,r=t.extend({beforeSubmit:function(s,a,o){if(l.enableForm(!1),(h&&h(s,a,o))!==!1){var c={},d=a.find('[type="file"]');c.fileapi=d.length&&d[0].files!==i,c.formdata=e.FormData!==i;var u=c.fileapi&&a.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),p=u.length,f="multipart/form-data",g=a.attr("enctype")==f||a.attr("encoding")==f,m=c.fileapi&&c.formdata,v=(p||g)&&!m;v&&(""==n&&(n=r.url),r.url!=n&&(r.url=n),r.url=r.url.indexOf("&")>=0?r.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":r.url+"?HTTP_X_REQUESTED_WITH=XMLHttpRequest")}},success:function(i,s,n){if(l.enableForm(),(d&&d(i,s,n,l))!==!1){try{"string"==typeof i&&(i=JSON.parse(i))}catch(o){}if("object"!=typeof i)return i?alert(i):a("No response.","danger");var h=r.responser?t(r.responser):l.find(".form-responser");h.length||(h=t("#responser"));var c=i.message;if("success"===i.result){if(c){var f=l.find('[type="submit"]'),g=!1;f.length&&(f.popover({container:"body",trigger:"manual",content:c,tipClass:"popover-in-modal popover-success text-success",placement:i.placement||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){f.popover("destroy")},r.popoverTime||2e3),g=!0),h.length&&(h.html(''+c+" ").show().delay(3e3).fadeOut(100),g=!0),g||a(c,"success")}if(u)return u(i,!0,l);if((r.closeModal||i.closeModal)&&setTimeout(t.zui.closeModal,r.closeModalTime||2e3),i.callback){var m=e[i.callback];if(t.isFunction(m)&&m()===!1)return}var v=r.locate||i.locate;if(v)if("loadInModal"==v){var y=t(".modal");setTimeout(function(){y.load(y.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else{var b="reload"==v?e.location.href:v;setTimeout(function(){e.location.href=b},1200)}var w=r.ajaxReload||i.ajaxReload;if(w){var _=t(w);_.length&&_.load(e.location.href+" "+w,function(){_.find('[data-toggle="modal"]').modalTrigger()})}}else{if("string"==typeof c)h.length?h.html(''+c+" ").show().delay(3e3).fadeOut(100):a(c,"danger");else if("object"==typeof c){var x=!1,C=[];t.each(c,function(e,i){var s=t.isArray(i)?i.join(";"):i,n=t("#"+e);if(!n.length)return void C.push(s);var a=e+"Label",o=t("#"+a);if(!o.length){var r=n.closest(".input-group").length;o=t('
').appendTo(r?n.closest(".input-group").parent():n.parent())}o.empty().append(s),n.css(p).addClass("has-error");var l=function(){var e=t("#"+a);if(e.length)return e.remove(),n.removeAttr("style").removeClass("has-error"),!0};n.on("change input mousedown",l);var h=t("#"+e+"_chosen");h.length&&h.find(".chosen-single").css(p).addClass("has-error").on("mousedown",function(){l()===!0&&t(this).removeAttr("style").removeClass("has-error")}),x||(n.focus(),x=!0)}),C.length&&a(C.join(";"),"danger")}if(u)return u(i,!1,l)}}},error:function(t,i,s){if((c&&c(t,i,s,l))!==!1){l.enableForm();var n="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+s;a(n,"danger")}}},r),l._ajaxForm(r),l.on("click","[data-form-action]",function(){l.attr("action",t(this).data("formAction")).submit()})},t.fn.ajaxForm=function(e){return this.each(function(){t.ajaxForm(this,e)})},t.fn.setInputRequired=function(){return this.each(function(){var e=t(this),i=e.parent();i.is(".input-control")?i.addClass("required"):e.is(".chosen")&&e.next(".chosen-container").addClass("required")})},t(function(){t('.form-ajax,form[data-type="ajax"]').ajaxForm(),t("input[required],select[required]").setInputRequired()})}(jQuery,window,void 0),function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i ').append(a)),e.$menu.append(a),e.$menu.removeClass("loading")},error:function(){e.$menu.removeClass("loading").append('
'+(i.errorText||window.lang&&window.lang.timeout)+"
")}},i.ajax))},s.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoView({behavior:"smooth"})},s.prototype.getItems=function(){return this.$.find(this.options.selector)},s.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},s.prototype.search=function(e){var s=this,n=void 0===e||null===e||""===e,a=s.getItems().removeClass("active");if(n)a.removeClass("hidden");else{var o=t.trim(e).split(" ");a.each(function(){var e=t(this),s=e.text()+" "+(e.data("key")||e.data("filter"));e.toggleClass("hidden",!i(o,s))})}s.scrollTo(a.not(".hidden").first().addClass("active"))},s.DEFAULTS={selector:".list-group a",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof i&&i;a||n.data(e,a=new s(this,o)),"string"==typeof i&&a[i]()})},s.NAME=e,t.fn.searchList.Constructor=s,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(s,n){var a=this;a.name=e;a.$=t(s);n=a.options=t.extend({},i.DEFAULTS,this.$.data(),n),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),""!==t&&"0"!==t&&this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,s=e.$wrapper;if(!s){if(i.wrapper)s=t(i.wrapper);else{var n=e.$.next();s=n.hasClass(".label-selector")?n:t('
')}s.parent().length||e.$.after(s),e.$wrapper=s,s.on("click",".label",function(){e.select(t(this).data("value"))})}s.empty();var a=e.$.val();e.$.children("option").each(function(){var e=t(this),n={label:e.text(),value:e.val()},o=t(i.labelTemplate||'
');i.labelCreator?o=i.labelCreator(o):(o.data("option",n).attr("data-value",n.value),""!==n.value&&"0"!==n.value||n.label?o.text(n.label).toggleClass("active",a===n.value):o.addClass("empty").append('
')),s.append(o)})},i.DEFAULTS={},t.fn.labelSelector=function(s){return this.each(function(){var n=t(this),a=n.data(e),o="object"==typeof s&&s;a||n.data(e,a=new i(this,o)),"string"==typeof s&&a[s]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput";const i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776};var s=t.formatBytes=function(t,e,s){return void 0===e&&(e=2),s||(s=t
o.fileMaxSize&&(h.val(""),(window.bootbox||window).alert(o.fileSizeError.format(s(o.fileMaxSize)))),r.update()}),r.update()};a.prototype.getFile=function(){return this.$input.prop("files")[0]},a.prototype.update=function(t){var e=this,i=e.$,n=e.getFile(),a=!n;i.toggleClass("normal",!a).toggleClass("empty",a),n?(e.oldName=n.name,i.find(".file-title").text(n.name).attr("title",n.name),i.find(".file-size").text(s(n.size)),i.find(".file-editbox").val(n.name).attr("size",n.name.length),e.options.onSelect&&e.options.onSelect(n,e)):i.find(".file-editbox").val("")},a.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var s=t(this),n=s.data(e),o="object"==typeof i&&i;n||s.data(e,n=new a(this,o)),"string"==typeof i&&n[i]()})},a.NAME=e,t.fn.fileInput.Constructor=a,t(function(){t('[data-provide="fileInput"]').fileInput()});var o=function(i,s){var n=this;n.name=e;var a=n.$=t(i);s=n.options=t.extend({},o.DEFAULTS,this.$.data(),s),n.$template=a.find(".file-input").detach(),n.add()};o.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},o.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(i){return this.each(function(){var s=t(this),n=s.data(e),a="object"==typeof i&&i;n||s.data(e,n=new o(this,a)),"string"==typeof i&&n[i]()})},o.NAME=e,t.fn.fileInputList.Constructor=o,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(t,e,s,n,a){if(n||(n=config.defaultView),a||(a=!1),s)for(s=s.split("&"),i=0;i'+d+"")}}t.val()||(time=e(a.format("hh:mm")),time=time-time%10+10,t.val(s(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var o=t(this),r=t.extend({},i,o.data()),l=o.find('[name="begin"],.control-time-begin'),h=o.find('[name="end"],.control-time-end'),c=function(){var t=l.val();if(o.find(".hide-empty-begin").toggleClass("hide",!t),t){const i=s(e(t)+30);h.find('option[value="'+i+'"]').length&&h.val(i),r.onChange&&r.onChange(h,i)}};if(o.data("timeSpanControlInit")){if(r.begin){const d=n(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){const u=n(r.end).format("hh:mm");h.find('option[value="'+u+'"]').length&&h.val(u),r.onChange&&r.onChange(h,u)}}else l.on("change",c),a(l,r.begin),a(h,r.end),o.data("timeSpanControlInit",!0);r.end||c()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:s,initTimeSelect:a,createTime:n},t.fn.blockTodoes=function(){return this.each(function(){var e=t(this),i=e.find("form"),s=i.find('[name="title"]'),n=function(t){void 0===t&&(t=!e.hasClass("show-form")),e.toggleClass("show-form",t),t&&setTimeout(function(){s.focus()},50)};e.on("click",".todo-form-trigger",function(){n(t(this).data("trigger"))}),i.timeSpanControl({onChange:function(t){t.trigger("chosen:updated")}})})},t(function(){t(".block-todoes").blockTodoes()});var o=t("#searchTypeMenu"),r=t("#searchType"),l=function(e){e||(e=r.val()),e=e||"bug",r.val(e),o.find("li.selected").removeClass("selected");var i=o.find('a[data-value="'+e+'"]'),s=i.text();i.parent().addClass("selected"),t("#searchTypeName").text(s)};l(),o.on("click","a[data-value]",function(){l(t(this).data("value"))}),t.chosenDefaultOptions={disable_search_threshold:1,width:"100%",allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0},t.chosenSimpleOptions=t.extend({},t.chosenDefaultOptions,{disable_search_threshold:6}),t.fn._chosen=t.fn.chosen,t.fn.chosen=function(e){return this.each(function(){var i=t(this);return i._chosen(t.extend({},i.hasClass("chosen-simple")?t.chosenSimpleOptions:t.chosenDefaultOptions,e))})},t(function(){t(".chosen").each(function(){var e=t(this);e.closest(".template").length||e.chosen()})}),t.extend(t.fn.pager.Constructor.DEFAULTS,{maxNavCount:8,prevIcon:"icon-angle-left",nextIcon:"icon-angle-right",navEllipsisItem:"…",menuDirection:"dropup",pageSizeOptions:[5,10,15,20,25,30,35,40,45,50,100,200,500,1e3,2e3],elements:["total_text","size_menu","prev_icon","nav","next_icon"],onPageChange:function(t,e){console.log("onPageChange",t,e),t.recPerPage!==e.recPerPage&&(window.location.href=this.createLink())}}),t.zui.Messager.DEFAULTS.cssClass="messagger-zt",t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var h=function(e,i){var s=t(e);i=t.extend({},s.data(),i);var n=s.find(".histories-list"),a=!0,o=!1;s.on("click",".btn-reverse",function(){n.children("li").reverseOrder(),a=!a,t(this).find(".icon").toggleClass("icon-arrow-up",a).toggleClass("icon-arrow-down",!a)}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");o=!o,e.toggleClass("icon-plus",!o).toggleClass("icon-minus",o),n.children("li").toggleClass("show-changes",o)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),s=e.find(".icon"),n=s.hasClass("icon-code");s.toggleClass("icon-code",!n).toggleClass("icon-text",n),e.attr("title",n?i.original:i.textdiff),e.closest("li").toggleClass("show-original",n)}),n.find(".btn-strip").attr("title",i.original);var r=s.find(".modal-comment").modal({show:!1,backdrop:!1,position:function(t){var e=n[0].getBoundingClientRect(),i=t.$element.find(".modal-dialog"),s=i.outerWidth(),a=i.outerHeight();return{top:Math.min(window.innerHeight-a,e.top-40),left:e.left+e.width-s,margin:0}}});s.on("click",".btn-comment",function(){r.modal("toggle")}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=s.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,s){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})};t.fn.histories=function(t){return this.each(function(){h(this,t)})},t(function(){t(".histories").histories()});var c=0,d=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var s=t("main");if(void 0===e)e=s.hasClass("hide-sidebar");else if(e&&!s.hasClass("hide-sidebar"))return;s.toggleClass("hide-sidebar",!e),clearTimeout(c),e&&(i.addClass("showing"),c=setTimeout(function(){i.removeClass("showing")},210)),t.zui.store.set(d,e)}};var u=function(){var e=t("#sidebar");if(e.length&&!e.data("init")){d="sidebar:"+(e.data("id")||config.module+"/"+config.method);var i=t("main");i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var s=t.zui.store.get(d,e.data("hide")!==!1);return e.addClass("no-animate"),t.toggleSidebar(s),setTimeout(function(){e.removeClass("no-animate")},500),e.data("init",1),!0}};u()||t(u),t.toggleQueryBox=function(e){var i=t("#queryBox");i.length&&(void 0===e&&(e=!i.hasClass("show")),i.toggleClass("show",!!e),i.data("init")||(i.addClass("load-indicator loading").data("init",1),t.get(t.createLink("search","buildForm"),function(t){i.html(t).removeClass("loading")})),t(".querybox-toggle").toggleClass("querybox-opened",e))},t(function(){var e=t("#queryBox");e.length&&(t(document).on("click",".querybox-toggle",function(){t.toggleQueryBox()}),e.hasClass("show")&&t.toggleQueryBox(!0))}),t.extend(t.fn.colorPicker.Constructor.DEFAULTS,{colors:["#3DA7F5","#75C941","#2DBDB2","#797EC9","#FFAF38","#FF4E3E"]}),t("a.iframe").modalTrigger({type:"iframe"});var p=function(){var e,i,s=t(this),n=t.extend({limitSize:40,suffix:"…"},s.data()),a=s.text();if(a.length>n.limitSize){e=a,i=a.substr(0,n.limitSize)+n.suffix,s.text(i).addClass("limit-text-on");var o=n.toggleBtn?t(n.toggleBtn):s.next(".text-limit-toggle");o.text(o.data("textExpand")),o.on("click",function(){var t=s.toggleClass("limit-text-on").hasClass("limit-text-on");s.text(t?i:e),o.text(o.data(t?"textExpand":"textCollapse"))})}};t.fn.textLimit=function(){return this.each(p)},t(function(){t(".text-limit").textLimit()}),t.fixedTableHead=window.fixedTableHead=function(e){t(e).scroll(function(){var e=t(this).find(".table-fixed-head").size()>0;if(!e&&(t(this).css("position","relative"),1==t(this).find("table").size())){var i=""+t(this).find("table thead").html()+"
";t(this).prepend(i);var s=t(this).find("table.table-fixed-head");s.addClass(t(this).find("table:last").attr("class"));var n=t(this).find("table:last thead th");s.find("thead th").each(function(t){s.find("thead th").eq(t).width(n.eq(t).width())})}t(this).find("table.table-fixed-head").css("top",t(this).scrollTop())})}}(jQuery);
\ No newline at end of file