diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 0e464087f..cf45d7e77 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -1,25 +1,9 @@ /* NHN (developers@xpressengine.com) */ -// insert fog layer -function showWaitingFogLayer() { - var $bg = jQuery(''); - $bg.height(jQuery(window).height()); - jQuery('.wfsr') - .wrap('
') - .before($bg); -} - -function hideWaitingFogLayer() { - jQuery('.wfsr').prev('span').remove(); - jQuery('.wfsr').unwrap(); -} - - // install module function doInstallModule(module) { var params = new Array(); params['module_name'] = module; exec_xml('install','procInstallAdminInstall',params, completeInstallModule); - showWaitingFogLayer(); } // upgrade module @@ -27,7 +11,6 @@ function doUpdateModule(module) { var params = new Array(); params['module_name'] = module; exec_xml('install','procInstallAdminUpdate',params, completeInstallModule); - showWaitingFogLayer(); } function completeInstallModule(ret_obj) { diff --git a/modules/admin/tpl/js/admin.min.js b/modules/admin/tpl/js/admin.min.js index 2cc5d83b6..c0141b6c4 100644 --- a/modules/admin/tpl/js/admin.min.js +++ b/modules/admin/tpl/js/admin.min.js @@ -1 +1 @@ -function showWaitingFogLayer(){var a=jQuery('');a.height(jQuery(window).height());jQuery(".wfsr").wrap('
').before(a);}function hideWaitingFogLayer(){jQuery(".wfsr").prev("span").remove();jQuery(".wfsr").unwrap();}function doInstallModule(a){var b=new Array();b.module_name=a;exec_xml("install","procInstallAdminInstall",b,completeInstallModule);showWaitingFogLayer();}function doUpdateModule(a){var b=new Array();b.module_name=a;exec_xml("install","procInstallAdminUpdate",b,completeInstallModule);showWaitingFogLayer();}function completeInstallModule(a){alert(a.message);location.reload();}jQuery(function(b){window.scrollTo(0,0);b(".x .skipNav>a").click(function(){b(b(this).attr("href")).attr("tabindex","0").css("outline","0").focus();});b(document.body).on("click",".x [data-toggle]",function(){var h=b(this);if(h.is("a")&&h.attr("href")!=h.attr("data-toggle")){var g=h.attr("href");h.attr("data-toggle",g);}var f=b(h.attr("data-toggle"));var j="a,input,button,textarea,select";f.toggle();if(f.is(":visible")&&!f.find(j).length){f.not(":disabled").attr("tabindex","0").css("outline","0").focus();}else{if(f.is(":visible")&&f.find(j).length){f.not(":disabled").find(j).eq(0).focus();}else{h.focus();}}return false;});b(document.body).on("click",".x [data-show]",function(){var g=b(this);if(g.is("a")&&g.attr("href")!=g.attr("data-show")){var f=g.attr("href");g.attr("data-show",f);}b(g.attr("data-show")).show().attr("tabindex","0").focus();return false;});b(document.body).on("click",".x [data-hide]",function(){var g=b(this);if(g.is("a")&&g.attr("href")!=g.attr("data-hide")){var f=g.attr("href");g.attr("data-hide",f);}b(g.attr("data-hide")).hide();g.focus();return false;});b.fn.xeTabbable=function(){b(this).each(function(){var f=b(this);f.find(">.x_nav-tabs>li>a").each(function(g){b(this).attr("data-index",g+1);});f.find(">.x_tab-content>.x_tab-pane").each(function(g){b(this).attr("data-index",g+1);});});b('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide();};b(".x .x_tabbable").xeTabbable();b(document.body).on("click",'.x .x_nav-tabs>li>a[href*="#"]',function(){var f=b(this);if(f.parent("li").hasClass("x_disabled")){return false;}f.parent("li").addClass("x_active").siblings().removeClass("x_active");f.closest(".x_nav-tabs").next(".x_tab-content").find(">.x_tab-pane").eq(f.attr("data-index")-1).addClass("x_active").show().siblings(".x_tab-pane").removeClass("x_active").hide();b(this).parents(".x_tabbable").trigger("tab_change",[parseInt(b(this).attr("data-index"))-1,b(this)]);return false;});function a(){var h=b(".x>.body");var g=h.find(">.gnb");var f=h.children("#content.content");f.width("99.99%");setTimeout(function(){f.removeAttr("style");if(g.height()>f.height()){f.height(g.height());}},100);}b.fn.gnb=function(){var m=b(".x>.body");var j=m.find(">.gnb");var l=j.find(">ul>li");var h=new Date();h.setTime(h.getTime()+60*60*24*356);l.find(">a").prepend("");l.each(function(n){b(this).attr("data-index",n+1);});var k=l.find(">ul>li.active_").closest("li.active").attr("data-index");l.find(">ul>li.active_").clone().addClass("active").attr("data-index",k).prependTo("#gnbNav").find(">a").prepend("");l.find(">a").click(function(){var p=b(this).parent("li");var r=p.hasClass("open");var o=p.hasClass("active");var n=p.find(">ul").length>=1;var q=m.hasClass("wide");function s(){m.removeClass("wide");a();}if(!r&&!o&&n){p.addClass("open").find(">ul").slideDown(100);s();return false;}else{if(r&&!o&&n&&!q){p.removeClass("open").find(">ul").slideUp(100);s();return false;}else{if(q&&!n||o||q&&r){s();return false;}}}});j.find('>a[href="#gnbNav"]').click(function(){b(this).parent(".gnb").toggleClass("open");m.toggleClass("wide");if(b(window).width()<=980&&!j.hasClass("open")){b("#gnbNav").removeClass("ex");}a();if(b(this).parent(".gnb").hasClass("open")){setCookie("__xe_admin_gnb_status","open",h);}else{setCookie("__xe_admin_gnb_status","close",h);}return false;});j.find(".exMenu>button").click(function(){b("#gnbNav").toggleClass("ex");a();if(b("#gnbNav").hasClass("ex")){setCookie("__xe_admin_gnb_ex_status","open",h);}else{setCookie("__xe_admin_gnb_ex_status","close",h);}});var f=getCookie("__xe_admin_gnb_status");if(f){setCookie("__xe_admin_gnb_status",f,h);}var g=getCookie("__xe_admin_gnb_ex_status");if(g){setCookie("__xe_admin_gnb_xe_status",g,h);}};b(".gnb").gnb();b(".x #lang").mouseleave(function(){b(this).hide();}).focusout(function(){var f=b(this);setTimeout(function(){if(!f.find("a:focus").length){f.mouseleave();}},500);});b('.x th>input[type="checkbox"]').change(function(){var g=b(this),f=g.data("name");g.closest("table").find("input:checkbox").filter(function(){var h=b(this);return !h.prop("disabled")&&((h.attr("name")==f)||(h.data("name")==f));}).prop("checked",g.prop("checked")).end().end().trigger("update.checkbox",[f,this.checked]);});b(document.body).on("click",".x .x_pagination .x_disabled, .x .x_pagination .x_active",function(){return false;});if(b(".section").length>1){var d=b(".x .section").find(">h1:first");d.append('');b(".x .section.collapse>h1>.snToggle").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down");d.find(">.snToggle").click(function(){var g=b(this);var f=g.closest(".section");if(!f.hasClass("collapse")){f.addClass("collapse");g.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down");}else{f.removeClass("collapse");g.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up");}a();});}var e=b(".x .x_alert");e.prepend('');e.children(".x_close").click(function(){b(this).parent(".x_alert").hide();});b(".x .x_btn").click(function(){if(b(this).hasClass("x_disabled")){return false;}});b.fn.vr=function(){this.each(function(){var f=b(this);if(f.text()=="|"){f.addClass("vr").filter(":first-child, :last-child").remove();}});};b(".x i").vr();b.fn.labelMaker=function(){this.each(function(h){h=h+1;var k=b(this);var g="input, textarea, select";var f=":radio, :checkbox";var l="[id]";var j="i"+h;if(k.next(g).filter(l).not(f).length){k.attr("for",k.next().attr("id"));}else{if(k.next(g).not(l).not(f).length){k.attr("for",j).next().attr("id",j);}else{if(k.prev(f).filter(l).length){k.attr("for",k.prev().attr("id"));}else{if(k.prev(f).not(l).length){k.attr("for",j).prev().attr("id",j);}else{if(k.children(g).filter(l).length){k.attr("for",k.children(g).filter(l).eq(0).attr("id"));}else{if(k.children(g).not(l).length){k.attr("for",j).children(g).not(l).eq(0).attr("id",j);}}}}}}});};b("label:not([for])").labelMaker();b.fn.checkToggle=function(){function f(){setTimeout(function(){b(":checked").parent("label").addClass("checked");b(':not(":checked")').parent("label").removeClass("checked");},0);}this.change(f);f();};b(":radio, :checkbox").checkToggle();b.fn.fileTypeOverlap=function(){this.each(function(){var f=b(this);f.wrap('').before(f.attr("title"));});};b('input[type="file"].overlap').fileTypeOverlap();b.fn.xeMask=function(){this.each(function(){var f=b(this),h=f.text();var g=/^([\w\-\.]+?)@(([\w-]+\.)+[a-z]{2,})$/ig;if(g.test(h)){f.html(h.replace(/(@.+)$/,'...$1')).find(">.ellipsis").css({position:"absolute",zIndex:1}).hover(function(){b(this).next(".cover").mouseover();},function(){b(this).next(".cover").mouseout();}).end().find(">.cover").css({zIndex:2,opacity:0}).hover(function(){b(this).css("opacity",1).prev("span").css("visibility","hidden");},function(){b(this).css("opacity",0).prev("span").css("visibility","visible");}).end();}});};b(".masked").xeMask();b.fn.tableSpan=function(){this.each(function(){var g=b(this);var h=g.find(">thead>tr:eq(0)>th").length;var f=g.find(">tbody>tr:eq(0)>td:only-child");if(h!=f.attr("colspan")){f.attr("colspan",h).css("text-align","center");}});};b("table").tableSpan();});jQuery(function(a){var b=27;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 g=a(this),d,f,e;d=a(g.attr("href"));if(d.data("state")=="showing"){g.trigger("close.mw");}else{g.trigger("open.mw");}return false;}).bind("open.mw",function(){var j=a(this),e,h,f,d,g;e=a(j.attr("href"));if(!e.parent("body").length){h=a('');h.click(function(){e.data("anchor").trigger("close.mw");});e.find("[data-hide]").click(function(){e.data("anchor").trigger("close.mw");});a("body").append('
').append(e);e.prepend(h);}e.data("anchor",j);d=a.Event("before-open.mw");j.trigger(d);if(d.isDefaultPrevented()){return false;}e=a(j.attr("href"));g=j.data("duration")||"fast";e.data("state","showing");function k(){j.trigger("after-open.mw");}a(document).bind("keydown.mw",function(l){if(l.which==b){j.trigger("close.mw");return false;}});e.fadeIn(g,k).find("button.x_close:first").focus().end().prev(".x_modal-backdrop").show();a("body").css("overflow","hidden");}).bind("close.mw",function(){var g=a(this),d,e,f;d=a.Event("before-close.mw");g.trigger(d);if(d.isDefaultPrevented()){return false;}e=a(g.attr("href"));f=g.data("duration")||"fast";e.data("state","hiding");function h(){g.trigger("after-close.mw");}e.fadeOut(f,h).prev(".x_modal-backdrop").hide();a("body").css("overflow","auto");g.focus();});a("div.x_modal").addClass("x").hide();};a("a.modalAnchor").xeModalWindow();});jQuery(function(b){var a=false;var d=27;b.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var e=b(this);$layer=b(e.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(f){a=true;}).focusout(function(f){setTimeout(function(){if(!a&&!$layer.find(":focus").length&&$layer.data("state")=="showing"){e.trigger("close.tc");}a=false;},1);});}).click(function(){var f=b(this),e;e=b(f.attr("href"));e.data("anchor",f);if(e.data("state")=="showing"){f.trigger("close.tc");}else{f.trigger("open.tc");}return false;}).bind("open.tc",function(){var j=b(this),f,g,h;f=b(j.attr("href"));g=j.data("effect");h=j.data("duration")||"fast";f.data("state","showing");j.trigger("before-open.tc");a=false;b(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(l){if(l){if(l.type=="keydown"&&l.which!=d){return true;}if(l.type=="mousedown"){var m=b(l.target);if(m.is("html,.tgAnchor,.tgContent")||f.has(m).length){return true;}}}j.trigger("close.tc");return false;});function k(){j.trigger("after-open.tc");}switch(g){case"slide":f.slideDown(h,k);break;case"slide-h":var e=f.css({"overflow-x":"",width:""}).width();f.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:e},h,function(){f.css({"overflow-x":"",width:""});k();});break;case"fade":f.fadeIn(h,k);break;default:f.show();j.trigger("after-open.tc");}}).bind("close.tc",function(){var h=b(this),e,f,g;b(document).unbind("mousedown.tc keydown.tc");e=b(h.attr("href"));f=h.data("effect");g=h.data("duration")||"fast";e.data("state","hiding");h.trigger("before-close.tc");function j(){h.trigger("after-close.tc");}switch(f){case"slide":e.slideUp(g,j);break;case"slide-h":e.animate({width:0},g,function(){e.hide();j();});break;case"fade":e.fadeOut(g,j);break;default:e.hide();h.trigger("after-close.tc");}});return this;};b("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,b,e;d=a(this);b=a(d.attr("href")).find(">ul");e=d.prev("input:text").val();function f(j){var l,h=j.site_list,g,k;b.empty();d.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(j.error||!a.isArray(h)){d.trigger("close.tc");return;}for(g=0,k=h.length;g").appendTo(b);a('