From 7bcbb4370741c1b2ebd091d2cf32a3a645dd42aa Mon Sep 17 00:00:00 2001 From: Catouse Date: Fri, 12 Jul 2019 09:39:08 +0800 Subject: [PATCH] * update zui. --- www/js/zui/min.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 178a27924c..ca9c3a035c 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI: Zentao template - v1.9.1 - 2019-07-09 + * ZUI: Zentao template - v1.9.1 - 2019-07-12 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2019 cnezsoft.com; Licensed MIT @@ -16,20 +16,20 @@ function(t,e,i){"$:nomunge";function n(){o=e[r](function(){s.each(function(){var * Copyright 2006, 2014 Klaus Hartl * Released under the MIT license */ -function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(t){return r.raw?t:encodeURIComponent(t)}function i(t){return r.raw?t:decodeURIComponent(t)}function n(t){return e(r.json?JSON.stringify(t):String(t))}function o(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(a," ")),r.json?JSON.parse(t):t}catch(e){}}function s(e,i){var n=r.raw?e:o(e);return t.isFunction(i)?i(n):n}var a=/\+/g,r=t.cookie=function(o,a,l){if(void 0!==a&&!t.isFunction(a)){if(l=t.extend({},r.defaults,l),"number"==typeof l.expires){var h=l.expires,c=l.expires=new Date;c.setTime(+c+864e5*h)}return document.cookie=[e(o),"=",n(a),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var d=o?void 0:{},u=document.cookie?document.cookie.split("; "):[],p=0,f=u.length;p=0;t--)delete this.page[i[t]];this.set(s,this.page)}},a.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},a.prototype.pageClear=function(){this.page={},this.pageSave()},a.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},a.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},a.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},a.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},a.prototype.removeItem=function(t){return i.removeItem(t),this},a.prototype.remove=function(t){return this.removeItem(t)},a.prototype.getItem=function(t){return i.getItem(t)},a.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},a.prototype.key=function(t){return i.key(t)},a.prototype.setItem=function(t,e){return i.setItem(t,e),this},a.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},a.prototype.clear=function(){return i.clear(),this},a.prototype.forEach=function(t){for(var e=this.length(),n=e-1;n>=0;n--){var o=i.key(n);t(o,this.get(o))}return this},a.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},a.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},a.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new a})}(window,jQuery),function(t){"use strict";var e="zui.searchBox",i=function(e,n){var o=this;o.name=name,o.$=t(e),o.options=n=t.extend({},i.DEFAULTS,o.$.data(),n);var s=o.$.is(n.inputSelector)?o.$:o.$.find(n.inputSelector);if(s.length){var a=function(){o.changeTimer&&(clearTimeout(o.changeTimer),o.changeTimer=null)},r=function(){a();var t=o.getSearch();if(t!==o.lastValue){var e=""===t;s.toggleClass("empty",e),o.$.callComEvent(o,"onSearchChange",[t,e]),o.lastValue=t}};o.$input=s=s.first(),s.on(n.listenEvent,function(t){o.changeTimer=setTimeout(function(){r()},n.changeDelay)}).on("focus",function(t){s.addClass("focus"),o.$.callComEvent(o,"onFocus",[t])}).on("blur",function(t){s.removeClass("focus"),o.$.callComEvent(o,"onBlur",[t])}).on("keydown",function(t){var e=0,i=t.which;27===i&&n.escToClear?(this.setSearch("",!0),r(),e=1):13===i&&n.onPressEnter&&(r(),o.$.callComEvent(o,"onPressEnter",[t]));var s=o.$.callComEvent(o,"onKeyDown",[t]);s===!1&&(e=1),e&&t.preventDefault()}),o.$.on("click",".search-clear-btn",function(t){o.setSearch("",!0),r(),o.focus(),t.preventDefault()}),r()}else console.error("ZUI: search box init error, cannot find search box input element.")};i.DEFAULTS={inputSelector:'input[type="search"],input[type="text"]',listenEvent:"change input paste",changeDelay:500},i.prototype.getSearch=function(){return this.$input&&t.trim(this.$input.val())},i.prototype.setSearch=function(t,e){var i=this.$input;i&&(i.val(t),e||i.trigger("change"))},i.prototype.focus=function(){this.$input&&this.$input.focus()},t.fn.searchBox=function(n){return this.each(function(){var o=t(this),s=o.data(e),a="object"==typeof n&&n;s||o.data(e,s=new i(this,a)),"string"==typeof n&&s[n]()})},i.NAME=e,t.fn.searchBox.Constructor=i}(jQuery),function(t,e){"use strict";var i="zui.draggable",n={container:"body",move:!0},o=0,s=function(e,i){var s=this;s.$=t(e),s.id=o++,s.options=t.extend({},n,s.$.data(),i),s.init()};s.DEFAULTS=n,s.NAME=i,s.prototype.init=function(){var n,o,s,a,r,l=this,h=l.$,c="before",d="drag",u="finish",p="."+i+"."+l.id,f="mousedown"+p,g="mouseup"+p,m="mousemove"+p,v=l.options,y=v.selector,b=v.handle,w=h,x=t.isFunction(v.move),C=function(t){var e=t.pageX,i=t.pageY;r=!0;var o={left:e-s.x,top:i-s.y};w.removeClass("drag-ready").addClass("dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[d]&&v[d]({event:t,element:w,startOffset:s,pos:o,offset:{x:e-n.x,y:i-n.y},smallOffset:{x:e-a.x,y:i-a.y}}),a.x=e,a.y=i,v.stopPropagation&&t.stopPropagation()},_=function(i){if(t(e).off(p),!r)return void w.removeClass("drag-ready");var o={left:i.pageX-s.x,top:i.pageY-s.y};w.removeClass("drag-ready dragging"),v.move&&(x?v.move(o,w):w.css(o)),v[u]&&v[u]({event:i,element:w,startOffset:s,pos:o,offset:{x:i.pageX-n.x,y:i.pageY-n.y},smallOffset:{x:i.pageX-a.x,y:i.pageY-a.y}}),i.preventDefault(),v.stopPropagation&&i.stopPropagation()},k=function(i){var l=t.zui.getMouseButtonCode(v.mouseButton);if(!(l>-1&&i.button!==l)){var h=t(this);if(y&&(w=b?h.closest(y):h),v[c]){var d=v[c]({event:i,element:w});if(d===!1)return}var u=t(v.container),p=w.offset();o=u.offset(),n={x:i.pageX,y:i.pageY},s={x:i.pageX-p.left+o.left,y:i.pageY-p.top+o.top},a=t.extend({},n),r=!1,w.addClass("drag-ready"),i.preventDefault(),v.stopPropagation&&i.stopPropagation(),t(e).on(m,C).on(g,_)}};b?h.on(f,b,k):y?h.on(f,y,k):h.on(f,k)},s.prototype.destroy=function(){var n="."+i+"."+this.id;this.$.off(n),t(e).off(n),this.$.data(i,null)},t.fn.draggable=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new s(this,a)),"string"==typeof e&&o[e]()})},t.fn.draggable.Constructor=s}(jQuery,document),function(t,e,i){"use strict";var n="zui.droppable",o={target:".droppable-target",deviation:5,sensorOffsetX:0,sensorOffsetY:0,dropToClass:"drop-to"},s=0,a=function(e,i){var n=this;n.id=s++,n.$=t(e),n.options=t.extend({},o,n.$.data(),i),n.init()};a.DEFAULTS=o,a.NAME=n,a.prototype.trigger=function(e,i){return t.zui.callEvent(this.options[e],i,this)},a.prototype.init=function(){var o,s,a,r,l,h,c,d,u,p,f,g,m,v=this,y=v.$,b=v.options,w=b.deviation,x="."+n+"."+v.id,C="mousedown"+x,_="mouseup"+x,k="mousemove"+x,T=b.selector,S=b.handle,D=b.flex,M=b.container,P=b.canMoveHere,F=b.dropToClass,z=y,L=!1,I=M?t(b.container).first():T?y:t("body"),E=function(e){if(L&&(f={left:e.pageX,top:e.pageY},!(i.abs(f.left-d.left)s&&f.top>a&&f.left-1&&i.button!==n)){var f=t(this);T&&(z=S?f.closest(T):f),z.hasClass("drag-shadow")||b.before&&b.before({event:i,element:z})===!1||(L=!0,o=t.isFunction(b.target)?b.target(z,y):I.find(b.target),s=null,a=null,r=!1,l=!0,h=null,c=z.offset(),u=I.offset(),u.top=u.top-I.scrollTop(),u.left=u.left-I.scrollLeft(),d={left:i.pageX,top:i.pageY},g=t.extend({},d),p={left:d.left-c.left,top:d.top-c.top},z.addClass("drag-from"),t(e).on(k,E).on(_,$),m=setTimeout(function(){t(e).on(C,$)},10),i.preventDefault(),b.stopPropagation&&i.stopPropagation())}};S?y.on(C,S,A):T?y.on(C,T,A):y.on(C,A)},a.prototype.destroy=function(){var i="."+n+"."+this.id;this.$.off(i),t(e).off(i),this.$.data(n,null)},a.prototype.reset=function(){this.destroy(),this.init()},t.fn.droppable=function(e){return this.each(function(){var i=t(this),o=i.data(n),s="object"==typeof e&&e;o||i.data(n,o=new a(this,s)),"string"==typeof e&&o[e]()})},t.fn.droppable.Constructor=a}(jQuery,document,Math),+function(t,e){"use strict";function i(e,i,s){return this.each(function(){var a=t(this),r=a.data(n),l=t.extend({},o.DEFAULTS,a.data(),"object"==typeof e&&e);r||a.data(n,r=new o(this,l)),"string"==typeof e?r[e](i,s):l.show&&r.show(i,s)})}var n="zui.modal",o=function(i,o){var s=this;s.options=o,s.$body=t(document.body),s.$element=t(i),s.$backdrop=s.isShown=null,s.scrollbarWidth=0,o.moveable===e&&(s.options.moveable=s.$element.hasClass("modal-moveable")),o.remote&&s.$element.find(".modal-content").load(o.remote,function(){s.$element.trigger("loaded."+n)})};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"};var s=function(e,i){var n=t(window);i.left=Math.max(0,Math.min(i.left,n.width()-e.outerWidth())),i.top=Math.max(0,Math.min(i.top,n.height()-e.outerHeight())),e.css(i)};o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.ajustPosition=function(i){var o=this,a=o.options;if(i===e&&(i=a.position),i!==e&&null!==i){t.isFunction(i)&&(i=i(o));var r=o.$element.find(".modal-dialog"),l=t(window).height(),h={maxHeight:"initial",overflow:"visible"},c=r.find(".modal-body").css(h);if(a.scrollInside){var d=a.headerHeight;"number"!=typeof d?d=r.find(".modal-header").height():t.isFunction(d)&&(d=d($header)),h.maxHeight=l-d,c.outerHeight()>h.maxHeight&&(h.overflow="auto")}c.css(h);var u=Math.max(0,(l-r.outerHeight())/2);if("fit"===i?i={top:u>50?Math.floor(2*u/3):u}:"center"===i?i={top:u}:t.isPlainObject(i)||(i={top:i}),r.hasClass("modal-moveable")){var p=null,f=a.rememberPos;f&&(f===!0?p=o.$element.data("modal-pos"):t.zui.store&&(p=t.zui.store.pageGet(n+".rememberPos."+f))),i=t.extend(i,{left:Math.max(0,(t(window).width()-r.outerWidth())/2)},p),"inside"===a.moveable?s(r,i):r.css(i)}else r.css(i)}},o.prototype.setMoveale=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,i=e.options,o=e.$element.find(".modal-dialog").removeClass("modal-dragged");o.toggleClass("modal-moveable",!!i.moveable),e.$element.data("modal-moveable-setup")||o.draggable({container:e.$element,handle:".modal-header",before:function(){var t=o.css("margin-top");t&&"0px"!==t&&o.css("top",t).css("margin-top","").addClass("modal-dragged")},finish:function(o){var s=i.rememberPos;s&&(e.$element.data("modal-pos",o.pos),t.zui.store&&s!==!0&&t.zui.store.pageSet(n+".rememberPos."+s,o.pos))},move:"inside"!==i.moveable||function(t){s(o,t)}})},o.prototype.show=function(e,i){var s=this,a=t.Event("show."+n,{relatedTarget:e});s.$element.trigger(a),s.$element.toggleClass("modal-scroll-inside",!!s.options.scrollInside),s.isShown||a.isDefaultPrevented()||(s.isShown=!0,s.options.moveable&&s.setMoveale(),s.checkScrollbar(),s.options.backdrop!==!1&&(s.$body.addClass("modal-open"),s.setScrollbar()),s.escape(),s.$element.on("click.dismiss."+n,'[data-dismiss="modal"]',function(t){s.hide(),t.stopPropagation()}),s.backdrop(function(){var a=t.support.transition&&s.$element.hasClass("fade");s.$element.parent().length||s.$element.appendTo(s.$body),s.$element.show().scrollTop(0),a&&s.$element[0].offsetWidth,s.$element.addClass("in").attr("aria-hidden",!1),s.ajustPosition(i),s.enforceFocus();var r=t.Event("shown."+n,{relatedTarget:e});a?s.$element.find(".modal-dialog").one("bsTransitionEnd",function(){s.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(o.TRANSITION_DURATION):s.$element.trigger("focus").trigger(r)}))},o.prototype.hide=function(e){e&&e.preventDefault&&e.preventDefault();var i=this;e=t.Event("hide."+n),i.$element.trigger(e),i.isShown&&!e.isDefaultPrevented()&&(i.isShown=!1,i.options.backdrop!==!1&&(i.$body.removeClass("modal-open"),i.resetScrollbar()),i.escape(),t(document).off("focusin."+n),i.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+n),t.support.transition&&i.$element.hasClass("fade")?i.$element.one("bsTransitionEnd",t.proxy(i.hideModal,i)).emulateTransitionEnd(o.TRANSITION_DURATION):i.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+n).on("focusin."+n,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+n,t.proxy(function(i){if(27==i.which){var o=t.Event("escaping."+n),s=this.$element.triggerHandler(o,"esc");if(s!=e&&!s)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+n)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+n)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var i=this,s=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=t.support.transition&&s;if(this.$backdrop=t('