From 9a6aa2d4d4ddf56ebfa7d653d87ef1eb06ff197d Mon Sep 17 00:00:00 2001 From: Catouse Date: Fri, 13 May 2016 17:24:34 +0800 Subject: [PATCH] * update zui: fix error in colorPicker on update color to other elements. --- www/js/zui/min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/js/zui/min.js b/www/js/zui/min.js index f8b8adad97..ddf1dda050 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI - v1.4.0 - 2016-05-04 + * ZUI - v1.4.0 - 2016-05-13 * http://zui.sexy * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2016 cnezsoft.com; Licensed MIT @@ -9,4 +9,4 @@ !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,a){if(t.isFunction(e)){void 0!==a&&(e=t.proxy(e,a));var o=e(i);return i&&(i.result=o),!(void 0!==o&&!o)}return 1},clientLang:function(){var i,a=e.config;if("undefined"!=typeof a&&a.clientLang)i=a.clientLang;else{var o=t("html").attr("lang");i=o?o:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return i.replace("-","_").toLowerCase()}}),t.fn.callEvent=function(e,i,a){var o=t(this),n=e.indexOf(".zui."),s=0>n?e:e.substring(0,n),r=t.Event(s,i);if(void 0===a&&n>0&&(a=o.data(e.substring(n+1))),a&&a.options){var l=a.options[s];t.isFunction(l)&&t.zui.callEvent(l,r,a)}return o.trigger(r),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 a in t)void 0!==t[a]&&(i=new RegExp("({"+a+"})","g"),e=e.replace(i,t[a]));else for(var o=0;o=e&&i>t}),Date.prototype.isSameYear||(Date.prototype.isSameYear=function(t){return this.getFullYear()===t.getFullYear()})}(),function(t,e){"use strict";var i="localStorage",a=t[i],o=(t.store,"page_"+t.location.pathname+t.location.search),n=function(){this.slience=!0,this.enable=i in t&&t[i]&&t[i].setItem,this.storage=a,this.page=this.get(o,{})};n.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(o);else{var t,i=[];for(t in this.page){var a=this.page[t];null===a&&i.push(t)}for(t=i.length-1;t>=0;t--)delete this.page[i[t]];this.set(o,this.page)}},n.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},n.prototype.pageClear=function(){this.page={},this.pageSave()},n.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},n.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},n.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},n.prototype.length=function(){return this.check()?a.getLength?a.getLength():a.length:0},n.prototype.removeItem=function(t){return a.removeItem(t),this},n.prototype.remove=function(t){return this.removeItem(t)},n.prototype.getItem=function(t){return a.getItem(t)},n.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},n.prototype.key=function(t){return a.key(t)},n.prototype.setItem=function(t,e){return a.setItem(t,e),this},n.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},n.prototype.clear=function(){return a.clear(),this},n.prototype.forEach=function(t){for(var e=a.length-1;e>=0;e--){var i=a.key(e);t(i,this.get(i))}return this},n.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},n.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},n.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new n})}(window,jQuery),function(t,e,i){"use strict";function a(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 a=[];for(e=1;7>e;e+=2)a.push(parseInt("0x"+t.slice(e,e+2)));return{r:a[0],g:a[1],b:a[2],a:1}}throw new Error("function hexToRgb: Wrong hex string! (hex: "+t+")")}function o(e){return"string"==typeof e&&("transparent"===e.toLowerCase()||c[e.toLowerCase()]||d.test(t.trim(e.toLowerCase())))}function n(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,a=t.s,o=t.l,n=t.a;i=l(i)%360/360,a=r(l(a)),o=r(l(o)),n=r(l(n));var s=.5>=o?o*(a+1):o+a-o*a,d=2*o-s,c={r:255*e(i+1/3),g:255*e(i),b:255*e(i-1/3),a:n};return c}function s(t,i,a){return void 0===a&&(a=0),void 0===i&&(i=255),e.min(e.max(t,a),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})$/,c={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"},p=function(t,e,i,o){if(this.r=0,this.g=0,this.b=0,this.a=1,void 0!==o&&(this.a=r(l(o),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:c[t]?this.rgb(a(c[t])):this.rgb(a(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(n(d))}}};p.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}},p.prototype.hue=function(t){var e=this.toHsl();return void 0===t?e.h:(e.h=r(l(t),360),this.rgb(n(e)),this)},p.prototype.darken=function(t){var e=this.toHsl();return e.l-=t/100,e.l=r(e.l,1),this.rgb(n(e)),this},p.prototype.clone=function(){return new p(this.r,this.g,this.b,this.a)},p.prototype.lighten=function(t){return this.darken(-t)},p.prototype.fade=function(t){return this.a=r(t/100,1),this},p.prototype.spin=function(t){var e=this.toHsl(),i=(e.h+t)%360;return e.h=0>i?360+i:i,this.rgb(n(e)),this},p.prototype.toHsl=function(){var t,i,a=this.r/255,o=this.g/255,n=this.b/255,s=this.a,r=e.max(a,o,n),l=e.min(a,o,n),d=(r+l)/2,c=r-l;if(r===l)t=i=0;else{switch(i=d>.5?c/(2-r-l):c/(r+l),r){case a:t=(o-n)/c+(n>o?6:0);break;case o:t=(n-a)/c+2;break;case n:t=(a-o)/c+4}t/=6}return{h:360*t,s:i,l:d,a:s}},p.prototype.luma=function(){var t=this.r/255,i=this.g/255,a=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),a=.03928>=a?a/12.92:e.pow((a+.055)/1.055,2.4),.2126*t+.7152*i+.0722*a},p.prototype.saturate=function(t){var e=this.toHsl();return e.s+=t/100,e.s=r(e.s),this.rgb(n(e)),this},p.prototype.desaturate=function(t){return this.saturate(-t)},p.prototype.contrast=function(t,e,i){if(e="undefined"==typeof e?new p(255,255,255,1):new p(e),t="undefined"==typeof t?new p(0,0,0,1):new p(t),this.a<.5)return t;if(i=void 0===i?.43:l(i),t.luma()>e.luma()){var a=e;e=t,t=a}return this.luma()0?this.a<1?"rgba("+this.r+","+this.g+","+this.b+","+this.a+")":this.hexStr():"transparent"},p.isColor=o,t.zui({Color:p})}(jQuery,Math,window),function(t){"use strict";var e=0,i=["primary","red","yellow","green","blue","purple","brown","dark"],a={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"};a.get=function(o){return("undefined"==typeof o||"random"===o)&&(o=i[e++%i.length]),new t.zui.Color(a[o]?a[o]:o)},t.zui({colorset:a}),t.zui.Color&&t.extend(t.zui.Color,a)}(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,a=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(a).trigger(t.support.transition.end)};return setTimeout(o,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,a){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,a),this.isLoading=!1};e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var i="disabled",a=this.$element,o=a.is("input")?"val":"html",n=a.data();e+="Text",n.resetText||a.data("resetText",a[o]()),a[o](n[e]||this.options[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,a.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,a.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 a=t(this),o=a.data("zui.button"),n="object"==typeof i&&i;o||a.data("zui.button",o=new e(this,n)),"toggle"==i?o.toggle():i&&o.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 a=t("#browseHappyTip");a.length||(a=t('
'),a.prependTo("body")),a.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,a){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,a),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 a=this.$parent&&this.$parent.find("> .panel > .in");if(a&&a.length){var o=a.data(e);if(o&&o.transitioning)return;a.collapse("hide"),o||a.data(e,null)}var n=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[n](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[n]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return s.call(this);var r=t.camelCase(["scroll",n].join("-"));this.$element.one(t.support.transition.end,t.proxy(s,this)).emulateTransitionEnd(350)[n](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 a=this.dimension();this.$element[a](this.$element[a]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[a](0).one(t.support.transition.end,t.proxy(o,this)).emulateTransitionEnd(350):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var a=t.fn.collapse;t.fn.collapse=function(a){return this.each(function(){var o=t(this),n=o.data(e),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof a&&a);n||o.data(e,n=new i(this,s)),"string"==typeof a&&n[a]()})},t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=a,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(i){var a,o=t(this),n=o.attr("data-target")||i.preventDefault()||(a=o.attr("href"))&&a.replace(/.*(?=#[^\s]+$)/,""),s=t(n),r=s.data(e),l=r?"toggle":o.data(),d=o.attr("data-parent"),c=d&&t(d);r&&r.transitioning||(c&&c.find('[data-toggle=collapse][data-parent="'+d+'"]').not(o).addClass("collapsed"),o[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),s.collapse(l)})}(window.jQuery),+function(t){"use strict";function e(){t(o).remove(),t(n).each(function(e){var o=i(t(this));o.hasClass("open")&&(o.trigger(e=t.Event("hide."+a)),e.isDefaultPrevented()||o.removeClass("open").trigger("hidden."+a))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var a=i&&t(i);return a&&a.length?a:e.parent()}var a="zui.dropdown",o=".dropdown-backdrop",n="[data-toggle=dropdown]",s=function(e){t(e).on("click."+a,this.toggle)};s.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=i(n),r=s.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('