diff --git a/common/js/x.min.js b/common/js/x.min.js index 634ec01d6..90dc8de0e 100644 --- a/common/js/x.min.js +++ b/common/js/x.min.js @@ -11,7 +11,7 @@ function xAppendChild(a,b){xDeprecate("xAppendChild");return a.appendChild?a.app function xClientHeight(){xDeprecate("xClientHeight");var a=0;xOp6Dn?a=window.innerHeight:"CSS1Compat"==document.compatMode&&!window.opera&&document.documentElement&&document.documentElement.clientHeight?a=document.documentElement.clientHeight:document.body&&document.body.clientHeight?a=document.body.clientHeight:xDef(window.innerWidth,window.innerHeight,document.width)&&(a=window.innerHeight,document.width>window.innerWidth&&(a-=16));return a} function xClientWidth(){xDeprecate("xClientWidth");var a=0;xOp6Dn?a=window.innerWidth:"CSS1Compat"==document.compatMode&&!window.opera&&document.documentElement&&document.documentElement.clientWidth?a=document.documentElement.clientWidth:document.body&&document.body.clientWidth?a=document.body.clientWidth:xDef(window.innerWidth,window.innerHeight,document.height)&&(a=window.innerWidth,document.height>window.innerHeight&&(a-=16));return a} function xCreateElement(a){xDeprecate("xCreateElement");return document.createElement?document.createElement(a):null}function xDef(){xDeprecate("xDef");for(var a=0;ab?a:b}function xGetBodyHeight(){xDeprecate("xGetBodyHeight");var a=xClientHeight(),b=window.document.body.scrollHeight;return a>b?a:b} @@ -32,7 +32,7 @@ function xRemoveEventListener(a,b,d,e){xDeprecate("xRemoveEventListener");if(a=x function xScrollLeft(a,b){xDeprecate("xScrollLeft");var d=0;if(!xDef(a)||b||a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase()){var e=window;b&&a&&(e=a);e.document.documentElement&&e.document.documentElement.scrollLeft?d=e.document.documentElement.scrollLeft:e.document.body&&xDef(e.document.body.scrollLeft)&&(d=e.document.body.scrollLeft)}else if((a=xGetElementById(a))&&xNum(a.scrollLeft))d=a.scrollLeft;return d} function xScrollTop(a,b){xDeprecate("xScrollTop");var d=0;if(!xDef(a)||b||a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase()){var e=window;b&&a&&(e=a);e.document.documentElement&&e.document.documentElement.scrollTop?d=e.document.documentElement.scrollTop:e.document.body&&xDef(e.document.body.scrollTop)&&(d=e.document.body.scrollTop)}else if((a=xGetElementById(a))&&xNum(a.scrollTop))d=a.scrollTop;return d} function xSetCookie(a,b,d,e){xDeprecate("xSetCookie");document.cookie=a+"="+escape(b)+(!d?"":"; expires="+d.toGMTString())+"; path="+(!e?"/":e)}function xShow(a){xDeprecate("xShow");return xVisibility(a,1)}function xStr(a){xDeprecate("xStr");for(var b=0;bb?0:Math.round(b):-1,d=xDef(a.style);if(a==document||"html"==a.tagName.toLowerCase()||"body"==a.tagName.toLowerCase())b=xClientWidth();else if(d&&xDef(a.offsetWidth)&&xStr(a.style.width)){if(0<=b){var e=d=0,f=0,h=0;if("CSS1Compat"==document.compatMode){var g=xGetComputedStyle,d=g(a,"padding-left",1);null!==d?(e=g(a,"padding-right",1),f=g(a,"border-left-width",1),h=g(a,"border-right-width",1)):xDef(a.offsetWidth, a.style.width)&&(a.style.width=b+"px",d=a.offsetWidth-b)}b-=d+e+f+h;if(isNaN(b)||0>b)return null;a.style.width=b+"px"}b=a.offsetWidth}else d&&xDef(a.style.pixelWidth)&&(0<=b&&(a.style.pixelWidth=b),b=a.style.pixelWidth);return b}function xZIndex(a,b){xDeprecate("xZIndex");if(!(a=xGetElementById(a)))return 0;a.style&&xDef(a.style.zIndex)&&(xNum(b)&&(a.style.zIndex=b),b=parseInt(a.style.zIndex));return b} function xStopPropagation(a){xDeprecate("xStopPropagation");a&&a.stopPropagation?a.stopPropagation():window.event&&(window.event.cancelBubble=!0)}; diff --git a/common/js/xe.js b/common/js/xe.js index 5a1a22f4d..d2400dcd2 100644 --- a/common/js/xe.js +++ b/common/js/xe.js @@ -1830,9 +1830,14 @@ var Validator = xe.createApp('Validator', { f = filter[name]; el = elems[name]; + if(!el) + { + el = elems[name + '[]']; + } val = el?$.trim(get_value($(el))):''; mod = (f.modifier||'')+','; + if(!el || el.disabled) continue; if(f['if']) { diff --git a/common/js/xe.min.js b/common/js/xe.min.js index 4431b994a..53ccb16b8 100644 --- a/common/js/xe.min.js +++ b/common/js/xe.min.js @@ -3,16 +3,16 @@ * @author NHN (developers@xpressengine.com) * @brief XE Common JavaScript **/ -(function(a){function b(){return function(){var g=this;a.isArray(this._plugins)&&(this._plugins=[]);this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b)||!/^API_([A-Z0-9_]+)$/.test(c))return!0;var d=RegExp.$1,e=function(a,b){return g[c](a,b)};g._messages?g._messages[d]=[e]:g._binded_fn[d]=e});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,e=[];d={_plugins:[],_messages:{},getPlugin:function(g){g=g.toLowerCase();return a.isArray(this._plugins[g])? +(function(a){function b(){return function(){var g=this;a.isArray(this._plugins)&&(this._plugins=[]);this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b)||!/^API_([A-Z0-9_]+)$/.test(c))return true;var d=RegExp.$1,e=function(a,b){return g[c](a,b)};g._messages?g._messages[d]=[e]:g._binded_fn[d]=e});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,e=[];d={_plugins:[],_messages:{},getPlugin:function(g){g=g.toLowerCase();return a.isArray(this._plugins[g])? this._plugins[g]:[]},registerPlugin:function(g){var c=this,b=g.getName().toLowerCase();if(0<=a.inArray(g,this._plugins))return!1;this._plugins.push(g);a.isArray(this._plugins[b])||(this._plugins[b]=[]);this._plugins[b].push(g);a.each(g._binded_fn,function(a,g){c.registerHandler(a,g)});g.oApp=this;a.isFunction(g.activate)&&g.activate();return!0},registerHandler:function(g,c){var b=this._messages,g=g.toUpperCase();a.isArray(b[g])||(b[g]=[]);b[g].push(c)},cast:function(a,b){return this._cast(this,a, -b||[])},broadcast:function(a,b,c){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,b,c)},_cast:function(g,b,c){var d,e=this._messages,b=b.toUpperCase();if(!e["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(g,"BEFORE_"+b,c)){var h=[];if(a.isArray(e[b]))for(d=0;dh.length&&(h=h[0]);(e["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(g,"AFTER_"+b,c);return/^(?:AFTER|BEFORE)_/.test(b)?a.isArray(h)?0>a.inArray(!1,h):"undefined"==typeof h?!0:!!h:h}}};c= -{oApp:null,cast:function(a,b){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,b||[])},broadcast:function(a,b){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,b||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(g,c){var e=b();a.extend(e.prototype,d,c);e.prototype.getName=function(){return g};return e},createPlugin:function(g,d){var e=b();a.extend(e.prototype,c,d);e.prototype.getName=function(){return g};return e},getApps:function(){return a.makeArray(e)}, +b||[])},broadcast:function(a,b,c){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,b,c)},_cast:function(g,b,c){var d,e=this._messages,b=b.toUpperCase();if(!e["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(g,"BEFORE_"+b,c)){var h=[];if(a.isArray(e[b]))for(d=0;dh.length&&(h=h[0]);(e["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(g,"AFTER_"+b,c);return!/^(?:AFTER|BEFORE)_/.test(b)?h:a.isArray(h)?0>a.inArray(!1,h):"undefined"==typeof h?!0:!!h}}}; +c={oApp:null,cast:function(a,b){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,b||[])},broadcast:function(a,b){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,b||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(g,c){var e=b();a.extend(e.prototype,d,c);e.prototype.getName=function(){return g};return e},createPlugin:function(g,d){var e=b();a.extend(e.prototype,c,d);e.prototype.getName=function(){return g};return e},getApps:function(){return a.makeArray(e)}, getApp:function(a){a=(a||"").toLowerCase();return"undefined"!=typeof e[a]?e[a]:null},registerApp:function(b){var c=b.getName().toLowerCase();e.push(b);a.isArray(e[c])||(e[c]=[]);e[c].push(b);b.parent=this;a.isFunction(b.activate)&&b.activate()},unregisterApp:function(b){var c=b.getName().toLowerCase(),d=a.inArray(b,e);0<=d&&(e=e.splice(d,1));a.isArray(e[c])&&(d=a.inArray(b,e[c]),0<=d&&(e[c]=e[c].splice(d,1)));a.isFunction(b.deactivate)&&b.deactivate()},broadcast:function(a,b){this._broadcast(this, a,b)},_broadcast:function(a,b,c){for(var d=0;dg.length)g=Array(g);if(g.length)for(var j=0;j"+l+" "}}this.loaded_popup_menus[c]=b}b&&(c=a("#popup_menu_area").html("
    "+ -b+"
"),b=e.page_y,e=e.page_x,c.outerHeight()+b>a(window).height()+a(window).scrollTop()&&(b=a(window).height()-c.outerHeight()+a(window).scrollTop()),c.outerWidth()+e>a(window).width()+a(window).scrollLeft()&&(e=a(window).width()-c.outerWidth()+a(window).scrollLeft()),c.css({top:b,left:e}).show())}}})(jQuery); +arguments[0],a.extend(c,arguments[1]||{})}!0==c.doClick&&(c.checked=null);"string"==typeof c.wrap&&(c.wrap="#"+c.wrap);var e=c.wrap?a(c.wrap).find("input[name="+b+"]:checkbox"):a("input[name="+b+"]:checkbox");"toggle"==c.checked?e.each(function(){a(this).attr("checked",a(this).attr("checked")?false:true)}):!0==c.doClick?e.click():e.attr("checked",c.checked)},displayPopupMenu:function(b,c,e){var c=e.menu_id,g=b.menus,b="";if(this.loaded_popup_menus[c])b=this.loaded_popup_menus[c];else{if(g){g=g.item; +if("undefined"==typeof g.length||1>g.length)g=Array(g);if(g.length)for(var j=0;j"+m+" "}}this.loaded_popup_menus[c]= +b}b&&(c=a("#popup_menu_area").html("
    "+b+"
"),b=e.page_y,e=e.page_x,c.outerHeight()+b>a(window).height()+a(window).scrollTop()&&(b=a(window).height()-c.outerHeight()+a(window).scrollTop()),c.outerWidth()+e>a(window).width()+a(window).scrollLeft()&&(e=a(window).width()-c.outerWidth()+a(window).scrollLeft()),c.css({top:b,left:e}).show())}}})(jQuery); jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var g=!1,d=[],k=0;kaddedDocument.length||a!=addedDocument.length||(a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[])} function transRGB2Hex(a){if(!a)return a;if(-1a.toLowerCase().indexOf("rgb"))return a;a=a.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=a.split(",");for(var a="",b=0;b>2,d=(d&3)<<4|c>>4,j=(c&15)<<2|e>>6,k=e&63,isNaN(c)?j=k=64:isNaN(e)&&(k=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(k);return b},decode:function(a){for(var b="",d,c,e,g,j,k=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k< +var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",d,c,e,g,j,k,m=0,a=Base64._utf8_encode(a);m>2,d=(d&3)<<4|c>>4,j=(c&15)<<2|e>>6,k=e&63,isNaN(c)?j=k=64:isNaN(e)&&(k=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(k);return b},decode:function(a){for(var b="",d,c,e,g,j,k=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k< a.length;)d=this._keyStr.indexOf(a.charAt(k++)),c=this._keyStr.indexOf(a.charAt(k++)),g=this._keyStr.indexOf(a.charAt(k++)),j=this._keyStr.indexOf(a.charAt(k++)),d=d<<2|c>>4,c=(c&15)<<4|g>>2,e=(g&3)<<6|j,b+=String.fromCharCode(d),64!=g&&(b+=String.fromCharCode(c)),64!=j&&(b+=String.fromCharCode(e));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",d=0;dc?b+=String.fromCharCode(c):(127c?b+=String.fromCharCode(c>> 6|192):(b+=String.fromCharCode(c>>12|224),b+=String.fromCharCode(c>>6&63|128)),b+=String.fromCharCode(c&63|128))}return b},_utf8_decode:function(a){for(var b="",d=0,c=c1=c2=0;dc?(b+=String.fromCharCode(c),d++):191c?(c2=a.charCodeAt(d+1),b+=String.fromCharCode((c&31)<<6|c2&63),d+=2):(c2=a.charCodeAt(d+1),c3=a.charCodeAt(d+2),b+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63),d+=3);return b}}; if("undefined"==typeof resizeImageContents)var resizeImageContents=function(){};if("undefined"==typeof activateOptionDisabled)var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};"undefined"!=typeof a&&(c.wrap=a);"undefined"!=typeof d&&(c.checked=d);XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:!0};"undefined"!=typeof a&&(d.wrap=a);XE.checkboxToggleAll(b,d)} @@ -46,29 +46,29 @@ function getCookie(a){if(a=document.cookie.match(RegExp(a+"=(.*?)(?:;|$)")))retu jQuery(function(a){a(".lang_code").each(function(){var b=a(this),d=b.attr("id");"undefined"==typeof d&&(d=b.attr("name"));"undefined"!=typeof d&&b.after("find_langcode")});a(document).click(function(b){var d=a("#popup_menu_area");d.length||(d=a('