diff --git a/dist/js/zui.js b/dist/js/zui.js
index b8e5a5ee177909667891a3fe86823877f8732bdb..606de3347bcf408a6d7d4710af77c67d99fd4cf5 100644
--- a/dist/js/zui.js
+++ b/dist/js/zui.js
@@ -4375,7 +4375,12 @@
};
$.Messager = Messager;
- if(!window.Messager) window.Messager = Messager;
+ var noConflictMessager = window.Messager;
+ window.Messager = $.Messager;
+ window.Messager.noConflict = function()
+ {
+ window.Messager = noConflictMessager;
+ };
$.showMessage = function(message, options)
{
@@ -4426,7 +4431,12 @@
}
};
- if(!window.messager) window.messager = $.messager;
+ var noConflict = window.messager;
+ window.messager = $.messager;
+ window.messager.noConflict = function()
+ {
+ window.messager = noConflict;
+ };
}(jQuery, window));
/* ========================================================================
diff --git a/dist/js/zui.min.js b/dist/js/zui.min.js
index aea0da5ac05759c7529095587849cb7df1662247..60e7437e85acf05663d27c9e068897c10e296213 100644
--- a/dist/js/zui.min.js
+++ b/dist/js/zui.min.js
@@ -8,5 +8,5 @@
/* Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
!function(a,b,c){"use strict";if("undefined"==typeof a)throw new Error("ZUI requires jQuery");a.extend({uuid:function(){for(var a=(new Date).getTime();1e16>a;)a*=10;return a+c.floor(9999*c.random())},getPropertyCount:function(a){return"object"!=typeof a||null===a?0:Object.getOwnPropertyNames(a).length},callEvent:function(b,c,d){return a.isFunction(b)?("undefined"!=typeof d&&(b=a.proxy(b,d)),c.result=b(c),!(void 0!==c.result&&!c.result)):1},clientLang:function(){var c;if("undefined"!=typeof b.config&&b.config.clientLang)c=b.config.clientLang;else{var d=a("html").attr("lang");c=d?d:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return c.replace("-","_").toLowerCase()}}),a.fn.callEvent=function(b,c,d){var e=a(this),f=b.indexOf(".zui."),g=b;0>f&&d&&d.name?b+="."+d.name:g=b.substring(0,f);var h=a.Event(b,c);if("undefined"==typeof d&&f>0&&(d=e.data(b.substring(f+1))),d&&d.options){var i=d.options[g];a.isFunction(i)&&a.callEvent(d.options[g],h,d)}return h}}(jQuery,window,Math),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),function(a,b){"use strict";var c=1200,d=992,e=768,f={desktop:"screen-desktop",desktopLg:"screen-desktop-wide",tablet:"screen-tablet",phone:"screen-phone",isMobile:"device-mobile",isDesktop:"device-desktop"},g=b(a),h=function(){var a=g.width();b("html").toggleClass(f.desktop,a>=d&&c>a).toggleClass(f.desktopLg,a>=c).toggleClass(f.tablet,a>=e&&d>a).toggleClass(f.phone,e>a).toggleClass(f.isMobile,d>a).toggleClass(f.isDesktop,a>=d)};g.resize(h),h()}(window,jQuery),function(a,b){"use strict";var c={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 了解更多...',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。了解更多...',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. Learn more...'},d=function(){var a=this.isIE,b=a();if(b)for(var c=10;c>5;c--)if(a(c)){b=c;break}this.ie=b,this.cssHelper()};d.prototype.cssHelper=function(){var a=this.ie,c=b("html");c.toggleClass("ie",a).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),a&&c.addClass("ie-"+a).toggleClass("gt-ie-7 gte-ie-8 support-ie",a>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",8>a).toggleClass("gt-ie-8 gte-ie-9",a>=9).toggleClass("lte-ie-8 lt-ie-9",9>a).toggleClass("gt-ie-9 gte-ie-10",a>=10).toggleClass("lte-ie-9 lt-ie-10",10>a)},d.prototype.tip=function(){if(this.ie&&this.ie<8){var a=b("#browseHappyTip");a.length||(a=b('
'),a.prependTo("body")),a.find(".content").html(this.browseHappyTip||c[b.clientLang()||"zh_cn"])}},d.prototype.isIE=function(a){var b=document.createElement("b");return b.innerHTML="",1===b.getElementsByTagName("i").length},d.prototype.isIE10=function(){return!1},a.browser=new d,b(function(){b("body").hasClass("disabled-browser-tip")||a.browser.tip()})}(window,jQuery),function(){"use strict";Date.ONEDAY_TICKS=864e5,Date.prototype.format=function(a){var b={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S+":this.getMilliseconds()};/(y+)/i.test(a)&&(a=a.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var c in b)new RegExp("("+c+")").test(a)&&(a=a.replace(RegExp.$1,1==RegExp.$1.length?b[c]:("00"+b[c]).substr((""+b[c]).length)));return a},Date.prototype.addMilliseconds=function(a){return this.setTime(this.getTime()+a),this},Date.prototype.addDays=function(a){return this.addMilliseconds(a*Date.ONEDAY_TICKS),this},Date.prototype.clone=function(){var a=new Date;return a.setTime(this.getTime()),a},Date.isLeapYear=function(a){return a%4===0&&a%100!==0||a%400===0},Date.getDaysInMonth=function(a,b){return[31,Date.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},Date.prototype.isLeapYear=function(){return Date.isLeapYear(this.getFullYear())},Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())},Date.prototype.addMonths=function(a){var b=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+a),this.setDate(Math.min(b,this.getDaysInMonth())),this},Date.prototype.getLastWeekday=function(a){a=a||1;for(var b=this.clone();b.getDay()!=a;)b.addDays(-1);return b.clearTime(),b},Date.prototype.isSameDay=function(a){return a.toDateString()===this.toDateString()},Date.prototype.isSameWeek=function(a){var b=this.getLastWeekday(),c=b.clone().addDays(7);return a>=b&&c>a},Date.prototype.isSameYear=function(a){return this.getFullYear()===a.getFullYear()}}(),function(){"use strict";String.prototype.format=function(a){var b=this;if(arguments.length>0){var c;if(1==arguments.length&&"object"==typeof a)for(var d in a)void 0!==a[d]&&(c=new RegExp("({"+d+"})","g"),b=b.replace(c,a[d]));else for(var e=0;e a"),this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),function(a,b){"use strict";var c="localStorage",d=a[c],e=a.store,f="page_"+a.location.pathname,g=function(){this.slience=!0,this.enable=c in a&&a[c]&&a[c].setItem,this.storage=d,this.page=this.get(f,{})};g.prototype.pageSave=function(){if(b.isEmptyObject(this.page))this.remove(f);else{var a,c=[];for(a in this.page){var d=this.page[a];null===d&&c.push(a)}for(a=c.length-1;a>=0;a--)delete this.page[c[a]];this.set(f,this.page)}},g.prototype.pageRemove=function(a){"undefined"!=typeof this.page[a]&&(this.page[a]=null,this.pageSave())},g.prototype.pageClear=function(){this.page={},this.pageSave()},g.prototype.pageGet=function(a,b){var c=this.page[a];return void 0===b||null!==c&&void 0!==c?c:b},g.prototype.pageSet=function(a,c){b.isPlainObject(a)?b.extend(!0,this.page,a):this.page[this.serialize(a)]=c,this.pageSave()},g.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},g.prototype.length=function(){return this.check()?d.getLength?d.getLength():d.length:0},g.prototype.removeItem=function(a){return d.removeItem(a),this},g.prototype.remove=function(a){return this.removeItem(a)},g.prototype.getItem=function(a){return d.getItem(a)},g.prototype.get=function(a,b){var c=this.deserialize(this.getItem(a));return void 0===b||"undefined"!=typeof c&&null!==c&&void 0!==c?c:b},g.prototype.key=function(a){return d.key(a)},g.prototype.setItem=function(a,b){return d.setItem(a,b),this},g.prototype.set=function(a,b){return void 0===b?this.remove(a):(this.setItem(a,this.serialize(b)),this)},g.prototype.clear=function(){return d.clear(),this},g.prototype.forEach=function(a){for(var b=d.length-1;b>=0;b--){var c=d.key(b);a(c,this.get(c))}return this},g.prototype.getAll=function(){var a={};return this.forEach(function(b,c){a[b]=c}),a},g.prototype.serialize=function(a){return"string"==typeof a?a:JSON.stringify(a)},g.prototype.deserialize=function(a){if("string"!=typeof a)return void 0;try{return JSON.parse(a)}catch(b){return a||void 0}};var h=new g;a.store=h,a.store.noConflict=function(){return a.store=e,h}}(window,jQuery),function(a){"use strict";var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};b.DEFAULTS={container:"body",move:!0},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.init=function(){this.handleMouseEvents()},b.prototype.handleMouseEvents=function(){var b=this.$,c="before",d="drag",e="finish",f=this.options;b.mousedown(function(g){function h(c){q=!0;var e=c.pageX,g=c.pageY,h={left:e-o.x,top:g-o.y};b.removeClass("drag-ready").addClass("dragging"),f.move&&b.css(h),f.hasOwnProperty(d)&&a.isFunction(f[d])&&f[d]({event:c,element:b,startOffset:o,pos:h,offset:{x:e-n.x,y:g-n.y},smallOffset:{x:e-p.x,y:g-p.y}}),p.x=e,p.y=g,f.stopPropagation&&c.stopPropagation()}function i(c){if(a(document).unbind("mousemove",h).unbind("mouseup",i),!q)return void b.removeClass("drag-ready");var d={left:c.pageX-o.x,top:c.pageY-o.y};b.removeClass("drag-ready").removeClass("dragging"),f.move&&b.css(d),f.hasOwnProperty(e)&&a.isFunction(f[e])&&f[e]({event:c,element:b,pos:d,offset:{x:c.pageX-n.x,y:c.pageY-n.y},smallOffset:{x:c.pageX-p.x,y:c.pageY-p.y}}),c.preventDefault(),f.stopPropagation&&c.stopPropagation()}if(f.hasOwnProperty(c)&&a.isFunction(f[c])){var j=f[c]({event:g,element:b});if(void 0!==j&&!j)return}var k=a(f.container),l=b.offset(),m=k.offset(),n={x:g.pageX,y:g.pageY},o={x:g.pageX-l.left+m.left,y:g.pageY-l.top+m.top},p=a.extend({},n),q=!1;b.addClass("drag-ready"),a(document).bind("mousemove",h).bind("mouseup",i),g.preventDefault(),f.stopPropagation&&g.stopPropagation()})},a.fn.draggable=function(c){return this.each(function(){var d=a(this),e=d.data("zui.draggable"),f="object"==typeof c&&c;e||d.data("zui.draggable",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.draggable.Constructor=b}(jQuery),function(a,b,c){"use strict";var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={container:"body",flex:!1,deviation:5,sensorOffsetX:0,sensorOffsetY:0,nested:!1},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)},d.prototype.callEvent=function(b,c){return a.callEvent(this.options[b],c,this)},d.prototype.init=function(){this.handleMouseEvents()},d.prototype.handleMouseEvents=function(){var d=this.$,e=this,f=this.options,g="before";this.$triggerTarget=f.trigger?(a.isFunction(f.trigger)?f.trigger(d):d.find(f.trigger)).first():d,this.$triggerTarget.on("mousedown",function(h){function i(b){var g={left:b.pageX,top:b.pageY};if(!(c.abs(g.left-t.left)h&&g.top>i&&g.lefti?g.before(f):g.after(f);var j=d.children(e.selector);c(j),a.callEvent(e.order,{list:j,element:f})}},finish:function(b){e.dragCssClass&&b.element.removeClass(e.dragCssClass),a.callEvent(e.finish,{list:d.children(e.selector),element:b.element})}})},a.fn.sortable=function(c){return this.each(function(){var d=a(this),e=d.data("zui.sortable"),f="object"==typeof c&&c;e?"object"==typeof c&&e.reset():d.data("zui.sortable",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.sortable.Constructor=b}(jQuery,window,document,Math),+function(a){"use strict";function b(b,d,e){return this.each(function(){var f=a(this),g=f.data("zui.modal"),h=a.extend({},c.DEFAULTS,f.data(),"object"==typeof b&&b);g||f.data("zui.modal",g=new c(this,h)),"string"==typeof b?g[b](d,e):h.show&&g.show(d,e)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.zui.modal")},this))};c.VERSION="3.2.0",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"},c.prototype.toggle=function(a,b){return this.isShown?this.hide():this.show(a,b)},c.prototype.ajustPosition=function(b){if("undefined"==typeof b&&(b=this.options.position),"undefined"!=typeof b){var c=this.$element.find(".modal-dialog"),d=Math.max(0,(a(window).height()-c.outerHeight())/2),e="fit"==b?2*d/3:"center"==b?d:b;c.css("margin-top",e)}},c.prototype.show=function(b,d){var e=this,f=a.Event("show.zui.modal",{relatedTarget:b});this.$element.trigger(f),this.isShown||f.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.zui.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var f=a.support.transition&&e.$element.hasClass("fade");e.$element.parent().length||e.$element.appendTo(e.$body),e.$element.show().scrollTop(0),f&&e.$element[0].offsetWidth,e.$element.addClass("in").attr("aria-hidden",!1),e.ajustPosition(d),e.enforceFocus();var g=a.Event("shown.zui.modal",{relatedTarget:b});f?e.$element.find(".modal-dialog").one("bsTransitionEnd",function(){e.$element.trigger("focus").trigger(g)}).emulateTransitionEnd(c.TRANSITION_DURATION):e.$element.trigger("focus").trigger(g)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.zui.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),a(document).off("focusin.zui.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.zui.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.zui.modal").on("focusin.zui.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?a(document).on("keydown.dismiss.zui.modal",a.proxy(function(b){if(27==b.which){var c=a.Event("escaping.bs.modal"),d=this.$element.triggerHandler(c,"esc");if(void 0!=d&&!d)return;this.hide()}},this)):this.isShown||a(document).off("keydown.dismiss.zui.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$element.trigger("hidden.zui.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('').appendTo(this.$body),this.$element.on("mousedown.dismiss.zui.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.zui.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=null;try{f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,""))}catch(g){return}if(f.length){var h=f.data("zui.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.zui.modal",function(a){a.isDefaultPrevented()||f.one("hidden.zui.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,h,this,d.data("position"))}})}(jQuery),function(a){"use strict";function b(b){var c=typeof b;return"undefined"===c?b=a(".modal.modal-once"):"string"===c&&(b=a("#"+b).replace("##","#")),b&&b instanceof a?b:null}if(!a.fn.modal)throw new Error("Modal trigger requires modal.js");var c=function(b){b=a.extend({},c.DEFAULTS,a.ModalTriggerDefaults,b),this.isShown=!1,this.options=b,this.id=a.uuid()};c.DEFAULTS={type:"custom",width:null,size:null,height:"auto",icon:null,name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0},c.prototype.init=function(b){var c=this;if(b.url&&(!b.type||"ajax"!=b.type&&"iframe"!=b.type)&&(b.type="ajax"),b.remote)b.type="ajax","string"==typeof b.remote&&(b.url=b.remote);else if(b.iframe)b.type="iframe","string"==typeof b.iframe&&(b.url=b.iframe);else if(b.custom&&(b.type="custom","string"==typeof b.custom)){var d;try{d=a(b.custom)}catch(e){}d&&d.length?b.custom=d:a.isFunction(window[b.custom])&&(b.custom=window[b.custom])}var f=a("#"+b.name);f.length&&(this.isShown||f.off(".zui.modal"),f.remove()),f=a('').appendTo("body");var g=function(c,d){var e=b[c];a.isFunction(e)&&f.on(d+".zui.modal",e)};g("onShow","show"),g("shown","shown"),g("onHide","hide"),g("hidden","hidden"),g("loaded","loaded"),f.on("shown.zui.modal",function(){c.isShown=!0}).on("hidden.zui.modal",function(){c.isShown=!1}),this.$modal=f,this.$dialog=f.find(".modal-dialog")},c.prototype.show=function(b){var c=a.extend({},this.options,b);this.init(c);var d=this,e=this.$modal,f=this.$dialog,g=c.custom,h=f.find(".modal-body").css("padding",""),i=f.find(".modal-header"),j=f.find(".modal-content");e.toggleClass("fade",c.fade).addClass(c.cssClass).toggleClass("modal-md","md"===c.size).toggleClass("modal-sm","sm"===c.size).toggleClass("modal-lg","lg"===c.size).toggleClass("modal-fullscreen","fullscreen"===c.size).toggleClass("modal-loading",!this.isShown),i.toggle(c.showHeader),i.find(".modal-icon").attr("class","modal-icon icon-"+c.icon),i.find(".modal-title-name").html(c.title||""),c.size&&"fullscreen"===c.size&&(c.width="",c.height="");var k=function(a){"undefined"==typeof a&&(a=300),setTimeout(function(){f=e.find(".modal-dialog"),c.width&&"auto"!=c.width&&f.css("width",c.width),c.height&&"auto"!=c.height&&f.css("height",c.height),d.ajustPosition(c.position),e.removeClass("modal-loading"),"iframe"!=c.type&&f.off("resize.zui.modaltrigger").on("resize.zui.modaltrigger",function(){d.ajustPosition()})},a)};if("custom"===c.type&&g)if(a.isFunction(g)){var l=g({modal:e,options:c,modalTrigger:d,ready:k});"string"==typeof l&&(h.html(l),k())}else g instanceof a?(h.html(a("").append(g.clone()).html()),k()):(h.html(g),k());else if(c.url)if(e.attr("ref",c.url),"iframe"===c.type){e.addClass("modal-iframe"),this.firstLoad=!0;var m="iframe-"+c.name;i.detach(),h.detach(),j.empty().append(i).append(h),h.css("padding",0).html('
'),c.waittime>0&&(d.waitTimeout=setTimeout(k,c.waittime));var n=document.getElementById(m);n.onload=n.onreadystatechange=function(){if(e.attr("ref",n.contentWindow.location.href),d.firstLoad&&e.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){d.firstLoad=!1,c.waittime>0&&clearTimeout(d.waitTimeout);try{var a=window.frames[m].$;if(a&&"auto"===c.height&&"fullscreen"!=c.size){var b=a("body").addClass("body-modal"),f=function(){e.removeClass("fade");var a=b.outerHeight();h.css("height",a),c.fade&&e.addClass("fade"),k()};e.callEvent("loaded.zui.modal",{modalType:"iframe"}),setTimeout(f,100),b.off("resize.zui.modaltrigger").on("resize.zui.modaltrigger",f)}a.extend({closeModal:d.close})}catch(g){k()}}}}else a.get(c.url,function(b){var c=a(b);c.hasClass("modal-dialog")?f.replaceWith(c):c.hasClass("modal-content")?f.find(".modal-content").replaceWith(c):h.wrapInner(c),e.callEvent("loaded.zui.modal",{modalType:"ajax"}),k()});e.modal({show:"show",backdrop:c.backdrop,keyboard:c.keyboard})},c.prototype.close=function(b,c){this.$modal.on("hidden.zui.modal",function(){a.isFunction(b)&&b(),"string"==typeof c&&("this"===c?window.location.reload():window.location=c)
-}).modal("hide")},c.prototype.toggle=function(a){this.isShown?this.close():this.show(a)},c.prototype.ajustPosition=function(a){this.$modal.modal("ajustPosition",a||this.options.position)},window.ModalTrigger=c,window.modalTrigger=new c,a.fn.modalTrigger=function(b,d){return a(this).each(function(){var e=a(this),f=e.data("zui.modaltrigger"),g=a.extend({title:e.attr("title")||e.text(),url:e.attr("href"),type:e.hasClass("iframe")?"iframe":""},e.data(),a.isPlainObject(b)&&b);f||e.data("zui.modaltrigger",f=new c(g)),"string"==typeof b?f[b](d):g.show&&f.show(d),e.on((g.trigger||"click")+".toggle.zui.modaltrigger",function(a){f.toggle(g),e.is("a")&&a.preventDefault()})})};var d=a.fn.modal;a.fn.modal=function(b,c){return a(this).each(function(){var e=a(this);e.hasClass("modal")?d.call(e,b,c):e.modalTrigger(b,c)})},window.closeModal=function(c,d,e){e=b(e),e&&e.length&&e.each(function(){a(this).data("zui.modaltrigger").close(c,d)})},window.ajustModalPosition=function(a,c){c=b(c),c&&c.length&&c.modal("ajustPosition",a)},a.extend({closeModal:window.closeModal,ajustModalPosition:window.ajustModalPosition}),a(document).on("click.zui.modaltrigger.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=null;try{e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,""))}catch(f){}e&&e.length||(c.data("zui.modaltrigger")?c.trigger(".toggle.zui.modaltrigger"):c.modalTrigger({show:!0})),c.is("a")&&b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h
'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTarget();if(b)return b.find(".arrow").length<1&&a.addClass("no-arrow"),void a.html(b.html());var c=this.getTitle(),d=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](c),a.find(".popover-content")[this.options.html?"html":"text"](d),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.getTarget=function(){var b=this.$element,c=this.options,d=b.attr("data-target")||("function"==typeof c.target?c.target.call(b[0]):c.target);return d?"$next"==d?b.next(".popover"):a(d):!1},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&iMath.abs(h))c(f,g),Math.abs(g)>10&&b.preventDefault();else{var i=a(window);a("body,html").animate({scrollTop:i.scrollTop()-h},400)}}}function c(a,b){b>10&&a.find(".left.carousel-control").click(),-10>b&&a.find(".right.carousel-control").click()}if(this.options.touchable){this.$element.on("touchstart touchmove touchend",b);var d,e}},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle(),f.touchable&&e.touchable()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),function(){"use strict";window.imgReady=function(){var a=[],b=null,c=function(){for(var b=0;b1024)&&(e.call(m),h.end=!0)},h(),m.onload=function(){!h.end&&h(),f&&f.call(m),m=m.onload=m.onerror=null},void(h.end||(a.push(h),null===b&&(b=setInterval(c,40)))))}}()}(),function(a,b,c){"use strict";if(!a.fn.modalTrigger)throw new Error("modal & modalTrigger requires for lightbox");if(!b.imgReady)throw new Error("imgReady requires for lightbox");var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={modalTeamplate:'![]({image})
'},d.prototype.getOptions=function(b){var c="image";return b=a.extend({},d.DEFAULTS,this.$.data(),b),b[c]||(b[c]=this.$.attr("src")||this.$.attr("href")||this.$.find("img").attr("src"),this.$.data(c,b[c])),b},d.prototype.init=function(){this.bindEvents()},d.prototype.initGroups=function(){var b=this.$.data("groups");b||(b=a('[data-toggle="lightbox"][data-group="'+this.options.group+'"], [data-lightbox-group="'+this.options.group+'"]'),this.$.data("groups",b),b.each(function(b){a(this).attr("data-group-index",b)})),this.groups=b,this.groupIndex=parseInt(this.$.data("group-index"))},d.prototype.bindEvents=function(){var d=this.$,e=this,f=this.options;return f.image?void d.modalTrigger({type:"custom",name:"lightboxModal",position:"center",custom:function(d){e.initGroups();var g=d.modal,h=e.groups,i=e.groupIndex;g.addClass("modal-lightbox").html(f.modalTeamplate.format(f)).toggleClass("lightbox-with-caption","string"==typeof f.caption).removeClass("lightbox-full").data("group-index",i);var j=g.find(".modal-dialog"),k=a(b).width();b.imgReady(f.image,function(){j.css({width:c.min(k,this.width)}),k
0),g.find(".next").toggleClass("show",h.filter('[data-group-index="'+(i+1)+'"]').length>0),g.find(".controller").click(function(){var e=a(this),f=g.data("group-index")+(e.hasClass("prev")?-1:1),i=h.filter('[data-group-index="'+f+'"]');if(i.length){var l=i.data("image"),m=i.data("caption");g.addClass("modal-loading").data("group-index",f).toggleClass("lightbox-with-caption","string"==typeof m).removeClass("lightbox-full"),g.find(".lightbox-img").attr("src",l),k=a(b).width(),b.imgReady(l,function(){j.css({width:c.min(k,this.width)}),k0),g.find(".next").toggleClass("show",h.filter('[data-group-index="'+(f+1)+'"]').length>0),!1})}}):!1},a.fn.lightbox=function(b){var c="group"+(new Date).getTime();return this.each(function(){var e=a(this),f="object"==typeof b&&b;"object"==typeof f&&f.group?e.attr("data-lightbox-group",f.group):e.data("group")?e.attr("data-lightbox-group",e.data("group")):e.attr("data-lightbox-group",c),e.data("group",e.data("lightbox-group"));var g=e.data("zui.lightbox");g||e.data("zui.lightbox",g=new d(this,f)),"string"==typeof b&&g[b]()})},a.fn.lightbox.Constructor=d,a(function(){a('[data-toggle="lightbox"]').lightbox()})}(jQuery,window,Math),function(a,b){"use strict";var c,d=0,e='',f={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},g=function(b,c){var g=this;g.id=d++,c=g.options=a.extend({},f,c),g.message=(c.icon?' ':"")+b,g.$=a(e.format(c)).toggleClass("fade",c.fade).toggleClass("scale",c.scale).attr("id","messager-"+g.id),c.close?g.$.on("click",".close",function(){g.hide()}):g.$.find(".close").remove(),g.$.find(".messager-content").html(g.message),g.$.data("zui.messager",g)};g.prototype.show=function(){var d=this,e=this.options;c&&c.isShow&&c.hide(),d.$.appendTo(e.parent).show(),("top"===e.placement||"bottom"===e.placement||"center"===e.placement)&&d.$.css("left",(a(b).width()-d.$.width()-50)/2),("left"===e.placement||"right"===e.placement||"center"===e.placement)&&d.$.css("top",(a(b).height()-d.$.height()-50)/2),d.$.addClass("in"),e.time&&setTimeout(function(){d.hide()},e.time),d.isShow=!0,c=d},g.prototype.hide=function(){var a=this;a.$.hasClass("in")&&(a.$.removeClass("in"),setTimeout(function(){a.$.remove()},200)),a.isShow=!1},a.Messager=g,b.Messager||(b.Messager=g),a.showMessage=function(a,b){"string"==typeof b&&(b={type:b});var c=new g(a,b);return c.show(),c};var h=function(a){return"string"==typeof a?{placement:a}:a};a.messager={show:a.showMessage,primary:function(b,c){return a.showMessage(b,a.extend({type:"primary"},h(c)))},success:function(b,c){return a.showMessage(b,a.extend({type:"success",icon:"ok-sign"},h(c)))},info:function(b,c){return a.showMessage(b,a.extend({type:"info",icon:"info-sign"},h(c)))},warning:function(b,c){return a.showMessage(b,a.extend({type:"warning",icon:"warning-sign"},h(c)))},danger:function(b,c){return a.showMessage(b,a.extend({type:"danger",icon:"exclamation-sign"},h(c)))},important:function(b,c){return a.showMessage(b,a.extend({type:"important"},h(c)))},special:function(b,c){return a.showMessage(b,a.extend({type:"special"},h(c)))}},b.messager||(b.messager=a.messager)}(jQuery,window),function(a){"use strict";var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};b.DEFAULTS={auto:!1,foldicon:"icon-chevron-right"},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.init=function(){var a=this.$.children(".nav");a.find(".nav").closest("li").addClass("nav-parent"),a.find(".nav > li.active").closest("li").addClass("active"),a.find(".nav-parent > a").append(''),this.handleFold()},b.prototype.handleFold=function(){var b=this.options.auto,c=this.$;this.$.find(".nav-parent > a").click(function(d){b&&(c.find(".nav-parent.show").find(".nav").slideUp(function(){a(this).closest(".nav-parent").removeClass("show")}),c.find(".icon-rotate-90").removeClass("icon-rotate-90"));var e=a(this).closest(".nav-parent");return e.hasClass("show")?(e.find(".icon-rotate-90").removeClass("icon-rotate-90"),e.find(".nav").slideUp(function(){a(this).closest(".nav-parent").removeClass("show")})):(e.find(".nav-parent-fold-icon").addClass("icon-rotate-90"),e.find(".nav").slideDown(function(){a(this).closest(".nav-parent").addClass("show")})),d.preventDefault(),!1})},a.fn.menu=function(c){return this.each(function(){var d=a(this),e=d.data("zui.menu"),f="object"==typeof c&&c;e||d.data("zui.menu",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.menu.Constructor=b,a(function(){a('[data-toggle="menu"]').menu()})}(jQuery),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(){var a;if("undefined"!=typeof config&&config.clientLang)a=config.clientLang;else{var c=b("html").attr("lang");a=c?c:"en"}return a.replace("-","_").toLowerCase()}function e(a){var b=r[p.locale];return b?b[a]:r.en[a]}function f(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d(a)===!1;e||c.modal("hide")}function g(a){var b,c=0;for(b in a)c++;return c}function h(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function i(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},p,a),a.buttons||(a.buttons={}),a.backdrop=a.backdrop?"static":!1,c=a.buttons,d=g(c),h(c,function(a,e){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=1==d||d>=2&&"confirm"===a?"btn-primary":"btn-default")}),a}function j(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function k(a,c,d){return b.extend(!0,{},a,j(c,d))}function l(a,b,c,d){var e={className:"bootbox-"+a,buttons:m.apply(null,b)};return n(k(e,d,c),b)}function m(){for(var a={},b=0,c=arguments.length;c>b;b++){var d=arguments[b],f=d.toLowerCase(),g=d.toUpperCase();a[f]={label:e(g)}}return a}function n(a,b){var d={};return h(b,function(a,b){d[b]=!0}),h(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var o={dialog:"",header:"",footer:"",closeButton:"",form:"",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"",date:"",time:"",number:"",password:""}},p={locale:d(),backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},q={};q.alert=function(){var a;if(a=l("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback():!0},q.dialog(a)},q.confirm=function(){var a;if(a=l("confirm",["confirm","cancel"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback(!1)},a.buttons.confirm.callback=function(){return a.callback(!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return q.dialog(a)},q.prompt=function(){var a,d,e,f,g,i,j;f=b(o.form),d={className:"bootbox-prompt",buttons:m("confirm","cancel"),value:"",inputType:"text"},a=n(k(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show;var l=["date","time","number"],p=document.createElement("input");if(p.setAttribute("type",a.inputType),l[a.inputType]&&(a.inputType=p.type),a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback(null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=g.val();break;case"checkbox":var d=g.find("input:checked");c=[],h(d,function(a,d){c.push(b(d).val())})}return a.callback(c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!o.inputs[a.inputType])throw new Error("invalid prompt type");switch(g=b(o.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":g.val(a.value);break;case"select":var r={};if(j=a.inputOptions||[],!j.length)throw new Error("prompt with select requires options");h(j,function(a,d){var e=g;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(r[d.group]||(r[d.group]=b("").attr("label",d.group)),e=r[d.group]),e.append("")}),h(r,function(a,b){g.append(b)}),g.val(a.value);break;case"checkbox":var s=b.isArray(a.value)?a.value:[a.value];if(j=a.inputOptions||[],!j.length)throw new Error("prompt with checkbox requires options");if(!j[0].value||!j[0].text)throw new Error("given options in wrong format");g=b(""),h(j,function(c,d){var e=b(o.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),h(s,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),g.append(e)})}return a.placeholder&&g.attr("placeholder",a.placeholder),a.pattern&&g.attr("pattern",a.pattern),f.append(g),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=q.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){g.focus()}),i===!0&&e.modal("show"),e},q.dialog=function(a){a=i(a);var c=b(o.dialog),d=c.find(".modal-dialog"),e=c.find(".modal-body"),g=a.buttons,j="",k={onEscape:a.onEscape};if(h(g,function(a,b){j+="",k[a]=b.callback}),e.find(".bootbox-body").html(a.message),a.animate===!0&&c.addClass("fade"),a.className&&c.addClass(a.className),"large"===a.size&&d.addClass("modal-lg"),"small"===a.size&&d.addClass("modal-sm"),a.title&&e.before(o.header),a.closeButton){var l=b(o.closeButton);a.title?c.find(".modal-header").prepend(l):l.css("margin-top","-10px").prependTo(e)}return a.title&&c.find(".modal-title").html(a.title),j.length&&(e.after(o.footer),c.find(".modal-footer").html(j)),c.on("hidden.bs.modal",function(a){a.target===this&&c.remove()}),c.on("shown.bs.modal",function(){c.find(".btn-primary:first").focus()}),c.on("escape.close.bb",function(a){k.onEscape&&f(a,c,k.onEscape)}),c.on("click",".modal-footer button",function(a){var d=b(this).data("bb-handler");f(a,c,k[d])}),c.on("click",".bootbox-close-button",function(a){f(a,c,k.onEscape)}),c.on("keyup",function(a){27===a.which&&c.trigger("escape.close.bb")}),b(a.container).append(c),c.modal({backdrop:a.backdrop,keyboard:!1,show:!1}),a.show&&c.modal("show"),c},q.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(p,a)},q.hideAll=function(){b(".bootbox").modal("hide")};var r={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return q.init=function(c){return a(c||b)},q}),+function(a,b){"use strict";function c(b){var c=b.data("url");c&&(b.addClass("panel-loading").find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").addClass("icon-spin"),a.ajax({url:c,dataType:"html"}).done(function(a){b.find(".panel-body").html(a)}).fail(function(){b.addClass("panel-error")}).always(function(){b.removeClass("panel-loading"),b.find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").removeClass("icon-spin")}))}var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.draggable=this.$.hasClass("dashboard-draggable")||this.options.draggable,this.init()};d.DEFAULTS={height:360},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)},d.prototype.handleRemoveEvent=function(){var b=this.options.afterPanelRemoved,c=this.options.panelRemovingTip;
-this.$.on("click",".remove-panel",function(){var d=a(this).closest(".panel"),e=d.data("name")||d.find(".panel-heading").text().replace("\n","").replace(/(^\s*)|(\s*$)/g,""),f=d.attr("data-id");(void 0==c||confirm(c.format(e)))&&(d.parent().remove(),b&&a.isFunction(b)&&b(f))})},d.prototype.handleRefreshEvent=function(){this.$.on(".click",".refresh-panel",function(){var b=a(this).closest(".panel");c(b)})},d.prototype.handleDraggable=function(){var b=this.$,c=this.options.afterOrdered;this.$.addClass("dashboard-draggable"),this.$.find(".panel-actions").mousedown(function(a){a.preventDefault(),a.stopPropagation()}),this.$.find(".panel-heading").mousedown(function(d){function e(c){var d=j.data("mouseOffset");j.css({left:c.pageX-d.x,top:c.pageY-d.y}),i.find(".dragging-in").removeClass("dragging-in");var e=!1;i.children().each(function(){var d=a(this);if(d.hasClass("dragging-col-holder"))return e=!0,!0;var f=d.children(".panel"),g=f.offset(),h=f.width(),j=f.height(),k=g.left,l=g.top,n=c.pageX,o=c.pageY;if(n>k&&o>l&&k+h>n&&l+j>o){{i.find(".dragging-col")}return d.addClass("dragging-in"),e?m.insertAfter(d):m.insertBefore(d),b.addClass("dashboard-holding"),!1}}),c.preventDefault()}function f(d){var h=g.data("order");g.parent().insertAfter(m);var k=0,l={};i.children(":not(.dragging-col-holder)").each(function(){var b=a(this).children(".panel");b.data("order",++k),l[b.attr("id")]=k,b.parent().attr("data-order",k)}),h!=l[g.attr("id")]&&(i.data("orders",l),c&&a.isFunction(c)&&c(l)),j.remove(),b.removeClass("dashboard-holding"),b.find(".dragging-col").removeClass("dragging-col"),b.find(".panel-dragging").removeClass("panel-dragging"),i.find(".dragging-in").removeClass("dragging-in"),b.removeClass("dashboard-dragging"),a(document).unbind("mousemove",e).unbind("mouseup",f),d.preventDefault()}var g=a(this).closest(".panel"),h=g.parent(),i=g.closest(".row"),j=g.clone().addClass("panel-dragging-shadow"),k=g.offset(),l=b.offset(),m=i.find(".dragging-col-holder");m.length||(m=a("").addClass(i.children().attr("class")).removeClass("dragging-col").appendTo(i)),m.insertBefore(h).find(".panel").replaceWith(g.clone().addClass("panel-dragging panel-dragging-holder")),b.addClass("dashboard-dragging"),g.addClass("panel-dragging").parent().addClass("dragging-col"),j.css({left:k.left-l.left,top:k.top-l.top,width:g.width(),height:g.height()}).appendTo(b).data("mouseOffset",{x:d.pageX-k.left+l.left,y:d.pageY-k.top+l.top}),a(document).bind("mousemove",e).bind("mouseup",f),d.preventDefault()})},d.prototype.handlePanelPadding=function(){this.$.find(".panel-body > table, .panel-body > .list-group").closest(".panel-body").addClass("no-padding")},d.prototype.handlePanelHeight=function(){var c=this.options.height;this.$.find(".row").each(function(){var d=a(this),e=d.find(".panel"),f=d.data("height")||c;"number"!=typeof f&&(f=0,e.each(function(){f=b.max(f,a(this).innerHeight())})),e.each(function(){var b=a(this);b.find(".panel-body").css("height",f-b.find(".panel-heading").outerHeight()-2)})})},d.prototype.init=function(){this.handlePanelHeight(),this.handlePanelPadding(),this.handleRemoveEvent(),this.handleRefreshEvent(),this.draggable&&this.handleDraggable();var b=0;this.$.find(".panel").each(function(){var d=a(this);d.data("order",++b),d.attr("id")||d.attr("id","panel"+b),d.attr("data-id")||d.attr("data-id",b),c(d)})},a.fn.dashboard=function(b){return this.each(function(){var c=a(this),e=c.data("zui.dashboard"),f="object"==typeof b&&b;e||c.data("zui.dashboard",e=new d(this,f)),"string"==typeof b&&e[b]()})},a.fn.dashboard.Constructor=d}(jQuery,Math),function(a){"use strict";if(!a.fn.droppable)throw new Error("droppable requires for boards");var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.getLang(),this.init()};b.DEFAULTS={lang:"zh-cn",langs:{"zh-cn":{appendToTheEnd:"移动到末尾"},"zh-tw":{appendToTheEnd:"移动到末尾"},en:{appendToTheEnd:"Move to the end."}}},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.getLang=function(){var c=window.config;if(!this.options.lang){if("undefined"!=typeof c&&c.clientLang)this.options.lang=c.clientLang;else{var d=a("html").attr("lang");this.options.lang=d?d:"en"}this.options.lang=this.options.lang.replace(/-/,"_").toLowerCase()}this.lang=this.options.langs[this.options.lang]||this.options.langs[b.DEFAULTS.lang]},b.prototype.init=function(){var b=1,c=this.lang;this.$.find('.board-item:not(".disable-drop"), .board:not(".disable-drop")').each(function(){var d=a(this);d.attr("id")?d.attr("data-id",d.attr("id")):d.attr("data-id")||d.attr("data-id","board"+b++),d.hasClass("board")&&d.find(".board-list").append(' {appendToTheEnd}
'.format(c)).append(''.format(c))}),this.bind()},b.prototype.bind=function(b){var c=this.$,d=this.options;"undefined"==typeof b&&(b=c.find('.board-item:not(".disable-drop, .board-item-shadow")')),b.droppable({target:'.board-item:not(".disable-drop, .board-item-shadow")',flex:!0,start:function(a){c.addClass("dragging").find(".board-item-shadow").height(a.element.outerHeight())},drag:function(a){if(c.find(".board.drop-in-empty").removeClass("drop-in-empty"),a.isIn){var b=a.target.closest(".board").addClass("drop-in"),d=b.find(".board-item-shadow"),e=a.target;c.addClass("drop-in").find(".board.drop-in").not(b).removeClass("drop-in"),d.insertBefore(e),b.toggleClass("drop-in-empty",e.hasClass("board-item-empty"))}},drop:function(b){if(b.isNew){var c="drop";d.hasOwnProperty(c)&&a.isFunction(d[c])&&d[c](b),b.element.insertBefore(b.target)}},finish:function(){c.removeClass("dragging").removeClass("drop-in").find(".board.drop-in").removeClass("drop-in")}})},a.fn.boards=function(c){return this.each(function(){var d=a(this),e=d.data("zui.boards"),f="object"==typeof c&&c;e||d.data("zui.boards",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.boards.Constructor=b,a(function(){a('[data-toggle="boards"]').boards()})}(jQuery),function(a){"use strict";var b="zui.datatable",c=function(c,d){this.name=b,this.$=a(c),this.isTable="TABLE"===this.$[0].tagName,this.firstShow=!0,this.isTable?(this.$table=this.$,this.id="datatable-"+(this.$.attr("id")||a.uuid())):(this.$datatable=this.$.addClass("datatable"),this.$.attr("id")?this.id=this.$.attr("id"):(this.id="datatable-"+a.uuid(),this.$.attr("id",this.id))),this.getOptions(d),this.load(),this.callEvent("ready")};c.DEFAULTS={checkable:!1,checkByClickRow:!0,checkedClass:"active",checkboxName:null,sortable:!1,fixedHeader:!0,fixedHeaderOffset:0,fixedLeftWidth:"30%",fixedRightWidth:"30%",flexHeadDrag:!0,scrollPos:"in",rowHover:!0,colHover:!0,hoverClass:"hover",colHoverClass:"col-hover",minColWidth:20,minFixedLeftWidth:200,minFixedRightWidth:200,minFlexAreaWidth:200},c.prototype.getOptions=function(b){var d=this.$;b=a.extend({},c.DEFAULTS,this.$.data(),b),b.tableClass=b.tableClass||"",b.tableClass=" "+b.tableClass+" table-datatable",d.hasClass("table-bordered")&&(b.tableClass+=" table-bordered"),(d.hasClass("table-hover")||b.rowHover)&&(b.tableClass+=" table-hover"),d.hasClass("table-striped")&&(b.tableClass+=" table-striped"),d.hasClass("table-condensed")&&(b.tableClass+=" table-condensed"),d.hasClass("table-fixed")&&(b.tableClass+=" table-fixed"),this.options=b},c.prototype.load=function(c){var d,e=this.options;if(a.isPlainObject(c))this.data=c;else if("string"==typeof c){var f=a(c);f.length&&(this.$table=f.first(),this.$table.data(b,this),this.isTable=!0),c=null}else c=e.data;if(!c){if(!this.isTable)throw new Error("No data avaliable!");c={cols:[],rows:[]},d=c.cols;var g,h,i,j,k=c.rows,l=this.$table;l.find("thead > tr:first").children("th").each(function(){g=a(this),d.push(a.extend({text:g.html(),flex:!1||g.hasClass("flex-col"),width:"auto",cssClass:g.attr("class"),css:g.attr("style"),type:"string",ignore:g.hasClass("ignore"),sort:!g.hasClass("sort-disabled")},g.data()))}),l.find("tbody > tr").each(function(){h=a(this),j=a.extend({data:[],checked:!1,cssClass:h.attr("class"),css:h.attr("style"),id:h.attr("id")},h.data()),h.children("td").each(function(){i=a(this),j.data.push(a.extend({cssClass:i.attr("class"),css:i.attr("style"),text:i.html()},i.data()))}),k.push(j)});var m=l.find("tfoot");m.length&&(c.footer=a('').append(m))}c.flexStart=-1,c.flexEnd=-1,d=c.cols,c.colsLength=d.length;for(var n=0;n=0,c.fixedRight=c.flexEnd>=0&&c.flexEnd0,c.flexStart<0&&c.flexEnd<0&&(c.fixedLeft=!0,c.flexStart=c.colsLength,c.flexEnd=c.colsLength),this.data=c,this.callEvent("afterLoad",{data:c}),this.render()},c.prototype.render=function(){var c,d,e,f,g=this,h=g.$datatable||(g.isTable?a(''):g.$datatable),i=g.options,j=g.data,k=g.data.cols,l=g.data.rows,m=i.checkable,n='',o='';h.children(".datatable-head, .datatable-rows").remove(),h.toggleClass("sortable",i.sortable);var p,q,r,s=a('');for(c=a("
"),e=a("
"),f=a("
"),d=0;d=j.flexStart&&d<=j.flexEnd?f:e,0===d&&m&&p.append(' | '),r.ignore||(q=a(" | "),q.toggleClass("sort-down","down"===r.sort).toggleClass("sort-up","up"===r.sort).toggleClass("sort-disabled",r.sort===!1),q.addClass(r.cssClass).addClass(r.colClass).html(r.text).attr({"data-index":d,"data-type":r.type,style:r.css}),p.append(q));var t;j.fixedLeft&&(t=a(o),t.addClass("fixed-left").find("table").addClass(i.tableClass).find("thead").append(c),s.append(t)),j.flexArea&&(t=a(o),t.addClass("flexarea").find(".datatable-wrapper").append('').find("table").addClass(i.tableClass).find("thead").append(f),s.append(t)),j.fixedRight&&(t=a(o),t.addClass("fixed-right").find("table").addClass(i.tableClass).find("thead").append(e),s.append(t)),h.append(s);var u,v,w,x,y,z,A,B,C=a(''),D=l.length;c=a("
"),e=a("
"),f=a("
");for(var E=0;D>E;++E){for(z=l[E],"undefined"==typeof z.id&&(z.id=E),z.index=E,u=a("
|
"),u.addClass(z.cssClass).toggleClass(i.checkedClass,z.checked).attr({"data-index":E,"data-id":z.id}),v=u.clone(),w=u.clone(),B=z.data.length,d=0;B>d;++d)A=z.data[d],p=d
=j.flexStart&&d<=j.flexEnd?v:w,0===d&&m&&(y=a(' | '),i.checkboxName&&y.append(''),p.append(y)),k[d].ignore||(a.isPlainObject(A)||(A={text:A,row:E,index:d},z.data[d]=A),x=a(" | "),x.html(A.text).addClass(A.cssClass).addClass(k[d].colClass).attr({"data-row":E,"data-index":d,"data-flex":!1,"data-type":k[d].type,style:A.css}),p.append(x));c.append(u),f.append(v),e.append(w)}var F;j.fixedLeft&&(F=a(n),F.addClass("fixed-left").find("table").addClass(i.tableClass).append(c),C.append(F)),j.flexArea&&(F=a(n),F.addClass("flexarea").find(".datatable-wrapper").append('').find("table").addClass(i.tableClass).append(f),C.append(F)),j.fixedRight&&(F=a(n),F.addClass("fixed-right").find("table").addClass(i.tableClass).append(e),C.append(F)),h.append(C),j.flexArea&&h.append('');var G=h.children(".datatable-footer").detach();j.footer?(h.append(a('').append(j.footer)),j.footer=null):G.length&&h.append(G),g.$datatable=h.data(b,g),g.isTable&&g.firstShow&&(g.$table.attr("data-datatable-id",this.id).hide().after(h),g.firstShow=!1),g.bindEvents(),g.refreshSize(),g.callEvent("render")},c.prototype.bindEvents=function(){var b=this,c=this.data,d=this.options,e=window.store,f=this.$datatable,g=b.$dataSpans=f.children(".datatable-head, .datatable-rows").find(".datatable-span"),h=b.$rowsSpans=f.children(".datatable-rows").children(".datatable-rows-span"),i=b.$headSpans=f.children(".datatable-head").children(".datatable-head-span"),j=b.$cells=g.find("td, th"),k=b.$dataCells=j.filter("td");b.$headCells=j.filter("th");var l=b.$rows=b.$rowsSpans.find(".table > tbody > tr");if(d.rowHover){var m=d.hoverClass;h.on("mouseenter","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m),l.filter('[data-index="'+a(this).addClass(m).closest("tr").data("index")+'"]').addClass(m)}).on("mouseleave","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m)})}if(d.colHover){var n=d.colHoverClass;i.on("mouseenter","th",function(){j.filter("."+n).removeClass(n),j.filter('[data-index="'+a(this).data("index")+'"]').addClass(n)}).on("mouseleave","th",function(){j.filter("."+n).removeClass(n)})}if(c.flexArea){var o,p,q,r,s,t,u,v=f.find(".scroll-slide"),w=f.find(".datatable-span.flexarea"),x=f.find(".datatable-span.fixed-left"),y=f.find(".datatable-span.flexarea .table"),z=v.children(".bar"),A=b.id+"_scrollOffset";b.width=f.width(),f.resize(function(){b.width=f.width()});var B=function(a,b){s=Math.max(0,Math.min(o-p,a)),b||f.addClass("scrolling"),z.css("left",s),u=0-Math.floor((q-o)*s/(o-p)),y.css("left",u),r=s,f.toggleClass("scrolled-in",s>2).toggleClass("scrolled-out",o-p-2>s),e.pageSet(A,s)},C=function(){o=w.width(),v.width(o).css("left",x.width()),q=y.width(),p=Math.floor(o*o/q),z.css("width",p),y.css("min-width",o),f.toggleClass("show-scroll-slide",q>o),t||o===p||(t=!0,B(e.pageGet(A,0),!0)),f.hasClass("size-changing")&&B(s,!0)};w.resize(C),C();var D={move:!1,stopPropagation:!0,drag:function(a){B(z.position().left+a.smallOffset.x*(a.element.hasClass("bar")?1:-1))},finish:function(){f.removeClass("scrolling")}};z.draggable(D),d.flexHeadDrag&&f.find(".datatable-head-span.flexarea").draggable(D),v.mousedown(function(a){var b=a.pageX-v.offset().left;B(b-p/2)})}if(d.checkable){var E,F=b.id+"_checkedStatus",G=d.checkedClass,H=function(){var f=h.first().find(".table > tbody > tr"),g=f.filter("."+G);f.find(".check-row input:checkbox").prop("checked",!1);var j={checkedAll:f.length===g.length&&g.length>0,checks:g.map(function(){return E=a(this).data("id"),d.checkboxName&&a(this).find(".check-row input:checkbox").prop("checked",!0),E}).toArray()};a.each(c.rows,function(b,c){c.checked=a.inArray(c.id,j.checks)>-1}),i.find(".check-all").toggleClass("checked",j.checkedAll),e.pageSet(F,j),b.callEvent("checksChanged",{checks:j})};this.$rowsSpans.on("click",d.checkByClickRow?"tr":".check-row",function(){l.filter('[data-index="'+a(this).closest("tr").data("index")+'"]').toggleClass(G),H()}),this.$datatable.on("click",".check-all",function(){l.toggleClass(G,a(this).toggleClass("checked").hasClass("checked")),H()}).on("click",".check-none",function(){l.toggleClass(G,!1),H()}).on("click",".check-inverse",function(){l.toggleClass(G),H()});var I=e.pageGet(F);I&&(i.find(".check-all").toggleClass("checked",I.checkedAll),I.checkedAll?l.addClass(G):(l.removeClass(G),a.each(I.checks,function(a,b){l.filter('[data-id="'+b+'"]').addClass(G)})),I.checks.length&&H())}d.sortable&&i.on("click","th:not(.sort-disabled, .check-btn)",function(){f.hasClass("size-changing")||b.sortTable(a(this))})},c.prototype.sortTable=function(b){var c=window.store,d=this.id+"_datatableSorter",e=c.pageGet(d);if(b||(b=e?this.$headCells.filter('[data-index="'+e.index+'"]').addClass("sort-"+e.type):this.$headCells.filter(".sort-up, .sort-down").first()),b.length){var f,g,h,i=this.data,j=i.cols,k=i.rows,l=this.$headCells;f=!b.hasClass("sort-up"),l.removeClass("sort-up sort-down"),b.addClass(f?"sort-up":"sort-down"),h=b.data("index"),f=b.hasClass("sort-up"),a.each(j,function(a,b){a==h||"up"!==b.sort&&"down"!==b.sort?a==h&&(b.sort=f?"up":"down",g=b.type):b.sort=!0});var m,n,o,p=this.$dataCells.filter('[data-index="'+h+'"]');k.sort(function(a,b){return a=a.data[h],b=b.data[h],m=p.filter('[data-row="'+a.row+'"]').text(),n=p.filter('[data-row="'+b.row+'"]').text(),"number"===g?(m=parseFloat(m),n=parseFloat(n)):"date"===g?(m=Date.parse(m),n=Date.parse(n)):(m=m.toLowerCase(),n=n.toLowerCase()),o=m>n?1:n>m?-1:0,f&&(o=-1*o),o});var q,r,s,t=this.$rows,u=[];a.each(k,function(b,c){q=t.filter('[data-index="'+c.index+'"]'),q.each(function(b){s=a(this),r=u[b],r?r.after(s):s.parent().prepend(s),u[b]=s})}),e={index:h,type:f?"up":"down"},c.pageSet(d,e),this.callEvent("sort",{sorter:e})}},c.prototype.refreshSize=function(){var b,c=this.$datatable,d=this.options,e=this.data.rows,f=this.data.cols;c.find(".datatable-span.fixed-left").css("width",d.fixedLeftWidth),c.find(".datatable-span.fixed-right").css("width",d.fixedRightWidth);var g=function(b){var c=0;return b.css("height","auto"),b.each(function(){c=Math.max(c,a(this).height())}),c},h=this.$dataCells,i=this.$cells,j=this.$headCells;for(b=0;b ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTarget();if(b)return b.find(".arrow").length<1&&a.addClass("no-arrow"),void a.html(b.html());var c=this.getTitle(),d=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](c),a.find(".popover-content")[this.options.html?"html":"text"](d),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.getTarget=function(){var b=this.$element,c=this.options,d=b.attr("data-target")||("function"==typeof c.target?c.target.call(b[0]):c.target);return d?"$next"==d?b.next(".popover"):a(d):!1},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('
').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&i
Math.abs(h))c(f,g),Math.abs(g)>10&&b.preventDefault();else{var i=a(window);a("body,html").animate({scrollTop:i.scrollTop()-h},400)}}}function c(a,b){b>10&&a.find(".left.carousel-control").click(),-10>b&&a.find(".right.carousel-control").click()}if(this.options.touchable){this.$element.on("touchstart touchmove touchend",b);var d,e}},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle(),f.touchable&&e.touchable()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),function(){"use strict";window.imgReady=function(){var a=[],b=null,c=function(){for(var b=0;b1024)&&(e.call(m),h.end=!0)},h(),m.onload=function(){!h.end&&h(),f&&f.call(m),m=m.onload=m.onerror=null},void(h.end||(a.push(h),null===b&&(b=setInterval(c,40)))))}}()}(),function(a,b,c){"use strict";if(!a.fn.modalTrigger)throw new Error("modal & modalTrigger requires for lightbox");if(!b.imgReady)throw new Error("imgReady requires for lightbox");var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={modalTeamplate:'![]({image})
'},d.prototype.getOptions=function(b){var c="image";return b=a.extend({},d.DEFAULTS,this.$.data(),b),b[c]||(b[c]=this.$.attr("src")||this.$.attr("href")||this.$.find("img").attr("src"),this.$.data(c,b[c])),b},d.prototype.init=function(){this.bindEvents()},d.prototype.initGroups=function(){var b=this.$.data("groups");b||(b=a('[data-toggle="lightbox"][data-group="'+this.options.group+'"], [data-lightbox-group="'+this.options.group+'"]'),this.$.data("groups",b),b.each(function(b){a(this).attr("data-group-index",b)})),this.groups=b,this.groupIndex=parseInt(this.$.data("group-index"))},d.prototype.bindEvents=function(){var d=this.$,e=this,f=this.options;return f.image?void d.modalTrigger({type:"custom",name:"lightboxModal",position:"center",custom:function(d){e.initGroups();var g=d.modal,h=e.groups,i=e.groupIndex;g.addClass("modal-lightbox").html(f.modalTeamplate.format(f)).toggleClass("lightbox-with-caption","string"==typeof f.caption).removeClass("lightbox-full").data("group-index",i);var j=g.find(".modal-dialog"),k=a(b).width();b.imgReady(f.image,function(){j.css({width:c.min(k,this.width)}),k
0),g.find(".next").toggleClass("show",h.filter('[data-group-index="'+(i+1)+'"]').length>0),g.find(".controller").click(function(){var e=a(this),f=g.data("group-index")+(e.hasClass("prev")?-1:1),i=h.filter('[data-group-index="'+f+'"]');if(i.length){var l=i.data("image"),m=i.data("caption");g.addClass("modal-loading").data("group-index",f).toggleClass("lightbox-with-caption","string"==typeof m).removeClass("lightbox-full"),g.find(".lightbox-img").attr("src",l),k=a(b).width(),b.imgReady(l,function(){j.css({width:c.min(k,this.width)}),k0),g.find(".next").toggleClass("show",h.filter('[data-group-index="'+(f+1)+'"]').length>0),!1})}}):!1},a.fn.lightbox=function(b){var c="group"+(new Date).getTime();return this.each(function(){var e=a(this),f="object"==typeof b&&b;"object"==typeof f&&f.group?e.attr("data-lightbox-group",f.group):e.data("group")?e.attr("data-lightbox-group",e.data("group")):e.attr("data-lightbox-group",c),e.data("group",e.data("lightbox-group"));var g=e.data("zui.lightbox");g||e.data("zui.lightbox",g=new d(this,f)),"string"==typeof b&&g[b]()})},a.fn.lightbox.Constructor=d,a(function(){a('[data-toggle="lightbox"]').lightbox()})}(jQuery,window,Math),function(a,b){"use strict";var c,d=0,e='',f={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},g=function(b,c){var g=this;g.id=d++,c=g.options=a.extend({},f,c),g.message=(c.icon?' ':"")+b,g.$=a(e.format(c)).toggleClass("fade",c.fade).toggleClass("scale",c.scale).attr("id","messager-"+g.id),c.close?g.$.on("click",".close",function(){g.hide()}):g.$.find(".close").remove(),g.$.find(".messager-content").html(g.message),g.$.data("zui.messager",g)};g.prototype.show=function(){var d=this,e=this.options;c&&c.isShow&&c.hide(),d.$.appendTo(e.parent).show(),("top"===e.placement||"bottom"===e.placement||"center"===e.placement)&&d.$.css("left",(a(b).width()-d.$.width()-50)/2),("left"===e.placement||"right"===e.placement||"center"===e.placement)&&d.$.css("top",(a(b).height()-d.$.height()-50)/2),d.$.addClass("in"),e.time&&setTimeout(function(){d.hide()},e.time),d.isShow=!0,c=d},g.prototype.hide=function(){var a=this;a.$.hasClass("in")&&(a.$.removeClass("in"),setTimeout(function(){a.$.remove()},200)),a.isShow=!1},a.Messager=g;var h=b.Messager;b.Messager=a.Messager,b.Messager.noConflict=function(){b.Messager=h},a.showMessage=function(a,b){"string"==typeof b&&(b={type:b});var c=new g(a,b);return c.show(),c};var i=function(a){return"string"==typeof a?{placement:a}:a};a.messager={show:a.showMessage,primary:function(b,c){return a.showMessage(b,a.extend({type:"primary"},i(c)))},success:function(b,c){return a.showMessage(b,a.extend({type:"success",icon:"ok-sign"},i(c)))},info:function(b,c){return a.showMessage(b,a.extend({type:"info",icon:"info-sign"},i(c)))},warning:function(b,c){return a.showMessage(b,a.extend({type:"warning",icon:"warning-sign"},i(c)))},danger:function(b,c){return a.showMessage(b,a.extend({type:"danger",icon:"exclamation-sign"},i(c)))},important:function(b,c){return a.showMessage(b,a.extend({type:"important"},i(c)))},special:function(b,c){return a.showMessage(b,a.extend({type:"special"},i(c)))}};var j=b.messager;b.messager=a.messager,b.messager.noConflict=function(){b.messager=j}}(jQuery,window),function(a){"use strict";var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};b.DEFAULTS={auto:!1,foldicon:"icon-chevron-right"},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.init=function(){var a=this.$.children(".nav");a.find(".nav").closest("li").addClass("nav-parent"),a.find(".nav > li.active").closest("li").addClass("active"),a.find(".nav-parent > a").append(''),this.handleFold()},b.prototype.handleFold=function(){var b=this.options.auto,c=this.$;this.$.find(".nav-parent > a").click(function(d){b&&(c.find(".nav-parent.show").find(".nav").slideUp(function(){a(this).closest(".nav-parent").removeClass("show")}),c.find(".icon-rotate-90").removeClass("icon-rotate-90"));var e=a(this).closest(".nav-parent");return e.hasClass("show")?(e.find(".icon-rotate-90").removeClass("icon-rotate-90"),e.find(".nav").slideUp(function(){a(this).closest(".nav-parent").removeClass("show")})):(e.find(".nav-parent-fold-icon").addClass("icon-rotate-90"),e.find(".nav").slideDown(function(){a(this).closest(".nav-parent").addClass("show")})),d.preventDefault(),!1})},a.fn.menu=function(c){return this.each(function(){var d=a(this),e=d.data("zui.menu"),f="object"==typeof c&&c;e||d.data("zui.menu",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.menu.Constructor=b,a(function(){a('[data-toggle="menu"]').menu()})}(jQuery),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(){var a;if("undefined"!=typeof config&&config.clientLang)a=config.clientLang;else{var c=b("html").attr("lang");a=c?c:"en"}return a.replace("-","_").toLowerCase()}function e(a){var b=r[p.locale];return b?b[a]:r.en[a]}function f(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d(a)===!1;e||c.modal("hide")}function g(a){var b,c=0;for(b in a)c++;return c}function h(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function i(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},p,a),a.buttons||(a.buttons={}),a.backdrop=a.backdrop?"static":!1,c=a.buttons,d=g(c),h(c,function(a,e){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=1==d||d>=2&&"confirm"===a?"btn-primary":"btn-default")}),a}function j(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function k(a,c,d){return b.extend(!0,{},a,j(c,d))}function l(a,b,c,d){var e={className:"bootbox-"+a,buttons:m.apply(null,b)};return n(k(e,d,c),b)}function m(){for(var a={},b=0,c=arguments.length;c>b;b++){var d=arguments[b],f=d.toLowerCase(),g=d.toUpperCase();a[f]={label:e(g)}}return a}function n(a,b){var d={};return h(b,function(a,b){d[b]=!0}),h(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var o={dialog:"",header:"",footer:"",closeButton:"",form:"",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"",date:"",time:"",number:"",password:""}},p={locale:d(),backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},q={};q.alert=function(){var a;if(a=l("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback():!0},q.dialog(a)},q.confirm=function(){var a;if(a=l("confirm",["confirm","cancel"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback(!1)},a.buttons.confirm.callback=function(){return a.callback(!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return q.dialog(a)},q.prompt=function(){var a,d,e,f,g,i,j;f=b(o.form),d={className:"bootbox-prompt",buttons:m("confirm","cancel"),value:"",inputType:"text"},a=n(k(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show;var l=["date","time","number"],p=document.createElement("input");if(p.setAttribute("type",a.inputType),l[a.inputType]&&(a.inputType=p.type),a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback(null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=g.val();break;case"checkbox":var d=g.find("input:checked");c=[],h(d,function(a,d){c.push(b(d).val())})}return a.callback(c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!o.inputs[a.inputType])throw new Error("invalid prompt type");switch(g=b(o.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":g.val(a.value);break;case"select":var r={};if(j=a.inputOptions||[],!j.length)throw new Error("prompt with select requires options");h(j,function(a,d){var e=g;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(r[d.group]||(r[d.group]=b("").attr("label",d.group)),e=r[d.group]),e.append("")}),h(r,function(a,b){g.append(b)}),g.val(a.value);break;case"checkbox":var s=b.isArray(a.value)?a.value:[a.value];if(j=a.inputOptions||[],!j.length)throw new Error("prompt with checkbox requires options");if(!j[0].value||!j[0].text)throw new Error("given options in wrong format");g=b(""),h(j,function(c,d){var e=b(o.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),h(s,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),g.append(e)})}return a.placeholder&&g.attr("placeholder",a.placeholder),a.pattern&&g.attr("pattern",a.pattern),f.append(g),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=q.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){g.focus()}),i===!0&&e.modal("show"),e},q.dialog=function(a){a=i(a);var c=b(o.dialog),d=c.find(".modal-dialog"),e=c.find(".modal-body"),g=a.buttons,j="",k={onEscape:a.onEscape};if(h(g,function(a,b){j+="",k[a]=b.callback}),e.find(".bootbox-body").html(a.message),a.animate===!0&&c.addClass("fade"),a.className&&c.addClass(a.className),"large"===a.size&&d.addClass("modal-lg"),"small"===a.size&&d.addClass("modal-sm"),a.title&&e.before(o.header),a.closeButton){var l=b(o.closeButton);a.title?c.find(".modal-header").prepend(l):l.css("margin-top","-10px").prependTo(e)}return a.title&&c.find(".modal-title").html(a.title),j.length&&(e.after(o.footer),c.find(".modal-footer").html(j)),c.on("hidden.bs.modal",function(a){a.target===this&&c.remove()}),c.on("shown.bs.modal",function(){c.find(".btn-primary:first").focus()}),c.on("escape.close.bb",function(a){k.onEscape&&f(a,c,k.onEscape)}),c.on("click",".modal-footer button",function(a){var d=b(this).data("bb-handler");f(a,c,k[d])}),c.on("click",".bootbox-close-button",function(a){f(a,c,k.onEscape)}),c.on("keyup",function(a){27===a.which&&c.trigger("escape.close.bb")}),b(a.container).append(c),c.modal({backdrop:a.backdrop,keyboard:!1,show:!1}),a.show&&c.modal("show"),c},q.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(p,a)},q.hideAll=function(){b(".bootbox").modal("hide")};var r={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return q.init=function(c){return a(c||b)},q}),+function(a,b){"use strict";function c(b){var c=b.data("url");c&&(b.addClass("panel-loading").find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").addClass("icon-spin"),a.ajax({url:c,dataType:"html"}).done(function(a){b.find(".panel-body").html(a)}).fail(function(){b.addClass("panel-error")}).always(function(){b.removeClass("panel-loading"),b.find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").removeClass("icon-spin")}))}var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.draggable=this.$.hasClass("dashboard-draggable")||this.options.draggable,this.init()};d.DEFAULTS={height:360},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)
+},d.prototype.handleRemoveEvent=function(){var b=this.options.afterPanelRemoved,c=this.options.panelRemovingTip;this.$.on("click",".remove-panel",function(){var d=a(this).closest(".panel"),e=d.data("name")||d.find(".panel-heading").text().replace("\n","").replace(/(^\s*)|(\s*$)/g,""),f=d.attr("data-id");(void 0==c||confirm(c.format(e)))&&(d.parent().remove(),b&&a.isFunction(b)&&b(f))})},d.prototype.handleRefreshEvent=function(){this.$.on(".click",".refresh-panel",function(){var b=a(this).closest(".panel");c(b)})},d.prototype.handleDraggable=function(){var b=this.$,c=this.options.afterOrdered;this.$.addClass("dashboard-draggable"),this.$.find(".panel-actions").mousedown(function(a){a.preventDefault(),a.stopPropagation()}),this.$.find(".panel-heading").mousedown(function(d){function e(c){var d=j.data("mouseOffset");j.css({left:c.pageX-d.x,top:c.pageY-d.y}),i.find(".dragging-in").removeClass("dragging-in");var e=!1;i.children().each(function(){var d=a(this);if(d.hasClass("dragging-col-holder"))return e=!0,!0;var f=d.children(".panel"),g=f.offset(),h=f.width(),j=f.height(),k=g.left,l=g.top,n=c.pageX,o=c.pageY;if(n>k&&o>l&&k+h>n&&l+j>o){{i.find(".dragging-col")}return d.addClass("dragging-in"),e?m.insertAfter(d):m.insertBefore(d),b.addClass("dashboard-holding"),!1}}),c.preventDefault()}function f(d){var h=g.data("order");g.parent().insertAfter(m);var k=0,l={};i.children(":not(.dragging-col-holder)").each(function(){var b=a(this).children(".panel");b.data("order",++k),l[b.attr("id")]=k,b.parent().attr("data-order",k)}),h!=l[g.attr("id")]&&(i.data("orders",l),c&&a.isFunction(c)&&c(l)),j.remove(),b.removeClass("dashboard-holding"),b.find(".dragging-col").removeClass("dragging-col"),b.find(".panel-dragging").removeClass("panel-dragging"),i.find(".dragging-in").removeClass("dragging-in"),b.removeClass("dashboard-dragging"),a(document).unbind("mousemove",e).unbind("mouseup",f),d.preventDefault()}var g=a(this).closest(".panel"),h=g.parent(),i=g.closest(".row"),j=g.clone().addClass("panel-dragging-shadow"),k=g.offset(),l=b.offset(),m=i.find(".dragging-col-holder");m.length||(m=a("").addClass(i.children().attr("class")).removeClass("dragging-col").appendTo(i)),m.insertBefore(h).find(".panel").replaceWith(g.clone().addClass("panel-dragging panel-dragging-holder")),b.addClass("dashboard-dragging"),g.addClass("panel-dragging").parent().addClass("dragging-col"),j.css({left:k.left-l.left,top:k.top-l.top,width:g.width(),height:g.height()}).appendTo(b).data("mouseOffset",{x:d.pageX-k.left+l.left,y:d.pageY-k.top+l.top}),a(document).bind("mousemove",e).bind("mouseup",f),d.preventDefault()})},d.prototype.handlePanelPadding=function(){this.$.find(".panel-body > table, .panel-body > .list-group").closest(".panel-body").addClass("no-padding")},d.prototype.handlePanelHeight=function(){var c=this.options.height;this.$.find(".row").each(function(){var d=a(this),e=d.find(".panel"),f=d.data("height")||c;"number"!=typeof f&&(f=0,e.each(function(){f=b.max(f,a(this).innerHeight())})),e.each(function(){var b=a(this);b.find(".panel-body").css("height",f-b.find(".panel-heading").outerHeight()-2)})})},d.prototype.init=function(){this.handlePanelHeight(),this.handlePanelPadding(),this.handleRemoveEvent(),this.handleRefreshEvent(),this.draggable&&this.handleDraggable();var b=0;this.$.find(".panel").each(function(){var d=a(this);d.data("order",++b),d.attr("id")||d.attr("id","panel"+b),d.attr("data-id")||d.attr("data-id",b),c(d)})},a.fn.dashboard=function(b){return this.each(function(){var c=a(this),e=c.data("zui.dashboard"),f="object"==typeof b&&b;e||c.data("zui.dashboard",e=new d(this,f)),"string"==typeof b&&e[b]()})},a.fn.dashboard.Constructor=d}(jQuery,Math),function(a){"use strict";if(!a.fn.droppable)throw new Error("droppable requires for boards");var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.getLang(),this.init()};b.DEFAULTS={lang:"zh-cn",langs:{"zh-cn":{appendToTheEnd:"移动到末尾"},"zh-tw":{appendToTheEnd:"移动到末尾"},en:{appendToTheEnd:"Move to the end."}}},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.getLang=function(){var c=window.config;if(!this.options.lang){if("undefined"!=typeof c&&c.clientLang)this.options.lang=c.clientLang;else{var d=a("html").attr("lang");this.options.lang=d?d:"en"}this.options.lang=this.options.lang.replace(/-/,"_").toLowerCase()}this.lang=this.options.langs[this.options.lang]||this.options.langs[b.DEFAULTS.lang]},b.prototype.init=function(){var b=1,c=this.lang;this.$.find('.board-item:not(".disable-drop"), .board:not(".disable-drop")').each(function(){var d=a(this);d.attr("id")?d.attr("data-id",d.attr("id")):d.attr("data-id")||d.attr("data-id","board"+b++),d.hasClass("board")&&d.find(".board-list").append(' {appendToTheEnd}
'.format(c)).append(''.format(c))}),this.bind()},b.prototype.bind=function(b){var c=this.$,d=this.options;"undefined"==typeof b&&(b=c.find('.board-item:not(".disable-drop, .board-item-shadow")')),b.droppable({target:'.board-item:not(".disable-drop, .board-item-shadow")',flex:!0,start:function(a){c.addClass("dragging").find(".board-item-shadow").height(a.element.outerHeight())},drag:function(a){if(c.find(".board.drop-in-empty").removeClass("drop-in-empty"),a.isIn){var b=a.target.closest(".board").addClass("drop-in"),d=b.find(".board-item-shadow"),e=a.target;c.addClass("drop-in").find(".board.drop-in").not(b).removeClass("drop-in"),d.insertBefore(e),b.toggleClass("drop-in-empty",e.hasClass("board-item-empty"))}},drop:function(b){if(b.isNew){var c="drop";d.hasOwnProperty(c)&&a.isFunction(d[c])&&d[c](b),b.element.insertBefore(b.target)}},finish:function(){c.removeClass("dragging").removeClass("drop-in").find(".board.drop-in").removeClass("drop-in")}})},a.fn.boards=function(c){return this.each(function(){var d=a(this),e=d.data("zui.boards"),f="object"==typeof c&&c;e||d.data("zui.boards",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.boards.Constructor=b,a(function(){a('[data-toggle="boards"]').boards()})}(jQuery),function(a){"use strict";var b="zui.datatable",c=function(c,d){this.name=b,this.$=a(c),this.isTable="TABLE"===this.$[0].tagName,this.firstShow=!0,this.isTable?(this.$table=this.$,this.id="datatable-"+(this.$.attr("id")||a.uuid())):(this.$datatable=this.$.addClass("datatable"),this.$.attr("id")?this.id=this.$.attr("id"):(this.id="datatable-"+a.uuid(),this.$.attr("id",this.id))),this.getOptions(d),this.load(),this.callEvent("ready")};c.DEFAULTS={checkable:!1,checkByClickRow:!0,checkedClass:"active",checkboxName:null,sortable:!1,fixedHeader:!0,fixedHeaderOffset:0,fixedLeftWidth:"30%",fixedRightWidth:"30%",flexHeadDrag:!0,scrollPos:"in",rowHover:!0,colHover:!0,hoverClass:"hover",colHoverClass:"col-hover",minColWidth:20,minFixedLeftWidth:200,minFixedRightWidth:200,minFlexAreaWidth:200},c.prototype.getOptions=function(b){var d=this.$;b=a.extend({},c.DEFAULTS,this.$.data(),b),b.tableClass=b.tableClass||"",b.tableClass=" "+b.tableClass+" table-datatable",d.hasClass("table-bordered")&&(b.tableClass+=" table-bordered"),(d.hasClass("table-hover")||b.rowHover)&&(b.tableClass+=" table-hover"),d.hasClass("table-striped")&&(b.tableClass+=" table-striped"),d.hasClass("table-condensed")&&(b.tableClass+=" table-condensed"),d.hasClass("table-fixed")&&(b.tableClass+=" table-fixed"),this.options=b},c.prototype.load=function(c){var d,e=this.options;if(a.isPlainObject(c))this.data=c;else if("string"==typeof c){var f=a(c);f.length&&(this.$table=f.first(),this.$table.data(b,this),this.isTable=!0),c=null}else c=e.data;if(!c){if(!this.isTable)throw new Error("No data avaliable!");c={cols:[],rows:[]},d=c.cols;var g,h,i,j,k=c.rows,l=this.$table;l.find("thead > tr:first").children("th").each(function(){g=a(this),d.push(a.extend({text:g.html(),flex:!1||g.hasClass("flex-col"),width:"auto",cssClass:g.attr("class"),css:g.attr("style"),type:"string",ignore:g.hasClass("ignore"),sort:!g.hasClass("sort-disabled")},g.data()))}),l.find("tbody > tr").each(function(){h=a(this),j=a.extend({data:[],checked:!1,cssClass:h.attr("class"),css:h.attr("style"),id:h.attr("id")},h.data()),h.children("td").each(function(){i=a(this),j.data.push(a.extend({cssClass:i.attr("class"),css:i.attr("style"),text:i.html()},i.data()))}),k.push(j)});var m=l.find("tfoot");m.length&&(c.footer=a('').append(m))}c.flexStart=-1,c.flexEnd=-1,d=c.cols,c.colsLength=d.length;for(var n=0;n=0,c.fixedRight=c.flexEnd>=0&&c.flexEnd0,c.flexStart<0&&c.flexEnd<0&&(c.fixedLeft=!0,c.flexStart=c.colsLength,c.flexEnd=c.colsLength),this.data=c,this.callEvent("afterLoad",{data:c}),this.render()},c.prototype.render=function(){var c,d,e,f,g=this,h=g.$datatable||(g.isTable?a(''):g.$datatable),i=g.options,j=g.data,k=g.data.cols,l=g.data.rows,m=i.checkable,n='',o='';h.children(".datatable-head, .datatable-rows").remove(),h.toggleClass("sortable",i.sortable);var p,q,r,s=a('');for(c=a("
"),e=a("
"),f=a("
"),d=0;d=j.flexStart&&d<=j.flexEnd?f:e,0===d&&m&&p.append(' | '),r.ignore||(q=a(" | "),q.toggleClass("sort-down","down"===r.sort).toggleClass("sort-up","up"===r.sort).toggleClass("sort-disabled",r.sort===!1),q.addClass(r.cssClass).addClass(r.colClass).html(r.text).attr({"data-index":d,"data-type":r.type,style:r.css}),p.append(q));var t;j.fixedLeft&&(t=a(o),t.addClass("fixed-left").find("table").addClass(i.tableClass).find("thead").append(c),s.append(t)),j.flexArea&&(t=a(o),t.addClass("flexarea").find(".datatable-wrapper").append('').find("table").addClass(i.tableClass).find("thead").append(f),s.append(t)),j.fixedRight&&(t=a(o),t.addClass("fixed-right").find("table").addClass(i.tableClass).find("thead").append(e),s.append(t)),h.append(s);var u,v,w,x,y,z,A,B,C=a(''),D=l.length;c=a("
"),e=a("
"),f=a("
");for(var E=0;D>E;++E){for(z=l[E],"undefined"==typeof z.id&&(z.id=E),z.index=E,u=a("
|
"),u.addClass(z.cssClass).toggleClass(i.checkedClass,z.checked).attr({"data-index":E,"data-id":z.id}),v=u.clone(),w=u.clone(),B=z.data.length,d=0;B>d;++d)A=z.data[d],p=d
=j.flexStart&&d<=j.flexEnd?v:w,0===d&&m&&(y=a(' | '),i.checkboxName&&y.append(''),p.append(y)),k[d].ignore||(a.isPlainObject(A)||(A={text:A,row:E,index:d},z.data[d]=A),x=a(" | "),x.html(A.text).addClass(A.cssClass).addClass(k[d].colClass).attr({"data-row":E,"data-index":d,"data-flex":!1,"data-type":k[d].type,style:A.css}),p.append(x));c.append(u),f.append(v),e.append(w)}var F;j.fixedLeft&&(F=a(n),F.addClass("fixed-left").find("table").addClass(i.tableClass).append(c),C.append(F)),j.flexArea&&(F=a(n),F.addClass("flexarea").find(".datatable-wrapper").append('').find("table").addClass(i.tableClass).append(f),C.append(F)),j.fixedRight&&(F=a(n),F.addClass("fixed-right").find("table").addClass(i.tableClass).append(e),C.append(F)),h.append(C),j.flexArea&&h.append('');var G=h.children(".datatable-footer").detach();j.footer?(h.append(a('').append(j.footer)),j.footer=null):G.length&&h.append(G),g.$datatable=h.data(b,g),g.isTable&&g.firstShow&&(g.$table.attr("data-datatable-id",this.id).hide().after(h),g.firstShow=!1),g.bindEvents(),g.refreshSize(),g.callEvent("render")},c.prototype.bindEvents=function(){var b=this,c=this.data,d=this.options,e=window.store,f=this.$datatable,g=b.$dataSpans=f.children(".datatable-head, .datatable-rows").find(".datatable-span"),h=b.$rowsSpans=f.children(".datatable-rows").children(".datatable-rows-span"),i=b.$headSpans=f.children(".datatable-head").children(".datatable-head-span"),j=b.$cells=g.find("td, th"),k=b.$dataCells=j.filter("td");b.$headCells=j.filter("th");var l=b.$rows=b.$rowsSpans.find(".table > tbody > tr");if(d.rowHover){var m=d.hoverClass;h.on("mouseenter","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m),l.filter('[data-index="'+a(this).addClass(m).closest("tr").data("index")+'"]').addClass(m)}).on("mouseleave","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m)})}if(d.colHover){var n=d.colHoverClass;i.on("mouseenter","th",function(){j.filter("."+n).removeClass(n),j.filter('[data-index="'+a(this).data("index")+'"]').addClass(n)}).on("mouseleave","th",function(){j.filter("."+n).removeClass(n)})}if(c.flexArea){var o,p,q,r,s,t,u,v=f.find(".scroll-slide"),w=f.find(".datatable-span.flexarea"),x=f.find(".datatable-span.fixed-left"),y=f.find(".datatable-span.flexarea .table"),z=v.children(".bar"),A=b.id+"_scrollOffset";b.width=f.width(),f.resize(function(){b.width=f.width()});var B=function(a,b){s=Math.max(0,Math.min(o-p,a)),b||f.addClass("scrolling"),z.css("left",s),u=0-Math.floor((q-o)*s/(o-p)),y.css("left",u),r=s,f.toggleClass("scrolled-in",s>2).toggleClass("scrolled-out",o-p-2>s),e.pageSet(A,s)},C=function(){o=w.width(),v.width(o).css("left",x.width()),q=y.width(),p=Math.floor(o*o/q),z.css("width",p),y.css("min-width",o),f.toggleClass("show-scroll-slide",q>o),t||o===p||(t=!0,B(e.pageGet(A,0),!0)),f.hasClass("size-changing")&&B(s,!0)};w.resize(C),C();var D={move:!1,stopPropagation:!0,drag:function(a){B(z.position().left+a.smallOffset.x*(a.element.hasClass("bar")?1:-1))},finish:function(){f.removeClass("scrolling")}};z.draggable(D),d.flexHeadDrag&&f.find(".datatable-head-span.flexarea").draggable(D),v.mousedown(function(a){var b=a.pageX-v.offset().left;B(b-p/2)})}if(d.checkable){var E,F=b.id+"_checkedStatus",G=d.checkedClass,H=function(){var f=h.first().find(".table > tbody > tr"),g=f.filter("."+G);f.find(".check-row input:checkbox").prop("checked",!1);var j={checkedAll:f.length===g.length&&g.length>0,checks:g.map(function(){return E=a(this).data("id"),d.checkboxName&&a(this).find(".check-row input:checkbox").prop("checked",!0),E}).toArray()};a.each(c.rows,function(b,c){c.checked=a.inArray(c.id,j.checks)>-1}),i.find(".check-all").toggleClass("checked",j.checkedAll),e.pageSet(F,j),b.callEvent("checksChanged",{checks:j})};this.$rowsSpans.on("click",d.checkByClickRow?"tr":".check-row",function(){l.filter('[data-index="'+a(this).closest("tr").data("index")+'"]').toggleClass(G),H()}),this.$datatable.on("click",".check-all",function(){l.toggleClass(G,a(this).toggleClass("checked").hasClass("checked")),H()}).on("click",".check-none",function(){l.toggleClass(G,!1),H()}).on("click",".check-inverse",function(){l.toggleClass(G),H()});var I=e.pageGet(F);I&&(i.find(".check-all").toggleClass("checked",I.checkedAll),I.checkedAll?l.addClass(G):(l.removeClass(G),a.each(I.checks,function(a,b){l.filter('[data-id="'+b+'"]').addClass(G)})),I.checks.length&&H())}d.sortable&&i.on("click","th:not(.sort-disabled, .check-btn)",function(){f.hasClass("size-changing")||b.sortTable(a(this))})},c.prototype.sortTable=function(b){var c=window.store,d=this.id+"_datatableSorter",e=c.pageGet(d);if(b||(b=e?this.$headCells.filter('[data-index="'+e.index+'"]').addClass("sort-"+e.type):this.$headCells.filter(".sort-up, .sort-down").first()),b.length){var f,g,h,i=this.data,j=i.cols,k=i.rows,l=this.$headCells;f=!b.hasClass("sort-up"),l.removeClass("sort-up sort-down"),b.addClass(f?"sort-up":"sort-down"),h=b.data("index"),f=b.hasClass("sort-up"),a.each(j,function(a,b){a==h||"up"!==b.sort&&"down"!==b.sort?a==h&&(b.sort=f?"up":"down",g=b.type):b.sort=!0});var m,n,o,p=this.$dataCells.filter('[data-index="'+h+'"]');k.sort(function(a,b){return a=a.data[h],b=b.data[h],m=p.filter('[data-row="'+a.row+'"]').text(),n=p.filter('[data-row="'+b.row+'"]').text(),"number"===g?(m=parseFloat(m),n=parseFloat(n)):"date"===g?(m=Date.parse(m),n=Date.parse(n)):(m=m.toLowerCase(),n=n.toLowerCase()),o=m>n?1:n>m?-1:0,f&&(o=-1*o),o});var q,r,s,t=this.$rows,u=[];a.each(k,function(b,c){q=t.filter('[data-index="'+c.index+'"]'),q.each(function(b){s=a(this),r=u[b],r?r.after(s):s.parent().prepend(s),u[b]=s})}),e={index:h,type:f?"up":"down"},c.pageSet(d,e),this.callEvent("sort",{sorter:e})}},c.prototype.refreshSize=function(){var b,c=this.$datatable,d=this.options,e=this.data.rows,f=this.data.cols;c.find(".datatable-span.fixed-left").css("width",d.fixedLeftWidth),c.find(".datatable-span.fixed-right").css("width",d.fixedRightWidth);var g=function(b){var c=0;return b.css("height","auto"),b.each(function(){c=Math.max(c,a(this).height())}),c},h=this.$dataCells,i=this.$cells,j=this.$headCells;for(b=0;b",
+ "/": "?",
+ "\\": "|"
+ }
+ };
+
+ function keyHandler(handleObj)
+ {
+ // Only care when a possible input has been specified
+ if (typeof handleObj.data !== "string")
+ {
+ return;
+ }
+
+ var origHandler = handleObj.handler,
+ keys = handleObj.data.toLowerCase().split(" ");
+
+ handleObj.handler = function(event)
+ {
+ // Don't fire in text-accepting inputs that we didn't directly bind to
+ if (this !== event.target && (/textarea|select/i.test(event.target.nodeName) ||
+ event.target.type === "text"))
+ {
+ return;
+ }
+
+ // Keypress represents characters, not special keys
+ var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which],
+ character = String.fromCharCode(event.which).toLowerCase(),
+ key, modif = "",
+ possible = {};
+
+ // check combinations (alt|ctrl|shift+anything)
+ if (event.altKey && special !== "alt")
+ {
+ modif += "alt+";
+ }
+
+ if (event.ctrlKey && special !== "ctrl")
+ {
+ modif += "ctrl+";
+ }
+
+ // TODO: Need to make sure this works consistently across platforms
+ if (event.metaKey && !event.ctrlKey && special !== "meta")
+ {
+ modif += "meta+";
+ }
+
+ if (event.shiftKey && special !== "shift")
+ {
+ modif += "shift+";
+ }
+
+ if (special)
+ {
+ possible[modif + special] = true;
+
+ }
+ else
+ {
+ possible[modif + character] = true;
+ possible[modif + jQuery.hotkeys.shiftNums[character]] = true;
+
+ // "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
+ if (modif === "shift+")
+ {
+ possible[jQuery.hotkeys.shiftNums[character]] = true;
+ }
+ }
+
+ for (var i = 0, l = keys.length; i < l; i++)
+ {
+ if (possible[keys[i]])
+ {
+ return origHandler.apply(this, arguments);
+ }
+ }
+ };
+ }
+
+ jQuery.each(["keydown", "keyup", "keypress"], function()
+ {
+ jQuery.event.special[this] = {
+ add: keyHandler
+ };
+ });
+
+})(jQuery);
diff --git a/docs/js/zui.min.js b/docs/js/zui.min.js
index 5bc756d9119bb1d7e89fffff504956a09d02fc16..fad99b0882934333dd53e088a27bb26cf4f84d19 100644
--- a/docs/js/zui.min.js
+++ b/docs/js/zui.min.js
@@ -8,5 +8,5 @@
/* Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
!function(a,b,c){"use strict";if("undefined"==typeof a)throw new Error("ZUI requires jQuery");a.extend({uuid:function(){for(var a=(new Date).getTime();1e16>a;)a*=10;return a+c.floor(9999*c.random())},getPropertyCount:function(a){return"object"!=typeof a||null===a?0:Object.getOwnPropertyNames(a).length},callEvent:function(b,c,d){return a.isFunction(b)?("undefined"!=typeof d&&(b=a.proxy(b,d)),c.result=b(c),!(void 0!==c.result&&!c.result)):1},clientLang:function(){var c;if("undefined"!=typeof b.config&&b.config.clientLang)c=b.config.clientLang;else{var d=a("html").attr("lang");c=d?d:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return c.replace("-","_").toLowerCase()}}),a.fn.callEvent=function(b,c,d){var e=a(this),f=b.indexOf(".zui."),g=b;0>f&&d&&d.name?b+="."+d.name:g=b.substring(0,f);var h=a.Event(b,c);if("undefined"==typeof d&&f>0&&(d=e.data(b.substring(f+1))),d&&d.options){var i=d.options[g];a.isFunction(i)&&a.callEvent(d.options[g],h,d)}return h}}(jQuery,window,Math),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),function(a,b){"use strict";var c=1200,d=992,e=768,f={desktop:"screen-desktop",desktopLg:"screen-desktop-wide",tablet:"screen-tablet",phone:"screen-phone",isMobile:"device-mobile",isDesktop:"device-desktop"},g=b(a),h=function(){var a=g.width();b("html").toggleClass(f.desktop,a>=d&&c>a).toggleClass(f.desktopLg,a>=c).toggleClass(f.tablet,a>=e&&d>a).toggleClass(f.phone,e>a).toggleClass(f.isMobile,d>a).toggleClass(f.isDesktop,a>=d)};g.resize(h),h()}(window,jQuery),function(a,b){"use strict";var c={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 了解更多...',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。了解更多...',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. Learn more...'},d=function(){var a=this.isIE,b=a();if(b)for(var c=10;c>5;c--)if(a(c)){b=c;break}this.ie=b,this.cssHelper()};d.prototype.cssHelper=function(){var a=this.ie,c=b("html");c.toggleClass("ie",a).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),a&&c.addClass("ie-"+a).toggleClass("gt-ie-7 gte-ie-8 support-ie",a>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",8>a).toggleClass("gt-ie-8 gte-ie-9",a>=9).toggleClass("lte-ie-8 lt-ie-9",9>a).toggleClass("gt-ie-9 gte-ie-10",a>=10).toggleClass("lte-ie-9 lt-ie-10",10>a)},d.prototype.tip=function(){if(this.ie&&this.ie<8){var a=b("#browseHappyTip");a.length||(a=b(''),a.prependTo("body")),a.find(".content").html(this.browseHappyTip||c[b.clientLang()||"zh_cn"])}},d.prototype.isIE=function(a){var b=document.createElement("b");return b.innerHTML="",1===b.getElementsByTagName("i").length},d.prototype.isIE10=function(){return!1},a.browser=new d,b(function(){b("body").hasClass("disabled-browser-tip")||a.browser.tip()})}(window,jQuery),function(){"use strict";Date.ONEDAY_TICKS=864e5,Date.prototype.format=function(a){var b={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S+":this.getMilliseconds()};/(y+)/i.test(a)&&(a=a.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var c in b)new RegExp("("+c+")").test(a)&&(a=a.replace(RegExp.$1,1==RegExp.$1.length?b[c]:("00"+b[c]).substr((""+b[c]).length)));return a},Date.prototype.addMilliseconds=function(a){return this.setTime(this.getTime()+a),this},Date.prototype.addDays=function(a){return this.addMilliseconds(a*Date.ONEDAY_TICKS),this},Date.prototype.clone=function(){var a=new Date;return a.setTime(this.getTime()),a},Date.isLeapYear=function(a){return a%4===0&&a%100!==0||a%400===0},Date.getDaysInMonth=function(a,b){return[31,Date.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},Date.prototype.isLeapYear=function(){return Date.isLeapYear(this.getFullYear())},Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())},Date.prototype.addMonths=function(a){var b=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+a),this.setDate(Math.min(b,this.getDaysInMonth())),this},Date.prototype.getLastWeekday=function(a){a=a||1;for(var b=this.clone();b.getDay()!=a;)b.addDays(-1);return b.clearTime(),b},Date.prototype.isSameDay=function(a){return a.toDateString()===this.toDateString()},Date.prototype.isSameWeek=function(a){var b=this.getLastWeekday(),c=b.clone().addDays(7);return a>=b&&c>a},Date.prototype.isSameYear=function(a){return this.getFullYear()===a.getFullYear()}}(),function(){"use strict";String.prototype.format=function(a){var b=this;if(arguments.length>0){var c;if(1==arguments.length&&"object"==typeof a)for(var d in a)void 0!==a[d]&&(c=new RegExp("({"+d+"})","g"),b=b.replace(c,a[d]));else for(var e=0;e a"),this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),function(a,b){"use strict";var c="localStorage",d=a[c],e=a.store,f="page_"+a.location.pathname,g=function(){this.slience=!0,this.enable=c in a&&a[c]&&a[c].setItem,this.storage=d,this.page=this.get(f,{})};g.prototype.pageSave=function(){if(b.isEmptyObject(this.page))this.remove(f);else{var a,c=[];for(a in this.page){var d=this.page[a];null===d&&c.push(a)}for(a=c.length-1;a>=0;a--)delete this.page[c[a]];this.set(f,this.page)}},g.prototype.pageRemove=function(a){"undefined"!=typeof this.page[a]&&(this.page[a]=null,this.pageSave())},g.prototype.pageClear=function(){this.page={},this.pageSave()},g.prototype.pageGet=function(a,b){var c=this.page[a];return void 0===b||null!==c&&void 0!==c?c:b},g.prototype.pageSet=function(a,c){b.isPlainObject(a)?b.extend(!0,this.page,a):this.page[this.serialize(a)]=c,this.pageSave()},g.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},g.prototype.length=function(){return this.check()?d.getLength?d.getLength():d.length:0},g.prototype.removeItem=function(a){return d.removeItem(a),this},g.prototype.remove=function(a){return this.removeItem(a)},g.prototype.getItem=function(a){return d.getItem(a)},g.prototype.get=function(a,b){var c=this.deserialize(this.getItem(a));return void 0===b||"undefined"!=typeof c&&null!==c&&void 0!==c?c:b},g.prototype.key=function(a){return d.key(a)},g.prototype.setItem=function(a,b){return d.setItem(a,b),this},g.prototype.set=function(a,b){return void 0===b?this.remove(a):(this.setItem(a,this.serialize(b)),this)},g.prototype.clear=function(){return d.clear(),this},g.prototype.forEach=function(a){for(var b=d.length-1;b>=0;b--){var c=d.key(b);a(c,this.get(c))}return this},g.prototype.getAll=function(){var a={};return this.forEach(function(b,c){a[b]=c}),a},g.prototype.serialize=function(a){return"string"==typeof a?a:JSON.stringify(a)},g.prototype.deserialize=function(a){if("string"!=typeof a)return void 0;try{return JSON.parse(a)}catch(b){return a||void 0}};var h=new g;a.store=h,a.store.noConflict=function(){return a.store=e,h}}(window,jQuery),function(a){"use strict";var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};b.DEFAULTS={container:"body",move:!0},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.init=function(){this.handleMouseEvents()},b.prototype.handleMouseEvents=function(){var b=this.$,c="before",d="drag",e="finish",f=this.options;b.mousedown(function(g){function h(c){q=!0;var e=c.pageX,g=c.pageY,h={left:e-o.x,top:g-o.y};b.removeClass("drag-ready").addClass("dragging"),f.move&&b.css(h),f.hasOwnProperty(d)&&a.isFunction(f[d])&&f[d]({event:c,element:b,startOffset:o,pos:h,offset:{x:e-n.x,y:g-n.y},smallOffset:{x:e-p.x,y:g-p.y}}),p.x=e,p.y=g,f.stopPropagation&&c.stopPropagation()}function i(c){if(a(document).unbind("mousemove",h).unbind("mouseup",i),!q)return void b.removeClass("drag-ready");var d={left:c.pageX-o.x,top:c.pageY-o.y};b.removeClass("drag-ready").removeClass("dragging"),f.move&&b.css(d),f.hasOwnProperty(e)&&a.isFunction(f[e])&&f[e]({event:c,element:b,pos:d,offset:{x:c.pageX-n.x,y:c.pageY-n.y},smallOffset:{x:c.pageX-p.x,y:c.pageY-p.y}}),c.preventDefault(),f.stopPropagation&&c.stopPropagation()}if(f.hasOwnProperty(c)&&a.isFunction(f[c])){var j=f[c]({event:g,element:b});if(void 0!==j&&!j)return}var k=a(f.container),l=b.offset(),m=k.offset(),n={x:g.pageX,y:g.pageY},o={x:g.pageX-l.left+m.left,y:g.pageY-l.top+m.top},p=a.extend({},n),q=!1;b.addClass("drag-ready"),a(document).bind("mousemove",h).bind("mouseup",i),g.preventDefault(),f.stopPropagation&&g.stopPropagation()})},a.fn.draggable=function(c){return this.each(function(){var d=a(this),e=d.data("zui.draggable"),f="object"==typeof c&&c;e||d.data("zui.draggable",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.draggable.Constructor=b}(jQuery),function(a,b,c){"use strict";var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={container:"body",flex:!1,deviation:5,sensorOffsetX:0,sensorOffsetY:0,nested:!1},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)},d.prototype.callEvent=function(b,c){return a.callEvent(this.options[b],c,this)},d.prototype.init=function(){this.handleMouseEvents()},d.prototype.handleMouseEvents=function(){var d=this.$,e=this,f=this.options,g="before";this.$triggerTarget=f.trigger?(a.isFunction(f.trigger)?f.trigger(d):d.find(f.trigger)).first():d,this.$triggerTarget.on("mousedown",function(h){function i(b){var g={left:b.pageX,top:b.pageY};if(!(c.abs(g.left-t.left)h&&g.top>i&&g.lefti?g.before(f):g.after(f);var j=d.children(e.selector);c(j),a.callEvent(e.order,{list:j,element:f})}},finish:function(b){e.dragCssClass&&b.element.removeClass(e.dragCssClass),a.callEvent(e.finish,{list:d.children(e.selector),element:b.element})}})},a.fn.sortable=function(c){return this.each(function(){var d=a(this),e=d.data("zui.sortable"),f="object"==typeof c&&c;e?"object"==typeof c&&e.reset():d.data("zui.sortable",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.sortable.Constructor=b}(jQuery,window,document,Math),+function(a){"use strict";function b(b,d,e){return this.each(function(){var f=a(this),g=f.data("zui.modal"),h=a.extend({},c.DEFAULTS,f.data(),"object"==typeof b&&b);g||f.data("zui.modal",g=new c(this,h)),"string"==typeof b?g[b](d,e):h.show&&g.show(d,e)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.zui.modal")},this))};c.VERSION="3.2.0",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"},c.prototype.toggle=function(a,b){return this.isShown?this.hide():this.show(a,b)},c.prototype.ajustPosition=function(b){if("undefined"==typeof b&&(b=this.options.position),"undefined"!=typeof b){var c=this.$element.find(".modal-dialog"),d=Math.max(0,(a(window).height()-c.outerHeight())/2),e="fit"==b?2*d/3:"center"==b?d:b;c.css("margin-top",e)}},c.prototype.show=function(b,d){var e=this,f=a.Event("show.zui.modal",{relatedTarget:b});this.$element.trigger(f),this.isShown||f.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.zui.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var f=a.support.transition&&e.$element.hasClass("fade");e.$element.parent().length||e.$element.appendTo(e.$body),e.$element.show().scrollTop(0),f&&e.$element[0].offsetWidth,e.$element.addClass("in").attr("aria-hidden",!1),e.ajustPosition(d),e.enforceFocus();var g=a.Event("shown.zui.modal",{relatedTarget:b});f?e.$element.find(".modal-dialog").one("bsTransitionEnd",function(){e.$element.trigger("focus").trigger(g)}).emulateTransitionEnd(c.TRANSITION_DURATION):e.$element.trigger("focus").trigger(g)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.zui.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),a(document).off("focusin.zui.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.zui.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.zui.modal").on("focusin.zui.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?a(document).on("keydown.dismiss.zui.modal",a.proxy(function(b){if(27==b.which){var c=a.Event("escaping.bs.modal"),d=this.$element.triggerHandler(c,"esc");if(void 0!=d&&!d)return;this.hide()}},this)):this.isShown||a(document).off("keydown.dismiss.zui.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$element.trigger("hidden.zui.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('').appendTo(this.$body),this.$element.on("mousedown.dismiss.zui.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.zui.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=null;try{f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,""))}catch(g){return}if(f.length){var h=f.data("zui.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.zui.modal",function(a){a.isDefaultPrevented()||f.one("hidden.zui.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,h,this,d.data("position"))}})}(jQuery),function(a){"use strict";function b(b){var c=typeof b;return"undefined"===c?b=a(".modal.modal-once"):"string"===c&&(b=a("#"+b).replace("##","#")),b&&b instanceof a?b:null}if(!a.fn.modal)throw new Error("Modal trigger requires modal.js");var c=function(b){b=a.extend({},c.DEFAULTS,a.ModalTriggerDefaults,b),this.isShown=!1,this.options=b,this.id=a.uuid()};c.DEFAULTS={type:"custom",width:null,size:null,height:"auto",icon:null,name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0},c.prototype.init=function(b){var c=this;if(b.url&&(!b.type||"ajax"!=b.type&&"iframe"!=b.type)&&(b.type="ajax"),b.remote)b.type="ajax","string"==typeof b.remote&&(b.url=b.remote);else if(b.iframe)b.type="iframe","string"==typeof b.iframe&&(b.url=b.iframe);else if(b.custom&&(b.type="custom","string"==typeof b.custom)){var d;try{d=a(b.custom)}catch(e){}d&&d.length?b.custom=d:a.isFunction(window[b.custom])&&(b.custom=window[b.custom])}var f=a("#"+b.name);f.length&&(this.isShown||f.off(".zui.modal"),f.remove()),f=a('').appendTo("body");var g=function(c,d){var e=b[c];a.isFunction(e)&&f.on(d+".zui.modal",e)};g("onShow","show"),g("shown","shown"),g("onHide","hide"),g("hidden","hidden"),g("loaded","loaded"),f.on("shown.zui.modal",function(){c.isShown=!0}).on("hidden.zui.modal",function(){c.isShown=!1}),this.$modal=f,this.$dialog=f.find(".modal-dialog")},c.prototype.show=function(b){var c=a.extend({},this.options,b);this.init(c);var d=this,e=this.$modal,f=this.$dialog,g=c.custom,h=f.find(".modal-body").css("padding",""),i=f.find(".modal-header"),j=f.find(".modal-content");e.toggleClass("fade",c.fade).addClass(c.cssClass).toggleClass("modal-md","md"===c.size).toggleClass("modal-sm","sm"===c.size).toggleClass("modal-lg","lg"===c.size).toggleClass("modal-fullscreen","fullscreen"===c.size).toggleClass("modal-loading",!this.isShown),i.toggle(c.showHeader),i.find(".modal-icon").attr("class","modal-icon icon-"+c.icon),i.find(".modal-title-name").html(c.title||""),c.size&&"fullscreen"===c.size&&(c.width="",c.height="");var k=function(a){"undefined"==typeof a&&(a=300),setTimeout(function(){f=e.find(".modal-dialog"),c.width&&"auto"!=c.width&&f.css("width",c.width),c.height&&"auto"!=c.height&&f.css("height",c.height),d.ajustPosition(c.position),e.removeClass("modal-loading"),"iframe"!=c.type&&f.off("resize.zui.modaltrigger").on("resize.zui.modaltrigger",function(){d.ajustPosition()})},a)};if("custom"===c.type&&g)if(a.isFunction(g)){var l=g({modal:e,options:c,modalTrigger:d,ready:k});"string"==typeof l&&(h.html(l),k())}else g instanceof a?(h.html(a("").append(g.clone()).html()),k()):(h.html(g),k());else if(c.url)if(e.attr("ref",c.url),"iframe"===c.type){e.addClass("modal-iframe"),this.firstLoad=!0;var m="iframe-"+c.name;i.detach(),h.detach(),j.empty().append(i).append(h),h.css("padding",0).html('
'),c.waittime>0&&(d.waitTimeout=setTimeout(k,c.waittime));var n=document.getElementById(m);n.onload=n.onreadystatechange=function(){if(e.attr("ref",n.contentWindow.location.href),d.firstLoad&&e.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){d.firstLoad=!1,c.waittime>0&&clearTimeout(d.waitTimeout);try{var a=window.frames[m].$;if(a&&"auto"===c.height&&"fullscreen"!=c.size){var b=a("body").addClass("body-modal"),f=function(){e.removeClass("fade");var a=b.outerHeight();h.css("height",a),c.fade&&e.addClass("fade"),k()};e.callEvent("loaded.zui.modal",{modalType:"iframe"}),setTimeout(f,100),b.off("resize.zui.modaltrigger").on("resize.zui.modaltrigger",f)}a.extend({closeModal:d.close})}catch(g){k()}}}}else a.get(c.url,function(b){var c=a(b);c.hasClass("modal-dialog")?f.replaceWith(c):c.hasClass("modal-content")?f.find(".modal-content").replaceWith(c):h.wrapInner(c),e.callEvent("loaded.zui.modal",{modalType:"ajax"}),k()});e.modal({show:"show",backdrop:c.backdrop,keyboard:c.keyboard})},c.prototype.close=function(b,c){this.$modal.on("hidden.zui.modal",function(){a.isFunction(b)&&b(),"string"==typeof c&&("this"===c?window.location.reload():window.location=c)
-}).modal("hide")},c.prototype.toggle=function(a){this.isShown?this.close():this.show(a)},c.prototype.ajustPosition=function(a){this.$modal.modal("ajustPosition",a||this.options.position)},window.ModalTrigger=c,window.modalTrigger=new c,a.fn.modalTrigger=function(b,d){return a(this).each(function(){var e=a(this),f=e.data("zui.modaltrigger"),g=a.extend({title:e.attr("title")||e.text(),url:e.attr("href"),type:e.hasClass("iframe")?"iframe":""},e.data(),a.isPlainObject(b)&&b);f||e.data("zui.modaltrigger",f=new c(g)),"string"==typeof b?f[b](d):g.show&&f.show(d),e.on((g.trigger||"click")+".toggle.zui.modaltrigger",function(a){f.toggle(g),e.is("a")&&a.preventDefault()})})};var d=a.fn.modal;a.fn.modal=function(b,c){return a(this).each(function(){var e=a(this);e.hasClass("modal")?d.call(e,b,c):e.modalTrigger(b,c)})},window.closeModal=function(c,d,e){e=b(e),e&&e.length&&e.each(function(){a(this).data("zui.modaltrigger").close(c,d)})},window.ajustModalPosition=function(a,c){c=b(c),c&&c.length&&c.modal("ajustPosition",a)},a.extend({closeModal:window.closeModal,ajustModalPosition:window.ajustModalPosition}),a(document).on("click.zui.modaltrigger.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=null;try{e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,""))}catch(f){}e&&e.length||(c.data("zui.modaltrigger")?c.trigger(".toggle.zui.modaltrigger"):c.modalTrigger({show:!0})),c.is("a")&&b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h
'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTarget();if(b)return b.find(".arrow").length<1&&a.addClass("no-arrow"),void a.html(b.html());var c=this.getTitle(),d=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](c),a.find(".popover-content")[this.options.html?"html":"text"](d),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.getTarget=function(){var b=this.$element,c=this.options,d=b.attr("data-target")||("function"==typeof c.target?c.target.call(b[0]):c.target);return d?"$next"==d?b.next(".popover"):a(d):!1},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&iMath.abs(h))c(f,g),Math.abs(g)>10&&b.preventDefault();else{var i=a(window);a("body,html").animate({scrollTop:i.scrollTop()-h},400)}}}function c(a,b){b>10&&a.find(".left.carousel-control").click(),-10>b&&a.find(".right.carousel-control").click()}if(this.options.touchable){this.$element.on("touchstart touchmove touchend",b);var d,e}},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle(),f.touchable&&e.touchable()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),function(){"use strict";window.imgReady=function(){var a=[],b=null,c=function(){for(var b=0;b1024)&&(e.call(m),h.end=!0)},h(),m.onload=function(){!h.end&&h(),f&&f.call(m),m=m.onload=m.onerror=null},void(h.end||(a.push(h),null===b&&(b=setInterval(c,40)))))}}()}(),function(a,b,c){"use strict";if(!a.fn.modalTrigger)throw new Error("modal & modalTrigger requires for lightbox");if(!b.imgReady)throw new Error("imgReady requires for lightbox");var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={modalTeamplate:'![]({image})
'},d.prototype.getOptions=function(b){var c="image";return b=a.extend({},d.DEFAULTS,this.$.data(),b),b[c]||(b[c]=this.$.attr("src")||this.$.attr("href")||this.$.find("img").attr("src"),this.$.data(c,b[c])),b},d.prototype.init=function(){this.bindEvents()},d.prototype.initGroups=function(){var b=this.$.data("groups");b||(b=a('[data-toggle="lightbox"][data-group="'+this.options.group+'"], [data-lightbox-group="'+this.options.group+'"]'),this.$.data("groups",b),b.each(function(b){a(this).attr("data-group-index",b)})),this.groups=b,this.groupIndex=parseInt(this.$.data("group-index"))},d.prototype.bindEvents=function(){var d=this.$,e=this,f=this.options;return f.image?void d.modalTrigger({type:"custom",name:"lightboxModal",position:"center",custom:function(d){e.initGroups();var g=d.modal,h=e.groups,i=e.groupIndex;g.addClass("modal-lightbox").html(f.modalTeamplate.format(f)).toggleClass("lightbox-with-caption","string"==typeof f.caption).removeClass("lightbox-full").data("group-index",i);var j=g.find(".modal-dialog"),k=a(b).width();b.imgReady(f.image,function(){j.css({width:c.min(k,this.width)}),k
0),g.find(".next").toggleClass("show",h.filter('[data-group-index="'+(i+1)+'"]').length>0),g.find(".controller").click(function(){var e=a(this),f=g.data("group-index")+(e.hasClass("prev")?-1:1),i=h.filter('[data-group-index="'+f+'"]');if(i.length){var l=i.data("image"),m=i.data("caption");g.addClass("modal-loading").data("group-index",f).toggleClass("lightbox-with-caption","string"==typeof m).removeClass("lightbox-full"),g.find(".lightbox-img").attr("src",l),k=a(b).width(),b.imgReady(l,function(){j.css({width:c.min(k,this.width)}),k0),g.find(".next").toggleClass("show",h.filter('[data-group-index="'+(f+1)+'"]').length>0),!1})}}):!1},a.fn.lightbox=function(b){var c="group"+(new Date).getTime();return this.each(function(){var e=a(this),f="object"==typeof b&&b;"object"==typeof f&&f.group?e.attr("data-lightbox-group",f.group):e.data("group")?e.attr("data-lightbox-group",e.data("group")):e.attr("data-lightbox-group",c),e.data("group",e.data("lightbox-group"));var g=e.data("zui.lightbox");g||e.data("zui.lightbox",g=new d(this,f)),"string"==typeof b&&g[b]()})},a.fn.lightbox.Constructor=d,a(function(){a('[data-toggle="lightbox"]').lightbox()})}(jQuery,window,Math),function(a,b){"use strict";var c,d=0,e='',f={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},g=function(b,c){var g=this;g.id=d++,c=g.options=a.extend({},f,c),g.message=(c.icon?' ':"")+b,g.$=a(e.format(c)).toggleClass("fade",c.fade).toggleClass("scale",c.scale).attr("id","messager-"+g.id),c.close?g.$.on("click",".close",function(){g.hide()}):g.$.find(".close").remove(),g.$.find(".messager-content").html(g.message),g.$.data("zui.messager",g)};g.prototype.show=function(){var d=this,e=this.options;c&&c.isShow&&c.hide(),d.$.appendTo(e.parent).show(),("top"===e.placement||"bottom"===e.placement||"center"===e.placement)&&d.$.css("left",(a(b).width()-d.$.width()-50)/2),("left"===e.placement||"right"===e.placement||"center"===e.placement)&&d.$.css("top",(a(b).height()-d.$.height()-50)/2),d.$.addClass("in"),e.time&&setTimeout(function(){d.hide()},e.time),d.isShow=!0,c=d},g.prototype.hide=function(){var a=this;a.$.hasClass("in")&&(a.$.removeClass("in"),setTimeout(function(){a.$.remove()},200)),a.isShow=!1},a.Messager=g,b.Messager||(b.Messager=g),a.showMessage=function(a,b){"string"==typeof b&&(b={type:b});var c=new g(a,b);return c.show(),c};var h=function(a){return"string"==typeof a?{placement:a}:a};a.messager={show:a.showMessage,primary:function(b,c){return a.showMessage(b,a.extend({type:"primary"},h(c)))},success:function(b,c){return a.showMessage(b,a.extend({type:"success",icon:"ok-sign"},h(c)))},info:function(b,c){return a.showMessage(b,a.extend({type:"info",icon:"info-sign"},h(c)))},warning:function(b,c){return a.showMessage(b,a.extend({type:"warning",icon:"warning-sign"},h(c)))},danger:function(b,c){return a.showMessage(b,a.extend({type:"danger",icon:"exclamation-sign"},h(c)))},important:function(b,c){return a.showMessage(b,a.extend({type:"important"},h(c)))},special:function(b,c){return a.showMessage(b,a.extend({type:"special"},h(c)))}},b.messager||(b.messager=a.messager)}(jQuery,window),function(a){"use strict";var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};b.DEFAULTS={auto:!1,foldicon:"icon-chevron-right"},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.init=function(){var a=this.$.children(".nav");a.find(".nav").closest("li").addClass("nav-parent"),a.find(".nav > li.active").closest("li").addClass("active"),a.find(".nav-parent > a").append(''),this.handleFold()},b.prototype.handleFold=function(){var b=this.options.auto,c=this.$;this.$.find(".nav-parent > a").click(function(d){b&&(c.find(".nav-parent.show").find(".nav").slideUp(function(){a(this).closest(".nav-parent").removeClass("show")}),c.find(".icon-rotate-90").removeClass("icon-rotate-90"));var e=a(this).closest(".nav-parent");return e.hasClass("show")?(e.find(".icon-rotate-90").removeClass("icon-rotate-90"),e.find(".nav").slideUp(function(){a(this).closest(".nav-parent").removeClass("show")})):(e.find(".nav-parent-fold-icon").addClass("icon-rotate-90"),e.find(".nav").slideDown(function(){a(this).closest(".nav-parent").addClass("show")})),d.preventDefault(),!1})},a.fn.menu=function(c){return this.each(function(){var d=a(this),e=d.data("zui.menu"),f="object"==typeof c&&c;e||d.data("zui.menu",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.menu.Constructor=b,a(function(){a('[data-toggle="menu"]').menu()})}(jQuery),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(){var a;if("undefined"!=typeof config&&config.clientLang)a=config.clientLang;else{var c=b("html").attr("lang");a=c?c:"en"}return a.replace("-","_").toLowerCase()}function e(a){var b=r[p.locale];return b?b[a]:r.en[a]}function f(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d(a)===!1;e||c.modal("hide")}function g(a){var b,c=0;for(b in a)c++;return c}function h(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function i(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},p,a),a.buttons||(a.buttons={}),a.backdrop=a.backdrop?"static":!1,c=a.buttons,d=g(c),h(c,function(a,e){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=1==d||d>=2&&"confirm"===a?"btn-primary":"btn-default")}),a}function j(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function k(a,c,d){return b.extend(!0,{},a,j(c,d))}function l(a,b,c,d){var e={className:"bootbox-"+a,buttons:m.apply(null,b)};return n(k(e,d,c),b)}function m(){for(var a={},b=0,c=arguments.length;c>b;b++){var d=arguments[b],f=d.toLowerCase(),g=d.toUpperCase();a[f]={label:e(g)}}return a}function n(a,b){var d={};return h(b,function(a,b){d[b]=!0}),h(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var o={dialog:"",header:"",footer:"",closeButton:"",form:"",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"",date:"",time:"",number:"",password:""}},p={locale:d(),backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},q={};q.alert=function(){var a;if(a=l("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback():!0},q.dialog(a)},q.confirm=function(){var a;if(a=l("confirm",["confirm","cancel"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback(!1)},a.buttons.confirm.callback=function(){return a.callback(!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return q.dialog(a)},q.prompt=function(){var a,d,e,f,g,i,j;f=b(o.form),d={className:"bootbox-prompt",buttons:m("confirm","cancel"),value:"",inputType:"text"},a=n(k(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show;var l=["date","time","number"],p=document.createElement("input");if(p.setAttribute("type",a.inputType),l[a.inputType]&&(a.inputType=p.type),a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback(null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=g.val();break;case"checkbox":var d=g.find("input:checked");c=[],h(d,function(a,d){c.push(b(d).val())})}return a.callback(c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!o.inputs[a.inputType])throw new Error("invalid prompt type");switch(g=b(o.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":g.val(a.value);break;case"select":var r={};if(j=a.inputOptions||[],!j.length)throw new Error("prompt with select requires options");h(j,function(a,d){var e=g;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(r[d.group]||(r[d.group]=b("").attr("label",d.group)),e=r[d.group]),e.append("")}),h(r,function(a,b){g.append(b)}),g.val(a.value);break;case"checkbox":var s=b.isArray(a.value)?a.value:[a.value];if(j=a.inputOptions||[],!j.length)throw new Error("prompt with checkbox requires options");if(!j[0].value||!j[0].text)throw new Error("given options in wrong format");g=b(""),h(j,function(c,d){var e=b(o.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),h(s,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),g.append(e)})}return a.placeholder&&g.attr("placeholder",a.placeholder),a.pattern&&g.attr("pattern",a.pattern),f.append(g),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=q.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){g.focus()}),i===!0&&e.modal("show"),e},q.dialog=function(a){a=i(a);var c=b(o.dialog),d=c.find(".modal-dialog"),e=c.find(".modal-body"),g=a.buttons,j="",k={onEscape:a.onEscape};if(h(g,function(a,b){j+="",k[a]=b.callback}),e.find(".bootbox-body").html(a.message),a.animate===!0&&c.addClass("fade"),a.className&&c.addClass(a.className),"large"===a.size&&d.addClass("modal-lg"),"small"===a.size&&d.addClass("modal-sm"),a.title&&e.before(o.header),a.closeButton){var l=b(o.closeButton);a.title?c.find(".modal-header").prepend(l):l.css("margin-top","-10px").prependTo(e)}return a.title&&c.find(".modal-title").html(a.title),j.length&&(e.after(o.footer),c.find(".modal-footer").html(j)),c.on("hidden.bs.modal",function(a){a.target===this&&c.remove()}),c.on("shown.bs.modal",function(){c.find(".btn-primary:first").focus()}),c.on("escape.close.bb",function(a){k.onEscape&&f(a,c,k.onEscape)}),c.on("click",".modal-footer button",function(a){var d=b(this).data("bb-handler");f(a,c,k[d])}),c.on("click",".bootbox-close-button",function(a){f(a,c,k.onEscape)}),c.on("keyup",function(a){27===a.which&&c.trigger("escape.close.bb")}),b(a.container).append(c),c.modal({backdrop:a.backdrop,keyboard:!1,show:!1}),a.show&&c.modal("show"),c},q.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(p,a)},q.hideAll=function(){b(".bootbox").modal("hide")};var r={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return q.init=function(c){return a(c||b)},q}),+function(a,b){"use strict";function c(b){var c=b.data("url");c&&(b.addClass("panel-loading").find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").addClass("icon-spin"),a.ajax({url:c,dataType:"html"}).done(function(a){b.find(".panel-body").html(a)}).fail(function(){b.addClass("panel-error")}).always(function(){b.removeClass("panel-loading"),b.find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").removeClass("icon-spin")}))}var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.draggable=this.$.hasClass("dashboard-draggable")||this.options.draggable,this.init()};d.DEFAULTS={height:360},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)},d.prototype.handleRemoveEvent=function(){var b=this.options.afterPanelRemoved,c=this.options.panelRemovingTip;
-this.$.on("click",".remove-panel",function(){var d=a(this).closest(".panel"),e=d.data("name")||d.find(".panel-heading").text().replace("\n","").replace(/(^\s*)|(\s*$)/g,""),f=d.attr("data-id");(void 0==c||confirm(c.format(e)))&&(d.parent().remove(),b&&a.isFunction(b)&&b(f))})},d.prototype.handleRefreshEvent=function(){this.$.on(".click",".refresh-panel",function(){var b=a(this).closest(".panel");c(b)})},d.prototype.handleDraggable=function(){var b=this.$,c=this.options.afterOrdered;this.$.addClass("dashboard-draggable"),this.$.find(".panel-actions").mousedown(function(a){a.preventDefault(),a.stopPropagation()}),this.$.find(".panel-heading").mousedown(function(d){function e(c){var d=j.data("mouseOffset");j.css({left:c.pageX-d.x,top:c.pageY-d.y}),i.find(".dragging-in").removeClass("dragging-in");var e=!1;i.children().each(function(){var d=a(this);if(d.hasClass("dragging-col-holder"))return e=!0,!0;var f=d.children(".panel"),g=f.offset(),h=f.width(),j=f.height(),k=g.left,l=g.top,n=c.pageX,o=c.pageY;if(n>k&&o>l&&k+h>n&&l+j>o){{i.find(".dragging-col")}return d.addClass("dragging-in"),e?m.insertAfter(d):m.insertBefore(d),b.addClass("dashboard-holding"),!1}}),c.preventDefault()}function f(d){var h=g.data("order");g.parent().insertAfter(m);var k=0,l={};i.children(":not(.dragging-col-holder)").each(function(){var b=a(this).children(".panel");b.data("order",++k),l[b.attr("id")]=k,b.parent().attr("data-order",k)}),h!=l[g.attr("id")]&&(i.data("orders",l),c&&a.isFunction(c)&&c(l)),j.remove(),b.removeClass("dashboard-holding"),b.find(".dragging-col").removeClass("dragging-col"),b.find(".panel-dragging").removeClass("panel-dragging"),i.find(".dragging-in").removeClass("dragging-in"),b.removeClass("dashboard-dragging"),a(document).unbind("mousemove",e).unbind("mouseup",f),d.preventDefault()}var g=a(this).closest(".panel"),h=g.parent(),i=g.closest(".row"),j=g.clone().addClass("panel-dragging-shadow"),k=g.offset(),l=b.offset(),m=i.find(".dragging-col-holder");m.length||(m=a("").addClass(i.children().attr("class")).removeClass("dragging-col").appendTo(i)),m.insertBefore(h).find(".panel").replaceWith(g.clone().addClass("panel-dragging panel-dragging-holder")),b.addClass("dashboard-dragging"),g.addClass("panel-dragging").parent().addClass("dragging-col"),j.css({left:k.left-l.left,top:k.top-l.top,width:g.width(),height:g.height()}).appendTo(b).data("mouseOffset",{x:d.pageX-k.left+l.left,y:d.pageY-k.top+l.top}),a(document).bind("mousemove",e).bind("mouseup",f),d.preventDefault()})},d.prototype.handlePanelPadding=function(){this.$.find(".panel-body > table, .panel-body > .list-group").closest(".panel-body").addClass("no-padding")},d.prototype.handlePanelHeight=function(){var c=this.options.height;this.$.find(".row").each(function(){var d=a(this),e=d.find(".panel"),f=d.data("height")||c;"number"!=typeof f&&(f=0,e.each(function(){f=b.max(f,a(this).innerHeight())})),e.each(function(){var b=a(this);b.find(".panel-body").css("height",f-b.find(".panel-heading").outerHeight()-2)})})},d.prototype.init=function(){this.handlePanelHeight(),this.handlePanelPadding(),this.handleRemoveEvent(),this.handleRefreshEvent(),this.draggable&&this.handleDraggable();var b=0;this.$.find(".panel").each(function(){var d=a(this);d.data("order",++b),d.attr("id")||d.attr("id","panel"+b),d.attr("data-id")||d.attr("data-id",b),c(d)})},a.fn.dashboard=function(b){return this.each(function(){var c=a(this),e=c.data("zui.dashboard"),f="object"==typeof b&&b;e||c.data("zui.dashboard",e=new d(this,f)),"string"==typeof b&&e[b]()})},a.fn.dashboard.Constructor=d}(jQuery,Math),function(a){"use strict";if(!a.fn.droppable)throw new Error("droppable requires for boards");var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.getLang(),this.init()};b.DEFAULTS={lang:"zh-cn",langs:{"zh-cn":{appendToTheEnd:"移动到末尾"},"zh-tw":{appendToTheEnd:"移动到末尾"},en:{appendToTheEnd:"Move to the end."}}},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.getLang=function(){var c=window.config;if(!this.options.lang){if("undefined"!=typeof c&&c.clientLang)this.options.lang=c.clientLang;else{var d=a("html").attr("lang");this.options.lang=d?d:"en"}this.options.lang=this.options.lang.replace(/-/,"_").toLowerCase()}this.lang=this.options.langs[this.options.lang]||this.options.langs[b.DEFAULTS.lang]},b.prototype.init=function(){var b=1,c=this.lang;this.$.find('.board-item:not(".disable-drop"), .board:not(".disable-drop")').each(function(){var d=a(this);d.attr("id")?d.attr("data-id",d.attr("id")):d.attr("data-id")||d.attr("data-id","board"+b++),d.hasClass("board")&&d.find(".board-list").append(' {appendToTheEnd}
'.format(c)).append(''.format(c))}),this.bind()},b.prototype.bind=function(b){var c=this.$,d=this.options;"undefined"==typeof b&&(b=c.find('.board-item:not(".disable-drop, .board-item-shadow")')),b.droppable({target:'.board-item:not(".disable-drop, .board-item-shadow")',flex:!0,start:function(a){c.addClass("dragging").find(".board-item-shadow").height(a.element.outerHeight())},drag:function(a){if(c.find(".board.drop-in-empty").removeClass("drop-in-empty"),a.isIn){var b=a.target.closest(".board").addClass("drop-in"),d=b.find(".board-item-shadow"),e=a.target;c.addClass("drop-in").find(".board.drop-in").not(b).removeClass("drop-in"),d.insertBefore(e),b.toggleClass("drop-in-empty",e.hasClass("board-item-empty"))}},drop:function(b){if(b.isNew){var c="drop";d.hasOwnProperty(c)&&a.isFunction(d[c])&&d[c](b),b.element.insertBefore(b.target)}},finish:function(){c.removeClass("dragging").removeClass("drop-in").find(".board.drop-in").removeClass("drop-in")}})},a.fn.boards=function(c){return this.each(function(){var d=a(this),e=d.data("zui.boards"),f="object"==typeof c&&c;e||d.data("zui.boards",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.boards.Constructor=b,a(function(){a('[data-toggle="boards"]').boards()})}(jQuery),function(a){"use strict";var b="zui.datatable",c=function(c,d){this.name=b,this.$=a(c),this.isTable="TABLE"===this.$[0].tagName,this.firstShow=!0,this.isTable?(this.$table=this.$,this.id="datatable-"+(this.$.attr("id")||a.uuid())):(this.$datatable=this.$.addClass("datatable"),this.$.attr("id")?this.id=this.$.attr("id"):(this.id="datatable-"+a.uuid(),this.$.attr("id",this.id))),this.getOptions(d),this.load(),this.callEvent("ready")};c.DEFAULTS={checkable:!1,checkByClickRow:!0,checkedClass:"active",checkboxName:null,sortable:!1,fixedHeader:!0,fixedHeaderOffset:0,fixedLeftWidth:"30%",fixedRightWidth:"30%",flexHeadDrag:!0,scrollPos:"in",rowHover:!0,colHover:!0,hoverClass:"hover",colHoverClass:"col-hover",minColWidth:20,minFixedLeftWidth:200,minFixedRightWidth:200,minFlexAreaWidth:200},c.prototype.getOptions=function(b){var d=this.$;b=a.extend({},c.DEFAULTS,this.$.data(),b),b.tableClass=b.tableClass||"",b.tableClass=" "+b.tableClass+" table-datatable",d.hasClass("table-bordered")&&(b.tableClass+=" table-bordered"),(d.hasClass("table-hover")||b.rowHover)&&(b.tableClass+=" table-hover"),d.hasClass("table-striped")&&(b.tableClass+=" table-striped"),d.hasClass("table-condensed")&&(b.tableClass+=" table-condensed"),d.hasClass("table-fixed")&&(b.tableClass+=" table-fixed"),this.options=b},c.prototype.load=function(c){var d,e=this.options;if(a.isPlainObject(c))this.data=c;else if("string"==typeof c){var f=a(c);f.length&&(this.$table=f.first(),this.$table.data(b,this),this.isTable=!0),c=null}else c=e.data;if(!c){if(!this.isTable)throw new Error("No data avaliable!");c={cols:[],rows:[]},d=c.cols;var g,h,i,j,k=c.rows,l=this.$table;l.find("thead > tr:first").children("th").each(function(){g=a(this),d.push(a.extend({text:g.html(),flex:!1||g.hasClass("flex-col"),width:"auto",cssClass:g.attr("class"),css:g.attr("style"),type:"string",ignore:g.hasClass("ignore"),sort:!g.hasClass("sort-disabled")},g.data()))}),l.find("tbody > tr").each(function(){h=a(this),j=a.extend({data:[],checked:!1,cssClass:h.attr("class"),css:h.attr("style"),id:h.attr("id")},h.data()),h.children("td").each(function(){i=a(this),j.data.push(a.extend({cssClass:i.attr("class"),css:i.attr("style"),text:i.html()},i.data()))}),k.push(j)});var m=l.find("tfoot");m.length&&(c.footer=a('').append(m))}c.flexStart=-1,c.flexEnd=-1,d=c.cols,c.colsLength=d.length;for(var n=0;n=0,c.fixedRight=c.flexEnd>=0&&c.flexEnd0,c.flexStart<0&&c.flexEnd<0&&(c.fixedLeft=!0,c.flexStart=c.colsLength,c.flexEnd=c.colsLength),this.data=c,this.callEvent("afterLoad",{data:c}),this.render()},c.prototype.render=function(){var c,d,e,f,g=this,h=g.$datatable||(g.isTable?a(''):g.$datatable),i=g.options,j=g.data,k=g.data.cols,l=g.data.rows,m=i.checkable,n='',o='';h.children(".datatable-head, .datatable-rows").remove(),h.toggleClass("sortable",i.sortable);var p,q,r,s=a('');for(c=a("
"),e=a("
"),f=a("
"),d=0;d=j.flexStart&&d<=j.flexEnd?f:e,0===d&&m&&p.append(' | '),r.ignore||(q=a(" | "),q.toggleClass("sort-down","down"===r.sort).toggleClass("sort-up","up"===r.sort).toggleClass("sort-disabled",r.sort===!1),q.addClass(r.cssClass).addClass(r.colClass).html(r.text).attr({"data-index":d,"data-type":r.type,style:r.css}),p.append(q));var t;j.fixedLeft&&(t=a(o),t.addClass("fixed-left").find("table").addClass(i.tableClass).find("thead").append(c),s.append(t)),j.flexArea&&(t=a(o),t.addClass("flexarea").find(".datatable-wrapper").append('').find("table").addClass(i.tableClass).find("thead").append(f),s.append(t)),j.fixedRight&&(t=a(o),t.addClass("fixed-right").find("table").addClass(i.tableClass).find("thead").append(e),s.append(t)),h.append(s);var u,v,w,x,y,z,A,B,C=a(''),D=l.length;c=a("
"),e=a("
"),f=a("
");for(var E=0;D>E;++E){for(z=l[E],"undefined"==typeof z.id&&(z.id=E),z.index=E,u=a("
|
"),u.addClass(z.cssClass).toggleClass(i.checkedClass,z.checked).attr({"data-index":E,"data-id":z.id}),v=u.clone(),w=u.clone(),B=z.data.length,d=0;B>d;++d)A=z.data[d],p=d
=j.flexStart&&d<=j.flexEnd?v:w,0===d&&m&&(y=a(' | '),i.checkboxName&&y.append(''),p.append(y)),k[d].ignore||(a.isPlainObject(A)||(A={text:A,row:E,index:d},z.data[d]=A),x=a(" | "),x.html(A.text).addClass(A.cssClass).addClass(k[d].colClass).attr({"data-row":E,"data-index":d,"data-flex":!1,"data-type":k[d].type,style:A.css}),p.append(x));c.append(u),f.append(v),e.append(w)}var F;j.fixedLeft&&(F=a(n),F.addClass("fixed-left").find("table").addClass(i.tableClass).append(c),C.append(F)),j.flexArea&&(F=a(n),F.addClass("flexarea").find(".datatable-wrapper").append('').find("table").addClass(i.tableClass).append(f),C.append(F)),j.fixedRight&&(F=a(n),F.addClass("fixed-right").find("table").addClass(i.tableClass).append(e),C.append(F)),h.append(C),j.flexArea&&h.append('');var G=h.children(".datatable-footer").detach();j.footer?(h.append(a('').append(j.footer)),j.footer=null):G.length&&h.append(G),g.$datatable=h.data(b,g),g.isTable&&g.firstShow&&(g.$table.attr("data-datatable-id",this.id).hide().after(h),g.firstShow=!1),g.bindEvents(),g.refreshSize(),g.callEvent("render")},c.prototype.bindEvents=function(){var b=this,c=this.data,d=this.options,e=window.store,f=this.$datatable,g=b.$dataSpans=f.children(".datatable-head, .datatable-rows").find(".datatable-span"),h=b.$rowsSpans=f.children(".datatable-rows").children(".datatable-rows-span"),i=b.$headSpans=f.children(".datatable-head").children(".datatable-head-span"),j=b.$cells=g.find("td, th"),k=b.$dataCells=j.filter("td");b.$headCells=j.filter("th");var l=b.$rows=b.$rowsSpans.find(".table > tbody > tr");if(d.rowHover){var m=d.hoverClass;h.on("mouseenter","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m),l.filter('[data-index="'+a(this).addClass(m).closest("tr").data("index")+'"]').addClass(m)}).on("mouseleave","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m)})}if(d.colHover){var n=d.colHoverClass;i.on("mouseenter","th",function(){j.filter("."+n).removeClass(n),j.filter('[data-index="'+a(this).data("index")+'"]').addClass(n)}).on("mouseleave","th",function(){j.filter("."+n).removeClass(n)})}if(c.flexArea){var o,p,q,r,s,t,u,v=f.find(".scroll-slide"),w=f.find(".datatable-span.flexarea"),x=f.find(".datatable-span.fixed-left"),y=f.find(".datatable-span.flexarea .table"),z=v.children(".bar"),A=b.id+"_scrollOffset";b.width=f.width(),f.resize(function(){b.width=f.width()});var B=function(a,b){s=Math.max(0,Math.min(o-p,a)),b||f.addClass("scrolling"),z.css("left",s),u=0-Math.floor((q-o)*s/(o-p)),y.css("left",u),r=s,f.toggleClass("scrolled-in",s>2).toggleClass("scrolled-out",o-p-2>s),e.pageSet(A,s)},C=function(){o=w.width(),v.width(o).css("left",x.width()),q=y.width(),p=Math.floor(o*o/q),z.css("width",p),y.css("min-width",o),f.toggleClass("show-scroll-slide",q>o),t||o===p||(t=!0,B(e.pageGet(A,0),!0)),f.hasClass("size-changing")&&B(s,!0)};w.resize(C),C();var D={move:!1,stopPropagation:!0,drag:function(a){B(z.position().left+a.smallOffset.x*(a.element.hasClass("bar")?1:-1))},finish:function(){f.removeClass("scrolling")}};z.draggable(D),d.flexHeadDrag&&f.find(".datatable-head-span.flexarea").draggable(D),v.mousedown(function(a){var b=a.pageX-v.offset().left;B(b-p/2)})}if(d.checkable){var E,F=b.id+"_checkedStatus",G=d.checkedClass,H=function(){var f=h.first().find(".table > tbody > tr"),g=f.filter("."+G);f.find(".check-row input:checkbox").prop("checked",!1);var j={checkedAll:f.length===g.length&&g.length>0,checks:g.map(function(){return E=a(this).data("id"),d.checkboxName&&a(this).find(".check-row input:checkbox").prop("checked",!0),E}).toArray()};a.each(c.rows,function(b,c){c.checked=a.inArray(c.id,j.checks)>-1}),i.find(".check-all").toggleClass("checked",j.checkedAll),e.pageSet(F,j),b.callEvent("checksChanged",{checks:j})};this.$rowsSpans.on("click",d.checkByClickRow?"tr":".check-row",function(){l.filter('[data-index="'+a(this).closest("tr").data("index")+'"]').toggleClass(G),H()}),this.$datatable.on("click",".check-all",function(){l.toggleClass(G,a(this).toggleClass("checked").hasClass("checked")),H()}).on("click",".check-none",function(){l.toggleClass(G,!1),H()}).on("click",".check-inverse",function(){l.toggleClass(G),H()});var I=e.pageGet(F);I&&(i.find(".check-all").toggleClass("checked",I.checkedAll),I.checkedAll?l.addClass(G):(l.removeClass(G),a.each(I.checks,function(a,b){l.filter('[data-id="'+b+'"]').addClass(G)})),I.checks.length&&H())}d.sortable&&i.on("click","th:not(.sort-disabled, .check-btn)",function(){f.hasClass("size-changing")||b.sortTable(a(this))})},c.prototype.sortTable=function(b){var c=window.store,d=this.id+"_datatableSorter",e=c.pageGet(d);if(b||(b=e?this.$headCells.filter('[data-index="'+e.index+'"]').addClass("sort-"+e.type):this.$headCells.filter(".sort-up, .sort-down").first()),b.length){var f,g,h,i=this.data,j=i.cols,k=i.rows,l=this.$headCells;f=!b.hasClass("sort-up"),l.removeClass("sort-up sort-down"),b.addClass(f?"sort-up":"sort-down"),h=b.data("index"),f=b.hasClass("sort-up"),a.each(j,function(a,b){a==h||"up"!==b.sort&&"down"!==b.sort?a==h&&(b.sort=f?"up":"down",g=b.type):b.sort=!0});var m,n,o,p=this.$dataCells.filter('[data-index="'+h+'"]');k.sort(function(a,b){return a=a.data[h],b=b.data[h],m=p.filter('[data-row="'+a.row+'"]').text(),n=p.filter('[data-row="'+b.row+'"]').text(),"number"===g?(m=parseFloat(m),n=parseFloat(n)):"date"===g?(m=Date.parse(m),n=Date.parse(n)):(m=m.toLowerCase(),n=n.toLowerCase()),o=m>n?1:n>m?-1:0,f&&(o=-1*o),o});var q,r,s,t=this.$rows,u=[];a.each(k,function(b,c){q=t.filter('[data-index="'+c.index+'"]'),q.each(function(b){s=a(this),r=u[b],r?r.after(s):s.parent().prepend(s),u[b]=s})}),e={index:h,type:f?"up":"down"},c.pageSet(d,e),this.callEvent("sort",{sorter:e})}},c.prototype.refreshSize=function(){var b,c=this.$datatable,d=this.options,e=this.data.rows,f=this.data.cols;c.find(".datatable-span.fixed-left").css("width",d.fixedLeftWidth),c.find(".datatable-span.fixed-right").css("width",d.fixedRightWidth);var g=function(b){var c=0;return b.css("height","auto"),b.each(function(){c=Math.max(c,a(this).height())}),c},h=this.$dataCells,i=this.$cells,j=this.$headCells;for(b=0;b'.format(this.lang)),this.$.append(f)),this.$caption=f.find(".calendar-caption"),this.$todayBtn=f.find(".btn-today"),this.$header=f}var g=this.$.children(".calendar-views");g.length||(g=a(''),this.$.append(g)),this.$views=g,this.$monthView=g.children(".calendar-view.month"),this.display(),this.bindEvents()};f.DEFAULTS={langs:{zh_cn:{weekNames:["周一","周二","周三","周四","周五","周六","周日"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",year:"{0}年",month:"{0}月",yearMonth:"{0}年{1}月"}},data:{calendars:{defaultCal:{color:"#229F24"}},events:[]},limitEventTitle:!0,storage:!0,withHeader:!0,dragThenDrop:!0},f.prototype.sortEvents=function(){var b=this.events;a.isArray(b)||(b=[]),a.each(b,function(b,c){"string"==typeof c.start&&(c.start=new Date(c.start)),"string"==typeof c.end&&(c.end=new Date(c.end)),"undefined"==typeof c.id&&(c.id=a.uuid())}),b.sort(function(a,b){return a.start>b.start?1:a.start=0&&this.callEvent("beforeRemoveEvent",{event:d,eventId:c,data:this.data})&&(f.splice(e,1),g.push(d))}),this.sortEvents(),this.display(),this.callEvent("removeEvents",{removedEvents:g,data:this.data})},f.prototype.getOptions=function(b){this.options=a.extend({},f.DEFAULTS,this.$.data(),b)},f.prototype.getLang=function(){this.lang=this.options.langs[this.options.lang||a.clientLang()]},f.prototype.display=function(a,c){"undefined"==typeof a?a=this.view:this.view=a,"undefined"==typeof c?c=this.date:this.date=c,"today"===c?(c=new Date,this.date=c):"string"==typeof c&&(c=new Date(c),this.date=c),this.options.storage&&b.store.pageSet(this.storeName,{date:c,view:a});var d={view:a,date:c};if(this.callEvent("beforeDisplay",d)){switch(a){case"month":this.displayMonth(c)}this.callEvent("display",d)}},f.prototype.displayMonth=function(){var b,c=this.options,f=this,g=this.lang,h=this.date,i=this.$views,j=this.$,k=f.$monthView;if(!k.length){k=a('');var l,m=k.find(".week-head"),n=k.find(".month-days");for(b=0;7>b;b++)m.append(""+g.weekNames[b]+" | ");for(b=0;6>b;b++){l=a('
');for(var o=0;7>o;o++)l.append(' | ');n.append(l)}i.append(k),f.$monthView=k}var p,q,r,s,t,u,v=k.find(".week-days"),w=k.find(".day"),x=e(h),y=new Date,z=d(x),A=h.getFullYear(),B=h.getMonth(),C=y.getMonth(),D=y.getFullYear(),E=y.getDate(),F=z.clone().addDays(42).addMilliseconds(-1),G=z.clone().addDays(1).addMilliseconds(-1);v.each(function(b){p=a(this),p.find(".day").each(function(c){q=a(this),r=q.closest(".cell-day"),s=G.getFullYear(),t=G.getDate(),u=G.getMonth(),q.attr("data-date",G.toDateString()),q.find(".heading > .number").text(t),q.find(".heading > .month").toggle(0===b&&0===c||1===t).text((0===u&&1===t?g.year.format(s)+" ":"")+g.monthNames[u]),r.toggleClass("current-month",u===B),r.toggleClass("current",t===E&&u===C&&s===D),r.toggleClass("past",y>G),r.toggleClass("future",G>y),q.find(".events").empty(),G.addDays(1)})}),c.withHeader&&(this.$caption.text(g.yearMonth.format(A,B+1)),this.$todayBtn.toggleClass("disabled",B===C));var H,I,J=this.calendars;a.each(this.events,function(b,c){c.start>=z&&c.start<=F&&(q=w.filter('[data-date="'+c.start.toDateString()+'"]'),q.length&&(H=a(''+c.start.format("hh:mm")+' '+c.title+"
"),H.find(".time").toggle(!c.allDay),H.data("event",c),c.calendar&&(I=J[c.calendar],I&&H.data("calendar",I).css("background-color",I.color)),q.find(".events").append(H)))}),c.dragThenDrop&&k.find(".event").droppable({target:w,container:k,flex:!0,start:function(){j.addClass("event-dragging")},drop:function(a){var b=a.element.data("event"),c=a.target.attr("data-date"),d=b.start.clone();if(d.toDateString()!=c&&(c=new Date(c),c.setHours(d.getHours()),c.setMinutes(d.getMinutes()),c.setSeconds(d.getSeconds()),f.callEvent("beforeChange",{event:b,change:"start",to:c}))){var e=b.end.clone();b.end.addMilliseconds(b.end.getTime()-d.getTime()),b.start=c,a.target.find(".events").append(a.element),f.callEvent("change",{data:f.data,changes:[{event:b,changes:[{change:"start",from:d,to:b.start},{change:"end",from:e,to:b.end}]}]})}},finish:function(){j.removeClass("event-dragging")}})},f.prototype.callEvent=function(a,b){var c=this.$.callEvent(a+"."+this.name,b,this);return!(void 0!==c.result&&!c.result)},a.fn.calendar=function(b){return this.each(function(){var d=a(this),e=d.data(c),g="object"==typeof b&&b;e||d.data(c,e=new f(this,g)),"string"==typeof b&&e[b]()})},a.fn.calendar.Constructor=f}(jQuery,window);
\ No newline at end of file
+}).modal("hide")},c.prototype.toggle=function(a){this.isShown?this.close():this.show(a)},c.prototype.ajustPosition=function(a){this.$modal.modal("ajustPosition",a||this.options.position)},window.ModalTrigger=c,window.modalTrigger=new c,a.fn.modalTrigger=function(b,d){return a(this).each(function(){var e=a(this),f=e.data("zui.modaltrigger"),g=a.extend({title:e.attr("title")||e.text(),url:e.attr("href"),type:e.hasClass("iframe")?"iframe":""},e.data(),a.isPlainObject(b)&&b);f||e.data("zui.modaltrigger",f=new c(g)),"string"==typeof b?f[b](d):g.show&&f.show(d),e.on((g.trigger||"click")+".toggle.zui.modaltrigger",function(a){f.toggle(g),e.is("a")&&a.preventDefault()})})};var d=a.fn.modal;a.fn.modal=function(b,c){return a(this).each(function(){var e=a(this);e.hasClass("modal")?d.call(e,b,c):e.modalTrigger(b,c)})},window.closeModal=function(c,d,e){e=b(e),e&&e.length&&e.each(function(){a(this).data("zui.modaltrigger").close(c,d)})},window.ajustModalPosition=function(a,c){c=b(c),c&&c.length&&c.modal("ajustPosition",a)},a.extend({closeModal:window.closeModal,ajustModalPosition:window.ajustModalPosition}),a(document).on("click.zui.modaltrigger.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=null;try{e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,""))}catch(f){}e&&e.length||(c.data("zui.modaltrigger")?c.trigger(".toggle.zui.modaltrigger"):c.modalTrigger({show:!0})),c.is("a")&&b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focus",i="hover"==g?"mouseleave":"blur";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this.tip();this.setContent(),this.options.animation&&c.addClass("fade");var d="function"==typeof this.options.placement?this.options.placement.call(this,c[0],this.$element[0]):this.options.placement,e=/\s?auto?\s?/i,f=e.test(d);f&&(d=d.replace(e,"")||"top"),c.detach().css({top:0,left:0,display:"block"}).addClass(d),this.options.container?c.appendTo(this.options.container):c.insertAfter(this.$element);var g=this.getPosition(),h=c[0].offsetWidth,i=c[0].offsetHeight;if(f){var j=this.$element.parent(),k=d,l=document.documentElement.scrollTop||document.body.scrollTop,m="body"==this.options.container?window.innerWidth:j.outerWidth(),n="body"==this.options.container?window.innerHeight:j.outerHeight(),o="body"==this.options.container?0:j.offset().left;d="bottom"==d&&g.top+g.height+i-l>n?"top":"top"==d&&g.top-l-i<0?"bottom":"right"==d&&g.right+h>m?"left":"left"==d&&g.left-h '}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTarget();if(b)return b.find(".arrow").length<1&&a.addClass("no-arrow"),void a.html(b.html());var c=this.getTitle(),d=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](c),a.find(".popover-content")[this.options.html?"html":"text"](d),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.getTarget=function(){var b=this.$element,c=this.options,d=b.attr("data-target")||("function"==typeof c.target?c.target.call(b[0]):c.target);return d?"$next"==d?b.next(".popover"):a(d):!1},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b),f.trigger(d=a.Event("show.bs.dropdown")),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=a("[role=menu] li:not(.divider):visible a",f);if(h.length){var i=h.index(h.filter(":focus"));38==b.keyCode&&i>0&&i--,40==b.keyCode&&iMath.abs(h))c(f,g),Math.abs(g)>10&&b.preventDefault();else{var i=a(window);a("body,html").animate({scrollTop:i.scrollTop()-h},400)}}}function c(a,b){b>10&&a.find(".left.carousel-control").click(),-10>b&&a.find(".right.carousel-control").click()}if(this.options.touchable){this.$element.on("touchstart touchmove touchend",b);var d,e}},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle(),f.touchable&&e.touchable()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),function(){"use strict";window.imgReady=function(){var a=[],b=null,c=function(){for(var b=0;b1024)&&(e.call(m),h.end=!0)},h(),m.onload=function(){!h.end&&h(),f&&f.call(m),m=m.onload=m.onerror=null},void(h.end||(a.push(h),null===b&&(b=setInterval(c,40)))))}}()}(),function(a,b,c){"use strict";if(!a.fn.modalTrigger)throw new Error("modal & modalTrigger requires for lightbox");if(!b.imgReady)throw new Error("imgReady requires for lightbox");var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};d.DEFAULTS={modalTeamplate:'![]({image})
'},d.prototype.getOptions=function(b){var c="image";return b=a.extend({},d.DEFAULTS,this.$.data(),b),b[c]||(b[c]=this.$.attr("src")||this.$.attr("href")||this.$.find("img").attr("src"),this.$.data(c,b[c])),b},d.prototype.init=function(){this.bindEvents()},d.prototype.initGroups=function(){var b=this.$.data("groups");b||(b=a('[data-toggle="lightbox"][data-group="'+this.options.group+'"], [data-lightbox-group="'+this.options.group+'"]'),this.$.data("groups",b),b.each(function(b){a(this).attr("data-group-index",b)})),this.groups=b,this.groupIndex=parseInt(this.$.data("group-index"))},d.prototype.bindEvents=function(){var d=this.$,e=this,f=this.options;return f.image?void d.modalTrigger({type:"custom",name:"lightboxModal",position:"center",custom:function(d){e.initGroups();var g=d.modal,h=e.groups,i=e.groupIndex;g.addClass("modal-lightbox").html(f.modalTeamplate.format(f)).toggleClass("lightbox-with-caption","string"==typeof f.caption).removeClass("lightbox-full").data("group-index",i);var j=g.find(".modal-dialog"),k=a(b).width();b.imgReady(f.image,function(){j.css({width:c.min(k,this.width)}),k
0),g.find(".next").toggleClass("show",h.filter('[data-group-index="'+(i+1)+'"]').length>0),g.find(".controller").click(function(){var e=a(this),f=g.data("group-index")+(e.hasClass("prev")?-1:1),i=h.filter('[data-group-index="'+f+'"]');if(i.length){var l=i.data("image"),m=i.data("caption");g.addClass("modal-loading").data("group-index",f).toggleClass("lightbox-with-caption","string"==typeof m).removeClass("lightbox-full"),g.find(".lightbox-img").attr("src",l),k=a(b).width(),b.imgReady(l,function(){j.css({width:c.min(k,this.width)}),k0),g.find(".next").toggleClass("show",h.filter('[data-group-index="'+(f+1)+'"]').length>0),!1})}}):!1},a.fn.lightbox=function(b){var c="group"+(new Date).getTime();return this.each(function(){var e=a(this),f="object"==typeof b&&b;"object"==typeof f&&f.group?e.attr("data-lightbox-group",f.group):e.data("group")?e.attr("data-lightbox-group",e.data("group")):e.attr("data-lightbox-group",c),e.data("group",e.data("lightbox-group"));var g=e.data("zui.lightbox");g||e.data("zui.lightbox",g=new d(this,f)),"string"==typeof b&&g[b]()})},a.fn.lightbox.Constructor=d,a(function(){a('[data-toggle="lightbox"]').lightbox()})}(jQuery,window,Math),function(a,b){"use strict";var c,d=0,e='',f={type:"default",placement:"top",time:4e3,parent:"body",icon:null,close:!0,fade:!0,scale:!0},g=function(b,c){var g=this;g.id=d++,c=g.options=a.extend({},f,c),g.message=(c.icon?' ':"")+b,g.$=a(e.format(c)).toggleClass("fade",c.fade).toggleClass("scale",c.scale).attr("id","messager-"+g.id),c.close?g.$.on("click",".close",function(){g.hide()}):g.$.find(".close").remove(),g.$.find(".messager-content").html(g.message),g.$.data("zui.messager",g)};g.prototype.show=function(){var d=this,e=this.options;c&&c.isShow&&c.hide(),d.$.appendTo(e.parent).show(),("top"===e.placement||"bottom"===e.placement||"center"===e.placement)&&d.$.css("left",(a(b).width()-d.$.width()-50)/2),("left"===e.placement||"right"===e.placement||"center"===e.placement)&&d.$.css("top",(a(b).height()-d.$.height()-50)/2),d.$.addClass("in"),e.time&&setTimeout(function(){d.hide()},e.time),d.isShow=!0,c=d},g.prototype.hide=function(){var a=this;a.$.hasClass("in")&&(a.$.removeClass("in"),setTimeout(function(){a.$.remove()},200)),a.isShow=!1},a.Messager=g;var h=b.Messager;b.Messager=a.Messager,b.Messager.noConflict=function(){b.Messager=h},a.showMessage=function(a,b){"string"==typeof b&&(b={type:b});var c=new g(a,b);return c.show(),c};var i=function(a){return"string"==typeof a?{placement:a}:a};a.messager={show:a.showMessage,primary:function(b,c){return a.showMessage(b,a.extend({type:"primary"},i(c)))},success:function(b,c){return a.showMessage(b,a.extend({type:"success",icon:"ok-sign"},i(c)))},info:function(b,c){return a.showMessage(b,a.extend({type:"info",icon:"info-sign"},i(c)))},warning:function(b,c){return a.showMessage(b,a.extend({type:"warning",icon:"warning-sign"},i(c)))},danger:function(b,c){return a.showMessage(b,a.extend({type:"danger",icon:"exclamation-sign"},i(c)))},important:function(b,c){return a.showMessage(b,a.extend({type:"important"},i(c)))},special:function(b,c){return a.showMessage(b,a.extend({type:"special"},i(c)))}};var j=b.messager;b.messager=a.messager,b.messager.noConflict=function(){b.messager=j}}(jQuery,window),function(a){"use strict";var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.init()};b.DEFAULTS={auto:!1,foldicon:"icon-chevron-right"},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.init=function(){var a=this.$.children(".nav");a.find(".nav").closest("li").addClass("nav-parent"),a.find(".nav > li.active").closest("li").addClass("active"),a.find(".nav-parent > a").append(''),this.handleFold()},b.prototype.handleFold=function(){var b=this.options.auto,c=this.$;this.$.find(".nav-parent > a").click(function(d){b&&(c.find(".nav-parent.show").find(".nav").slideUp(function(){a(this).closest(".nav-parent").removeClass("show")}),c.find(".icon-rotate-90").removeClass("icon-rotate-90"));var e=a(this).closest(".nav-parent");return e.hasClass("show")?(e.find(".icon-rotate-90").removeClass("icon-rotate-90"),e.find(".nav").slideUp(function(){a(this).closest(".nav-parent").removeClass("show")})):(e.find(".nav-parent-fold-icon").addClass("icon-rotate-90"),e.find(".nav").slideDown(function(){a(this).closest(".nav-parent").addClass("show")})),d.preventDefault(),!1})},a.fn.menu=function(c){return this.each(function(){var d=a(this),e=d.data("zui.menu"),f="object"==typeof c&&c;e||d.data("zui.menu",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.menu.Constructor=b,a(function(){a('[data-toggle="menu"]').menu()})}(jQuery),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(){var a;if("undefined"!=typeof config&&config.clientLang)a=config.clientLang;else{var c=b("html").attr("lang");a=c?c:"en"}return a.replace("-","_").toLowerCase()}function e(a){var b=r[p.locale];return b?b[a]:r.en[a]}function f(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d(a)===!1;e||c.modal("hide")}function g(a){var b,c=0;for(b in a)c++;return c}function h(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function i(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},p,a),a.buttons||(a.buttons={}),a.backdrop=a.backdrop?"static":!1,c=a.buttons,d=g(c),h(c,function(a,e){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=1==d||d>=2&&"confirm"===a?"btn-primary":"btn-default")}),a}function j(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function k(a,c,d){return b.extend(!0,{},a,j(c,d))}function l(a,b,c,d){var e={className:"bootbox-"+a,buttons:m.apply(null,b)};return n(k(e,d,c),b)}function m(){for(var a={},b=0,c=arguments.length;c>b;b++){var d=arguments[b],f=d.toLowerCase(),g=d.toUpperCase();a[f]={label:e(g)}}return a}function n(a,b){var d={};return h(b,function(a,b){d[b]=!0}),h(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var o={dialog:"",header:"",footer:"",closeButton:"",form:"",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"",date:"",time:"",number:"",password:""}},p={locale:d(),backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},q={};q.alert=function(){var a;if(a=l("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback():!0},q.dialog(a)},q.confirm=function(){var a;if(a=l("confirm",["confirm","cancel"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback(!1)},a.buttons.confirm.callback=function(){return a.callback(!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return q.dialog(a)},q.prompt=function(){var a,d,e,f,g,i,j;f=b(o.form),d={className:"bootbox-prompt",buttons:m("confirm","cancel"),value:"",inputType:"text"},a=n(k(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show;var l=["date","time","number"],p=document.createElement("input");if(p.setAttribute("type",a.inputType),l[a.inputType]&&(a.inputType=p.type),a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback(null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=g.val();break;case"checkbox":var d=g.find("input:checked");c=[],h(d,function(a,d){c.push(b(d).val())})}return a.callback(c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!o.inputs[a.inputType])throw new Error("invalid prompt type");switch(g=b(o.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":g.val(a.value);break;case"select":var r={};if(j=a.inputOptions||[],!j.length)throw new Error("prompt with select requires options");h(j,function(a,d){var e=g;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(r[d.group]||(r[d.group]=b("").attr("label",d.group)),e=r[d.group]),e.append("")}),h(r,function(a,b){g.append(b)}),g.val(a.value);break;case"checkbox":var s=b.isArray(a.value)?a.value:[a.value];if(j=a.inputOptions||[],!j.length)throw new Error("prompt with checkbox requires options");if(!j[0].value||!j[0].text)throw new Error("given options in wrong format");g=b(""),h(j,function(c,d){var e=b(o.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),h(s,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),g.append(e)})}return a.placeholder&&g.attr("placeholder",a.placeholder),a.pattern&&g.attr("pattern",a.pattern),f.append(g),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=q.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){g.focus()}),i===!0&&e.modal("show"),e},q.dialog=function(a){a=i(a);var c=b(o.dialog),d=c.find(".modal-dialog"),e=c.find(".modal-body"),g=a.buttons,j="",k={onEscape:a.onEscape};if(h(g,function(a,b){j+="",k[a]=b.callback}),e.find(".bootbox-body").html(a.message),a.animate===!0&&c.addClass("fade"),a.className&&c.addClass(a.className),"large"===a.size&&d.addClass("modal-lg"),"small"===a.size&&d.addClass("modal-sm"),a.title&&e.before(o.header),a.closeButton){var l=b(o.closeButton);a.title?c.find(".modal-header").prepend(l):l.css("margin-top","-10px").prependTo(e)}return a.title&&c.find(".modal-title").html(a.title),j.length&&(e.after(o.footer),c.find(".modal-footer").html(j)),c.on("hidden.bs.modal",function(a){a.target===this&&c.remove()}),c.on("shown.bs.modal",function(){c.find(".btn-primary:first").focus()}),c.on("escape.close.bb",function(a){k.onEscape&&f(a,c,k.onEscape)}),c.on("click",".modal-footer button",function(a){var d=b(this).data("bb-handler");f(a,c,k[d])}),c.on("click",".bootbox-close-button",function(a){f(a,c,k.onEscape)}),c.on("keyup",function(a){27===a.which&&c.trigger("escape.close.bb")}),b(a.container).append(c),c.modal({backdrop:a.backdrop,keyboard:!1,show:!1}),a.show&&c.modal("show"),c},q.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(p,a)},q.hideAll=function(){b(".bootbox").modal("hide")};var r={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return q.init=function(c){return a(c||b)},q}),+function(a,b){"use strict";function c(b){var c=b.data("url");c&&(b.addClass("panel-loading").find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").addClass("icon-spin"),a.ajax({url:c,dataType:"html"}).done(function(a){b.find(".panel-body").html(a)}).fail(function(){b.addClass("panel-error")}).always(function(){b.removeClass("panel-loading"),b.find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").removeClass("icon-spin")}))}var d=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.draggable=this.$.hasClass("dashboard-draggable")||this.options.draggable,this.init()};d.DEFAULTS={height:360},d.prototype.getOptions=function(b){return b=a.extend({},d.DEFAULTS,this.$.data(),b)
+},d.prototype.handleRemoveEvent=function(){var b=this.options.afterPanelRemoved,c=this.options.panelRemovingTip;this.$.on("click",".remove-panel",function(){var d=a(this).closest(".panel"),e=d.data("name")||d.find(".panel-heading").text().replace("\n","").replace(/(^\s*)|(\s*$)/g,""),f=d.attr("data-id");(void 0==c||confirm(c.format(e)))&&(d.parent().remove(),b&&a.isFunction(b)&&b(f))})},d.prototype.handleRefreshEvent=function(){this.$.on(".click",".refresh-panel",function(){var b=a(this).closest(".panel");c(b)})},d.prototype.handleDraggable=function(){var b=this.$,c=this.options.afterOrdered;this.$.addClass("dashboard-draggable"),this.$.find(".panel-actions").mousedown(function(a){a.preventDefault(),a.stopPropagation()}),this.$.find(".panel-heading").mousedown(function(d){function e(c){var d=j.data("mouseOffset");j.css({left:c.pageX-d.x,top:c.pageY-d.y}),i.find(".dragging-in").removeClass("dragging-in");var e=!1;i.children().each(function(){var d=a(this);if(d.hasClass("dragging-col-holder"))return e=!0,!0;var f=d.children(".panel"),g=f.offset(),h=f.width(),j=f.height(),k=g.left,l=g.top,n=c.pageX,o=c.pageY;if(n>k&&o>l&&k+h>n&&l+j>o){{i.find(".dragging-col")}return d.addClass("dragging-in"),e?m.insertAfter(d):m.insertBefore(d),b.addClass("dashboard-holding"),!1}}),c.preventDefault()}function f(d){var h=g.data("order");g.parent().insertAfter(m);var k=0,l={};i.children(":not(.dragging-col-holder)").each(function(){var b=a(this).children(".panel");b.data("order",++k),l[b.attr("id")]=k,b.parent().attr("data-order",k)}),h!=l[g.attr("id")]&&(i.data("orders",l),c&&a.isFunction(c)&&c(l)),j.remove(),b.removeClass("dashboard-holding"),b.find(".dragging-col").removeClass("dragging-col"),b.find(".panel-dragging").removeClass("panel-dragging"),i.find(".dragging-in").removeClass("dragging-in"),b.removeClass("dashboard-dragging"),a(document).unbind("mousemove",e).unbind("mouseup",f),d.preventDefault()}var g=a(this).closest(".panel"),h=g.parent(),i=g.closest(".row"),j=g.clone().addClass("panel-dragging-shadow"),k=g.offset(),l=b.offset(),m=i.find(".dragging-col-holder");m.length||(m=a("").addClass(i.children().attr("class")).removeClass("dragging-col").appendTo(i)),m.insertBefore(h).find(".panel").replaceWith(g.clone().addClass("panel-dragging panel-dragging-holder")),b.addClass("dashboard-dragging"),g.addClass("panel-dragging").parent().addClass("dragging-col"),j.css({left:k.left-l.left,top:k.top-l.top,width:g.width(),height:g.height()}).appendTo(b).data("mouseOffset",{x:d.pageX-k.left+l.left,y:d.pageY-k.top+l.top}),a(document).bind("mousemove",e).bind("mouseup",f),d.preventDefault()})},d.prototype.handlePanelPadding=function(){this.$.find(".panel-body > table, .panel-body > .list-group").closest(".panel-body").addClass("no-padding")},d.prototype.handlePanelHeight=function(){var c=this.options.height;this.$.find(".row").each(function(){var d=a(this),e=d.find(".panel"),f=d.data("height")||c;"number"!=typeof f&&(f=0,e.each(function(){f=b.max(f,a(this).innerHeight())})),e.each(function(){var b=a(this);b.find(".panel-body").css("height",f-b.find(".panel-heading").outerHeight()-2)})})},d.prototype.init=function(){this.handlePanelHeight(),this.handlePanelPadding(),this.handleRemoveEvent(),this.handleRefreshEvent(),this.draggable&&this.handleDraggable();var b=0;this.$.find(".panel").each(function(){var d=a(this);d.data("order",++b),d.attr("id")||d.attr("id","panel"+b),d.attr("data-id")||d.attr("data-id",b),c(d)})},a.fn.dashboard=function(b){return this.each(function(){var c=a(this),e=c.data("zui.dashboard"),f="object"==typeof b&&b;e||c.data("zui.dashboard",e=new d(this,f)),"string"==typeof b&&e[b]()})},a.fn.dashboard.Constructor=d}(jQuery,Math),function(a){"use strict";if(!a.fn.droppable)throw new Error("droppable requires for boards");var b=function(b,c){this.$=a(b),this.options=this.getOptions(c),this.getLang(),this.init()};b.DEFAULTS={lang:"zh-cn",langs:{"zh-cn":{appendToTheEnd:"移动到末尾"},"zh-tw":{appendToTheEnd:"移动到末尾"},en:{appendToTheEnd:"Move to the end."}}},b.prototype.getOptions=function(c){return c=a.extend({},b.DEFAULTS,this.$.data(),c)},b.prototype.getLang=function(){var c=window.config;if(!this.options.lang){if("undefined"!=typeof c&&c.clientLang)this.options.lang=c.clientLang;else{var d=a("html").attr("lang");this.options.lang=d?d:"en"}this.options.lang=this.options.lang.replace(/-/,"_").toLowerCase()}this.lang=this.options.langs[this.options.lang]||this.options.langs[b.DEFAULTS.lang]},b.prototype.init=function(){var b=1,c=this.lang;this.$.find('.board-item:not(".disable-drop"), .board:not(".disable-drop")').each(function(){var d=a(this);d.attr("id")?d.attr("data-id",d.attr("id")):d.attr("data-id")||d.attr("data-id","board"+b++),d.hasClass("board")&&d.find(".board-list").append(' {appendToTheEnd}
'.format(c)).append(''.format(c))}),this.bind()},b.prototype.bind=function(b){var c=this.$,d=this.options;"undefined"==typeof b&&(b=c.find('.board-item:not(".disable-drop, .board-item-shadow")')),b.droppable({target:'.board-item:not(".disable-drop, .board-item-shadow")',flex:!0,start:function(a){c.addClass("dragging").find(".board-item-shadow").height(a.element.outerHeight())},drag:function(a){if(c.find(".board.drop-in-empty").removeClass("drop-in-empty"),a.isIn){var b=a.target.closest(".board").addClass("drop-in"),d=b.find(".board-item-shadow"),e=a.target;c.addClass("drop-in").find(".board.drop-in").not(b).removeClass("drop-in"),d.insertBefore(e),b.toggleClass("drop-in-empty",e.hasClass("board-item-empty"))}},drop:function(b){if(b.isNew){var c="drop";d.hasOwnProperty(c)&&a.isFunction(d[c])&&d[c](b),b.element.insertBefore(b.target)}},finish:function(){c.removeClass("dragging").removeClass("drop-in").find(".board.drop-in").removeClass("drop-in")}})},a.fn.boards=function(c){return this.each(function(){var d=a(this),e=d.data("zui.boards"),f="object"==typeof c&&c;e||d.data("zui.boards",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.boards.Constructor=b,a(function(){a('[data-toggle="boards"]').boards()})}(jQuery),function(a){"use strict";var b="zui.datatable",c=function(c,d){this.name=b,this.$=a(c),this.isTable="TABLE"===this.$[0].tagName,this.firstShow=!0,this.isTable?(this.$table=this.$,this.id="datatable-"+(this.$.attr("id")||a.uuid())):(this.$datatable=this.$.addClass("datatable"),this.$.attr("id")?this.id=this.$.attr("id"):(this.id="datatable-"+a.uuid(),this.$.attr("id",this.id))),this.getOptions(d),this.load(),this.callEvent("ready")};c.DEFAULTS={checkable:!1,checkByClickRow:!0,checkedClass:"active",checkboxName:null,sortable:!1,fixedHeader:!0,fixedHeaderOffset:0,fixedLeftWidth:"30%",fixedRightWidth:"30%",flexHeadDrag:!0,scrollPos:"in",rowHover:!0,colHover:!0,hoverClass:"hover",colHoverClass:"col-hover",minColWidth:20,minFixedLeftWidth:200,minFixedRightWidth:200,minFlexAreaWidth:200},c.prototype.getOptions=function(b){var d=this.$;b=a.extend({},c.DEFAULTS,this.$.data(),b),b.tableClass=b.tableClass||"",b.tableClass=" "+b.tableClass+" table-datatable",d.hasClass("table-bordered")&&(b.tableClass+=" table-bordered"),(d.hasClass("table-hover")||b.rowHover)&&(b.tableClass+=" table-hover"),d.hasClass("table-striped")&&(b.tableClass+=" table-striped"),d.hasClass("table-condensed")&&(b.tableClass+=" table-condensed"),d.hasClass("table-fixed")&&(b.tableClass+=" table-fixed"),this.options=b},c.prototype.load=function(c){var d,e=this.options;if(a.isPlainObject(c))this.data=c;else if("string"==typeof c){var f=a(c);f.length&&(this.$table=f.first(),this.$table.data(b,this),this.isTable=!0),c=null}else c=e.data;if(!c){if(!this.isTable)throw new Error("No data avaliable!");c={cols:[],rows:[]},d=c.cols;var g,h,i,j,k=c.rows,l=this.$table;l.find("thead > tr:first").children("th").each(function(){g=a(this),d.push(a.extend({text:g.html(),flex:!1||g.hasClass("flex-col"),width:"auto",cssClass:g.attr("class"),css:g.attr("style"),type:"string",ignore:g.hasClass("ignore"),sort:!g.hasClass("sort-disabled")},g.data()))}),l.find("tbody > tr").each(function(){h=a(this),j=a.extend({data:[],checked:!1,cssClass:h.attr("class"),css:h.attr("style"),id:h.attr("id")},h.data()),h.children("td").each(function(){i=a(this),j.data.push(a.extend({cssClass:i.attr("class"),css:i.attr("style"),text:i.html()},i.data()))}),k.push(j)});var m=l.find("tfoot");m.length&&(c.footer=a('').append(m))}c.flexStart=-1,c.flexEnd=-1,d=c.cols,c.colsLength=d.length;for(var n=0;n=0,c.fixedRight=c.flexEnd>=0&&c.flexEnd0,c.flexStart<0&&c.flexEnd<0&&(c.fixedLeft=!0,c.flexStart=c.colsLength,c.flexEnd=c.colsLength),this.data=c,this.callEvent("afterLoad",{data:c}),this.render()},c.prototype.render=function(){var c,d,e,f,g=this,h=g.$datatable||(g.isTable?a(''):g.$datatable),i=g.options,j=g.data,k=g.data.cols,l=g.data.rows,m=i.checkable,n='',o='';h.children(".datatable-head, .datatable-rows").remove(),h.toggleClass("sortable",i.sortable);var p,q,r,s=a('');for(c=a("
"),e=a("
"),f=a("
"),d=0;d=j.flexStart&&d<=j.flexEnd?f:e,0===d&&m&&p.append(' | '),r.ignore||(q=a(" | "),q.toggleClass("sort-down","down"===r.sort).toggleClass("sort-up","up"===r.sort).toggleClass("sort-disabled",r.sort===!1),q.addClass(r.cssClass).addClass(r.colClass).html(r.text).attr({"data-index":d,"data-type":r.type,style:r.css}),p.append(q));var t;j.fixedLeft&&(t=a(o),t.addClass("fixed-left").find("table").addClass(i.tableClass).find("thead").append(c),s.append(t)),j.flexArea&&(t=a(o),t.addClass("flexarea").find(".datatable-wrapper").append('').find("table").addClass(i.tableClass).find("thead").append(f),s.append(t)),j.fixedRight&&(t=a(o),t.addClass("fixed-right").find("table").addClass(i.tableClass).find("thead").append(e),s.append(t)),h.append(s);var u,v,w,x,y,z,A,B,C=a(''),D=l.length;c=a("
"),e=a("
"),f=a("
");for(var E=0;D>E;++E){for(z=l[E],"undefined"==typeof z.id&&(z.id=E),z.index=E,u=a("
|
"),u.addClass(z.cssClass).toggleClass(i.checkedClass,z.checked).attr({"data-index":E,"data-id":z.id}),v=u.clone(),w=u.clone(),B=z.data.length,d=0;B>d;++d)A=z.data[d],p=d
=j.flexStart&&d<=j.flexEnd?v:w,0===d&&m&&(y=a(' | '),i.checkboxName&&y.append(''),p.append(y)),k[d].ignore||(a.isPlainObject(A)||(A={text:A,row:E,index:d},z.data[d]=A),x=a(" | "),x.html(A.text).addClass(A.cssClass).addClass(k[d].colClass).attr({"data-row":E,"data-index":d,"data-flex":!1,"data-type":k[d].type,style:A.css}),p.append(x));c.append(u),f.append(v),e.append(w)}var F;j.fixedLeft&&(F=a(n),F.addClass("fixed-left").find("table").addClass(i.tableClass).append(c),C.append(F)),j.flexArea&&(F=a(n),F.addClass("flexarea").find(".datatable-wrapper").append('').find("table").addClass(i.tableClass).append(f),C.append(F)),j.fixedRight&&(F=a(n),F.addClass("fixed-right").find("table").addClass(i.tableClass).append(e),C.append(F)),h.append(C),j.flexArea&&h.append('');var G=h.children(".datatable-footer").detach();j.footer?(h.append(a('').append(j.footer)),j.footer=null):G.length&&h.append(G),g.$datatable=h.data(b,g),g.isTable&&g.firstShow&&(g.$table.attr("data-datatable-id",this.id).hide().after(h),g.firstShow=!1),g.bindEvents(),g.refreshSize(),g.callEvent("render")},c.prototype.bindEvents=function(){var b=this,c=this.data,d=this.options,e=window.store,f=this.$datatable,g=b.$dataSpans=f.children(".datatable-head, .datatable-rows").find(".datatable-span"),h=b.$rowsSpans=f.children(".datatable-rows").children(".datatable-rows-span"),i=b.$headSpans=f.children(".datatable-head").children(".datatable-head-span"),j=b.$cells=g.find("td, th"),k=b.$dataCells=j.filter("td");b.$headCells=j.filter("th");var l=b.$rows=b.$rowsSpans.find(".table > tbody > tr");if(d.rowHover){var m=d.hoverClass;h.on("mouseenter","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m),l.filter('[data-index="'+a(this).addClass(m).closest("tr").data("index")+'"]').addClass(m)}).on("mouseleave","td",function(){k.filter("."+m).removeClass(m),l.filter("."+m).removeClass(m)})}if(d.colHover){var n=d.colHoverClass;i.on("mouseenter","th",function(){j.filter("."+n).removeClass(n),j.filter('[data-index="'+a(this).data("index")+'"]').addClass(n)}).on("mouseleave","th",function(){j.filter("."+n).removeClass(n)})}if(c.flexArea){var o,p,q,r,s,t,u,v=f.find(".scroll-slide"),w=f.find(".datatable-span.flexarea"),x=f.find(".datatable-span.fixed-left"),y=f.find(".datatable-span.flexarea .table"),z=v.children(".bar"),A=b.id+"_scrollOffset";b.width=f.width(),f.resize(function(){b.width=f.width()});var B=function(a,b){s=Math.max(0,Math.min(o-p,a)),b||f.addClass("scrolling"),z.css("left",s),u=0-Math.floor((q-o)*s/(o-p)),y.css("left",u),r=s,f.toggleClass("scrolled-in",s>2).toggleClass("scrolled-out",o-p-2>s),e.pageSet(A,s)},C=function(){o=w.width(),v.width(o).css("left",x.width()),q=y.width(),p=Math.floor(o*o/q),z.css("width",p),y.css("min-width",o),f.toggleClass("show-scroll-slide",q>o),t||o===p||(t=!0,B(e.pageGet(A,0),!0)),f.hasClass("size-changing")&&B(s,!0)};w.resize(C),C();var D={move:!1,stopPropagation:!0,drag:function(a){B(z.position().left+a.smallOffset.x*(a.element.hasClass("bar")?1:-1))},finish:function(){f.removeClass("scrolling")}};z.draggable(D),d.flexHeadDrag&&f.find(".datatable-head-span.flexarea").draggable(D),v.mousedown(function(a){var b=a.pageX-v.offset().left;B(b-p/2)})}if(d.checkable){var E,F=b.id+"_checkedStatus",G=d.checkedClass,H=function(){var f=h.first().find(".table > tbody > tr"),g=f.filter("."+G);f.find(".check-row input:checkbox").prop("checked",!1);var j={checkedAll:f.length===g.length&&g.length>0,checks:g.map(function(){return E=a(this).data("id"),d.checkboxName&&a(this).find(".check-row input:checkbox").prop("checked",!0),E}).toArray()};a.each(c.rows,function(b,c){c.checked=a.inArray(c.id,j.checks)>-1}),i.find(".check-all").toggleClass("checked",j.checkedAll),e.pageSet(F,j),b.callEvent("checksChanged",{checks:j})};this.$rowsSpans.on("click",d.checkByClickRow?"tr":".check-row",function(){l.filter('[data-index="'+a(this).closest("tr").data("index")+'"]').toggleClass(G),H()}),this.$datatable.on("click",".check-all",function(){l.toggleClass(G,a(this).toggleClass("checked").hasClass("checked")),H()}).on("click",".check-none",function(){l.toggleClass(G,!1),H()}).on("click",".check-inverse",function(){l.toggleClass(G),H()});var I=e.pageGet(F);I&&(i.find(".check-all").toggleClass("checked",I.checkedAll),I.checkedAll?l.addClass(G):(l.removeClass(G),a.each(I.checks,function(a,b){l.filter('[data-id="'+b+'"]').addClass(G)})),I.checks.length&&H())}d.sortable&&i.on("click","th:not(.sort-disabled, .check-btn)",function(){f.hasClass("size-changing")||b.sortTable(a(this))})},c.prototype.sortTable=function(b){var c=window.store,d=this.id+"_datatableSorter",e=c.pageGet(d);if(b||(b=e?this.$headCells.filter('[data-index="'+e.index+'"]').addClass("sort-"+e.type):this.$headCells.filter(".sort-up, .sort-down").first()),b.length){var f,g,h,i=this.data,j=i.cols,k=i.rows,l=this.$headCells;f=!b.hasClass("sort-up"),l.removeClass("sort-up sort-down"),b.addClass(f?"sort-up":"sort-down"),h=b.data("index"),f=b.hasClass("sort-up"),a.each(j,function(a,b){a==h||"up"!==b.sort&&"down"!==b.sort?a==h&&(b.sort=f?"up":"down",g=b.type):b.sort=!0});var m,n,o,p=this.$dataCells.filter('[data-index="'+h+'"]');k.sort(function(a,b){return a=a.data[h],b=b.data[h],m=p.filter('[data-row="'+a.row+'"]').text(),n=p.filter('[data-row="'+b.row+'"]').text(),"number"===g?(m=parseFloat(m),n=parseFloat(n)):"date"===g?(m=Date.parse(m),n=Date.parse(n)):(m=m.toLowerCase(),n=n.toLowerCase()),o=m>n?1:n>m?-1:0,f&&(o=-1*o),o});var q,r,s,t=this.$rows,u=[];a.each(k,function(b,c){q=t.filter('[data-index="'+c.index+'"]'),q.each(function(b){s=a(this),r=u[b],r?r.after(s):s.parent().prepend(s),u[b]=s})}),e={index:h,type:f?"up":"down"},c.pageSet(d,e),this.callEvent("sort",{sorter:e})}},c.prototype.refreshSize=function(){var b,c=this.$datatable,d=this.options,e=this.data.rows,f=this.data.cols;c.find(".datatable-span.fixed-left").css("width",d.fixedLeftWidth),c.find(".datatable-span.fixed-right").css("width",d.fixedRightWidth);var g=function(b){var c=0;return b.css("height","auto"),b.each(function(){c=Math.max(c,a(this).height())}),c},h=this.$dataCells,i=this.$cells,j=this.$headCells;for(b=0;b'.format(this.lang)),this.$.append(f)),this.$caption=f.find(".calendar-caption"),this.$todayBtn=f.find(".btn-today"),this.$header=f}var g=this.$.children(".calendar-views");g.length||(g=a(''),this.$.append(g)),this.$views=g,this.$monthView=g.children(".calendar-view.month"),this.display(),this.bindEvents()};f.DEFAULTS={langs:{zh_cn:{weekNames:["周一","周二","周三","周四","周五","周六","周日"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",year:"{0}年",month:"{0}月",yearMonth:"{0}年{1}月"}},data:{calendars:{defaultCal:{color:"#229F24"}},events:[]},limitEventTitle:!0,storage:!0,withHeader:!0,dragThenDrop:!0},f.prototype.sortEvents=function(){var b=this.events;a.isArray(b)||(b=[]),a.each(b,function(b,c){"string"==typeof c.start&&(c.start=new Date(c.start)),"string"==typeof c.end&&(c.end=new Date(c.end)),"undefined"==typeof c.id&&(c.id=a.uuid())}),b.sort(function(a,b){return a.start>b.start?1:a.start=0&&this.callEvent("beforeRemoveEvent",{event:d,eventId:c,data:this.data})&&(f.splice(e,1),g.push(d))}),this.sortEvents(),this.display(),this.callEvent("removeEvents",{removedEvents:g,data:this.data})},f.prototype.getOptions=function(b){this.options=a.extend({},f.DEFAULTS,this.$.data(),b)},f.prototype.getLang=function(){this.lang=this.options.langs[this.options.lang||a.clientLang()]},f.prototype.display=function(a,c){"undefined"==typeof a?a=this.view:this.view=a,"undefined"==typeof c?c=this.date:this.date=c,"today"===c?(c=new Date,this.date=c):"string"==typeof c&&(c=new Date(c),this.date=c),this.options.storage&&b.store.pageSet(this.storeName,{date:c,view:a});var d={view:a,date:c};if(this.callEvent("beforeDisplay",d)){switch(a){case"month":this.displayMonth(c)}this.callEvent("display",d)}},f.prototype.displayMonth=function(){var b,c=this.options,f=this,g=this.lang,h=this.date,i=this.$views,j=this.$,k=f.$monthView;if(!k.length){k=a('');var l,m=k.find(".week-head"),n=k.find(".month-days");for(b=0;7>b;b++)m.append(""+g.weekNames[b]+" | ");for(b=0;6>b;b++){l=a('
');for(var o=0;7>o;o++)l.append(' | ');n.append(l)}i.append(k),f.$monthView=k}var p,q,r,s,t,u,v=k.find(".week-days"),w=k.find(".day"),x=e(h),y=new Date,z=d(x),A=h.getFullYear(),B=h.getMonth(),C=y.getMonth(),D=y.getFullYear(),E=y.getDate(),F=z.clone().addDays(42).addMilliseconds(-1),G=z.clone().addDays(1).addMilliseconds(-1);v.each(function(b){p=a(this),p.find(".day").each(function(c){q=a(this),r=q.closest(".cell-day"),s=G.getFullYear(),t=G.getDate(),u=G.getMonth(),q.attr("data-date",G.toDateString()),q.find(".heading > .number").text(t),q.find(".heading > .month").toggle(0===b&&0===c||1===t).text((0===u&&1===t?g.year.format(s)+" ":"")+g.monthNames[u]),r.toggleClass("current-month",u===B),r.toggleClass("current",t===E&&u===C&&s===D),r.toggleClass("past",y>G),r.toggleClass("future",G>y),q.find(".events").empty(),G.addDays(1)})}),c.withHeader&&(this.$caption.text(g.yearMonth.format(A,B+1)),this.$todayBtn.toggleClass("disabled",B===C));var H,I,J=this.calendars;a.each(this.events,function(b,c){c.start>=z&&c.start<=F&&(q=w.filter('[data-date="'+c.start.toDateString()+'"]'),q.length&&(H=a(''+c.start.format("hh:mm")+' '+c.title+"
"),H.find(".time").toggle(!c.allDay),H.data("event",c),c.calendar&&(I=J[c.calendar],I&&H.data("calendar",I).css("background-color",I.color)),q.find(".events").append(H)))}),c.dragThenDrop&&k.find(".event").droppable({target:w,container:k,flex:!0,start:function(){j.addClass("event-dragging")},drop:function(a){var b=a.element.data("event"),c=a.target.attr("data-date"),d=b.start.clone();if(d.toDateString()!=c&&(c=new Date(c),c.setHours(d.getHours()),c.setMinutes(d.getMinutes()),c.setSeconds(d.getSeconds()),f.callEvent("beforeChange",{event:b,change:"start",to:c}))){var e=b.end.clone();b.end.addMilliseconds(b.end.getTime()-d.getTime()),b.start=c,a.target.find(".events").append(a.element),f.callEvent("change",{data:f.data,changes:[{event:b,changes:[{change:"start",from:d,to:b.start},{change:"end",from:e,to:b.end}]}]})}},finish:function(){j.removeClass("event-dragging")}})},f.prototype.callEvent=function(a,b){var c=this.$.callEvent(a+"."+this.name,b,this);return!(void 0!==c.result&&!c.result)},a.fn.calendar=function(b){return this.each(function(){var d=a(this),e=d.data(c),g="object"==typeof b&&b;e||d.data(c,e=new f(this,g)),"string"==typeof b&&e[b]()})},a.fn.calendar.Constructor=f}(jQuery,window),function(a){function b(b){if("string"==typeof b.data){var c=b.handler,d=b.data.toLowerCase().split(" ");b.handler=function(b){if(this===b.target||!/textarea|select/i.test(b.target.nodeName)&&"text"!==b.target.type){var e="keypress"!==b.type&&a.hotkeys.specialKeys[b.which],f=String.fromCharCode(b.which).toLowerCase(),g="",h={};b.altKey&&"alt"!==e&&(g+="alt+"),b.ctrlKey&&"ctrl"!==e&&(g+="ctrl+"),b.metaKey&&!b.ctrlKey&&"meta"!==e&&(g+="meta+"),b.shiftKey&&"shift"!==e&&(g+="shift+"),e?h[g+e]=!0:(h[g+f]=!0,h[g+a.hotkeys.shiftNums[f]]=!0,"shift+"===g&&(h[a.hotkeys.shiftNums[f]]=!0));for(var i=0,j=d.length;j>i;i++)if(h[d[i]])return c.apply(this,arguments)}}}}a.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}},a.each(["keydown","keyup","keypress"],function(){a.event.special[this]={add:b}})}(jQuery);
\ No newline at end of file
diff --git a/src/js/messager.js b/src/js/messager.js
index 80fba32228aab35407997758d7ce87be217bfe42..7972520fd661670761903d064fcdb190baa8575e 100644
--- a/src/js/messager.js
+++ b/src/js/messager.js
@@ -94,7 +94,12 @@
};
$.Messager = Messager;
- if(!window.Messager) window.Messager = Messager;
+ var noConflictMessager = window.Messager;
+ window.Messager = $.Messager;
+ window.Messager.noConflict = function()
+ {
+ window.Messager = noConflictMessager;
+ };
$.showMessage = function(message, options)
{
@@ -145,5 +150,10 @@
}
};
- if(!window.messager) window.messager = $.messager;
+ var noConflict = window.messager;
+ window.messager = $.messager;
+ window.messager.noConflict = function()
+ {
+ window.messager = noConflict;
+ };
}(jQuery, window));