From eee114b4d6ea828a3c58dcd27919268c31ea6ffb Mon Sep 17 00:00:00 2001 From: Catouse Date: Tue, 8 May 2018 10:58:19 +0800 Subject: [PATCH] * update zui files. --- module/common/view/datepicker.html.php | 54 ----- www/js/my.full.js | 289 ------------------------- www/js/zui/min.js | 4 +- www/theme/default/style.css | 54 ----- 4 files changed, 2 insertions(+), 399 deletions(-) diff --git a/module/common/view/datepicker.html.php b/module/common/view/datepicker.html.php index 02d2d3b5cd..4464ca81cf 100755 --- a/module/common/view/datepicker.html.php +++ b/module/common/view/datepicker.html.php @@ -1,55 +1 @@ getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> -app->getClientLang(); -if($config->debug) -{ - css::import($jsRoot . 'jquery/datetimepicker/min.css'); - js::import($jsRoot . 'jquery/datetimepicker/min.js'); -} -?> - diff --git a/www/js/my.full.js b/www/js/my.full.js index 1ed8f07fa5..d753ce8479 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -911,294 +911,6 @@ function isNum(s) return false; } -/** - * Set modal load content with ajax or iframe - * - * @access public - * @return void - */ -function setModal() -{ - jQuery.fn.modalTrigger = function(setting) - { - return $(this).each(function() - { - var $this = $(this); - $this.off('click.modalTrigger.zui'); - - $this.on('click.modalTrigger.zui', function(event) - { - var $e = $(this); - if($e.closest('.body-modal').length) return; - - if($e.hasClass('disabled')) return false; - - var url = (setting ? setting.url : false) || $e.attr('href') || $e.data('url'); - var type = (setting ? setting.type : false) || ($e.hasClass('iframe') ? 'iframe' : ($e.data('type') || 'ajax')); - if(type == 'iframe') - { - var options = $.extend( - { - url: url, - title: $e.attr('title') || $e.text(), - cssClass: $e.data('class'), - icon: '?', - center: true - }, setting, $e.data()); - - if(options.icon == '?') - { - var i = $e.find("[class^='icon-']"); - options.icon = i.length ? i.attr('class').substring(5) : 'file-text'; - } - - showIframeModal(options); - } - else - { - initModalFrame(); - $.get(url, function(data) - { - var options = $.extend( - { - width: 800, - title: $e.attr('title') || $e.text(), - icon: '?', - backdrop: 'static', - show: true - }, setting, $e.data()); - - var ajaxModal = $('#ajaxModal'); - if(data.indexOf('modal-dialog') < 0) - { - data = "".format($.extend({content: data}, options)); - } - ajaxModal.html(data); - - /* Set the width of modal dialog. */ - if(options.width) - { - var modalWidth = parseInt(options.width); - $ajaxModal.data('width', modalWidth).find('.modal-dialog').css('width', modalWidth); - ajustModalPosition(); - } - ajaxModal.modal(options); - }); - } - - /* Save the href to rel attribute thus we can save it. */ - $('#ajaxModal').attr('rel', url); - - event.preventDefault(); - return false; - }); - }); - } - - function showIframeModal(settings) - { - var options = - { - width: 800, - height: 'auto', - icon: '?', - title: '', - name: 'modalIframe', - cssClass: '', - headerless: false, - waittime: 0, - center: true, - backdrop: 'static', - show: true - }; - - if(typeof(settings) == 'string') - { - options.url = settings; - } - else - { - options = $.extend(options, settings); - } - - initModalFrame(options); - - if(isNum(options.height.toString())) options.height += 'px'; - if(isNum(options.width.toString())) options.width += 'px'; - if(options.size == 'fullscreen') - { - var $w = $(window); - options.width = $w.width(); - options.height = $w.height(); - options.cssClass += ' fullscreen'; - } - if(options.headerless) - { - options.cssClass += ' hide-header'; - } - if(typeof(options.url) == 'undefined' || !options.url) return false; - - var modal = $('#ajaxModal').addClass('modal-loading').data('first', true); - - modal.html("
".format(options)); - - var modalBody = modal.find('.modal-body'), dialog = modal.find('.modal-dialog'); - if(options.cssClass) - { - dialog.addClass(options.cssClass); - } - - if(options.waittime > 0) - { - options.waitingFuc = setTimeout(function(){showModal(options, modal, modalBody, dialog);}, options.waittime ); - } - - var frame = document.getElementById(options.name); - frame.onload = frame.onreadystatechange = function() - { - if(this.readyState && this.readyState != 'complete') return; - if(modal.data('first') && (!modal.hasClass('modal-loading'))) return; - if(!modal.data('first')) modal.addClass('modal-loading'); - - if(options.waittime > 0) - { - clearTimeout(options.waitingFuc); - } - showModal(options, modal, modalBody, dialog); - } - modal.modal(options); - } - - function showModal(options, modal, modalBody, dialog) - { - modalBody.css('height', options.height - modal.find('.modal-header').outerHeight()); - try - { - var frame$ = window.frames[options.name].$; - frame$(function() - { - if(frame$('#titlebar').length || frame$('.main-header').length || frame$('.modal-header').length || frame$('#mainMenu').length) - { - modal.addClass('with-titlebar'); - if(options.size == 'fullscreen') - { - modalBody.css('height', options.height); - } - } - - if(options.height == 'auto') - { - var $framebody = frame$('body'); - setTimeout(function() - { - modal.removeClass('fade'); - var fbH = $framebody.addClass('body-modal').outerHeight(); - frame$('#titlebar > .heading a').each(function() - { - var $a = frame$(this); - $a.replaceWith("" + $a.text() + ""); - }); - if(typeof fbH == 'object') fbH = $framebody.height(); - modalBody.css('height', fbH); - ajustModalPosition(); - if(modal.data('first')) modal.data('first', false); - modal.removeClass('modal-loading').addClass('fade'); - }, 100); - - $framebody.resize(function() - { - var fbH = $framebody.outerHeight(); - if(typeof fbH == 'object') fbH = $framebody.height(); - modalBody.css('height', fbH); - ajustModalPosition(); - }); - } - else - { - modal.removeClass('modal-loading'); - } - }) - - if(frame$) - { - frame$.extend({'closeModal': $.closeModal}); - } - } - catch(e) - { - modal.removeClass('modal-loading'); - } - } - - function initModalFrame(setting) - { - if($('#ajaxModal').length) - { - /* unbind all events */ - $('#ajaxModal').attr('class', 'modal fade').off('show.zui.modal shown.zui.modal hide.zui.modal hidden.zui.modal'); - } - else - { - /* Addpend modal div. */ - $('').appendTo('body'); - } - - $ajaxModal = $('#ajaxModal'); - $ajaxModal.data('cancel-reload', false); - - $.extend({'closeModal':function(callback, location) - { - $ajaxModal.on('hidden.zui.modal', function() - { - if(location && (!$ajaxModal.data('cancel-reload'))) - { - if(location == 'this') window.location.reload(); - else window.location = location; - } - if(callback && $.isFunction(callback)) callback(); - }); - $ajaxModal.modal('hide'); - }, 'cancelReloadCloseModal': function(){$ajaxModal.data('cancel-reload', true);}}); - - /* rebind events */ - if(!setting) return; - if(setting.afterShow && $.isFunction(setting.afterShow)) $ajaxModal.on('show.zui.modal', setting.afterShow); - if(setting.afterShown && $.isFunction(setting.afterShown)) $ajaxModal.on('shown.zui.modal', setting.afterShown); - if(setting.afterHide && $.isFunction(setting.afterHide)) $ajaxModal.on('hide.zui.modal', setting.afterHide); - if(setting.afterHidden && $.isFunction(setting.afterHidden)) $ajaxModal.on('hidden.zui.modal', setting.afterHidden); - } - - function ajustModalPosition(position, dialog) - { - position = position || 'fit'; - if(!dialog) dialog = $('#ajaxModal .modal-dialog'); - if(position) - { - var half = Math.max(0, ($(window).height() - dialog.outerHeight())/2); - var pos = position == 'fit' ? (half*2/3) : (position == 'center' ? half : position); - dialog.css('margin-top', pos); - } - } - - $.extend({ajustModalPosition: ajustModalPosition, modalTrigger: showIframeModal, colorbox: function(setting) - { - if((typeof setting == 'object') && setting.iframe) - { - $.modalTrigger({type: 'iframe', width: setting['width'], afterHide: setting['onCleanup'], url: setting['href']}); - } - }}); - - $('[data-toggle=modal], a.iframe').modalTrigger(); - - jQuery.fn.colorbox = function(setting) - { - if((typeof setting == 'object') && setting.iframe) - { - $(this).modalTrigger({type: 'iframe', width: setting['width'], afterHide: setting['onCleanup'], url: setting['href']}); - } - } -} - /** * Set modal for list page. * @@ -1962,7 +1674,6 @@ $(document).ready(function() if(typeof(config.onlybody) != 'undefined' && config.onlybody == 'yes') checkOnlybodyPage(); $('body').addClass('m-{currentModule}-{currentMethod}'.format(config)); - setModal(); setTableBehavior(); setForm(); saveWindowSize(); diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 58d81c178f..5c02b3ce22 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI: Zentao template - v1.8.1 - 2018-05-04 + * ZUI: Zentao template - v1.8.1 - 2018-05-08 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2018 cnezsoft.com; Licensed MIT @@ -63,4 +63,4 @@ function(){var t,e,i,s,n,a={}.hasOwnProperty,o=function(t,e){function i(){this.c * 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((L=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(L&&L.location.href!==d.iframeSrc||x){m.detachEvent?m.detachEvent("onload",r):m.removeEventListener("load",r,!1);var e,i="success";try{if(x)throw"timeout";var a="xml"===d.dataType||L.XMLDocument||v.isXMLDoc(L);if(s("isXml="+a),!a&&window.opera&&(null===L.body||!L.body.innerHTML)&&--E)return s("requeing onLoad callback, DOM not available"),void setTimeout(r,250);var o=L.body?L.body:L.documentElement;y.responseText=o?o.innerHTML:null,y.responseXML=L.XMLDocument?L.XMLDocument:L,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=L.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=L.getElementsByTagName("pre")[0],f=L.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{z=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,z,"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(_),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 z,L,$,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 x=[];if(e.resetForm&&x.push(function(){p.resetForm()}),e.clearForm&&x.push(function(){p.clearForm(e.includeHidden)}),!e.dataType&&e.target){var _=e.success||function(){};x.push(function(i,s,n){var a=arguments,o=e.replaceTarget?"replaceWith":"html";t(e.target)[o](i).each(function(){_.apply(this,a)})})}else e.success&&(t.isArray(e.success)?t.merge(x,e.success):x.push(e.success));if(e.success=function(t,i,s){for(var n=e.context||this,a=0,o=x.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?'
  • ').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+=1),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)}})};var a=function(i,s){var n=t(i),a=n.is("canvas")?n:n.find("canvas"),o=t.extend({value:0,color:"#006af1",backColor:"#E9F2FB",doughnut:!0,doughnutSize:85,width:20,height:20,showTip:!1,name:"",tipTemplate:"<%=value%>%",animation:"auto",realValue:parseFloat(n.find(".progress-value").text())},s,n.data()),r=a.length;r||(a=t("").appendTo(n)),a.attr("width")!==e?o.width=a.attr("width"):a.attr("width",o.width),a.attr("height")!==e?o.height=a.attr("height"):a.attr("height",o.height),r||8!=t.zui.browser.ie||G_vmlCanvasManager.initElement(a[0]),"auto"===o.animation&&(o.animation=o.width>30),o.value=Math.max(0,Math.min(100,o.value)),n.addClass("progress-pie-"+o.width);var l=[{value:o.value,label:o.name,color:o.color,circleBeginEnd:!0},{value:100-o.value,label:"",color:o.backColor}];a[o.doughnut?"doughnutChart":"pieChart"](l,t.extend({segmentShowStroke:!1,animation:o.animation,showTooltips:o.showTip,tooltipTemplate:o.tipTemplate,percentageInnerCutout:o.doughnutSize,reverseDrawOrder:!0,animationEasing:"easeInOutQuart",onAnimationProgress:o.realValue?function(t){n.find(".progress-value").text(Math.floor(o.realValue*t))}:e,onAnimationComplete:o.realValue?function(t){n.find(".progress-value").text(o.realValue)}:e},o.chartOptions))};jQuery.fn.progressPie=function(e){t(this).each(function(){var i=t(this),s=i.closest(".tab-pane");s.length&&!s.hasClass("active")?t('[data-toggle="tab"][data-target="#'+s.attr("id")+'"]').one("shown.zui.tab",function(){a(i,e)}):a(this,e)})},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"],tbody label[for]',function(e){e.stopPropagation();var i=t(this);i.is("label")&&(i=i.closest(".checkbox-primary").find('input[type="checkbox"]')),o.checkRow(i.closest("tr"),i.is(":checked"))}).on("click","tbody a,tbody .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()}).on("sidebar.toggle",function(){setTimeout(function(){o.updateFixUI()},200)})),(a.group||h.hasClass("table-grouped"))&&(h.on("click",".group-toggle",function(){o.toggleRowGroup(t(this).closest("tr").data("id"))}),t(document).on("click",".group-collapse-all",function(){o.toggleGroups(!1)}).on("click",".group-expand-all",function(){o.toggleGroups(!0)})),o.$statistic=r.find(".table-statistic"),o.defaultStatistic=o.$statistic.html(),o.updateStatistic()};n.prototype.toggleGroups=function(e){var i=this,s={};i.$.find("tbody>tr").each(function(n){var a=t(this).closest("tr").data("id");s[a]||i.toggleRowGroup(a,e)})},n.prototype.toggleRowGroup=function(i,s){var n=this.$.find('tbody>tr[data-id="'+i+'"]'),a=n.filter(".group-summary"),o=s===e?!a.hasClass("hidden"):!!s;n.not(".group-summary").toggleClass("hidden",!o),a.toggleClass("hidden",o),t("body").toggleClass("table-group-collapsed",!this.$.find("tbody>tr.group-summary.hidden").length)},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.$.find("tbody>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 x=t(w);x.length&&x.load(e.location.href+" "+w,function(){x.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 _=!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")}),_||(n.focus(),_=!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.attr("required","").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=to.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="zui.fileInputList",r=function(e,i){var s=this;s.name=o;var n=s.$=t(e);i=s.options=t.extend({},r.DEFAULTS,this.$.data(),i),s.$template=n.find(".file-input").detach(),s.add()};r.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)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),s=i.data(o),n="object"==typeof e&&e;s||i.data(o,s=new r(this,n)),"string"==typeof e&&s[e]()})},r.NAME=o,t.fn.fileInputList.Constructor=r,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(t){r.modal("toggle"),t.preventDefault()}).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"),i.trigger("sidebar.toggle",e)},210)):i.trigger("sidebar.toggle",e),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"))})}else(n.toggleBtn?t(n.toggleBtn):s.next(".text-limit-toggle")).hide()};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())})},t(document).on("click","[data-href],tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)})}(jQuery); \ No newline at end of file +"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"],tbody label[for]',function(e){e.stopPropagation();var i=t(this);i.is("label")&&(i=i.closest(".checkbox-primary").find('input[type="checkbox"]')),o.checkRow(i.closest("tr"),i.is(":checked"))}).on("click","tbody a,tbody .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()}).on("sidebar.toggle",function(){setTimeout(function(){o.updateFixUI()},200)})),(a.group||h.hasClass("table-grouped"))&&(h.on("click",".group-toggle",function(){o.toggleRowGroup(t(this).closest("tr").data("id"))}),t(document).on("click",".group-collapse-all",function(){o.toggleGroups(!1)}).on("click",".group-expand-all",function(){o.toggleGroups(!0)})),o.$statistic=r.find(".table-statistic"),o.defaultStatistic=o.$statistic.html(),o.updateStatistic()};n.prototype.toggleGroups=function(e){var i=this,s={};i.$.find("tbody>tr").each(function(n){var a=t(this).closest("tr").data("id");s[a]||i.toggleRowGroup(a,e)})},n.prototype.toggleRowGroup=function(i,s){var n=this.$.find('tbody>tr[data-id="'+i+'"]'),a=n.filter(".group-summary"),o=s===e?!a.hasClass("hidden"):!!s;n.not(".group-summary").toggleClass("hidden",!o),a.toggleClass("hidden",o),t("body").toggleClass("table-group-collapsed",!this.$.find("tbody>tr.group-summary.hidden").length)},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.$.find("tbody>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 x=t(w);x.length&&x.load(e.location.href+" "+w,function(){x.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 _=!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")}),_||(n.focus(),_=!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.attr("required","").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=to.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="zui.fileInputList",r=function(e,i){var s=this;s.name=o;var n=s.$=t(e);i=s.options=t.extend({},r.DEFAULTS,this.$.data(),i),s.$template=n.find(".file-input").detach(),s.add()};r.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)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),s=i.data(o),n="object"==typeof e&&e;s||i.data(o,s=new r(this,n)),"string"==typeof e&&s[e]()})},r.NAME=o,t.fn.fileInputList.Constructor=r,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(t){r.modal("toggle"),t.preventDefault()}).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"),i.trigger("sidebar.toggle",e)},210)):i.trigger("sidebar.toggle",e),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(function(){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"))})}else(n.toggleBtn?t(n.toggleBtn):s.next(".text-limit-toggle")).hide()};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())})},t(document).on("click","[data-href],tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)})}(jQuery); \ No newline at end of file diff --git a/www/theme/default/style.css b/www/theme/default/style.css index fcb3806412..7bd3e22ac2 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -8,57 +8,3 @@ * @version $Id: style.css 1454 2009-10-23 01:45:26Z wwccss $ * @link http://www.zentao.net */ - -/* === CSS HELPERS === */ -/* Width definitions */ -.w-p5 {width: 5%} .w-p10 {width: 10%} .w-p15 {width: 15%} .w-p20 {width: 20%} .w-p25 {width: 25%} .w-p30 {width: 30%} .w-p35 {width: 35%} .w-p40 {width: 40%} .w-p45 {width: 45%} .w-p50 {width: 50%} .w-p55 {width: 55%} .w-p60 {width: 60%} .w-p65 {width: 65%} .w-p70 {width: 70%} .w-p75 {width: 75%} .w-p80 {width: 80%} .w-p85 {width: 85%} .w-p90 {width: 90%} .w-p94 {width: 94%} .w-p95 {width: 95%} .w-p98 {width: 98%} .w-p99 {width: 99%} .w-p100{width: 100%} - -.w-auto {width: auto} .w-10px {width:10px} .w-20px {width:20px} .w-30px {width:30px} .w-35px {width:35px} .w-40px {width:40px} .w-45px {width:45px} .w-50px {width:50px} .w-60px {width:60px} .w-70px {width:70px} .w-80px {width:80px} .w-90px {width:90px} .w-100px {width:100px} .w-110px {width:110px} .w-120px {width:120px} .w-130px {width:130px} .w-140px {width:140px} .w-150px {width:150px} .w-160px {width:160px} .w-180px {width:180px} .w-200px {width:200px} .w-230px {width:230px} .w-250px {width:250px} .w-300px {width:300px} .w-400px {width:400px} .w-500px {width:500px} .w-600px {width:600px} .w-700px {width:700px} .w-800px {width:800px} .w-900px {width:900px} -.mw-200px {max-width:200px!important} .mw-300px {max-width:300px!important} .mw-400px {max-width:400px!important} .mw-500px {max-width:500px!important} .mw-600px {max-width:600px!important} .mw-700px {max-width:700px!important} .mw-800px {max-width:800px!important} .mw-900px {max-width:900px!important} .mw-1400px {max-width:1400px!important} - -.w-id {width:70px;} .w-pri {width:40px;} .w-severity {width:50px;} .w-hour {width:57px;} .w-date {width:90px;} .w-user {width:80px;} .w-status {width:60px} .w-type {width:80px} .w-resolution {width:70px} - -.w-p15-f {width: 15% !important; min-width: 120px} .w-p25-f {width: 25% !important; min-width: 200px} .w-p35-f {width: 35% !important; min-width: 300px} .w-p45-f {width: 45% !important; min-width: 400px} - -/* Height definitions */ -.h-5px {height:5px} .h-10px {height:10px} .h-20px {height:20px} .h-30px {height:30px} .h-35px {height:35px} .h-40px {height:40px} .h-45px {height:45px} .h-50px {height:50px} .h-60px {height:60px} .h-70px {height:70px} .h-80px {height:80px} .h-100px {height:100px} .h-120px {height:120px} .h-130px {height:130px} .h-140px {height:140px} .h-150px {height:150px} .h-200px {height:200px} - -/* paddings and margins */ -.pd-0 {padding: 0 !important} -.mg-0 {margin: 0 !important} -.mgb-20 {margin-bottom: 20px !important} -.mgb-10 {margin-bottom: 10px !important} -.pdb-20 {padding-bottom: 20px !important} -.pdt-20 {padding-top: 20px !important} - -/* borders */ -.br-0 {border-radius: 0!important} -.bd-0, .borderless, .bd-none {border: none !important;} - -/* backgrounds */ -.bg-none {background: none!important} - -/* Style of text */ -.text-latin {font-family: Arial;} -.text-strong {font-weight: bold;} -.text-middle,.text-middle td {vertical-align: middle !important;} -tr.text-center > td, tr.text-center > th {text-align: center;} -tr.text-center > td.text-left, tr.text-center > th.text-left {text-align: left;} -tr.text-center > td.text-right, tr.text-center > th.text-right {text-align: right;} -.text-top, tr.text-top td, tr.text-top th {vertical-align: top!important;} - -/* === Components === */ -/* remove outline of links */ -a,a:focus,a:active {text-decoration: none; outline:none;} -.modal-content {background-color:#fff;} -body.body-modal{padding-bottom:0px;} -body.body-modal .container{padding:0px;} -body.body-modal #mainMenu{margin-top:5px;} - -.modal-iframe .modal-body {padding: 0;} -.modal.with-titlebar .modal-header, .modal-dialog.hide-header .modal-header{position: relative; height: 0; padding: 0; border: none; z-index: 999; min-height: 0} -.modal.with-titlebar .modal-header .modal-body, .modal-dialog.hide-header .modal-header .modal-body {z-index: 990} -.modal.with-titlebar .modal-header .modal-title, .modal-dialog.hide-header .modal-header .modal-title {display: none} -.modal.with-titlebar .modal-header .close, .modal-dialog.hide-header .modal-header .close {position: absolute; right: 0px; top: 15px} - -.search-list .list-group {max-height: 214px; height:auto !important;}