mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 09:49:54 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11661 201d5d3c-b55e-5fd7-737f-ddc643e51545
41 lines
20 KiB
JavaScript
41 lines
20 KiB
JavaScript
jQuery(function(a){function e(){b.width("99.99%");setTimeout(function(){b.removeAttr("style")},0)}window.scrollTo(0,0);a(".x .skipNav>a").click(function(){a(a(this).attr("href")).attr("tabindex","0").css("outline","0").focus()});a(document.body).on("click",".x [data-toggle]",function(){var b=a(this),d=a(b.attr("data-toggle"));d.toggle();d.is(":visible")&&!d.find("a,input,button,textarea,select").length?d.attr("tabindex","0").focus():d.is(":visible")&&d.find("a,input,button,textarea,select").length?
|
|
d.find("a,input,button,textarea,select").eq(0).focus():b.focus();return!1});a(document.body).on("click",".x [data-show]",function(){a(a(this).attr("data-show")).show().attr("tabindex","0").focus();return!1});a(document.body).on("click",".x [data-hide]",function(){var b=a(this);a(b.attr("data-hide")).hide();b.focus();return!1});a('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide();a(document.body).on("click",'.x .x_nav-tabs>li>a[href^="#"]',function(){var b=a(this);b.parent("li").addClass("x_active").siblings().removeClass("x_active");
|
|
b.closest(".x_nav-tabs").next(".x_tab-content").find(b.attr("href")).addClass("x_active").show().siblings().removeClass("x_active").hide();return!1});var d=a(".x>.body"),b=d.children("#content.content"),f=d.find(">.gnb"),g=f.find(">ul>li");g.find("ul").prev("a").bind("click focus",function(){var b=a(this);g.not(b.parent("li")).removeClass("open");a(this).parent("li").toggleClass("open");d.removeClass("wide");e();return!1});f.find('>a[href="#gnbNav"]').click(function(){a(this).parent(".gnb").toggleClass("open");
|
|
d.toggleClass("wide");e();return!1});f.prepend('<button type="button" class="close before" />').append('<button type="button" class="close after" />');f.find(">.close").focus(function(){d.addClass("wide");e()});a('.x th>input[type="checkbox"]').change(function(){var b=a(this),d=b.data("name");b.closest("table").find("input:checkbox").filter(function(){var b=a(this);return!b.prop("disabled")&&(b.attr("name")==d||b.data("name")==d)}).prop("checked",b.prop("checked")).end().end().trigger("update.checkbox",
|
|
[d,this.checked])});a(document.body).on("click",".x .x_pagination .x_disabled, .x .x_pagination .x_active",function(){return!1});a(".x .section>h1").append('<button type="button" class="snToggle x_icon-chevron-up">Toggle this section</button>');a(".x .section>h1>.snToggle").click(function(){var b=a(this),d=b.closest(".section");d.hasClass("collapse")?(d.removeClass("collapse").children("h1:first").siblings().show(),b.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up")):(d.addClass("collapse").children("h1:first").siblings().hide(),
|
|
b.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"))});f=a(".x .x_alert");f.prepend('<button type="button" class="x_close">×</button>');f.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(".x i").each(function(){var b=a(this);"|"==b.text()&&b.addClass("vr")})});
|
|
jQuery(function(a){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 e=a(this);"showing"==a(e.attr("href")).data("state")?e.trigger("close.mw"):e.trigger("open.mw");return!1}).bind("open.mw",function(){var e=a(this),d,b;d=a(e.attr("href"));d.parent("body").length||(b=a('<button type="button" class="x_close">×</button>'),b.click(function(){d.data("anchor").trigger("close.mw")}),
|
|
d.find("[data-hide]").click(function(){d.data("anchor").trigger("close.mw")}),a("body").append('<div class="x_modal-backdrop"></div>').append(d),d.prepend(b));d.data("anchor",e);b=a.Event("before-open.mw");e.trigger(b);if(b.isDefaultPrevented())return!1;d=a(e.attr("href"));b=e.data("duration")||"fast";d.data("state","showing");a("html,body").addClass("modalContainer");a(document).bind("keydown.mw",function(b){if(27==b.which)return e.trigger("close.mw"),!1});d.fadeIn(b,function(){e.trigger("after-open.mw")}).find("button.x_close:first").focus();
|
|
a(".x_modal-backdrop").show()}).bind("close.mw",function(){var e=a(this),d,b;d=a.Event("before-close.mw");e.trigger(d);if(d.isDefaultPrevented())return!1;d=a(e.attr("href"));b=e.data("duration")||"fast";d.data("state","hiding");a("html,body").removeClass("modalContainer");d.fadeOut(b,function(){e.trigger("after-close.mw")});a(".x_modal-backdrop").hide();e.focus()});a("div.x_modal").addClass("x").hide()};a("a.modalAnchor").xeModalWindow()});
|
|
jQuery(function(a){var e=!1;a.fn.xeContentToggler=function(){this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var d=a(this);$layer=a(d.attr("href"));$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(){e=!0}).focusout(function(){setTimeout(function(){!e&&(!$layer.find(":focus").length&&"showing"==$layer.data("state"))&&d.trigger("close.tc");e=!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 d(){b.trigger("after-open.tc")}var b=a(this),f,g,h;f=a(b.attr("href"));g=b.data("effect");h=b.data("duration")||"fast";f.data("state","showing");b.trigger("before-open.tc");e=!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")||f.has(d).length)))return!0;
|
|
b.trigger("close.tc");return!1});switch(g){case "slide":f.slideDown(h,d);break;case "slide-h":g=f.css({"overflow-x":"",width:""}).width();f.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:g},h,function(){f.css({"overflow-x":"",width:""});d()});break;case "fade":f.fadeIn(h,d);break;default:f.show(),b.trigger("after-open.tc")}}).bind("close.tc",function(){function d(){b.trigger("after-close.tc")}var b=a(this),f,e,h;a(document).unbind("mousedown.tc keydown.tc");f=a(b.attr("href"));e=b.data("effect");
|
|
h=b.data("duration")||"fast";f.data("state","hiding");b.trigger("before-close.tc");switch(e){case "slide":f.slideUp(h,d);break;case "slide-h":f.animate({width:0},h,function(){f.hide();d()});break;case "fade":f.fadeOut(h,d);break;default:f.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 e,d,b;e=a(this);d=a(e.attr("href")).find(">ul");b=e.prev("input:text").val();a.exec_json("admin.getSiteAllList",{domain:b},function(b){var g=b.site_list,h,j;d.empty();e.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(b.error||!a.isArray(g))e.trigger("close.tc");else{h=0;for(j=g.length;h<
|
|
j;h++)b=a("<li />").appendTo(d),a('<button type="button" />').text(g[h].domain).data("site_srl",g[h].site_srl).appendTo(b)}})}).end().find(".tgContent.suggestion").delegate("button","click",function(){var e,d;e=a(this);d=e.closest(".modulefinder");d.find("a.tgAnchor.findsite").trigger("close.tc");a.exec_json("module.procModuleAdminGetList",{site_srl:e.data("site_srl")},function(b){var e=b.module_list,g;if(!b.error&&e){b=d.find(".moduleList").data("module_list",e).removeAttr("disabled").empty();for(g in e)e.hasOwnProperty(g)&&
|
|
a("<option />").attr("value",g).text(e[g].title).appendTo(b);b.prop("selectedIndex",0).change().focus();b.is(":visible")||b.slideDown(100,function(){d.find(".moduleIdList:not(:visible)").slideDown(100).trigger("show")}).trigger("show")}})}).end().find(".moduleList,.moduleIdList").hide().end().find(".moduleList").change(function(){var e,d,b;e=a(this);d=e.val();b=e.data("module_list");if(b[d]){b=b[d].list;e=e.closest(".modulefinder").find(".moduleIdList").removeAttr("disabled").empty();for(var f in b)b.hasOwnProperty(f)&&
|
|
a("<option />").attr("value",b[f].module_srl).text(b[f].browser_title).appendTo(e);e.prop("selectedIndex",0).change()}});return this};a(".modulefinder").xeModuleFinder()});
|
|
jQuery(function(a){_xeModuleSearch=function(){function e(b,a){var d;b.find("li div").width("");b.css("height","");b.css("overflow-y","");b.height()>a&&(d=b.find("li div"),d.width(d.width()-20+"px"),b.css("height",a+"px"),b.css("overflow-y","auto"))}function d(b){var d,f=RegExp(b,"ig"),g=q;l.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(b){return'<span class="highlight">'+b+"</span>"})}$li=a("<li />").appendTo(l);a("<a>").attr("href","#").html("<div>"+
|
|
d+'</div><span class="x_icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>').data("site_srl",g[i].site_srl).appendTo($li)}e(l,w-n.parent("DIV").height())}var b=this,f=a(this),g=f.find(".moduleSearchWindow"),h=g.find(".siteList"),j=g.find(".moduleTypeList"),k=g.find(".moduleInstanceList"),l=h.find("UL"),p=j.find("UL"),m=k.find("SELECT"),n=g.find("INPUT.siteListSearchInput"),q,w=280;n.keyup(function(){d(n.val())});"undefined"==typeof console&&(console=
|
|
{log:function(){}});f.not(".xe-module-search").addClass("xe-module-search").find("a.tgAnchor.moduleSearch").bind("before-open.tc",function(){var b;b=a(this);l.empty();m.empty();j.hide();k.hide();a.exec_json("admin.getSiteAllList",{domain:""},function(e){var f=e.site_list;e.error||!a.isArray(f)?b.trigger("close.tc"):(q=f,d(n.val()),n.focus())})}).end().find(".tgContent .siteListUL").delegate("a","click",function(b){var d;d=a(this);d.closest(".modulefinder");p.empty();k.hide();a.exec_json("module.procModuleAdminGetList",
|
|
{site_srl:d.data("site_srl")},function(b){var f=b.module_list,u;if(!b.error&&f){for(u in f)f.hasOwnProperty(u)&&($li=a("<li />").appendTo(p),a("<a>").attr("href","#").html("<div>"+f[u].title+'</div><span class="x_icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>').data("moduleInstanceList",f[u].list).appendTo($li));g.find(".moduleTypeList").show();e(p,w);l.find("li").removeClass("on");d.parent("li").addClass("on")}});b.preventDefault()}).end().find(".moduleTypeListUL").delegate("a",
|
|
"click",function(d){var f,g;f=a(this);if(g=f.data("moduleInstanceList")){b.sSelectedModuleType=f.text();m.empty();for(var h in g)g.hasOwnProperty(h)&&($li=a("<option />").html(g[h].browser_title).appendTo(m).val(g[h].module_srl).data("mid",g[h].module_srl).data("module_srl",g[h].module_srl).data("layout_srl",g[h].layout_srl).data("browser_title",g[h].browser_title));k.show();e(m,w);p.find("li").removeClass("on");f.parent("li").addClass("on");d.preventDefault()}}).end().find(".moduleSearch_ok").click(function(d){var e=
|
|
[];f.find(".moduleInstanceListSelect option:selected").each(function(){e.push({type:b.sSelectedModuleType,module_srl:a(this).data("module_srl"),layout_srl:a(this).data("layout_srl"),browser_title:a(this).data("browser_title")})});f.trigger("moduleSelect",[e]);a(".tgAnchor.moduleSearch").trigger("close.tc");d.preventDefault()});return this};a.fn.xeModuleSearch=function(){a(this).each(_xeModuleSearch)};a(".moduleSearch").xeModuleSearch()});
|
|
jQuery(function(a){function e(b,a){for(var d=0,e=0;b&&b!=a;)d+=b.offsetTop,e+=b.offsetLeft,b=b.offsetParent;return{top:d,left:e}}var d=a('<tr class="placeholder"><td> </td></tr>');a.fn.xeSortableTable=function(){this.not(".xe-sortable-table").addClass("xe-sortable-table").delegate("button.dragBtn","mousedown.st",function(b){var f,g,h,j,k,l,p,m,n,q;if(1==b.which){g=a(this);h=g.closest("tr");j=g.closest("table");q=j.get(0).offsetParent;g=h.height();k=h.width();before_event=a.Event("before-drag.st");
|
|
j.trigger(before_event);if(before_event.isDefaultPrevented())return!1;f=b.pageY;l=e(h.get(0),q);$clone=h.attr("target",!0).clone(!0).appendTo(j);n=(b=j.find("thead th")).length;b.filter("[colspan]").attr("colspan",function(b,a){n+=a-1});d.find("td").attr("colspan",n);p=[];j.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),d;d=e(this,q);p.push({top:d.top,bottom:d.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:k,height:g,
|
|
left:l.left,top:l.top,zIndex:100});d.css({position:"absolute",opacity:0.6,width:k,height:"10px",left:l.left,top:l.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(j);h.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(b){var a,e,g;m=null;b=l.top-(f-b.pageY);a=0;for(e=p.length;a<e;a++)g=p[a],a&&g.top>b||a<e-1&&g.bottom<b||(m={element:g.$item},g.top>b-12?(m.state="before",d.css("top",g.top-5)):(m.state="after",d.css("top",g.bottom-5)));$clone.css({top:b})}).bind("mouseup.st",
|
|
function(){var b;a(document).unbind("mousemove.st mouseup.st");h.removeAttr("target").css("opacity","");$clone.remove();d.remove();m&&(b=a(m.element),b[m.state](h),j.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable();jQuery(function(b){b(".filebox").bind("before-open.mw",function(){function a(f){e.html(f.html);e.find(".select").bind("click",function(){var a=b("input.select_checkbox:checked");0==a.length?(a=b(this).closest("tr").find("img.filebox_item").attr("src"))?
|
|
(d.trigger("filebox.selected",[a]),d.trigger("close.mw")):alert("None selected!"):(d.trigger("filebox.selected",[a]),d.trigger("close.mw"));return!1});e.find(".x_pagination").find("a").filter(function(){return b(this).data("toggle")||b(this).parent().hasClass("x_disabled")||b(this).parent().hasClass("x_active")?!1:!0}).bind("click",function(){var d=b(this).attr("page");b.exec_json("module.getFileBoxListHtml",{page:d},a);return!1});b("#goToFileBox").find("button").bind("click",function(){var d=b(this).prev("input").val();
|
|
b.exec_json("module.getFileBoxListHtml",{page:d},a);return!1});e.closest(".x_modal-body").scrollTop(0)}var d,e,f;d=b(this);f=d.attr("href");e=b(f).find(".filebox_list");b.exec_json("module.getFileBoxListHtml",{page:"1"},a)});var a=b(".x .dsTg .__simple"),d=b(".x .dsTg .__detail");b(".x .dsTg td.title").each(function(){var a=b(this);0==a.find("p.update").length?a.addClass("tg").find(">*:not(:first-child)").hide():a.addClass("up")});var e=b(".x .dsTg td.tg>*:not(:first-child)");a.click(function(){e.slideUp(200);
|
|
d.removeClass("x_active");a.addClass("x_active")});d.click(function(){e.slideDown(200);d.addClass("x_active");a.removeClass("x_active")});var j=b('.vLang[type="hidden"]'),k=b(".lang_code");(j.length||k.length)&&b.exec_json("module.getModuleAdminMultilingualHtml",{},function(a){function d(a,e,f){a=b("#lang_"+a.closest(".x_modal").data("lang-target"));a.width(135).attr("disabled","disabled").val(f).parent(".g11n").addClass("active");a.siblings("#"+a.data("lang-id")).val("$user_lang->"+e);t=!1;a.siblings('[href="#g11n"]').trigger("close.mw")}
|
|
function e(a,g,h){a||(a=1);g||(g="");h||(h="");b.exec_json("module.getModuleAdminLangListHtml",{page:a,search_keyword:g,name:h},function(a){a&&a.html&&(b("#lang_search").html(a.html),b("#lang_search .x_pagination a").click(function(){var a=b(this).data("page"),d=b(this).data("search_keyword");if(a)return e(a,d),!1}),b("#lang_search .x_pagination").submit(function(){var a=b(this).find('[name="page"]').val(),d=b(this).data("search_keyword");if(!a)return!1;e(a,d);return!1}),b("#lang_search .search").submit(function(){var a=
|
|
b(this).find('[name="search_keyword"]').val();e(1,a);return!1}),b("#lang_search #search_cancel").click(function(){e(1,"")}),b("#lang_search").find('[href^="#lang-"]').append('<i class="x_icon-chevron-down"></i>').click(function(){function a(e){b(d.attr("href")+" textarea").each(function(){var a=b(this),d=e.langs[a.data("lang")];/^\$user_lang->/.test(d)?a.val("").data("value",""):a.val(d).data("value",d)});d.data("is_loaded",!0)}var d=b(this),e=d.data("lang_code");f();d.next("fieldset").is(":visible")?
|
|
d.children("i").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"):(d.children("i").removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up"),d.parent(".item").siblings(".item").find("a > i").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down").end().children("fieldset").hide());d.data("is_loaded")||b.exec_json("module.getModuleAdminLangCode",{name:e},a)}),h&&b("#lang_search").find('[href^="#lang-"]').trigger("click"),b("#lang_search").find(".modify").click(function(){b(this).closest("fieldset").addClass("editMode").find("textarea").removeAttr("disabled")}),
|
|
b("#lang_search").find(".cancel").click(function(){b(this).closest("fieldset").removeClass("editMode").find("textarea").attr("disabled","disabled").each(function(){var a=b(this);a.val(a.data("value"))});return!1}),b("#lang_search").find(".item").submit(function(){var a=b(this),d=a.find(".editMode").children("textarea"),e=a.find('[href^="#lang-"]'),f={},g=null;d.each(function(){var a=b(this);f[a.attr("class")]=a.val();a.data("tmp_value",a.val());xe.current_lang==a.attr("class")&&(g=a.val())});f.lang_name=
|
|
e.data("lang_code");b.exec_json("module.procModuleAdminInsertLang",f,function(f){f&&(!f.error&&f.name)&&(d.each(function(){var a=b(this);a.data("value",a.data("tmp_value"))}),e.children("span").html(g),b("#lang_search").find(".cancel").trigger("click"),a.find(".useit").trigger("click"))});return!1}),b("#lang_search").find(".useit").click(function(){var a=b(this),e=a.closest(".item").find('[href^="#lang-"]'),f=e.data("lang_code"),e=e.children("span").text();d(a,f,e)}))})}function f(){if(s.is(":visible")&&
|
|
s.find(".editMode").length){var b=s.find("form.item");confirm(xe.msg_confirm_save_and_use_multilingual)?b.find(".save").trigger("click").end().find("textarea").attr("disabled","disabled"):b.find(".cancel").trigger("click")}return!0}b(".x #content").append(a.html);var g=0;j.each(function(){var a=b(this);a.removeClass("vLang").addClass("lang_code");a.parent().find(".editUserLang").remove()});k=b(".lang_code");k.each(function(){var a=b(this),d=a.attr("id");d||(d="__lang_code_"+g,g++,a.attr("id",d));
|
|
var e="TEXTAREA"==this.tagName||a.next("textarea.vLang").length?b('<textarea id="lang_'+d+'" class="displayInput" style="width:179px">').data("lang-id",d):b('<input type="text" id="lang_'+d+'" class="displayInput" style="width:179px">').data("lang-id",d),f=b('<button type="button" class="x_add-on remover" title="Remove Multilingual Text"><i class="x_icon-remove"></i> Remove Multilingual Text</button>').data("lang-target",d),d=b('<a href="#g11n" class="x_add-on modalAnchor" title="Set Multilungual Text"><i class="x_icon-globe"></i> Set Multilingual Text</a>').data("lang-target",
|
|
d);a.parent().addClass("g11n").addClass("x_input-append");a.after(e,f,d);a.parent().find(".vLang").remove();a.hide();d.xeModalWindow();var h=a;e.keydown(function(){a=b(this);a.closest(".g11n").hasClass("active")||h.val(a.val())});e.val(h.val());if(/^\$user_lang->/.test(e.val())){b.exec_json("module.getModuleAdminLangCode",{name:e.val().replace("$user_lang->","")},j);var j=function(b){b&&b.langs&&(e.closest(".g11n").addClass("active"),e.val(b.langs[xe.current_lang]).attr("disabled","disabled").width(135))}}});
|
|
var a=b(".x .g11n"),h=a.children(".modalAnchor"),v=b(".x #g11n"),r=v.find("#lang_create"),s=v.find("#lang_search"),t=!1;r.find(".editMode textarea").change(function(){t=!0});r.submit(function(){var a=b(this),e={},f=null;a.find(".editMode").children("textarea").each(function(){var a=b(this);e[a.attr("class")]=a.val();xe.current_lang==a.attr("class")&&(f=a.val())});if(!f)return alert(xe.msg_empty_multilingual),!1;b.exec_json("module.procModuleAdminInsertLang",e,function(b){b&&(!b.error&&b.name)&&d(a,
|
|
b.name,f)});return!1});a.children(".remover").click(function(){var a=b(this);b("#lang_"+a.data("lang-target")).val("").removeAttr("disabled").width(179).parent(".g11n").removeClass("active");a.siblings(".lang_code").val("")});h.bind("before-close.mw",function(){r.is(":visible")&&t&&confirm(xe.msg_confirm_save_and_use_multilingual)&&r.find(".save-useit").trigger("click");if(!f())return!1;s.find(".item > fieldset").hide().prev("a").children("i").removeClass("x_icon-chevrom-up").addClass("x_icon-chevron-down");
|
|
v.find('[href="#lang_create"]').trigger("click");r.find(".editMode").children("textarea").val("");t=!1});h.bind("open.mw",function(){var a=b(this),d=a.siblings(".displayInput");a.closest(".g11n").hasClass("active")?(e(1,"",d.prev(".lang_code").val().replace("$user_lang->","")),b(a.attr("href")).find('[href="#lang_search"]').trigger("click")):e();b(a.attr("href")).data("lang-target",a.data("lang-target"))})})})});
|