mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11610 201d5d3c-b55e-5fd7-737f-ddc643e51545
31 lines
14 KiB
JavaScript
31 lines
14 KiB
JavaScript
jQuery(function(a){function e(){b.width("99.99%");setTimeout(function(){b.removeAttr("style")},0)}window.top.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(".x .x_nav-tabs").find('>li>a[href^="#"]').click(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.find(">.content"),f=d.find(">.gnb"),g=f.find(">ul>li");a(window).resize(function(){setTimeout(function(){980>=a(window).width()||1240<a(window).width()?d.removeClass("wide"):d.addClass("wide")},100)}).resize();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");
|
|
f.trigger("mouseenter");return!1});f.mouseenter(function(){980<=a(window).width()&&(d.removeClass("wide"),e())}).mouseleave(function(){980<=a(window).width()&&1240>a(window).width()&&(d.addClass("wide"),e())});f.find('>a[href="#gnbNav"]').click(function(){a(this).parent(".gnb").toggleClass("open");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"))});var h=a(".x .x_alert");h.prepend('<button type="button" class="x_close">×</button>');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(".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(a){if(27==a.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("a.modalAnchor").xeModalWindow();a("div.x_modal").addClass("x").hide()});
|
|
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(a,b){var d;a.find("li div").width("");a.css("height","");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 d(b){var d,f=RegExp(b,"ig"),g=q;k.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'<span class="highlight">'+a+"</span>"})}$li=a("<li />").appendTo(k);a("<a>").attr("href","#").html("<div>"+
|
|
d+'</div><span class="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(k,r-m.parent("DIV").height())}var b=this,f=a(this),g=f.find(".moduleSearchWindow"),h=g.find(".siteList"),j=g.find(".moduleTypeList"),p=g.find(".moduleInstanceList"),k=h.find("UL"),n=j.find("UL"),l=p.find("SELECT"),m=g.find("INPUT.siteListSearchInput"),q,r=280;m.keyup(function(){d(m.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);k.empty();l.empty();j.hide();p.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(m.val()),m.focus())})}).end().find(".tgContent .siteListUL").delegate("a","click",function(b){var d;d=a(this);d.closest(".modulefinder");n.empty();p.hide();a.exec_json("module.procModuleAdminGetList",
|
|
{site_srl:d.data("site_srl")},function(b){var f=b.module_list,h;if(!b.error&&f){for(h in f)f.hasOwnProperty(h)&&($li=a("<li />").appendTo(n),a("<a>").attr("href","#").html("<div>"+f[h].title+'</div><span class="icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>').data("moduleInstanceList",f[h].list).appendTo($li));g.find(".moduleTypeList").show();e(n,r);k.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();l.empty();for(var h in g)g.hasOwnProperty(h)&&($li=a("<option />").html(g[h].browser_title).appendTo(l).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));p.show();e(l,r);n.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,p,k,n,l,m,q;if(1==b.which){g=a(this);h=g.closest("tr");j=g.closest("table");q=j.get(0).offsetParent;g=h.height();p=h.width();before_event=a.Event("before-drag.st");
|
|
j.trigger(before_event);if(before_event.isDefaultPrevented())return!1;f=b.pageY;k=e(h.get(0),q);$clone=h.attr("target",!0).clone(!0).appendTo(j);m=(b=j.find("thead th")).length;b.filter("[colspan]").attr("colspan",function(b,a){m+=a-1});d.find("td").attr("colspan",m);n=[];j.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),d;d=e(this,q);n.push({top:d.top,bottom:d.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:p,height:g,
|
|
left:k.left,top:k.top,zIndex:100});d.css({position:"absolute",opacity:0.6,width:p,height:"10px",left:k.left,top:k.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;l=null;b=k.top-(f-b.pageY);a=0;for(e=n.length;a<e;a++)g=n[a],a&&g.top>b||a<e-1&&g.bottom<b||(l={element:g.$item},g.top>b-12?(l.state="before",d.css("top",g.top-5)):(l.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();l&&(b=a(l.element),b[l.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")})})});
|