From 7412681d2c67d19298891230cebef8d96817a6df Mon Sep 17 00:00:00 2001 From: Catouse Date: Fri, 15 Apr 2016 11:42:47 +0800 Subject: [PATCH 01/14] * update zui. --- www/js/zui/min.js | 8 ++++---- www/theme/zui/css/min.css | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/www/js/zui/min.js b/www/js/zui/min.js index 8967d5adc9..4c7d56a273 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI - v1.4.0 - 2016-04-14 + * ZUI - v1.4.0 - 2016-04-15 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2016 cnezsoft.com; Licensed MIT @@ -7,6 +7,6 @@ /* Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/ -!function(t,e){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var i=0;t.zui({uuid:function(){return 1e3*(new Date).getTime()+i++%1e3},callEvent:function(e,i,o){if(t.isFunction(e)){void 0!==o&&(e=t.proxy(e,o));var n=e(i);return i&&(i.result=n),!(void 0!==n&&!n)}return 1},clientLang:function(){var i,o=e.config;if("undefined"!=typeof o&&o.clientLang)i=o.clientLang;else{var n=t("html").attr("lang");i=n?n:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return i.replace("-","_").toLowerCase()}}),t.fn.callEvent=function(e,i,o){var n=t(this),a=e.indexOf(".zui."),s=e;0>a&&o&&o.name?e+="."+o.name:s=e.substring(0,a);var r=t.Event(e,i);if(void 0===o&&a>0&&(o=n.data(e.substring(a+1))),o&&o.options){var l=o.options[s];t.isFunction(l)&&t.zui.callEvent(o.options[s],r,o)}return n.trigger(s,i),r}}(jQuery,window),function(){"use strict";String.prototype.format||(String.prototype.format=function(t){var e=this;if(arguments.length>0){var i;if(1==arguments.length&&"object"==typeof t)for(var o in t)void 0!==t[o]&&(i=new RegExp("({"+o+"})","g"),e=e.replace(i,t[o]));else for(var n=0;n=e&&i>t}),Date.prototype.isSameYear||(Date.prototype.isSameYear=function(t){return this.getFullYear()===t.getFullYear()})}(),function(t,e){"use strict";var i="localStorage",o=t[i],n=(t.store,"page_"+t.location.pathname+t.location.search),a=function(){this.slience=!0,this.enable=i in t&&t[i]&&t[i].setItem,this.storage=o,this.page=this.get(n,{})};a.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(n);else{var t,i=[];for(t in this.page){var o=this.page[t];null===o&&i.push(t)}for(t=i.length-1;t>=0;t--)delete this.page[i[t]];this.set(n,this.page)}},a.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},a.prototype.pageClear=function(){this.page={},this.pageSave()},a.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},a.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},a.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},a.prototype.length=function(){return this.check()?o.getLength?o.getLength():o.length:0},a.prototype.removeItem=function(t){return o.removeItem(t),this},a.prototype.remove=function(t){return this.removeItem(t)},a.prototype.getItem=function(t){return o.getItem(t)},a.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},a.prototype.key=function(t){return o.key(t)},a.prototype.setItem=function(t,e){return o.setItem(t,e),this},a.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},a.prototype.clear=function(){return o.clear(),this},a.prototype.forEach=function(t){for(var e=o.length-1;e>=0;e--){var i=o.key(e);t(i,this.get(i))}return this},a.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},a.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},a.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new a})}(window,jQuery),function(t,e,i){"use strict";function o(t){if(t=t.toLowerCase(),t&&d.test(t)){var e;if(4===t.length){var i="#";for(e=1;4>e;e+=1)i+=t.slice(e,e+1).concat(t.slice(e,e+1));t=i}var o=[];for(e=1;7>e;e+=2)o.push(parseInt("0x"+t.slice(e,e+2)));return{r:o[0],g:o[1],b:o[2],a:1}}throw new Error("function hexToRgb: Wrong hex string! (hex: "+t+")")}function n(e){return"string"==typeof e&&("transparent"===e.toLowerCase()||p[e.toLowerCase()]||d.test(t.trim(e.toLowerCase())))}function a(t){function e(t){return t=0>t?t+1:t>1?t-1:t,1>6*t?d+(s-d)*t*6:1>2*t?s:2>3*t?d+(s-d)*(2/3-t)*6:d}var i=t.h,o=t.s,n=t.l,a=t.a;i=l(i)%360/360,o=r(l(o)),n=r(l(n)),a=r(l(a));var s=.5>=n?n*(o+1):n+o-n*o,d=2*n-s,p={r:255*e(i+1/3),g:255*e(i),b:255*e(i-1/3),a:a};return p}function s(t,i,o){return void 0===o&&(o=0),void 0===i&&(i=255),e.min(e.max(t,o),i)}function r(t,e){return s(t,e)}function l(t){return"number"==typeof t?t:parseFloat(t)}var d=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,p={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},c=function(t,e,i,n){if(this.r=0,this.g=0,this.b=0,this.a=1,void 0!==n&&(this.a=r(l(n),1)),void 0!==t&&void 0!==e&&void 0!==i)this.r=parseInt(r(l(t),255)),this.g=parseInt(r(l(e),255)),this.b=parseInt(r(l(i),255));else if(void 0!==t){var s=typeof t;if("string"==s)t=t.toLowerCase(),"transparent"===t?this.a=0:p[t]?this.rgb(o(p[t])):this.rgb(o(t));else if("number"==s&&void 0===e)this.r=parseInt(r(t,255)),this.g=this.r,this.b=this.r;else if("object"==s&&t.hasOwnProperty("r"))this.r=parseInt(r(l(t.r),255)),t.hasOwnProperty("g")&&(this.g=parseInt(r(l(t.g),255))),t.hasOwnProperty("b")&&(this.b=parseInt(r(l(t.b),255))),t.hasOwnProperty("a")&&(this.a=r(l(t.a),1));else if("object"==s&&t.hasOwnProperty("h")){var d={h:r(l(t.h),360),s:1,l:1,a:1};t.hasOwnProperty("s")&&(d.s=r(l(t.s),1)),t.hasOwnProperty("l")&&(d.l=r(l(t.l),1)),t.hasOwnProperty("a")&&(d.a=r(l(t.a),1)),this.rgb(a(d))}}};c.prototype.rgb=function(t){if(void 0!==t){if("object"==typeof t)t.hasOwnProperty("r")&&(this.r=parseInt(r(l(t.r),255))),t.hasOwnProperty("g")&&(this.g=parseInt(r(l(t.g),255))),t.hasOwnProperty("b")&&(this.b=parseInt(r(l(t.b),255))),t.hasOwnProperty("a")&&(this.a=r(l(t.a),1));else{var e=parseInt(l(t));this.r=e,this.g=e,this.b=e}return this}return{r:this.r,g:this.g,b:this.b,a:this.a}},c.prototype.hue=function(t){var e=this.toHsl();return void 0===t?e.h:(e.h=r(l(t),360),this.rgb(a(e)),this)},c.prototype.darken=function(t){var e=this.toHsl();return e.l-=t/100,e.l=r(e.l,1),this.rgb(a(e)),this},c.prototype.clone=function(){return new c(this.r,this.g,this.b,this.a)},c.prototype.lighten=function(t){return this.darken(-t)},c.prototype.fade=function(t){return this.a=r(t/100,1),this},c.prototype.spin=function(t){var e=this.toHsl(),i=(e.h+t)%360;return e.h=0>i?360+i:i,this.rgb(a(e)),this},c.prototype.toHsl=function(){var t,i,o=this.r/255,n=this.g/255,a=this.b/255,s=this.a,r=e.max(o,n,a),l=e.min(o,n,a),d=(r+l)/2,p=r-l;if(r===l)t=i=0;else{switch(i=d>.5?p/(2-r-l):p/(r+l),r){case o:t=(n-a)/p+(a>n?6:0);break;case n:t=(a-o)/p+2;break;case a:t=(o-n)/p+4}t/=6}return{h:360*t,s:i,l:d,a:s}},c.prototype.luma=function(){var t=this.r/255,i=this.g/255,o=this.b/255;return t=.03928>=t?t/12.92:e.pow((t+.055)/1.055,2.4),i=.03928>=i?i/12.92:e.pow((i+.055)/1.055,2.4),o=.03928>=o?o/12.92:e.pow((o+.055)/1.055,2.4),.2126*t+.7152*i+.0722*o},c.prototype.saturate=function(t){var e=this.toHsl();return e.s+=t/100,e.s=r(e.s),this.rgb(a(e)),this},c.prototype.desaturate=function(t){return this.saturate(-t)},c.prototype.contrast=function(t,e,i){if(e="undefined"==typeof e?new c(255,255,255,1):new c(e),t="undefined"==typeof t?new c(0,0,0,1):new c(t),this.a<.5)return t;if(i=void 0===i?.43:l(i),t.luma()>e.luma()){var o=e;e=t,t=o}return this.luma()0?this.a<1?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":this.hexStr():"transparent"},c.isColor=n,t.zui({Color:c})}(jQuery,Math,window),function(t){"use strict";var e=0,i=["primary","red","yellow","green","blue","purple","brown","dark"],o={primary:"#3280fc",secondary:"#145ccd",pale:"#ebf2f9",fore:"#353535",back:"#fff",grayDarker:"#222222",grayDark:"#333333",gray:"#808080",grayLight:"#dddddd",grayLighter:"#e5e5e5",grayPale:"#f1f1f1",white:"#fff",black:"#000",red:"#ea644a",yellow:"#f1a325",green:"#38b03f",blue:"#03b8cf",purple:"#8666b8",brown:"#bd7b46",greenPale:"#ddf4df",yellowPale:"#fff0d5",redPale:"#ffe5e0",bluePale:"#ddf3f5",brownPale:"#f7ebe1",purplePale:"#f5eeff",light:"#fff",dark:"#353535",success:"#38b03f",warning:"#f1a325",danger:"#ea644a",info:"#03b8cf",important:"#bd7b46",special:"#8666b8",successPale:"#ddf4df",warningPale:"#fff0d5",dangerPale:"#ffe5e0",infoPale:"#ddf3f5",importantPale:"#f7ebe1",specialPale:"#f5eeff"};o.get=function(n){return("undefined"==typeof n||"random"===n)&&(n=i[e++%i.length]),new t.zui.Color(o[n]?o[n]:n)},t.zui({colorset:o}),t.zui.Color&&t.extend(t.zui.Color,o)}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";var e=function(i,o){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,o),this.isLoading=!1};e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",a=o.data();e+="Text",a.resetText||o.data("resetText",o[n]()),o[n](a[e]||this.options[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},e.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=function(i){return this.each(function(){var o=t(this),n=o.data("zui.button"),a="object"==typeof i&&i;n||o.data("zui.button",n=new e(this,a)),"toggle"==i?n.toggle():i&&n.setState(i)})},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.zui.button.data-api","[data-toggle^=button]",function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle"),e.preventDefault()})}(jQuery),function(t){"use strict";var e={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 了解更多...',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。了解更多...',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. Learn more...'},i=function(){var t=this.isIE()||this.isIE10()||!1;if(t)for(var e=10;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};i.prototype.cssHelper=function(){var e=this.ie,i=t("html");i.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&i.addClass("ie-"+e).toggleClass("gt-ie-7 gte-ie-8 support-ie",e>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",8>e).toggleClass("gt-ie-8 gte-ie-9",e>=9).toggleClass("lte-ie-8 lt-ie-9",9>e).toggleClass("gt-ie-9 gte-ie-10",e>=10).toggleClass("lte-ie-9 lt-ie-10",10>e)},i.prototype.tip=function(i){var o=t("#browseHappyTip");o.length||(o=t('
'),o.prependTo("body")),o.find(".content").html(i||this.browseHappyTip||e[t.zui.clientLang()||"zh_cn"])},i.prototype.isIE=function(t){if(10===t)return this.isIE10();var e=document.createElement("b");return e.innerHTML="",1===e.getElementsByTagName("i").length},i.prototype.isIE10=function(){return!1},t.zui({browser:new i}),t(function(){t("body").hasClass("disabled-browser-tip")||t.zui.browser.ie&&t.zui.browser.ie<8&&t.zui.browser.tip()})}(jQuery),+function(t){"use strict";var e="zui.collapse",i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.$parent&&this.$parent.find("> .panel > .in");if(o&&o.length){var n=o.data(e);if(n&&n.transitioning)return;o.collapse("hide"),n||o.data(e,null)}var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[a]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return s.call(this);var r=t.camelCase(["scroll",a].join("-"));this.$element.one(t.support.transition.end,t.proxy(s,this)).emulateTransitionEnd(350)[a](this.$element[0][r])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.dimension();this.$element[o](this.$element[o]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[o](0).one(t.support.transition.end,t.proxy(n,this)).emulateTransitionEnd(350):n.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var o=t.fn.collapse;t.fn.collapse=function(o){return this.each(function(){var n=t(this),a=n.data(e),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof o&&o);a||n.data(e,a=new i(this,s)),"string"==typeof o&&a[o]()})},t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(i){var o,n=t(this),a=n.attr("data-target")||i.preventDefault()||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""),s=t(a),r=s.data(e),l=r?"toggle":n.data(),d=n.attr("data-parent"),p=d&&t(d);r&&r.transitioning||(p&&p.find('[data-toggle=collapse][data-parent="'+d+'"]').not(n).addClass("collapsed"),n[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),s.collapse(l)})}(window.jQuery),+function(t){"use strict";function e(){t(n).remove(),t(a).each(function(e){var n=i(t(this));n.hasClass("open")&&(n.trigger(e=t.Event("hide."+o)),e.isDefaultPrevented()||n.removeClass("open").trigger("hidden."+o))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}var o="zui.dropdown",n=".dropdown-backdrop",a="[data-toggle=dropdown]",s=function(e){t(e).on("click."+o,this.toggle)};s.prototype.toggle=function(n){var a=t(this);if(!a.is(".disabled, :disabled")){var s=i(a),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('