function doInstallModule(a){var d=[];d.module_name=a;exec_xml("install","procInstallAdminInstall",d,completeInstallModule)}function doUpdateModule(a){var d=[];d.module_name=a;exec_xml("install","procInstallAdminUpdate",d,completeInstallModule)}function completeInstallModule(a){alert(a.message);location.reload()} jQuery(function(a){function d(){var b=a(".x>.body"),e=b.find(">.gnb"),d=b.children("#content.content");d.width("99.99%");setTimeout(function(){d.removeAttr("style");e.height()>d.height()&&d.height(e.height())},100)}window.scrollTo(0,0);a(document.body).on("click",".x [data-toggle]",function(){var b=a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-toggle")){var e=b.attr("href");b.attr("data-toggle",e)}e=a(b.attr("data-toggle"));e.toggle();e.is(":visible")&&!e.find("a,input,button,textarea,select").length? e.not(":disabled").attr("tabindex","0").focus():e.is(":visible")&&e.find("a,input,button,textarea,select").length?e.not(":disabled").find("a,input,button,textarea,select").eq(0).focus():b.focus();return!1});a(document.body).on("click",".x [data-show]",function(){var b=a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-show")){var e=b.attr("href");b.attr("data-show",e)}a(b.attr("data-show")).show().attr("tabindex","0").focus();return!1});a(document.body).on("click",".x [data-hide]",function(){var b= a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-hide")){var e=b.attr("href");b.attr("data-hide",e)}a(b.attr("data-hide")).hide();b.focus();return!1});a.fn.xeTabbable=function(){a(this).each(function(){var b=a(this);b.find(">.x_nav-tabs>li>a").each(function(b){a(this).attr("data-index",b+1)});b.find(">.x_tab-content>.x_tab-pane").each(function(b){a(this).attr("data-index",b+1)})});a('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide()};a(".x .x_tabbable").xeTabbable();a(document.body).on("click", '.x .x_nav-tabs>li>a[href^="#"]',function(){var b=a(this);if(b.parent("li").hasClass("x_disabled"))return!1;b.parent("li").addClass("x_active").siblings().removeClass("x_active");b.closest(".x_nav-tabs").next(".x_tab-content").find(">.x_tab-pane").eq(b.attr("data-index")-1).addClass("x_active").show().siblings(".x_tab-pane").removeClass("x_active").hide();b.parents(".x_tabbable").trigger("tab_change",[parseInt(b.attr("data-index"))-1,b]);return!1});a.fn.gnb=function(){var b=a(".x>.body"),e=b.find(">.gnb"), g=e.find(">ul>li"),f=new Date;f.setTime(f.getTime()+30758400);g.find(">a").prepend("");g.find(">ul").prev("a").append("");g.each(function(b){a(this).attr("data-index",b+1)});var h=g.find(">ul>li.active_").closest("li.active").attr("data-index");g.find(">ul>li.active_").clone().addClass("active").attr("data-index",h).prependTo("#gnbNav").find(">a").prepend("");g.find(">a").click(function(){function e(){b.removeClass("wide");d()}var h=a(this),g=a(this).parent("li"),n=g.hasClass("open"), k=g.hasClass("active"),j=1<=g.find(">ul").length,t=b.hasClass("wide");if(!n&&!k&&j)return g.addClass("open").find(">ul").slideDown(100),e(),setCookie("__xe_admin_gnb_tx_"+h.data("href"),"open",f),!1;if(n&&!k&&j&&!t)return g.removeClass("open").find(">ul").slideUp(100),e(),setCookie("__xe_admin_gnb_tx_"+h.data("href"),"close",f),!1;if(t&&!j||k||t&&n)return e(),!1});e.find('>a[href="#gnbNav"]').click(function(){a(this).parent(".gnb").toggleClass("open");b.toggleClass("wide");980>=a(window).width()&& !e.hasClass("open")&&a("#gnbNav").removeClass("ex");d();a(this).parent(".gnb").hasClass("open")?setCookie("__xe_admin_gnb_status","open",f):setCookie("__xe_admin_gnb_status","close",f);return!1});e.find(".exMenu>button").click(function(){a("#gnbNav").toggleClass("ex");d();a("#gnbNav").hasClass("ex")?setCookie("__xe_admin_gnb_ex_status","open",f):setCookie("__xe_admin_gnb_ex_status","close",f)});(g=getCookie("__xe_admin_gnb_status"))&&setCookie("__xe_admin_gnb_status",g,f);(g=getCookie("__xe_admin_gnb_ex_status"))&& setCookie("__xe_admin_gnb_xe_status",g,f);if("undefined"!=typeof __xe_admin_gnb_txs)for(var j in __xe_admin_gnb_txs)g=__xe_admin_gnb_txs[j],h=getCookie(g),setCookie(g,h,f)};a(".gnb").gnb();a(".x #lang").mouseleave(function(){a(this).hide()}).focusout(function(){var b=a(this);setTimeout(function(){b.find("a:focus").length||b.mouseleave()},500)});a(".x th :checkbox").change(function(){var b=a(this),e=b.data("name");b.closest("table").find(":checkbox").filter(function(){var b=a(this);return!b.prop("disabled")&& (b.attr("name")==e||b.data("name")==e)}).prop("checked",b.prop("checked")).end().end().trigger("update.checkbox",[e,this.checked])});a(document.body).on("click",".x .x_pagination .x_disabled, .x .x_pagination .x_active",function(){return!1});if(1h1:first");h.each(function(){var b=a(this);b.next().length&&b.append('')});a(".x .section.collapsed>h1>.snToggle").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"); h.find(">.snToggle").click(function(){var b=a(this),e=b.closest(".section");e.hasClass("collapsed")?(e.removeClass("collapsed"),b.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up")):(e.addClass("collapsed"),b.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"));d()})}h=a(".x .x_alert");h.prepend('');h.children(".x_close").click(function(){a(this).parent(".x_alert").hide()});a(".x .x_btn").click(function(){if(a(this).hasClass("x_disabled"))return!1}); a.fn.vr=function(){this.each(function(){var b=a(this);"|"==b.text()&&b.addClass("vr").filter(":first-child, :last-child").remove()})};a(".x i").vr();a.fn.labelMaker=function(){this.each(function(b){b+=1;var e=a(this);b="i"+b;e.next("input, textarea, select").filter("[id]").not(":radio, :checkbox").length?e.attr("for",e.next().attr("id")):e.next("input, textarea, select").not("[id]").not(":radio, :checkbox").length?e.attr("for",b).next().attr("id",b):e.prev(":radio, :checkbox").filter("[id]").length? e.attr("for",e.prev().attr("id")):e.prev(":radio, :checkbox").not("[id]").length?e.attr("for",b).prev().attr("id",b):e.children("input, textarea, select").filter("[id]").length?e.attr("for",e.children("input, textarea, select").filter("[id]").eq(0).attr("id")):e.children("input, textarea, select").not("[id]").length&&e.attr("for",b).children("input, textarea, select").not("[id]").eq(0).attr("id",b)})};a("label:not([for])").labelMaker();a.fn.checkToggle=function(){function b(){setTimeout(function(){a(":checked").parent("label").addClass("checked"); a(':not(":checked")').parent("label").removeClass("checked")},0)}this.change(b);b()};a(":radio, :checkbox").checkToggle();a.fn.fileTypeOverlap=function(){this.each(function(){var b=a(this);b.wrap('').before(b.attr("title"))})};a('input[type="file"].overlap').fileTypeOverlap();a.fn.tableSpan=function(){this.each(function(){var b=a(this),e=b.find(">thead>tr:eq(0)>th").length,b=b.find(">tbody>tr:eq(0)>td:only-child");e!=b.attr("colspan")&&b.attr("colspan",e).css("text-align", "center")})};a("table").tableSpan()}); jQuery(function(a){var d=[],h=a('').appendTo("body").hide();a.fn.xeModalWindow=function(){this.not(".xe-modal-window").addClass("xe-modal-window").each(function(){a(a(this).attr("href")).addClass("x").hide()}).click(function(){var b=a(this);"showing"==a(b.attr("href")).data("state")?b.trigger("close.mw"):b.trigger("open.mw");return!1}).bind("open.mw",function(){function b(){e.trigger("after-open.mw")}var e=a(this),g,f;g=a(e.attr("href"));if(!(d.length&&d[d.length- 1].get(0)==g.get(0))){g.parent("body").length||(f=a(''),f.click(function(){g.data("anchor").trigger("close.mw")}),g.find("[data-hide]").click(function(){g.data("anchor").trigger("close.mw")}),a("body").append(g),g.prepend(f));g.data("anchor",e);f=a.Event("before-open.mw");e.trigger(f);if(f.isDefaultPrevented())return!1;f=e.data("duration")||"fast";g.data("state","showing");a(document).bind("keydown.mw",function(a){if(27==a.which)return e.trigger("close.mw"), !1});g.fadeIn(f,b).find("button.x_close:first").focus();a("body").css("overflow","hidden");d.push(g);f=1040+2*(d.length-1);h.css("z-index",f).show();g.css("z-index",f+1)}}).bind("close.mw",function(){function b(){e.trigger("after-close.mw")}var e=a(this),g,f;f=a(e.attr("href"));if(!(d.length&&d[d.length-1].get(0)!=f.get(0))){g=a.Event("before-close.mw");e.trigger(g);if(g.isDefaultPrevented())return!1;g=e.data("duration")||"fast";f.data("state","hiding");f.fadeOut(g,b);a("body").css("overflow","auto"); e.focus();d.pop();f=1040+2*(d.length-1);d.length?h.css("z-index",f):h.hide()}});a("div.x_modal").addClass("x")};a("a.modalAnchor").xeModalWindow()}); jQuery(function(a){var d=!1;a.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var h=a(this);$layer=a(h.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(){d=!0}).focusout(function(){setTimeout(function(){!d&&(!$layer.find(":focus").length&&"showing"==$layer.data("state"))&&h.trigger("close.tc");d=!1},1)})}).click(function(){var d=a(this),b;b=a(d.attr("href"));b.data("anchor",d);"showing"== b.data("state")?d.trigger("close.tc"):d.trigger("open.tc");return!1}).bind("open.tc",function(){function h(){b.trigger("after-open.tc")}var b=a(this),e,g,f;e=a(b.attr("href"));g=b.data("effect");f=b.data("duration")||"fast";e.data("state","showing");b.trigger("before-open.tc");d=!1;a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(d){if(d&&("keydown"==d.type&&27!=d.which||"mousedown"==d.type&&(d=a(d.target),d.is("html,.tgAnchor,.tgContent")||e.has(d).length)))return!0; b.trigger("close.tc");return!1});switch(g){case "slide":e.slideDown(f,h);break;case "slide-h":g=e.css({"overflow-x":"",width:""}).width();e.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:g},f,function(){e.css({"overflow-x":"",width:""});h()});break;case "fade":e.fadeIn(f,h);break;default:e.show(),b.trigger("after-open.tc")}}).bind("close.tc",function(){function d(){b.trigger("after-close.tc")}var b=a(this),e,g,f;a(document).unbind("mousedown.tc keydown.tc");e=a(b.attr("href"));g=b.data("effect"); f=b.data("duration")||"fast";e.data("state","hiding");b.trigger("before-close.tc");switch(g){case "slide":e.slideUp(f,d);break;case "slide-h":e.animate({width:0},f,function(){e.hide();d()});break;case "fade":e.fadeOut(f,d);break;default:e.hide(),b.trigger("after-close.tc")}});return this};a("a.tgAnchor").xeContentToggler()}); jQuery(function(a){a.fn.xeModuleFinder=function(){this.not(".xe-module-finder").addClass("xe-module-finder").find("a.tgAnchor.findsite").bind("before-open.tc",function(){var d,h,b;d=a(this);h=a(d.attr("href")).find(">ul");b=d.prev("input:text").val();a.exec_json("admin.getSiteAllList",{domain:b},function(b){var g=b.site_list,f,k;h.empty();d.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(b.error||!a.isArray(g))d.trigger("close.tc");else{f=0;for(k=g.length;f< k;f++)b=a("").appendTo(h),a('').text(g[f].domain).data("site_srl",g[f].site_srl).appendTo(b)}})}).end().find(".tgContent.suggestion").delegate("button","click",function(){var d,h;d=a(this);h=d.closest(".modulefinder");h.find("a.tgAnchor.findsite").trigger("close.tc");a.exec_json("module.procModuleAdminGetList",{site_srl:d.data("site_srl")},function(b){var e=b.module_list,d;if(!b.error&&e){b=h.find(".moduleList").data("module_list",e).removeAttr("disabled").empty();for(d in e)e.hasOwnProperty(d)&& a("").attr("value",d).text(e[d].title).appendTo(b);b.prop("selectedIndex",0).change().focus();b.is(":visible")||b.slideDown(100,function(){h.find(".moduleIdList:not(:visible)").slideDown(100).trigger("show")}).trigger("show")}})}).end().find(".moduleList,.moduleIdList").hide().end().find(".moduleList").change(function(){var d,h,b;d=a(this);h=d.val();b=d.data("module_list");if(b[h]){b=b[h].list;d=d.closest(".modulefinder").find(".moduleIdList").removeAttr("disabled").empty();for(var e in b)b.hasOwnProperty(e)&& a("").attr("value",b[e].module_srl).text(b[e].browser_title).appendTo(d);d.prop("selectedIndex",0).change()}});return this};a(".modulefinder").xeModuleFinder()}); jQuery(function(a){var d=0;_xeModuleSearch=function(){var h=this,b=a(this),e=b.data("multiple");e||(e="");var g="__module_searcher_"+d;d++;a.exec_json("module.getModuleAdminModuleSearcherHtml",{id:g,is_multiple:e},function(d){function e(a,b){var d;a.find("li div").width("");a.css("height","auto");a.css("overflow-y","");a.height()>b&&(d=a.find("li div"),d.width(d.width()-20+"px"),a.css("height",b+"px"),a.css("overflow-y","auto"))}function j(b){var d,f=RegExp(b,"ig"),g=q;n.empty();i=0;for(c=g.length;i< c;i++){d=g[i].domain;if(b){if(!d.match(f))continue;d=d.replace(f,function(a){return''+a+""})}$li=a("").appendTo(n);a("").attr("href","#").html(d).data("site_srl",g[i].site_srl).appendTo($li)}e(n,w-t.parent("div").height());1==g.length&&n.find("a").trigger("click")}if(d&&d.html){b.after(d.html).addClass("tgAnchor").attr("href","#"+g).xeContentToggler();var l=b.next(".moduleWindow");d=l.find(".siteList");var p=l.find(".moduleList"),r=l.find(".instanceList"),n= d.find(">ul"),z=p.find(">ul"),s=r.find(">select"),t=l.find("input.siteFinder"),q,w=280;t.keyup(function(){j(t.val())});"undefined"==typeof console&&(console={log:function(){}});b.not(".xe-module-search").addClass("xe-module-search").parent().find(".moduleTrigger").bind("before-open.tc",function(){var b;b=a(this);n.empty();s.empty();p.hide();r.hide();a.exec_json("admin.getSiteAllList",{domain:""},function(d){var e=d.site_list;d.error||!a.isArray(e)?b.trigger("close.tc"):(q=e,j(t.val()),t.focus())})}); l.find(".siteList>ul").delegate("a","click",function(b){var d;d=a(this);d.closest(".moduleSearch");z.empty();r.hide();a.exec_json("module.procModuleAdminGetList",{site_srl:d.data("site_srl")},function(b){var g=b.module_list,f;if(!b.error&&g){for(f in g)g.hasOwnProperty(f)&&($li=a("").appendTo(z),a("").attr("href","#").html(g[f].title).data("moduleInstanceList",g[f].list).appendTo($li));l.find(".moduleList").show();e(z,w);n.find("li").removeClass("x_active");d.parent("li").addClass("x_active")}}); b.preventDefault()}).end().find(".moduleList>ul").delegate("a","click",function(b){var d,g;d=a(this);if(g=d.data("moduleInstanceList")){h.sSelectedModuleType=d.text();s.empty();for(var f in g)g.hasOwnProperty(f)&&($li=a("").html(g[f].browser_title+" ("+g[f].mid+")").appendTo(s).val(g[f].module_srl).data("mid",g[f].mid).data("module_srl",g[f].module_srl).data("layout_srl",g[f].layout_srl).data("browser_title",g[f].browser_title));r.show();e(s,w);z.find("li").removeClass("x_active");d.parent("li").addClass("x_active"); b.preventDefault()}}).end().find(".moduleSearch_ok").click(function(d){var e=[];s.find("option:selected").each(function(){e.push({type:h.sSelectedModuleType,module_srl:a(this).data("module_srl"),layout_srl:a(this).data("layout_srl"),browser_title:a(this).data("browser_title"),mid:a(this).data("mid")})});b.trigger("moduleSelect",[e]);a(".moduleTrigger").trigger("close.tc");d.preventDefault()})}});return this};a.fn.xeModuleSearch=function(){a(this).each(_xeModuleSearch)};a.fn.xeModuleSearchHtml=function(){var d= 0;a(this).each(function(){var b=a(this),e=b.attr("id");e||(e="__module_search_"+d);d++;var e=a(''+xe.cmd_find+""),g=a('');b.after(e).after(" ").after(g).hide();e.xeModuleSearch();e.bind("moduleSelect",function(a,d){g.val(d[0].browser_title+" ("+d[0].mid+")");b.val(d[0].module_srl)});b.val()&&a.exec_json("module.getModuleAdminModuleInfo",{search_module_srl:b.val()},function(a){a&&a.module_info&&g.val(a.module_info.browser_title+" ("+ a.module_info.mid+")")})});return this}}); jQuery(function(a){var d=a.fn.hide;a.fn.hide=function(b,e,g,f){a(this).trigger("hide",[f]);a(this).find(".active").removeClass("active");var h=a(this).attr("id");a(this).hasClass("col")&&(a(this).next().hide(b,e,g,f),h&&a(this).parent().find('a[href="#'+h+'"]').parent("li.active").removeClass("active"));return d.apply(this,arguments)};var h=a.fn.show;a.fn.show=function(b,d,g,f){a(this).trigger("show",[f]);if(a(this).hasClass("col")){a(this).next().hide(b,d,g,f);var k=a(this).parent();setTimeout(function(){k.scrollTo(k.width(), 0,{duration:0})},0)}var j=h.apply(this,arguments),l=a(this);setTimeout(function(){l.trigger("after-show",[f])},0);return j}}); jQuery(function(a){a.xeMsgBox={htOptions:{}};var d=a.xeMsgBox.$msgBox=a("").addClass("x_modal _common x").hide().css("z-index",9999);d.html('\t\t