issue 2878, minify

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12628 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2013-01-31 02:28:04 +00:00
parent 2f6ae4b70c
commit 174255a2fb
3 changed files with 117 additions and 43 deletions

39
common/js/x.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -424,6 +424,11 @@ if(jQuery) jQuery.noConflict();
/* jQuery(document).ready() */
jQuery(function($) {
// Anchor: focus move to target
$('a[href^="#"]').click(function(){
$($(this).attr('href')).attr('tabindex','0').css('outline','0').focus();
});
/* select - option의 disabled=disabled 속성을 IE에서도 체크하기 위한 함수 */
if($.browser.msie) {
$('select').each(function(i, sels) {
@ -755,7 +760,7 @@ function setFixedPopupSize() {
w = $pc.width(10).height(10000).get(0).scrollWidth + offset.left*2;
h = $pc.height(10).width(10000).get(0).scrollHeight + offset.top*2;
if(w < 600) w = 600 + offset.left*2;
if(w < 800) w = 800 + offset.left*2;
dw = $win.width();
dh = $win.height();
@ -1568,6 +1573,14 @@ $.exec_xml = window.exec_xml = function(module, act, params, callback_func, resp
// ajax 통신중 대기 메세지 출력 (show_waiting_message값을 false로 세팅시 보이지 않음)
var waiting_obj = $('.wfsr');
if(show_waiting_message && waiting_obj.length) {
var timeoutId = $(".wfsr").data('timeout_id');
if(timeoutId) clearTimeout(timeoutId);
$(".wfsr").css('opacity', 0.0);
$(".wfsr").data('timeout_id', setTimeout(function(){
$(".wfsr").css('opacity', '');
}, 1000));
waiting_obj.html(waiting_message).show();
}
}
@ -1613,6 +1626,13 @@ $.exec_json = function(action,data,func){
if(typeof(data) == 'undefined') data = {};
action = action.split(".");
if(action.length == 2){
// The cover can be disturbing if it consistently blinks (because ajax call usually takes very short time). So make it invisible for the 1st 0.5 sec and then make it visible.
var timeoutId = $(".wfsr").data('timeout_id');
if(timeoutId) clearTimeout(timeoutId);
$(".wfsr").css('opacity', 0.0);
$(".wfsr").data('timeout_id', setTimeout(function(){
$(".wfsr").css('opacity', '');
}, 1000));
if(show_waiting_message) $(".wfsr").html(waiting_message).show();
$.extend(data,{module:action[0],act:action[1]});
@ -1625,7 +1645,16 @@ $.exec_json = function(action,data,func){
,data:$.param(data)
,success : function(data){
$(".wfsr").hide().trigger('cancel_confirm');
if(data.error > 0) alert(data.message);
if(data.error != 0 && data.error > -1000){
if(data.error == -1 && data.message == 'msg_is_not_administrator'){
alert('You are not logged in as an administrator');
// window.location.reload();
return;
}else{
alert(data.message);
return;
}
}
if($.isFunction(func)) func(data);
}
});
@ -1639,6 +1668,12 @@ $.fn.exec_html = function(action,data,type,func,args){
var self = $(this);
action = action.split(".");
if(action.length == 2){
var timeoutId = $(".wfsr").data('timeout_id');
if(timeoutId) clearTimeout(timeoutId);
$(".wfsr").css('opacity', 0.0);
$(".wfsr").data('timeout_id', setTimeout(function(){
$(".wfsr").css('opacity', '');
}, 1000));
if(show_waiting_message) $(".wfsr").html(waiting_message).show();
$.extend(data,{module:action[0],act:action[1]});

82
common/js/xe.min.js vendored
View file

@ -4,29 +4,29 @@
* @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])?
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,c){return this._cast(this,a,
c||[])},broadcast:function(a,c,b){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,c,b)},_cast:function(c,b,d){var e,m=this._messages,b=b.toUpperCase();if(!m["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(c,"BEFORE_"+b,d)){var h=[];if(a.isArray(m[b]))for(e=0;e<m[b].length;e++)h.push(m[b][e](c,d));2>h.length&&(h=h[0]);(m["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(c,"AFTER_"+b,d);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,c){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,c||[])},broadcast:function(a,c){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,c||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(c,e){var i=b();a.extend(i.prototype,d,e);i.prototype.getName=function(){return c};return i},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)},
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,c){return this._cast(this,a,
c||[])},broadcast:function(a,c,b){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,c,b)},_cast:function(c,b,d){var e,n=this._messages;b=b.toUpperCase();if(!n["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(c,"BEFORE_"+b,d)){var h=[];if(a.isArray(n[b]))for(e=0;e<n[b].length;e++)h.push(n[b][e](c,d));2>h.length&&(h=h[0]);(n["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(c,"AFTER_"+b,d);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,c){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,c||[])},broadcast:function(a,c){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,c||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(c,e){var j=b();a.extend(j.prototype,d,e);j.prototype.getName=function(){return c};return j},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(c){var b=c.getName().toLowerCase();e.push(c);a.isArray(e[b])||(e[b]=[]);e[b].push(c);c.parent=this;a.isFunction(c.activate)&&c.activate()},unregisterApp:function(c){var b=c.getName().toLowerCase(),d=a.inArray(c,e);0<=d&&(e=e.splice(d,1));a.isArray(e[b])&&(d=a.inArray(c,e[b]),0<=d&&(e[b]=e[b].splice(d,1)));a.isFunction(c.deactivate)&&c.deactivate()},broadcast:function(a,c){this._broadcast(this,
a,c)},_broadcast:function(a,c,b){for(var d=0;d<e.length;d++)e[d]._cast(a,c,b);this._cast(a,c,b)}});window.xe.lang={};a(function(){xe.broadcast("ONREADY")});a(window).load(function(){xe.broadcast("ONLOAD")})})(jQuery);jQuery&&jQuery.noConflict();
(function(a){var b=navigator.userAgent.toLowerCase();a.os={Linux:/linux/.test(b),Unix:/x11/.test(b),Mac:/mac/.test(b),Windows:/win/.test(b)};a.os.name=a.os.Windows?"Windows":a.os.Linux?"Linux":a.os.Unix?"Unix":a.os.Mac?"Mac":"";window.XE={loaded_popup_menus:[],addedDocument:[],checkboxToggleAll:function(b){is_def(b)||(b="cart");var c={wrap:null,checked:"toggle",doClick:!1};switch(arguments.length){case 1:"string"==typeof arguments[0]?b=arguments[0]:(a.extend(c,arguments[0]||{}),b="cart");break;case 2:b=
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")?!1:!0)}):!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<g.length;j++){var i=g[j].url,l=g[j].str,m=g[j].target,h="";switch(m){case "popup":h=" onclick=\"popopen(this.href,'"+m+"'); return false;\"";break;case "javascript":h=' onclick="'+i+'; return false; "';i="#";break;default:h=' onclick="window.open(this.href); return false;"'}b+='<li ><a href="'+i+'"'+h+">"+l+"</a></li> "}}this.loaded_popup_menus[c]=b}b&&(c=a("#popup_menu_area").html("<ul>"+b+"</ul>"),b=e.page_y,e=e.page_x,c.outerHeight()+
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")?!1:!0)}):!0==c.doClick?e.click():e.attr("checked",c.checked)},displayPopupMenu:function(b,c,e){c=e.menu_id;var 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 k=0;k<g.length;k++){var j=g[k].url,m=g[k].str,n=g[k].target,h="";switch(n){case "popup":h=" onclick=\"popopen(this.href,'"+n+"'); return false;\"";break;case "javascript":h=' onclick="'+j+'; return false; "';j="#";break;default:h=' onclick="window.open(this.href); return false;"'}b+='<li ><a href="'+j+'"'+h+">"+m+"</a></li> "}}this.loaded_popup_menus[c]=b}b&&(c=a("#popup_menu_area").html("<ul>"+b+"</ul>"),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=[],i=0;i<b.options.length;i++)b.options[i].disabled?(b.options[i].style.color="#CCCCCC",g=!0):d[a]=-1<d[a]?d[a]:i;if(g&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},0<=b.selectedIndex&&b.options[b.selectedIndex].disabled))b.onchange()});var b=a(".xe_content .fold_button");if(b.size()){var d=a("div.fold_container",
b);a("button.more",b).click(function(){a(this).hide().next("button").show().parent().next(d).show()});a("button.less",b).click(function(){a(this).hide().prev("button").show().parent().next(d).hide()})}jQuery('input[type="submit"],button[type="submit"]').click(function(a){var b=jQuery(a.currentTarget);setTimeout(function(){b.attr("disabled","disabled")},0);setTimeout(function(){b.removeAttr("disabled")},3E3)})});
jQuery(function(a){a('a[href^="#"]').click(function(){a(a(this).attr("href")).attr("tabindex","0").css("outline","0").focus()});a.browser.msie&&a("select").each(function(a,b){for(var g=!1,d=[],j=0;j<b.options.length;j++)b.options[j].disabled?(b.options[j].style.color="#CCCCCC",g=!0):d[a]=-1<d[a]?d[a]:j;if(g&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},0<=b.selectedIndex&&b.options[b.selectedIndex].disabled))b.onchange()});
var b=a(".xe_content .fold_button");if(b.size()){var d=a("div.fold_container",b);a("button.more",b).click(function(){a(this).hide().next("button").show().parent().next(d).show()});a("button.less",b).click(function(){a(this).hide().prev("button").show().parent().next(d).hide()})}jQuery('input[type="submit"],button[type="submit"]').click(function(a){var b=jQuery(a.currentTarget);setTimeout(function(){b.attr("disabled","disabled")},0);setTimeout(function(){b.removeAttr("disabled")},3E3)})});
(function(){var a=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)};String.prototype.getQuery=function(a){var d=this.replace(/#.*$/,"")===window.location.href.replace(/#.*$/,"")?current_url:this,c=d.indexOf("?");if(-1==c)return null;var e={};d.substr(c+1,this.length).replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){e[b]=c});a=e[a];"undefined"==typeof a&&(a="");return a};String.prototype.setQuery=function(b,d){var c=this.replace(/#.*$/,"")===window.location.href.replace(/#.*$/,
"")?current_url:this,e=c.indexOf("?"),g=c.replace(/#$/,""),j,i;"undefined"==typeof d&&(d="");if(-1!=e){var l=g.substr(e+1,c.length),m={},h=[],g=c.substr(0,e);l.replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){m[b]=c});m[b]=d;for(var n in m)m.hasOwnProperty(n)&&(i=String(m[n]).trim())&&h.push(n+"="+decodeURI(i));l=h.join("&");g+=l?"?"+l:""}else String(d).trim()&&(g=g+"?"+b+"="+d);e=/^https:\/\/([^:\/]+)(:\d+|)/i;e.test(g)&&(c="http://"+RegExp.$1,window.http_port&&80!=http_port&&(c+=":"+http_port),g=
g.replace(e,c));c=!!window.enforce_ssl;if(!c&&a(window.ssl_actions)&&(j=g.getQuery("act"))){e=0;for(i=ssl_actions.length;e<i;e++)if(ssl_actions[e]===j){c=!0;break}}e=/http:\/\/([^:\/]+)(:\d+|)/i;c&&e.test(g)&&(c="https://"+RegExp.$1,window.https_port&&443!=https_port&&(c+=":"+https_port),g=g.replace(e,c));g=g.replace(/\/(index\.php)?\?/,"/index.php?");return encodeURI(g)};String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")}})();
function xSleep(a){for(var a=a/1E3,b=new Date,d=new Date;d.getTime()-b.getTime()<a;)d=new Date}function isDef(){for(var a=0;a<arguments.length;++a)if("undefined"==typeof arguments[a])return!1;return!0}var winopen_list=[];
"")?current_url:this,e=c.indexOf("?"),g=c.replace(/#$/,""),k,j;"undefined"==typeof d&&(d="");if(-1!=e){var m=g.substr(e+1,c.length),n={},h=[],g=c.substr(0,e);m.replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){n[b]=c});n[b]=d;for(var p in n)n.hasOwnProperty(p)&&(j=String(n[p]).trim())&&h.push(p+"="+decodeURI(j));m=h.join("&");g+=m?"?"+m:""}else String(d).trim()&&(g=g+"?"+b+"="+d);e=/^https:\/\/([^:\/]+)(:\d+|)/i;e.test(g)&&(c="http://"+RegExp.$1,window.http_port&&80!=http_port&&(c+=":"+http_port),g=
g.replace(e,c));c=!!window.enforce_ssl;if(!c&&a(window.ssl_actions)&&(k=g.getQuery("act"))){e=0;for(j=ssl_actions.length;e<j;e++)if(ssl_actions[e]===k){c=!0;break}}e=/http:\/\/([^:\/]+)(:\d+|)/i;c&&e.test(g)&&(c="https://"+RegExp.$1,window.https_port&&443!=https_port&&(c+=":"+https_port),g=g.replace(e,c));g=g.replace(/\/(index\.php)?\?/,"/index.php?");return encodeURI(g)};String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")}})();
function xSleep(a){a/=1E3;for(var b=new Date,d=new Date;d.getTime()-b.getTime()<a;)d=new Date}function isDef(){for(var a=0;a<arguments.length;++a)if("undefined"==typeof arguments[a])return!1;return!0}var winopen_list=[];
function winopen(a,b,d){"undefined"!=typeof xeVid&&(-1<a.indexOf(request_uri)&&!a.getQuery("vid"))&&(a=a.setQuery("vid",xeVid));try{"_blank"!=b&&winopen_list[b]&&(winopen_list[b].close(),winopen_list[b]=null)}catch(c){}"undefined"==typeof b&&(b="_blank");"undefined"==typeof d&&(d="");a=window.open(a,b,d);a.focus();"_blank"!=b&&(winopen_list[b]=a)}
function popopen(a,b){"undefined"==typeof b&&(b="_blank");"undefined"!=typeof xeVid&&(-1<a.indexOf(request_uri)&&!a.getQuery("vid"))&&(a=a.setQuery("vid",xeVid));winopen(a,b,"width=650,height=500,scrollbars=yes,resizable=yes,toolbars=no")}function sendMailTo(a){location.href="mailto:"+a}function move_url(a,b){if(!a)return!1;"undefined"==typeof b&&(b="N");b="N"==b?!1:!0;/^\./.test(a)&&(a=request_uri+a);b?winopen(a):location.href=a;return!1}
function displayMultimedia(a,b,d,c){(a=_displayMultimedia(a,b,d,c))&&document.writeln(a)}
function _displayMultimedia(a,b,d,c){0==a.indexOf("files")&&(a=request_uri+a);var c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:!1},c||{}),e=c.autostart&&"false"!=c.autostart?"true":"false";delete c.autostart;var g="",g="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a))g='<img src="'+a+'" width="'+b+'" height="'+d+'" />';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))g='<embed src="'+request_uri+'common/img/flvplayer.swf" allowfullscreen="true" autostart="'+
function _displayMultimedia(a,b,d,c){0==a.indexOf("files")&&(a=request_uri+a);c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:!1},c||{});var e=c.autostart&&"false"!=c.autostart?"true":"false";delete c.autostart;var g="",g="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a))g='<img src="'+a+'" width="'+b+'" height="'+d+'" />';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))g='<embed src="'+request_uri+'common/img/flvplayer.swf" allowfullscreen="true" autostart="'+
e+'" width="'+b+'" height="'+d+'" flashvars="&file='+a+"&width="+b+"&height="+d+"&autostart="+e+'" wmode="'+c.wmode+'" />';else if(/\.swf/i.test(a)){var g="undefined"!=typeof enforce_ssl&&enforce_ssl?"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0":"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0",g='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+g+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+
'">',g=g+('<param name="movie" value="'+a+'" />'),j;for(j in c)"undefined"!=c[j]&&""!=c[j]&&(g+='<param name="'+j+'" value="'+c[j]+'" />');g+='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+'" wmode="'+c.wmode+'"></embed></object>'}else{if(jQuery.browser.mozilla||jQuery.browser.opera)e=c.autostart&&"false"!=c.autostart?"1":"0";g='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'"';"transparent"==c.wmode&&(g+=' windowlessvideo="1"');g+="></embed>"}return g}
'">',g=g+('<param name="movie" value="'+a+'" />'),k;for(k in c)"undefined"!=c[k]&&""!=c[k]&&(g+='<param name="'+k+'" value="'+c[k]+'" />');g+='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+'" wmode="'+c.wmode+'"></embed></object>'}else{if(jQuery.browser.mozilla||jQuery.browser.opera)e=c.autostart&&"false"!=c.autostart?"1":"0";g='<embed src="'+a+'" autostart="'+e+'" width="'+b+'" height="'+d+'"';"transparent"==c.wmode&&(g+=' windowlessvideo="1"');g+="></embed>"}return g}
function zbxe_folder_open(a){jQuery("#folder_open_"+a).hide();jQuery("#folder_close_"+a).show();jQuery("#folder_"+a).show()}function zbxe_folder_close(a){jQuery("#folder_open_"+a).show();jQuery("#folder_close_"+a).hide();jQuery("#folder_"+a).hide()}
function setFixedPopupSize(){var a=jQuery,b=a(window),a=a("body>.popup"),d,c,e,g;g=a.css({overflow:"scroll"}).offset();d=a.width(10).height(1E4).get(0).scrollWidth+2*g.left;c=a.height(10).width(1E4).get(0).scrollHeight+2*g.top;600>d&&(d=600+2*g.left);e=b.width();b=b.height();d!=e&&window.resizeBy(d-e,0);c!=b&&window.resizeBy(0,c-b);a.width(d-2*g.left).css({overflow:"",height:""})}
function setFixedPopupSize(){var a=jQuery,b=a(window),a=a("body>.popup"),d,c,e,g;g=a.css({overflow:"scroll"}).offset();d=a.width(10).height(1E4).get(0).scrollWidth+2*g.left;c=a.height(10).width(1E4).get(0).scrollHeight+2*g.top;800>d&&(d=800+2*g.left);e=b.width();b=b.height();d!=e&&window.resizeBy(d-e,0);c!=b&&window.resizeBy(0,c-b);a.width(d-2*g.left).css({overflow:"",height:""})}
function doCallModuleAction(a,b,d){exec_xml(a,b,{target_srl:d,cur_mid:current_mid,mid:current_mid},completeCallModuleAction)}function completeCallModuleAction(a){"success"!=a.message&&alert(a.message);location.reload()}function completeMessage(a){alert(a.message);location.reload()}function doChangeLangType(a){"string"==typeof a?setLangType(a):setLangType(a.options[a.selectedIndex].value);location.href=location.href.setQuery("l","")}
function setLangType(a){var b=new Date;b.setTime(b.getTime()+6048E8);setCookie("lang_type",a,b,"/")}
function doDocumentPreview(a){for(;"FORM"!=a.nodeName;)a=a.parentNode;if("FORM"==a.nodeName){a=a.getAttribute("editor_sequence");a=editorGetContent(a);window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var b=jQuery("#previewDocument");b.length?b=b[0]:(jQuery('<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'"><input type="hidden" name="module" value="document" /><input type="hidden" name="act" value="dispDocumentPreview" /><input type="hidden" name="content" /></form>').appendTo(document.body),b=
@ -35,10 +35,10 @@ function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editor
"procDocumentTempSave",e,completeDocumentSave,["error","message","document_srl"],e,a.form);editorRelKeys[b].content.value=d;return!1}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))}
function doDocumentSelect(a){opener&&opener.objForSavedDoc&&(opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite"));window.close()}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo")}var addedDocument=[];function doAddDocumentCart(a){addedDocument[addedDocument.length]=a.value;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)}
function callAddDocumentCart(a){1>addedDocument.length||a!=addedDocument.length||(a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[])}
function transRGB2Hex(a){if(!a)return a;if(-1<a.indexOf("#"))return a.replace(/^#/,"");if(0>a.toLowerCase().indexOf("rgb"))return a;a=a.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=a.split(",");for(var a="",b=0;b<value_list.length;b++){var d=parseInt(value_list[b],10).toString(16);1==d.length&&(d="0"+d);a+=d}return a}function toggleSecuritySignIn(){var a=location.href;location.href=/https:\/\//i.test(a)?a.replace(/^https/i,"http"):a.replace(/^http/i,"https")}
function transRGB2Hex(a){if(!a)return a;if(-1<a.indexOf("#"))return a.replace(/^#/,"");if(0>a.toLowerCase().indexOf("rgb"))return a;a=a.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=a.split(",");a="";for(var b=0;b<value_list.length;b++){var d=parseInt(value_list[b],10).toString(16);1==d.length&&(d="0"+d);a+=d}return a}function toggleSecuritySignIn(){var a=location.href;location.href=/https:\/\//i.test(a)?a.replace(/^https/i,"http"):a.replace(/^http/i,"https")}
function reloadDocument(){location.reload()}
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",d,c,e,g,j,i,l=0,a=Base64._utf8_encode(a);l<a.length;)d=a.charCodeAt(l++),c=a.charCodeAt(l++),e=a.charCodeAt(l++),g=d>>2,d=(d&3)<<4|c>>4,j=(c&15)<<2|e>>6,i=e&63,isNaN(c)?j=i=64:isNaN(e)&&(i=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(i);return b},decode:function(a){for(var b="",d,c,e,g,j,i=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<
a.length;)d=this._keyStr.indexOf(a.charAt(i++)),c=this._keyStr.indexOf(a.charAt(i++)),g=this._keyStr.indexOf(a.charAt(i++)),j=this._keyStr.indexOf(a.charAt(i++)),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;d<a.length;d++){var c=a.charCodeAt(d);128>c?b+=String.fromCharCode(c):(127<c&&2048>c?b+=String.fromCharCode(c>>
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var b="",d,c,e,g,k,j,m=0;for(a=Base64._utf8_encode(a);m<a.length;)d=a.charCodeAt(m++),c=a.charCodeAt(m++),e=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|c>>4,k=(c&15)<<2|e>>6,j=e&63,isNaN(c)?k=j=64:isNaN(e)&&(j=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(j);return b},decode:function(a){var b="",d,c,e,g,k,j=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");j<
a.length;)d=this._keyStr.indexOf(a.charAt(j++)),c=this._keyStr.indexOf(a.charAt(j++)),g=this._keyStr.indexOf(a.charAt(j++)),k=this._keyStr.indexOf(a.charAt(j++)),d=d<<2|c>>4,c=(c&15)<<4|g>>2,e=(g&3)<<6|k,b+=String.fromCharCode(d),64!=g&&(b+=String.fromCharCode(c)),64!=k&&(b+=String.fromCharCode(e));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",d=0;d<a.length;d++){var c=a.charCodeAt(d);128>c?b+=String.fromCharCode(c):(127<c&&2048>c?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;d<a.length;)c=a.charCodeAt(d),128>c?(b+=String.fromCharCode(c),d++):191<c&&224>c?(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 svc_folder_open(a){jQuery("#_folder_open_"+a).hide();jQuery("#_folder_close_"+a).show();jQuery("#_folder_"+a).show()}function svc_folder_close(a){jQuery("#_folder_open_"+a).show();jQuery("#_folder_close_"+a).hide();jQuery("#_folder_"+a).hide()}
function open_calendar(a,b,d){"undefined"==typeof b&&(b="");var c="./common/tpl/calendar.php?";a&&(c+="fo_id="+a);b&&(c+="&day_str="+b);d&&(c+="&callback_func="+d);popopen(c,"Calendar")}var loaded_popup_menus=XE.loaded_popup_menus;function createPopupMenu(){}function chkPopupMenu(){}function displayPopupMenu(a,b,d){XE.displayPopupMenu(a,b,d)}function GetObjLeft(a){return jQuery(a).offset().left}function GetObjTop(a){return jQuery(a).offset().top}
@ -46,29 +46,31 @@ function replaceOuterHTML(a,b){jQuery(a).replaceWith(b)}function getOuterHTML(a)
jQuery(function(a){a(document).click(function(b){var d=a("#popup_menu_area");d.length||(d=a('<div id="popup_menu_area" style="display:none;z-index:9999" />').appendTo(document.body));d.hide();d=a(b.target).filter("a,div,span");d.length||(d=a(b.target).closest("a,div,span"));if(d.length){var d=d.attr("class"),c;d&&(c=d.match(/(?:^| )((document|comment|member)_([1-9]\d*))(?: |$)/));if(c){d="get"+ucfirst(c[2])+"Menu";c={mid:current_mid,cur_mid:current_mid,menu_id:c[1],target_srl:c[3],cur_act:current_url.getQuery("act"),
page_x:b.pageX,page_y:b.pageY};var e=["error","message","menus"];b.preventDefault();b.stopPropagation();is_def(window.xeVid)&&(c.vid=xeVid);if(is_def(XE.loaded_popup_menus[c.menu_id]))return XE.displayPopupMenu(c,e,c);show_waiting_message=!1;exec_xml("member",d,c,XE.displayPopupMenu,e,c);show_waiting_message=!0}}});a("a._xe_popup").click(function(){var b=a(this),d=b.attr("name"),b=b.attr("href");d||(d="_xe_popup_"+Math.floor(1E3*Math.random()));(d=window.open(b,d,"left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no"))&&
d.focus();return!1});a.datepicker&&a.datepicker.setDefaults({dateFormat:"yy-mm-dd"})});var show_waiting_message=!0;
function xml2json(a,b,d){var c={toObj:function(a){var b={};if(1==a.nodeType){if(d&&a.attributes.length)for(var e=0;e<a.attributes.length;e++)b["@"+a.attributes[e].nodeName]=(a.attributes[e].nodeValue||"").toString();if(a.firstChild){for(var l=e=0,m=!1,h=a.firstChild;h;h=h.nextSibling)1==h.nodeType?m=!0:3==h.nodeType&&h.nodeValue.match(/[^ \f\n\r\t\v]/)?e++:4==h.nodeType&&l++;if(m)if(2>e&&2>l){c.removeWhite(a);for(h=a.firstChild;h;h=h.nextSibling)3==h.nodeType?b=c.escape(h.nodeValue):4==h.nodeType?
b=c.escape(h.nodeValue):b[h.nodeName]?b[h.nodeName]instanceof Array?b[h.nodeName][b[h.nodeName].length]=c.toObj(h):b[h.nodeName]=[b[h.nodeName],c.toObj(h)]:b[h.nodeName]=c.toObj(h)}else a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(e)a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(l)if(1<l)b=c.escape(c.innerXml(a));else for(h=a.firstChild;h;h=h.nextSibling)b=c.escape(h.nodeValue)}!a.attributes.length&&!a.firstChild&&
(b=null)}else 9==a.nodeType?b=c.toObj(a.documentElement):alert("unhandled node type: "+a.nodeType);return b},toJson:function(a,b,d){var e=b?'"'+b+'"':"";if(a instanceof Array){for(var m=0,h=a.length;m<h;m++)a[m]=c.toJson(a[m],"",d+"\t");e+=(b?":[":"[")+(1<a.length?"\n"+d+"\t"+a.join(",\n"+d+"\t")+"\n"+d:a.join(""))+"]"}else if(null==a)e+=(b&&":")+"null";else if("object"==typeof a){m=[];for(h in a)m[m.length]=c.toJson(a[h],h,d+"\t");e+=(b?":{":"{")+(1<m.length?"\n"+d+"\t"+m.join(",\n"+d+"\t")+"\n"+
d:m.join(""))+"}"}else e="string"==typeof a?e+((b&&":")+'"'+a.toString()+'"'):e+((b&&":")+a.toString());return e},innerXml:function(a){var b="";if("innerHTML"in a)b=a.innerHTML;else for(var c=function(a){var b="";if(1==a.nodeType){for(var b=b+("<"+a.nodeName),d=0;d<a.attributes.length;d++)b+=" "+a.attributes[d].nodeName+'="'+(a.attributes[d].nodeValue||"").toString()+'"';if(a.firstChild){b+=">";for(d=a.firstChild;d;d=d.nextSibling)b+=c(d);b+="</"+a.nodeName+">"}else b+="/>"}else 3==a.nodeType?b+=
a.nodeValue:4==a.nodeType&&(b+="<![CDATA["+a.nodeValue+"]]\>");return b},a=a.firstChild;a;a=a.nextSibling)b+=c(a);return b},escape:function(a){return a.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(a){a.normalize();for(var b=a.firstChild;b;)if(3==b.nodeType)if(b.nodeValue.match(/[^ \f\n\r\t\v]/))b=b.nextSibling;else{var d=b.nextSibling;a.removeChild(b);b=d}else 1==b.nodeType&&c.removeWhite(b),b=b.nextSibling;return a}};9==a.nodeType&&
function xml2json(a,b,d){var c={toObj:function(a){var b={};if(1==a.nodeType){if(d&&a.attributes.length)for(var e=0;e<a.attributes.length;e++)b["@"+a.attributes[e].nodeName]=(a.attributes[e].nodeValue||"").toString();if(a.firstChild){for(var m=e=0,n=!1,h=a.firstChild;h;h=h.nextSibling)1==h.nodeType?n=!0:3==h.nodeType&&h.nodeValue.match(/[^ \f\n\r\t\v]/)?e++:4==h.nodeType&&m++;if(n)if(2>e&&2>m){c.removeWhite(a);for(h=a.firstChild;h;h=h.nextSibling)3==h.nodeType?b=c.escape(h.nodeValue):4==h.nodeType?
b=c.escape(h.nodeValue):b[h.nodeName]?b[h.nodeName]instanceof Array?b[h.nodeName][b[h.nodeName].length]=c.toObj(h):b[h.nodeName]=[b[h.nodeName],c.toObj(h)]:b[h.nodeName]=c.toObj(h)}else a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(e)a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(m)if(1<m)b=c.escape(c.innerXml(a));else for(h=a.firstChild;h;h=h.nextSibling)b=c.escape(h.nodeValue)}!a.attributes.length&&!a.firstChild&&
(b=null)}else 9==a.nodeType?b=c.toObj(a.documentElement):alert("unhandled node type: "+a.nodeType);return b},toJson:function(a,b,d){var e=b?'"'+b+'"':"";if(a instanceof Array){for(var n=0,h=a.length;n<h;n++)a[n]=c.toJson(a[n],"",d+"\t");e+=(b?":[":"[")+(1<a.length?"\n"+d+"\t"+a.join(",\n"+d+"\t")+"\n"+d:a.join(""))+"]"}else if(null==a)e+=(b&&":")+"null";else if("object"==typeof a){n=[];for(h in a)n[n.length]=c.toJson(a[h],h,d+"\t");e+=(b?":{":"{")+(1<n.length?"\n"+d+"\t"+n.join(",\n"+d+"\t")+"\n"+
d:n.join(""))+"}"}else e="string"==typeof a?e+((b&&":")+'"'+a.toString()+'"'):e+((b&&":")+a.toString());return e},innerXml:function(a){var b="";if("innerHTML"in a)b=a.innerHTML;else{var c=function(a){var b="";if(1==a.nodeType){for(var b=b+("<"+a.nodeName),d=0;d<a.attributes.length;d++)b+=" "+a.attributes[d].nodeName+'="'+(a.attributes[d].nodeValue||"").toString()+'"';if(a.firstChild){b+=">";for(d=a.firstChild;d;d=d.nextSibling)b+=c(d);b+="</"+a.nodeName+">"}else b+="/>"}else 3==a.nodeType?b+=a.nodeValue:
4==a.nodeType&&(b+="<![CDATA["+a.nodeValue+"]]\x3e");return b};for(a=a.firstChild;a;a=a.nextSibling)b+=c(a)}return b},escape:function(a){return a.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(a){a.normalize();for(var b=a.firstChild;b;)if(3==b.nodeType)if(b.nodeValue.match(/[^ \f\n\r\t\v]/))b=b.nextSibling;else{var d=b.nextSibling;a.removeChild(b);b=d}else 1==b.nodeType&&c.removeWhite(b),b=b.nextSibling;return a}};9==a.nodeType&&
(a=a.documentElement);var e=c.toObj(c.removeWhite(a));"object"==typeof JSON&&jQuery.isFunction(JSON.stringify);a=c.toJson(e,a.nodeName,"");return"{"+(b?a.replace(/\t/g,b):a.replace(/\t|\n/g,""))+"}"}
(function(a){function b(){return""}a.exec_xml=window.exec_xml=function(b,c,e,g,j,i,l){function m(e){var e=a(e).find("response")[0],h,m="",n=[],k={};h="";t.css("display","none").trigger("cancel_confirm");if(!e)return alert(w.responseText),null;h=xml2json(e,!1,!1);h="object"==typeof JSON&&a.isFunction(JSON.parse)?JSON.parse(h):eval("("+h+")");h=h.response;if("undefined"==typeof h){n.error=-1;n.message="Unexpected error occured.";try{if("undefined"!=typeof(m=e.childNodes[0].firstChild.data))n.message+=
"\r\n"+m}catch(p){}return n}a.each(j,function(a,b){k[b]=!0});k.redirect_url=!0;k.act=!0;a.each(h,function(a,b){k[a]&&(n[a]=b)});if(0!=n.error){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(b,c,n,g,j,i,l);alert((n.message||"An unknown error occured while loading ["+b+"."+c+"]").replace(/\\n/g,"\n"));return null}if(n.redirect_url)return location.href=n.redirect_url.replace(/&amp;/g,"&"),null;a.isFunction(g)&&g(n,j,i,l)}var h=request_uri+"index.php";e||(e={});if(a.isArray(e)){var n={},
k;for(k in e)e.hasOwnProperty(k)&&(n[k]=e[k]);e=n}e.module=b;e.act=c;"undefined"!=typeof xeVid&&(e.vid=xeVid);"undefined"==typeof j||1>j.length?j=["error","message"]:j.push("error","message");a.isArray(ssl_actions)&&(e.act&&0<=a.inArray(e.act,ssl_actions))&&(k=default_url||request_uri,h=window.https_port||443,k=a("<a>").attr("href",k)[0],n="https://"+k.hostname.replace(/:\d+$/,""),443!=h&&(n+=":"+h),"/"!=k.pathname[0]&&(n+="/"),n+=k.pathname,h=n.replace(/\/$/,"")+"/index.php");k=a("<a>").attr("href",
location.href)[0];n=a("<a>").attr("href",h)[0];if(k.protocol!=n.protocol||k.port!=n.port){a("#xeTmpIframe").length||a('<iframe name="%id%" id="%id%" style="position:absolute;left:-1px;top:1px;width:1px;height:1px"></iframe>'.replace(/%id%/g,"xeTmpIframe")).appendTo(document.body);a("#xeVirtualForm").remove();var A=a('<form id="%id%"></form>'.replace(/%id%/g,"xeVirtualForm")).attr({id:"xeVirtualForm",method:"post",action:h,target:"xeTmpIframe"});e.xeVirtualRequestMethod="xml";e.xeRequestURI=location.href.replace(/#(.*)$/i,
"");e.xeVirtualRequestUrl=request_uri;a.each(e,function(b,c){a('<input type="hidden">').attr("name",b).attr("value",c).appendTo(A)});A.appendTo(document.body).submit()}else{var x=[],p=0;x[p++]='<?xml version="1.0" encoding="utf-8" ?>';x[p++]="<methodCall>";x[p++]="<params>";a.each(e,function(a,b){x[p++]="<"+a+"><![CDATA["+b+"]]\></"+a+">"});x[p++]="</params>";x[p++]="</methodCall>";var w=null;w&&0!=w.readyState&&w.abort();try{a.ajax({url:h,type:"POST",dataType:"xml",data:x.join("\n"),contentType:"text/plain",
beforeSend:function(a){w=a},success:m,error:function(a,b){t.css("display","none");var c="";if("parsererror"==b){if(""==a.responseText)return;c="The result is not valid XML :\n-------------------------------------\n"+a.responseText.replace(/<[^>]+>/g,"")}else c=b;try{console.log(c)}catch(d){}}})}catch(u){alert(u);return}var t=a(".wfsr");show_waiting_message&&t.length&&t.html(waiting_message).show()}};a.exec_json=function(b,c,e){"undefined"==typeof c&&(c={});b=b.split(".");2==b.length&&(show_waiting_message&&
a(".wfsr").html(waiting_message).show(),a.extend(c,{module:b[0],act:b[1]}),"undefined"!=typeof xeVid&&a.extend(c,{vid:xeVid}),a.ajax({type:"POST",dataType:"json",url:request_uri,contentType:"application/json",data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");0<b.error&&alert(b.message);a.isFunction(e)&&e(b)}}))};a.fn.exec_html=function(b,c,e,g,j){"undefined"==typeof c&&(c={});a.inArray(e,["html","append","prepend"])||(e="html");var i=a(this),b=b.split(".");2==b.length&&
(show_waiting_message&&a(".wfsr").html(waiting_message).show(),a.extend(c,{module:b[0],act:b[1]}),a.ajax({type:"POST",dataType:"html",url:request_uri,data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");i[e](b);a.isFunction(g)&&g(j)}}))};a(function(a){a(".wfsr").ajaxStart(function(){a(window).bind("beforeunload",b)}).bind("ajaxStop cancel_confirm",function(){a(window).unbind("beforeunload",b)})})})(jQuery);
(function(a){function b(a){var b=[];return a.is(":radio")?a.filter(":checked").val():a.is(":checkbox")?(a.filter(":checked").each(function(){b.push(this.value)}),b.join("|@|")):a.val()}var d=[],c=[],e={},g=[],j={},i=new (xe.createApp("Validator",{init:function(){var a=/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast("ADD_RULE",["email",a]);this.cast("ADD_RULE",["email_address",a]);a=/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast("ADD_RULE",["userid",a]);this.cast("ADD_RULE",["user_id",a]);a=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/;
(function(a){function b(){return""}a.exec_xml=window.exec_xml=function(b,c,e,g,k,j,m){function n(e){e=a(e).find("response")[0];var h,n="",p=[],l={};h="";u.css("display","none").trigger("cancel_confirm");if(!e)return alert(x.responseText),null;h=xml2json(e,!1,!1);h="object"==typeof JSON&&a.isFunction(JSON.parse)?JSON.parse(h):eval("("+h+")");h=h.response;if("undefined"==typeof h){p.error=-1;p.message="Unexpected error occured.";try{if("undefined"!=typeof(n=e.childNodes[0].firstChild.data))p.message+=
"\r\n"+n}catch(q){}return p}a.each(k,function(a,b){l[b]=!0});l.redirect_url=!0;l.act=!0;a.each(h,function(a,b){l[a]&&(p[a]=b)});if(0!=p.error){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(b,c,p,g,k,j,m);alert((p.message||"An unknown error occured while loading ["+b+"."+c+"]").replace(/\\n/g,"\n"));return null}if(p.redirect_url)return location.href=p.redirect_url.replace(/&amp;/g,"&"),null;a.isFunction(g)&&g(p,k,j,m)}var h=request_uri+"index.php";e||(e={});if(a.isArray(e)){var p={},
l;for(l in e)e.hasOwnProperty(l)&&(p[l]=e[l]);e=p}e.module=b;e.act=c;"undefined"!=typeof xeVid&&(e.vid=xeVid);"undefined"==typeof k||1>k.length?k=["error","message"]:k.push("error","message");a.isArray(ssl_actions)&&(e.act&&0<=a.inArray(e.act,ssl_actions))&&(l=default_url||request_uri,h=window.https_port||443,l=a("<a>").attr("href",l)[0],p="https://"+l.hostname.replace(/:\d+$/,""),443!=h&&(p+=":"+h),"/"!=l.pathname[0]&&(p+="/"),p+=l.pathname,h=p.replace(/\/$/,"")+"/index.php");l=a("<a>").attr("href",
location.href)[0];p=a("<a>").attr("href",h)[0];if(l.protocol!=p.protocol||l.port!=p.port){a("#xeTmpIframe").length||a('<iframe name="%id%" id="%id%" style="position:absolute;left:-1px;top:1px;width:1px;height:1px"></iframe>'.replace(/%id%/g,"xeTmpIframe")).appendTo(document.body);a("#xeVirtualForm").remove();var B=a('<form id="%id%"></form>'.replace(/%id%/g,"xeVirtualForm")).attr({id:"xeVirtualForm",method:"post",action:h,target:"xeTmpIframe"});e.xeVirtualRequestMethod="xml";e.xeRequestURI=location.href.replace(/#(.*)$/i,
"");e.xeVirtualRequestUrl=request_uri;a.each(e,function(b,c){a('<input type="hidden">').attr("name",b).attr("value",c).appendTo(B)});B.appendTo(document.body).submit()}else{var y=[],q=0;y[q++]='<?xml version="1.0" encoding="utf-8" ?>';y[q++]="<methodCall>";y[q++]="<params>";a.each(e,function(a,b){y[q++]="<"+a+"><![CDATA["+b+"]]\x3e</"+a+">"});y[q++]="</params>";y[q++]="</methodCall>";var x=null;x&&0!=x.readyState&&x.abort();try{a.ajax({url:h,type:"POST",dataType:"xml",data:y.join("\n"),contentType:"text/plain",
beforeSend:function(a){x=a},success:n,error:function(a,b){u.css("display","none");var c="";if("parsererror"==b){if(""==a.responseText)return;c="The result is not valid XML :\n-------------------------------------\n"+a.responseText.replace(/<[^>]+>/g,"")}else c=b;try{console.log(c)}catch(d){}}})}catch(v){alert(v);return}var u=a(".wfsr");show_waiting_message&&u.length&&((e=a(".wfsr").data("timeout_id"))&&clearTimeout(e),a(".wfsr").css("opacity",0),a(".wfsr").data("timeout_id",setTimeout(function(){a(".wfsr").css("opacity",
"")},1E3)),u.html(waiting_message).show())}};a.exec_json=function(b,c,e){"undefined"==typeof c&&(c={});b=b.split(".");if(2==b.length){var g=a(".wfsr").data("timeout_id");g&&clearTimeout(g);a(".wfsr").css("opacity",0);a(".wfsr").data("timeout_id",setTimeout(function(){a(".wfsr").css("opacity","")},1E3));show_waiting_message&&a(".wfsr").html(waiting_message).show();a.extend(c,{module:b[0],act:b[1]});"undefined"!=typeof xeVid&&a.extend(c,{vid:xeVid});a.ajax({type:"POST",dataType:"json",url:request_uri,
contentType:"application/json",data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");0!=b.error&&-1E3<b.error?-1==b.error&&"msg_is_not_administrator"==b.message?alert("You are not logged in as an administrator"):alert(b.message):a.isFunction(e)&&e(b)}})}};a.fn.exec_html=function(b,c,e,g,k){"undefined"==typeof c&&(c={});a.inArray(e,["html","append","prepend"])||(e="html");var j=a(this);b=b.split(".");if(2==b.length){var m=a(".wfsr").data("timeout_id");m&&clearTimeout(m);a(".wfsr").css("opacity",
0);a(".wfsr").data("timeout_id",setTimeout(function(){a(".wfsr").css("opacity","")},1E3));show_waiting_message&&a(".wfsr").html(waiting_message).show();a.extend(c,{module:b[0],act:b[1]});a.ajax({type:"POST",dataType:"html",url:request_uri,data:a.param(c),success:function(b){a(".wfsr").hide().trigger("cancel_confirm");j[e](b);a.isFunction(g)&&g(k)}})}};a(function(a){a(".wfsr").ajaxStart(function(){a(window).bind("beforeunload",b)}).bind("ajaxStop cancel_confirm",function(){a(window).unbind("beforeunload",
b)})})})(jQuery);
(function(a){function b(a){var b=[];return a.is(":radio")?a.filter(":checked").val():a.is(":checkbox")?(a.filter(":checked").each(function(){b.push(this.value)}),b.join("|@|")):a.val()}var d=[],c=[],e={},g=[],k={},j=new (xe.createApp("Validator",{init:function(){var a=/^[\w-]+((?:\.|\+|\~)[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast("ADD_RULE",["email",a]);this.cast("ADD_RULE",["email_address",a]);a=/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast("ADD_RULE",["userid",a]);this.cast("ADD_RULE",["user_id",a]);a=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/;
this.cast("ADD_RULE",["url",a]);this.cast("ADD_RULE",["homepage",a]);this.cast("ADD_RULE",["korean",RegExp("^[\uac00-\ud7a3]*$")]);this.cast("ADD_RULE",["korean_number",RegExp("^[\uac00-\ud7a30-9]*$")]);this.cast("ADD_RULE",["alpha",/^[a-z]*$/i]);this.cast("ADD_RULE",["alpha_number",/^[a-z][a-z0-9_]*$/i]);this.cast("ADD_RULE",["number",/^[0-9]*$/])},run:function(a){var b="";a._filter&&(b=a._filter.value);a=this.cast("VALIDATE",[a,b]);"undefined"==typeof a&&(a=!1);return a},API_ONREADY:function(){var b=
this;a("form").each(function(){this.onsubmit&&(this["xe:onsubmit"]=this.onsubmit,this.onsubmit=null)}).submit(function(c){var d=this["xe:onsubmit"];(d=a.isFunction(d)?d.apply(this):b.run(this))||c.stopImmediatePropagation();return d})},API_VALIDATE:function(c,d){function n(a){return a.replace(/([\.\+\-\[\]\{\}\(\)\\])/g,"\\$1")}var k=!0,i=d[0],l=i.elements,p,w,u,t,r,q,v,s,y,z;l.ruleset?p=i.elements.ruleset.value:l._filter&&(p=i.elements._filter.value);if(!p)return!0;a.isFunction(g[p])&&(u=g[p]);p=
a.extend({},e[p.toLowerCase()]||{},j);t=[];q=0;for(s=i.elements.length;q<s;q++)k=l[q],(r=k.name)&&l[r]&&(!l[r].length||l[r][0]===k)&&t.push(r);t=t.join("\n");w={};for(r in p)if(p.hasOwnProperty(r)&&(k=[],"^"==r.substr(0,1))){(k=t.match(RegExp("^"+n(r.substr(1))+".*$","gm")))||(k=[]);q=0;for(s=k.length;q<s;q++)w[k[q]]=p[r];p[r]=null;delete p[r]}p=a.extend(p,w);for(r in p)if(p.hasOwnProperty(r)&&(f=p[r],(k=l[r])||(k=l[r+"[]"]),t=k?a.trim(b(a(k))):"",w=(f.modifier||"")+",",k&&!k.disabled)){if(f["if"]){a.isArray(f["if"])||
(f["if"]=[f["if"]]);for(q=0;q<f["if"].length;q++)s=f["if"][q],k=new Function("el","return !!("+s.test.replace(/\$(\w+)/g,"(jQuery('[name=$1]').is(':radio, :checkbox') ? jQuery('[name=$1]:checked').val() : jQuery('[name=$1]').val())")+")"),k(l)?f[s.attr]=s.value:delete f[s.attr]}if(t){k=parseInt(f.minlength)||0;s=parseInt(f.maxlength)||0;z=/b$/.test(f.minlength||"");y=/b$/.test(f.maxlength||"");q=t.length;if(z||y)if(v=t,v+="",v.length){v=encodeURI(v);var B=v.split("%").length-1;v=v.length-2*B}else v=
0;if(k&&k>(z?v:q)||s&&s<(y?v:q))return this.cast("ALERT",[i,r,"outofrange",k,s])&&!1;if(f.equalto&&(s=(q=l[f.equalto])?a.trim(b(a(q))):"",q&&s!==t))return this.cast("ALERT",[i,r,"equalto"])&&!1;y=(f.rule||"").split(",");q=0;for(s=y.length;q<s;q++)if(z=y[q])if(k=this.cast("APPLY_RULE",[z,t]),-1<w.indexOf("not,")&&(k=!k),!k)return this.cast("ALERT",[i,r,"invalid_"+z])&&!1}else if(f["default"]&&(t=f["default"]),f.required)return this.cast("ALERT",[i,r,"isnull"])&&!1}return a.isFunction(u)?u(i):!0},API_ADD_RULE:function(a,
b){var d=b[0].toLowerCase();c[d]=b[1]},API_DEL_RULE:function(a,b){var d=b[0].toLowerCase();delete c[d]},API_GET_RULE:function(a,b){var d=b[0].toLowerCase();return c[d]?c[d]:null},API_ADD_FILTER:function(a,b){var c=b[0].toLowerCase();e[c]=b[1]},API_DEL_FILTER:function(a,b){var c=b[0].toLowerCase();delete e[c]},API_GET_FILTER:function(a,b){var c=b[0].toLowerCase();return e[c]?e[c]:null},API_ADD_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();j[c]=b[1]},API_GET_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();
return j[c]},API_DEL_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();delete j[c]},API_APPLY_RULE:function(b,d){var e=d[0],g=d[1];return"undefined"==typeof c[e]?!0:a.isFunction(c[e])?c[e](g):c[e]instanceof RegExp?c[e].test(g):a.isArray(c[e])?-1<a.inArray(g,c[e]):!0},API_ALERT:function(b,c){var d=c[0],e=c[1],g=c[2],i=c[3],j=c[4],l=this.cast("GET_MESSAGE",[e]),u=this.cast("GET_MESSAGE",[g]);u!=g&&(u=0>u.indexOf("%s")?l+u:u.replace("%s",l));if(i||j)u+="("+(i||"")+"~"+(j||"")+")";this.cast("SHOW_ALERT",
[u]);a(d.elements[e]).focus()},API_SHOW_ALERT:function(a,b){alert(b[0])},API_ADD_MESSAGE:function(a,b){d[b[0]]=b[1]},API_GET_MESSAGE:function(a,b){var c=b[0];return d[c]||c},API_ADD_CALLBACK:function(a,b){g[b[0]]=b[1]},API_REMOVE_CALLBACK:function(a,b){delete g[b[0]]}}));xe.registerApp(i);var l=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");c&&"object"==typeof c&&(c=c.value);if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||
""}catch(d){}}});i.registerPlugin(new l)})(jQuery);function filterAlertMessage(a){var b=a.message,d=a.act,a=a.redirect_url,c=location.href;"undefined"!=typeof b&&(b&&"success"!=b)&&alert(b);"undefined"!=typeof d&&d?c=current_url.setQuery("act",d):"undefined"!=typeof a&&a&&(c=a);c==location.href&&(c=c.replace(/#(.*)$/,""));location.href=c}function procFilter(a,b){b(a);return!1}
function legacy_filter(a,b,d,c,e,g,j,i){var l=xe.getApp("Validator")[0],m=jQuery,h=[];if(!l)return!1;b.elements._filter||m(b).prepend('<input type="hidden" name="_filter" />');b.elements._filter.value=a;h[0]=a;h[1]=function(a){var h={},a=m(a).serializeArray();m.each(a,function(a,b){var c=m.trim(b.value),d=b.name;if(!c||!d)return!0;i[d]&&(d=i[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));h[d]=h[d]?h[d]+("|@|"+c):b.value});if(j&&!confirm(j))return!1;exec_xml(d,c,h,e,g,h,b)};l.cast("ADD_CALLBACK",h);
l.cast("VALIDATE",[b,a]);return!1};
this;a("form").each(function(){this.onsubmit&&(this["xe:onsubmit"]=this.onsubmit,this.onsubmit=null)}).submit(function(c){var d=this["xe:onsubmit"];(d=a.isFunction(d)?d.apply(this):b.run(this))||c.stopImmediatePropagation();return d})},API_VALIDATE:function(c,d){function p(a){return a.replace(/([\.\+\-\[\]\{\}\(\)\\])/g,"\\$1")}var l=!0,j=d[0],m=j.elements,q,x,v,u,s,r,w,t,z,A;m.ruleset?q=j.elements.ruleset.value:m._filter&&(q=j.elements._filter.value);if(!q)return!0;a.isFunction(g[q])&&(v=g[q]);q=
a.extend({},e[q.toLowerCase()]||{},k);u=[];r=0;for(t=j.elements.length;r<t;r++)l=m[r],(s=l.name)&&m[s]&&(!m[s].length||m[s][0]===l)&&u.push(s);u=u.join("\n");x={};for(s in q)if(q.hasOwnProperty(s)&&(l=[],"^"==s.substr(0,1))){(l=u.match(RegExp("^"+p(s.substr(1))+".*$","gm")))||(l=[]);r=0;for(t=l.length;r<t;r++)x[l[r]]=q[s];q[s]=null;delete q[s]}q=a.extend(q,x);for(s in q)if(q.hasOwnProperty(s)&&(f=q[s],(l=m[s])||(l=m[s+"[]"]),u=l?a.trim(b(a(l))):"",x=(f.modifier||"")+",",l&&!l.disabled)){if(f["if"]){a.isArray(f["if"])||
(f["if"]=[f["if"]]);for(r=0;r<f["if"].length;r++)t=f["if"][r],l=new Function("el","return !!("+t.test.replace(/\$(\w+)/g,"(jQuery('[name=$1]').is(':radio, :checkbox') ? jQuery('[name=$1]:checked').val() : jQuery('[name=$1]').val())")+")"),l(m)?f[t.attr]=t.value:delete f[t.attr]}if(u){l=parseInt(f.minlength)||0;t=parseInt(f.maxlength)||0;A=/b$/.test(f.minlength||"");z=/b$/.test(f.maxlength||"");r=u.length;if(A||z)if(w=u,w+="",w.length){w=encodeURI(w);var C=w.split("%").length-1;w=w.length-2*C}else w=
0;if(l&&l>(A?w:r)||t&&t<(z?w:r))return this.cast("ALERT",[j,s,"outofrange",l,t])&&!1;if(f.equalto&&(t=(r=m[f.equalto])?a.trim(b(a(r))):"",r&&t!==u))return this.cast("ALERT",[j,s,"equalto"])&&!1;z=(f.rule||"").split(",");r=0;for(t=z.length;r<t;r++)if(A=z[r])if(l=this.cast("APPLY_RULE",[A,u]),-1<x.indexOf("not,")&&(l=!l),!l)return this.cast("ALERT",[j,s,"invalid_"+A])&&!1}else if(f["default"]&&(u=f["default"]),f.required)return this.cast("ALERT",[j,s,"isnull"])&&!1}return a.isFunction(v)?v(j):!0},API_ADD_RULE:function(a,
b){var d=b[0].toLowerCase();c[d]=b[1]},API_DEL_RULE:function(a,b){var d=b[0].toLowerCase();delete c[d]},API_GET_RULE:function(a,b){var d=b[0].toLowerCase();return c[d]?c[d]:null},API_ADD_FILTER:function(a,b){var c=b[0].toLowerCase();e[c]=b[1]},API_DEL_FILTER:function(a,b){var c=b[0].toLowerCase();delete e[c]},API_GET_FILTER:function(a,b){var c=b[0].toLowerCase();return e[c]?e[c]:null},API_ADD_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();k[c]=b[1]},API_GET_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();
return k[c]},API_DEL_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();delete k[c]},API_APPLY_RULE:function(b,d){var e=d[0],g=d[1];return"undefined"==typeof c[e]?!0:a.isFunction(c[e])?c[e](g):c[e]instanceof RegExp?c[e].test(g):a.isArray(c[e])?-1<a.inArray(g,c[e]):!0},API_ALERT:function(b,c){var d=c[0],e=c[1],g=c[2],j=c[3],k=c[4],m=this.cast("GET_MESSAGE",[e]),v=this.cast("GET_MESSAGE",[g]);v!=g&&(v=0>v.indexOf("%s")?m+v:v.replace("%s",m));if(j||k)v+="("+(j||"")+"~"+(k||"")+")";this.cast("SHOW_ALERT",
[v]);a(d.elements[e]).focus()},API_SHOW_ALERT:function(a,b){alert(b[0])},API_ADD_MESSAGE:function(a,b){d[b[0]]=b[1]},API_GET_MESSAGE:function(a,b){var c=b[0];return d[c]||c},API_ADD_CALLBACK:function(a,b){g[b[0]]=b[1]},API_REMOVE_CALLBACK:function(a,b){delete g[b[0]]}}));xe.registerApp(j);var m=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");c&&"object"==typeof c&&(c=c.value);if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||
""}catch(d){}}});j.registerPlugin(new m)})(jQuery);function filterAlertMessage(a){var b=a.message,d=a.act;a=a.redirect_url;var c=location.href;"undefined"!=typeof b&&(b&&"success"!=b)&&alert(b);"undefined"!=typeof d&&d?c=current_url.setQuery("act",d):"undefined"!=typeof a&&a&&(c=a);c==location.href&&(c=c.replace(/#(.*)$/,""));location.href=c}function procFilter(a,b){b(a);return!1}
function legacy_filter(a,b,d,c,e,g,k,j){var m=xe.getApp("Validator")[0],n=jQuery,h=[];if(!m)return!1;b.elements._filter||n(b).prepend('<input type="hidden" name="_filter" />');b.elements._filter.value=a;h[0]=a;h[1]=function(a){var h={};a=n(a).serializeArray();n.each(a,function(a,b){var c=n.trim(b.value),d=b.name;if(!c||!d)return!0;j[d]&&(d=j[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));h[d]=h[d]?h[d]+("|@|"+c):b.value});if(k&&!confirm(k))return!1;exec_xml(d,c,h,e,g,h,b)};m.cast("ADD_CALLBACK",h);
m.cast("VALIDATE",[b,a]);return!1};