mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
retouch multilingual
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11908 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
fe53b778af
commit
fd7dc90dac
2 changed files with 42 additions and 37 deletions
|
|
@ -1570,6 +1570,7 @@ jQuery(function($){
|
|||
});
|
||||
|
||||
// load value
|
||||
function loadValue(){
|
||||
$displayInput.val($hiddenInput.val());
|
||||
var pattern = /^\$user_lang->/;
|
||||
if(pattern.test($displayInput.val())){
|
||||
|
|
@ -1584,6 +1585,10 @@ jQuery(function($){
|
|||
}
|
||||
}
|
||||
|
||||
$this.bind('reload-multilingual', loadValue);
|
||||
loadValue();
|
||||
}
|
||||
|
||||
if($('#g11n').length){
|
||||
makeUI();
|
||||
}else{
|
||||
|
|
|
|||
56
modules/admin/tpl/js/admin.min.js
vendored
56
modules/admin/tpl/js/admin.min.js
vendored
|
|
@ -3,8 +3,8 @@ function doUpdateModule(a){var e=[];e.module_name=a;exec_xml("install","procInst
|
|||
jQuery(function(a){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").not(":disabled").focus():d.is(":visible")&&d.find("a,input,button,textarea,select").length?d.find("a,input,button,textarea,select").not(":disabled").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.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);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().removeClass("x_active").hide();a(this).parents(".x_tabbable").trigger("tab_change",[parseInt(a(this).attr("data-index"))-
|
||||
1,a(this)]);return!1});a.fn.gnb=function(){function b(){e.width("99.99%");setTimeout(function(){e.removeAttr("style");g.height()>e.height()&&e.height(g.height())},100)}var d=a(".x>.xin>.body"),e=d.children("#content.content"),g=d.find(">.gnb"),f=g.find(">ul>li");f.find("a").prepend("<i />");f.each(function(b){a(this).attr("data-index",b+1)});var k=f.find(">ul>li.active_").closest("li.active").attr("data-index");f.find(">ul>li.active_").clone().addClass("active").attr("data-index",k).prependTo("#gnbNav");
|
||||
f.find("ul").prev("a").bind("click focus",function(){a(this).parent("li").addClass("open").siblings("li").removeClass("open");d.removeClass("wide");b();return!1});g.find('>a[href="#gnbNav"]').click(function(){a(this).parent(".gnb").toggleClass("open");d.toggleClass("wide");b();return!1});g.prepend('<button type="button" class="close before" />').append('<button type="button" class="close after" />');g.find(">.close").focus(function(){d.addClass("wide");b()})};a(".gnb").gnb();a(".x #lang").mouseleave(function(){a(this).hide()}).focusout(function(){var b=
|
||||
1,a(this)]);return!1});a.fn.gnb=function(){function b(){e.width("99.99%");setTimeout(function(){e.removeAttr("style");f.height()>e.height()&&e.height(f.height())},100)}var d=a(".x>.xin>.body"),e=d.children("#content.content"),f=d.find(">.gnb"),g=f.find(">ul>li");g.find("a").prepend("<i />");g.each(function(b){a(this).attr("data-index",b+1)});var k=g.find(">ul>li.active_").closest("li.active").attr("data-index");g.find(">ul>li.active_").clone().addClass("active").attr("data-index",k).prependTo("#gnbNav");
|
||||
g.find("ul").prev("a").bind("click focus",function(){a(this).parent("li").addClass("open").siblings("li").removeClass("open");d.removeClass("wide");b();return!1});f.find('>a[href="#gnbNav"]').click(function(){a(this).parent(".gnb").toggleClass("open");d.toggleClass("wide");b();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");b()})};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()},0)});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});
|
||||
var e=a(".x .section").find(">h1:first");e.append('<button type="button" class="snToggle x_icon-chevron-up">Toggle this section</button>');a(".x .section.collapse>h1>.snToggle").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down");e.find(">.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"));reflow()});e=a(".x .x_alert");e.prepend('<button type="button" class="x_close">×</button>');e.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){var b=
|
||||
|
|
@ -17,42 +17,42 @@ jQuery(function(a){a.fn.xeModalWindow=function(){this.not(".xe-modal-window").ad
|
|||
a("body").append('<div class="x_modal-backdrop"></div>').append(b),b.prepend(d));b.data("anchor",e);d=a.Event("before-open.mw");e.trigger(d);if(d.isDefaultPrevented())return!1;b=a(e.attr("href"));d=e.data("duration")||"fast";b.data("state","showing");a(document).bind("keydown.mw",function(a){if(27==a.which)return e.trigger("close.mw"),!1});b.fadeIn(d,function(){e.trigger("after-open.mw")}).find("button.x_close:first").focus().end().prev(".x_modal-backdrop").show();a("body").css("overflow","hidden")}).bind("close.mw",
|
||||
function(){var e=a(this),b,d;b=a.Event("before-close.mw");e.trigger(b);if(b.isDefaultPrevented())return!1;b=a(e.attr("href"));d=e.data("duration")||"fast";b.data("state","hiding");b.fadeOut(d,function(){e.trigger("after-close.mw")}).prev(".x_modal-backdrop").hide();a("body").css("overflow","auto");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 b=a(this);$layer=a(b.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"))&&b.trigger("close.tc");e=!1},1)})}).click(function(){var b=a(this),d;d=a(b.attr("href"));d.data("anchor",b);"showing"==
|
||||
d.data("state")?b.trigger("close.tc"):b.trigger("open.tc");return!1}).bind("open.tc",function(){function b(){d.trigger("after-open.tc")}var d=a(this),h,g,f;h=a(d.attr("href"));g=d.data("effect");f=d.data("duration")||"fast";h.data("state","showing");d.trigger("before-open.tc");e=!1;a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(b){if(b&&("keydown"==b.type&&27!=b.which||"mousedown"==b.type&&(b=a(b.target),b.is("html,.tgAnchor,.tgContent")||h.has(b).length)))return!0;
|
||||
d.trigger("close.tc");return!1});switch(g){case "slide":h.slideDown(f,b);break;case "slide-h":g=h.css({"overflow-x":"",width:""}).width();h.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:g},f,function(){h.css({"overflow-x":"",width:""});b()});break;case "fade":h.fadeIn(f,b);break;default:h.show(),d.trigger("after-open.tc")}}).bind("close.tc",function(){function b(){d.trigger("after-close.tc")}var d=a(this),e,g,f;a(document).unbind("mousedown.tc keydown.tc");e=a(d.attr("href"));g=d.data("effect");
|
||||
f=d.data("duration")||"fast";e.data("state","hiding");d.trigger("before-close.tc");switch(g){case "slide":e.slideUp(f,b);break;case "slide-h":e.animate({width:0},f,function(){e.hide();b()});break;case "fade":e.fadeOut(f,b);break;default:e.hide(),d.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,b,d;e=a(this);b=a(e.attr("href")).find(">ul");d=e.prev("input:text").val();a.exec_json("admin.getSiteAllList",{domain:d},function(d){var g=d.site_list,f,k;b.empty();e.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(d.error||!a.isArray(g))e.trigger("close.tc");else{f=0;for(k=g.length;f<
|
||||
k;f++)d=a("<li />").appendTo(b),a('<button type="button" />').text(g[f].domain).data("site_srl",g[f].site_srl).appendTo(d)}})}).end().find(".tgContent.suggestion").delegate("button","click",function(){var e,b;e=a(this);b=e.closest(".modulefinder");b.find("a.tgAnchor.findsite").trigger("close.tc");a.exec_json("module.procModuleAdminGetList",{site_srl:e.data("site_srl")},function(d){var e=d.module_list,g;if(!d.error&&e){d=b.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(d);d.prop("selectedIndex",0).change().focus();d.is(":visible")||d.slideDown(100,function(){b.find(".moduleIdList:not(:visible)").slideDown(100).trigger("show")}).trigger("show")}})}).end().find(".moduleList,.moduleIdList").hide().end().find(".moduleList").change(function(){var e,b,d;e=a(this);b=e.val();d=e.data("module_list");if(d[b]){d=d[b].list;e=e.closest(".modulefinder").find(".moduleIdList").removeAttr("disabled").empty();for(var h in d)d.hasOwnProperty(h)&&
|
||||
d.data("state")?b.trigger("close.tc"):b.trigger("open.tc");return!1}).bind("open.tc",function(){function b(){d.trigger("after-open.tc")}var d=a(this),h,f,g;h=a(d.attr("href"));f=d.data("effect");g=d.data("duration")||"fast";h.data("state","showing");d.trigger("before-open.tc");e=!1;a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(b){if(b&&("keydown"==b.type&&27!=b.which||"mousedown"==b.type&&(b=a(b.target),b.is("html,.tgAnchor,.tgContent")||h.has(b).length)))return!0;
|
||||
d.trigger("close.tc");return!1});switch(f){case "slide":h.slideDown(g,b);break;case "slide-h":f=h.css({"overflow-x":"",width:""}).width();h.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:f},g,function(){h.css({"overflow-x":"",width:""});b()});break;case "fade":h.fadeIn(g,b);break;default:h.show(),d.trigger("after-open.tc")}}).bind("close.tc",function(){function b(){d.trigger("after-close.tc")}var d=a(this),e,f,g;a(document).unbind("mousedown.tc keydown.tc");e=a(d.attr("href"));f=d.data("effect");
|
||||
g=d.data("duration")||"fast";e.data("state","hiding");d.trigger("before-close.tc");switch(f){case "slide":e.slideUp(g,b);break;case "slide-h":e.animate({width:0},g,function(){e.hide();b()});break;case "fade":e.fadeOut(g,b);break;default:e.hide(),d.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,b,d;e=a(this);b=a(e.attr("href")).find(">ul");d=e.prev("input:text").val();a.exec_json("admin.getSiteAllList",{domain:d},function(d){var f=d.site_list,g,k;b.empty();e.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(d.error||!a.isArray(f))e.trigger("close.tc");else{g=0;for(k=f.length;g<
|
||||
k;g++)d=a("<li />").appendTo(b),a('<button type="button" />').text(f[g].domain).data("site_srl",f[g].site_srl).appendTo(d)}})}).end().find(".tgContent.suggestion").delegate("button","click",function(){var e,b;e=a(this);b=e.closest(".modulefinder");b.find("a.tgAnchor.findsite").trigger("close.tc");a.exec_json("module.procModuleAdminGetList",{site_srl:e.data("site_srl")},function(d){var e=d.module_list,f;if(!d.error&&e){d=b.find(".moduleList").data("module_list",e).removeAttr("disabled").empty();for(f in e)e.hasOwnProperty(f)&&
|
||||
a("<option />").attr("value",f).text(e[f].title).appendTo(d);d.prop("selectedIndex",0).change().focus();d.is(":visible")||d.slideDown(100,function(){b.find(".moduleIdList:not(:visible)").slideDown(100).trigger("show")}).trigger("show")}})}).end().find(".moduleList,.moduleIdList").hide().end().find(".moduleList").change(function(){var e,b,d;e=a(this);b=e.val();d=e.data("module_list");if(d[b]){d=d[b].list;e=e.closest(".modulefinder").find(".moduleIdList").removeAttr("disabled").empty();for(var h in d)d.hasOwnProperty(h)&&
|
||||
a("<option />").attr("value",d[h].module_srl).text(d[h].browser_title).appendTo(e);e.prop("selectedIndex",0).change()}});return this};a(".modulefinder").xeModuleFinder()});
|
||||
jQuery(function(a){var e=0;_xeModuleSearch=function(){var b=this,d=a(this),h=d.data("multiple");h||(h="");var g="__module_searcher_"+e;e++;a.exec_json("module.getModuleAdminModuleSearcherHtml",{id:g,is_multiple:h},function(e){function h(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,e=RegExp(b,"ig"),f=u;m.empty();i=0;for(c=f.length;i<
|
||||
c;i++){d=f[i].domain;if(b){if(!d.match(e))continue;d=d.replace(e,function(a){return'<span class="highlight">'+a+"</span>"})}$li=a("<li />").appendTo(m);a("<a>").attr("href","#").html(d).data("site_srl",f[i].site_srl).appendTo($li)}h(m,t-q.parent("div").height())}if(e&&e.html){d.after(e.html).addClass("tgAnchor").attr("href","#"+g).xeContentToggler();var l=d.next(".moduleWindow"),e=l.find(".siteList"),n=l.find(".moduleList"),p=l.find(".instanceList"),m=e.find(">ul"),s=n.find(">ul"),r=p.find(">select"),
|
||||
q=l.find("input.siteFinder"),u,t=280;q.keyup(function(){j(q.val())});"undefined"==typeof console&&(console={log:function(){}});d.not(".xe-module-search").addClass("xe-module-search").parent().find("a.moduleTrigger").bind("before-open.tc",function(){var b;b=a(this);m.empty();r.empty();n.hide();p.hide();a.exec_json("admin.getSiteAllList",{domain:""},function(d){var e=d.site_list;d.error||!a.isArray(e)?b.trigger("close.tc"):(u=e,j(q.val()),q.focus())})});l.find(".siteList>ul").delegate("a","click",function(b){var d;
|
||||
d=a(this);d.closest(".moduleSearch");s.empty();p.hide();a.exec_json("module.procModuleAdminGetList",{site_srl:d.data("site_srl")},function(b){var e=b.module_list,f;if(!b.error&&e){for(f in e)e.hasOwnProperty(f)&&($li=a("<li />").appendTo(s),a("<a>").attr("href","#").html(e[f].title).data("moduleInstanceList",e[f].list).appendTo($li));l.find(".moduleList").show();h(s,t);m.find("li").removeClass("x_active");d.parent("li").addClass("x_active")}});b.preventDefault()}).end().find(".moduleList>ul").delegate("a",
|
||||
jQuery(function(a){var e=0;_xeModuleSearch=function(){var b=this,d=a(this),h=d.data("multiple");h||(h="");var f="__module_searcher_"+e;e++;a.exec_json("module.getModuleAdminModuleSearcherHtml",{id:f,is_multiple:h},function(e){function h(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,e=RegExp(b,"ig"),f=u;n.empty();i=0;for(c=f.length;i<
|
||||
c;i++){d=f[i].domain;if(b){if(!d.match(e))continue;d=d.replace(e,function(a){return'<span class="highlight">'+a+"</span>"})}$li=a("<li />").appendTo(n);a("<a>").attr("href","#").html(d).data("site_srl",f[i].site_srl).appendTo($li)}h(n,t-q.parent("div").height())}if(e&&e.html){d.after(e.html).addClass("tgAnchor").attr("href","#"+f).xeContentToggler();var l=d.next(".moduleWindow"),e=l.find(".siteList"),m=l.find(".moduleList"),p=l.find(".instanceList"),n=e.find(">ul"),s=m.find(">ul"),r=p.find(">select"),
|
||||
q=l.find("input.siteFinder"),u,t=280;q.keyup(function(){j(q.val())});"undefined"==typeof console&&(console={log:function(){}});d.not(".xe-module-search").addClass("xe-module-search").parent().find("a.moduleTrigger").bind("before-open.tc",function(){var b;b=a(this);n.empty();r.empty();m.hide();p.hide();a.exec_json("admin.getSiteAllList",{domain:""},function(d){var e=d.site_list;d.error||!a.isArray(e)?b.trigger("close.tc"):(u=e,j(q.val()),q.focus())})});l.find(".siteList>ul").delegate("a","click",function(b){var d;
|
||||
d=a(this);d.closest(".moduleSearch");s.empty();p.hide();a.exec_json("module.procModuleAdminGetList",{site_srl:d.data("site_srl")},function(b){var e=b.module_list,f;if(!b.error&&e){for(f in e)e.hasOwnProperty(f)&&($li=a("<li />").appendTo(s),a("<a>").attr("href","#").html(e[f].title).data("moduleInstanceList",e[f].list).appendTo($li));l.find(".moduleList").show();h(s,t);n.find("li").removeClass("x_active");d.parent("li").addClass("x_active")}});b.preventDefault()}).end().find(".moduleList>ul").delegate("a",
|
||||
"click",function(d){var e,f;e=a(this);if(f=e.data("moduleInstanceList")){b.sSelectedModuleType=e.text();r.empty();for(var g in f)f.hasOwnProperty(g)&&($li=a("<option />").html(f[g].browser_title+" ("+f[g].mid+")").appendTo(r).val(f[g].module_srl).data("mid",f[g].mid).data("module_srl",f[g].module_srl).data("layout_srl",f[g].layout_srl).data("browser_title",f[g].browser_title));p.show();h(r,t);s.find("li").removeClass("x_active");e.parent("li").addClass("x_active");d.preventDefault()}}).end().find(".moduleSearch_ok").click(function(e){var f=
|
||||
[];r.find("option:selected").each(function(){f.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"),mid:a(this).data("mid")})});d.trigger("moduleSelect",[f]);a("a.moduleTrigger").trigger("close.tc");e.preventDefault()})}});return this};a.fn.xeModuleSearch=function(){a(this).each(_xeModuleSearch)};a(".moduleTrigger").xeModuleSearch();a.fn.xeModuleSearchHtml=function(){var b=0;a(this).each(function(){var d=
|
||||
a(this),e=d.attr("id");e||(e="__module_search_"+b);b++;var e=a('<a class="x_btn moduleTrigger">'+xe.cmd_find+"</a>"),g=a('<input type="text" readonly>');d.after(e).after(" ").after(g).hide();e.xeModuleSearch();e.bind("moduleSelect",function(a,b){g.val(b[0].browser_title+" ("+b[0].mid+")");d.val(b[0].module_srl)});d.val()&&a.exec_json("module.getModuleAdminModuleInfo",{module_srl:d.val()},function(a){a&&a.module_info&&g.val(a.module_info.browser_title+" ("+a.module_info.mid+")")})});return this};
|
||||
a(this),e=d.attr("id");e||(e="__module_search_"+b);b++;var e=a('<a class="x_btn moduleTrigger">'+xe.cmd_find+"</a>"),f=a('<input type="text" readonly>');d.after(e).after(" ").after(f).hide();e.xeModuleSearch();e.bind("moduleSelect",function(a,b){f.val(b[0].browser_title+" ("+b[0].mid+")");d.val(b[0].module_srl)});d.val()&&a.exec_json("module.getModuleAdminModuleInfo",{module_srl:d.val()},function(a){a&&a.module_info&&f.val(a.module_info.browser_title+" ("+a.module_info.mid+")")})});return this};
|
||||
a(".module_search").xeModuleSearchHtml()});
|
||||
jQuery(function(a){var e=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 d,h,g,f,k,j,l,n,p,m;if(1==b.which){h=a(this);g=h.closest("tr");f=h.closest("table");m=f.get(0).offsetParent;h=g.height();k=g.width();before_event=a.Event("before-drag.st");f.trigger(before_event);if(before_event.isDefaultPrevented())return!1;d=b.pageY;j=getOffset(g.get(0),m);
|
||||
$clone=g.attr("target",!0).clone(!0).appendTo(f);p=(b=f.find("thead th")).length;b.filter("[colspan]").attr("colspan",function(a,b){p+=b-1});e.find("td").attr("colspan",p);l=[];f.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),d;d=getOffset(this,m);l.push({top:d.top,bottom:d.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:k,height:h,left:j.left,top:j.top,zIndex:100});e.css({position:"absolute",opacity:0.6,width:k,height:"10px",
|
||||
left:j.left,top:j.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(f);g.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var b,f,g;n=null;a=j.top-(d-a.pageY);b=0;for(f=l.length;b<f;b++)g=l[b],b&&g.top>a||b<f-1&&g.bottom<a||(n={element:g.$item},g.top>a-12?(n.state="before",e.css("top",g.top-5)):(n.state="after",e.css("top",g.bottom-5)));$clone.css({top:a})}).bind("mouseup.st",function(){var b;a(document).unbind("mousemove.st mouseup.st");
|
||||
g.removeAttr("target").css("opacity","");$clone.remove();e.remove();n&&(b=a(n.element),b[n.state](g),f.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable()});
|
||||
jQuery(function(a){var e=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 d,h,f,g,k,j,l,m,p,n;if(1==b.which){h=a(this);f=h.closest("tr");g=h.closest("table");n=g.get(0).offsetParent;h=f.height();k=f.width();before_event=a.Event("before-drag.st");g.trigger(before_event);if(before_event.isDefaultPrevented())return!1;d=b.pageY;j=getOffset(f.get(0),n);
|
||||
$clone=f.attr("target",!0).clone(!0).appendTo(g);p=(b=g.find("thead th")).length;b.filter("[colspan]").attr("colspan",function(a,b){p+=b-1});e.find("td").attr("colspan",p);l=[];g.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),d;d=getOffset(this,n);l.push({top:d.top,bottom:d.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:k,height:h,left:j.left,top:j.top,zIndex:100});e.css({position:"absolute",opacity:0.6,width:k,height:"10px",
|
||||
left:j.left,top:j.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(g);f.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var b,f,g;m=null;a=j.top-(d-a.pageY);b=0;for(f=l.length;b<f;b++)g=l[b],b&&g.top>a||b<f-1&&g.bottom<a||(m={element:g.$item},g.top>a-12?(m.state="before",e.css("top",g.top-5)):(m.state="after",e.css("top",g.bottom-5)));$clone.css({top:a})}).bind("mouseup.st",function(){var b;a(document).unbind("mousemove.st mouseup.st");
|
||||
f.removeAttr("target").css("opacity","");$clone.remove();e.remove();m&&(b=a(m.element),b[m.state](f),g.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable()});
|
||||
jQuery(function(a){a(".filebox").bind("before-open.mw",function(){function b(j){e.html(j.html);e.find(".select").bind("click",function(){var b=a("input.select_checkbox:checked");0==b.length?(b=a(this).closest("tr").find("img.filebox_item").attr("src"))?(d.trigger("filebox.selected",[b]),d.trigger("close.mw")):alert("None selected!"):(d.trigger("filebox.selected",[b]),d.trigger("close.mw"));return!1});e.find(".x_pagination").find("a").filter(function(){return a(this).data("toggle")||a(this).parent().hasClass("x_disabled")||
|
||||
a(this).parent().hasClass("x_active")?!1:!0}).bind("click",function(){var d=a(this).attr("page");a.exec_json("module.getFileBoxListHtml",{page:d},b);return!1});a("#goToFileBox").find("button").bind("click",function(){var d=a(this).prev("input").val();a.exec_json("module.getFileBoxListHtml",{page:d},b);return!1});e.closest(".x_modal-body").scrollTop(0)}var d,e,k;d=a(this);k=d.attr("href");e=a(k).find(".filebox_list");a.exec_json("module.getFileBoxListHtml",{page:"1"},b)});var e=a(".x .dsTg .__simple"),
|
||||
b=a(".x .dsTg .__detail");a(".x .dsTg td.title").each(function(){var b=a(this);0==b.find("p.update").length?b.addClass("tg").find(">*:not(:first-child)").hide():b.addClass("up")});var d=a(".x .dsTg td.tg>*:not(:first-child)");e.click(function(){d.slideUp(200);b.removeClass("x_active");e.addClass("x_active")});b.click(function(){d.slideDown(200);b.addClass("x_active");e.removeClass("x_active")})});
|
||||
jQuery(function(a){a.fn.xeMultilingualWindow=function(e){function b(){if(j.is(":visible")&&j.find(".editMode").length){var a=j.find("form.item");confirm(xe.msg_confirm_save_and_use_multilingual)?a.find(".save").trigger("click").end().find("textarea").attr("disabled","disabled"):a.find(".cancel").trigger("click")}return!0}function d(){j.find(".item > fieldset").hide().prev("a").children("i").removeClass("x_icon-chevrom-up").addClass("x_icon-chevron-down");f.find('[href="#lang_create"]').trigger("click");
|
||||
k.find(".editMode").children("textarea").val("");l=!1;return!0}function h(a,b){var d=f.data("lang-target");l=!1;d&&d.trigger("selected.g11n",[a,b])}function g(d,f,m,k){"undefined"==typeof d&&(d=1);"undefined"==typeof f&&(f="");"undefined"==typeof m&&(m="");"undefined"==typeof k&&(k=!0);a.exec_json("module.getModuleAdminLangListHtml",{page:d,search_keyword:f,name:m,list_count:e.list_count},function(d){d&&d.html&&(j.html(d.html),j.find(".x_pagination a").click(function(){var b=a(this).data("page"),
|
||||
d=a(this).data("search_keyword");if(b)return g(b,d),!1}),j.find(".x_pagination").submit(function(){var b=a(this).find('[name="page"]').val(),d=a(this).data("search_keyword");if(!b)return!1;g(b,d);return!1}),j.find(".search").submit(function(){var b=a(this).find('[name="search_keyword"]').val();g(1,b);return!1}),j.find("#search_cancel").click(function(){g(1,"")}),j.find(".set").append('<i class="x_icon-chevron-down"></i>').click(function(){function d(b){e.next("fieldset").find("textarea").each(function(){var d=
|
||||
jQuery(function(a){a.fn.xeMultilingualWindow=function(e){function b(){if(j.is(":visible")&&j.find(".editMode").length){var a=j.find("form.item");confirm(xe.msg_confirm_save_and_use_multilingual)?a.find(".save").trigger("click").end().find("textarea").attr("disabled","disabled"):a.find(".cancel").trigger("click")}return!0}function d(){j.find(".item > fieldset").hide().prev("a").children("i").removeClass("x_icon-chevrom-up").addClass("x_icon-chevron-down");g.find('[href="#lang_create"]').trigger("click");
|
||||
k.find(".editMode").children("textarea").val("");l=!1;return!0}function h(a,b){var d=g.data("lang-target");l=!1;d&&d.trigger("selected.g11n",[a,b])}function f(d,g,k,l){"undefined"==typeof d&&(d=1);"undefined"==typeof g&&(g="");"undefined"==typeof k&&(k="");"undefined"==typeof l&&(l=!0);a.exec_json("module.getModuleAdminLangListHtml",{page:d,search_keyword:g,name:k,list_count:e.list_count},function(d){d&&d.html&&(j.html(d.html),j.find(".x_pagination a").click(function(){var b=a(this).data("page"),
|
||||
d=a(this).data("search_keyword");if(b)return f(b,d),!1}),j.find(".x_pagination").submit(function(){var b=a(this).find('[name="page"]').val(),d=a(this).data("search_keyword");if(!b)return!1;f(b,d);return!1}),j.find(".search").submit(function(){var b=a(this).find('[name="search_keyword"]').val();f(1,b);return!1}),j.find("#search_cancel").click(function(){f(1,"")}),j.find(".set").append('<i class="x_icon-chevron-down"></i>').click(function(){function d(b){e.next("fieldset").find("textarea").each(function(){var d=
|
||||
a(this),e=b.langs[d.data("lang")];/^\$user_lang->/.test(e)?d.val("").data("value",""):d.val(e).data("value",e)});e.data("is_loaded",!0)}var e=a(this),f=e.data("lang_code");b();e.next("fieldset").is(":visible")?e.children("i").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"):(e.parent(".item").siblings(".item").find("a > i").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down").end().children("fieldset").hide(),e.children("i").removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up"));
|
||||
"undefined"==typeof e.data("is_loaded")&&a.exec_json("module.getModuleAdminLangCode",{name:f},d)}),e.view_use||j.find(".useit").hide(),e.view_modify||j.find(".modify").hide(),e.view_delete||j.find(".delete").hide(),"save"==e.modify_type&&j.find(".save").text(xe.cmd_save),j.find(".modify").click(function(){a(this).closest("fieldset").addClass("editMode").find("textarea").removeAttr("disabled");a(this).siblings(".cancel").prependTo(a(this).parent());a(this).siblings(".delete").attr("disabled","disabled")}),
|
||||
j.find(".cancel").click(function(){a(this).closest("fieldset").removeClass("editMode").find("textarea").attr("disabled","disabled").each(function(){var b=a(this);b.val(b.data("value"))});a(this).siblings(".modify").prependTo(a(this).parent());a(this).siblings(".delete").removeAttr("disabled");return!1}),j.find(".delete").click(function(){confirm(xe.confirm_delete)&&(lang_name=a(this).closest(".item").find('[href^="#lang-"]').data("lang_code"),a.exec_json("module.procModuleAdminDeleteLang",{name:lang_name},
|
||||
function(a){if(a)if(a.error)alert(a.message);else{var b=j.find(".x_pagination"),a=b.data("page"),b=b.data("search_keyword");a||($page=1);g(a,b)}}))}),j.find(".item").submit(function(){var b=a(this),d=b.find(".editMode").children("textarea"),e=b.find('[href^="#lang-"]'),f={},g=null;d.each(function(){var b=a(this);f[b.attr("class")]=b.val();b.data("tmp_value",b.val());xe.current_lang==b.attr("class")&&(g=b.val())});f.lang_name=e.data("lang_code");a.exec_json("module.procModuleAdminInsertLang",f,function(f){f&&
|
||||
(!f.error&&f.name)&&(d.each(function(){var b=a(this);b.data("value",b.data("tmp_value"))}),e.children("span").html(g),j.find(".cancel").trigger("click"),b.find(".useit").trigger("click"))});return!1}),j.find(".useit").click(function(){var b=a(this).closest(".item").find('[href^="#lang-"]'),d=b.data("lang_code"),b=b.children("span").text();h(d,b)}),k&&(document.location.href="#lang_search"),m&&a("#lang_search").find('[href^="#lang-"]').trigger("click"))})}var f=a(this),k=f.find("#lang_create"),j=f.find("#lang_search"),
|
||||
l=!1,e=a.extend({create_type:"save_and_use",modify_type:"save_and_use",view_use:!0,view_modify:!0,view_delete:!1,list_count:5},e||{});"save_and_use"!=e.create_type&&k.find(".save-useit").text(xe.cmd_save);f.find(".x_tabbable").xeTabbable();k.find(".editMode textarea").change(function(){l=!0});k.submit(function(){var b={},f=null;a(this).find(".editMode").children("textarea").each(function(){var d=a(this);b[d.attr("class")]=d.val();xe.current_lang==d.attr("class")&&(f=d.val())});if(!f)return alert(xe.msg_empty_multilingual),
|
||||
!1;a.exec_json("module.procModuleAdminInsertLang",b,function(a){a&&(!a.error&&a.name)&&("save_and_use"==e.create_type?h(a.name,f):(alert(a.message),d()))});return!1});f.bind("reset.g11n",function(){d()});f.bind("before-open.g11n",function(a,b){b?(g(1,"",b,!1),f.find('[href="#lang_search"]').trigger("click")):g(1,"","",!1)});f.bind("before-close.g11n",function(){var a;k.is(":visible")&&l&&confirm(xe.msg_confirm_save_and_use_multilingual)&&k.find(".save-useit").trigger("click");a=!b()||!d()?!1:void 0;
|
||||
function(a){if(a)if(a.error)alert(a.message);else{var b=j.find(".x_pagination"),a=b.data("page"),b=b.data("search_keyword");a||($page=1);f(a,b)}}))}),j.find(".item").submit(function(){var b=a(this),d=b.find(".editMode").children("textarea"),e=b.find('[href^="#lang-"]'),f={},g=null;d.each(function(){var b=a(this);f[b.attr("class")]=b.val();b.data("tmp_value",b.val());xe.current_lang==b.attr("class")&&(g=b.val())});f.lang_name=e.data("lang_code");a.exec_json("module.procModuleAdminInsertLang",f,function(f){f&&
|
||||
(!f.error&&f.name)&&(d.each(function(){var b=a(this);b.data("value",b.data("tmp_value"))}),e.children("span").html(g),j.find(".cancel").trigger("click"),b.find(".useit").trigger("click"))});return!1}),j.find(".useit").click(function(){var b=a(this).closest(".item").find('[href^="#lang-"]'),d=b.data("lang_code"),b=b.children("span").text();h(d,b)}),l&&(document.location.href="#lang_search"),k&&a("#lang_search").find('[href^="#lang-"]').trigger("click"))})}var g=a(this),k=g.find("#lang_create"),j=g.find("#lang_search"),
|
||||
l=!1,e=a.extend({create_type:"save_and_use",modify_type:"save_and_use",view_use:!0,view_modify:!0,view_delete:!1,list_count:5},e||{});"save_and_use"!=e.create_type&&k.find(".save-useit").text(xe.cmd_save);g.find(".x_tabbable").xeTabbable();k.find(".editMode textarea").change(function(){l=!0});k.submit(function(){var b={},f=null;a(this).find(".editMode").children("textarea").each(function(){var d=a(this);b[d.attr("class")]=d.val();xe.current_lang==d.attr("class")&&(f=d.val())});if(!f)return alert(xe.msg_empty_multilingual),
|
||||
!1;a.exec_json("module.procModuleAdminInsertLang",b,function(a){a&&(!a.error&&a.name)&&("save_and_use"==e.create_type?h(a.name,f):(alert(a.message),d()))});return!1});g.bind("reset.g11n",function(){d()});g.bind("before-open.g11n",function(a,b){b?(f(1,"",b,!1),g.find('[href="#lang_search"]').trigger("click")):f(1,"","",!1)});g.bind("before-close.g11n",function(){var a;k.is(":visible")&&l&&confirm(xe.msg_confirm_save_and_use_multilingual)&&k.find(".save-useit").trigger("click");a=!b()||!d()?!1:void 0;
|
||||
return a});return this}});var is_loaded_multilingual_window_html=!1;jQuery(function(a){a.fn.xeLoadMultilingualWindowHtml=function(){a.exec_json("module.getModuleAdminMultilingualHtml",{},function(e){var b=a(".x #content");a(e.html).appendTo(b).xeMultilingualWindow();a(".lang_code").trigger("loaded-multilingualWindow")});return this}});var multilingual_id_count=0;
|
||||
jQuery(function(a){a.fn.xeApplyMultilingualUI=function(){a(this).each(function(){function e(){var e=a("#g11n"),f="TEXTAREA"==d.tagName||b.next("textarea.vLang").length?a('<textarea id="lang_'+h+'" class="displayInput" style="width:179px">').data("lang-id",h):a('<input type="text" id="lang_'+h+'" class="displayInput" style="width:179px">').data("lang-id",h),k=a('<button type="button" class="x_add-on remover" title="'+xe.cmd_remove_multilingual_text+'"><i class="x_icon-remove"></i>'+xe.cmd_remove_multilingual_text+
|
||||
"</button>").data("lang-target",h),j=a('<a href="#g11n" class="x_add-on modalAnchor" title="'+xe.cmd_set_multilingual_text+'"><i class="x_icon-globe"></i>'+xe.cmd_set_multilingual_text+"</a>").data("lang-target",h);b.parent().addClass("g11n").addClass("x_input-append");b.after(f,k,j);b.parent().find(".vLang").remove();b.hide();j.attr("href","#g11n").xeModalWindow();f.bind("selected.g11n",function(a,b,d){f.width(135).attr("disabled","disabled").val(d).parent(".g11n").addClass("active");f.siblings("#"+
|
||||
f.data("lang-id")).val("$user_lang->"+b);j.trigger("close.mw")});j.bind("open.mw",function(){var b=a(this),d=b.siblings(".displayInput");b.closest(".g11n").hasClass("active")?e.trigger("before-open.g11n",d.prev(".lang_code").val().replace("$user_lang->","")):e.trigger("before-open.g11n");e.data("lang-target",d)});j.bind("before-close.mw",function(){return e.trigger("before-close.g11n")});k.click(function(){var b=a(this);a("#lang_"+b.data("lang-target")).val("").removeAttr("disabled").width(179).parent(".g11n").removeClass("active");
|
||||
b.siblings(".lang_code").val("")});var l=b;f.bind("change, keyup",function(){b=a(this);l.show();b.closest(".g11n").hasClass("active")||l.val(b.val())});f.val(l.val());/^\$user_lang->/.test(f.val())&&a.exec_json("module.getModuleAdminLangCode",{name:f.val().replace("$user_lang->","")},function(a){a&&a.langs&&(f.closest(".g11n").addClass("active"),f.val(a.langs[xe.current_lang]).attr("disabled","disabled").width(135))})}is_loaded_multilingual_window_html||(a().xeLoadMultilingualWindowHtml(),is_loaded_multilingual_window_html=
|
||||
jQuery(function(a){a.fn.xeApplyMultilingualUI=function(){a(this).each(function(){function e(){function e(){k.val(m.val());/^\$user_lang->/.test(k.val())&&a.exec_json("module.getModuleAdminLangCode",{name:k.val().replace("$user_lang->","")},function(a){a&&a.langs&&(k.closest(".g11n").addClass("active"),k.val(a.langs[xe.current_lang]).attr("disabled","disabled").width(135))})}var g=a("#g11n"),k="TEXTAREA"==d.tagName||b.next("textarea.vLang").length?a('<textarea id="lang_'+h+'" class="displayInput" style="width:179px">').data("lang-id",
|
||||
h):a('<input type="text" id="lang_'+h+'" class="displayInput" style="width:179px">').data("lang-id",h),j=a('<button type="button" class="x_add-on remover" title="'+xe.cmd_remove_multilingual_text+'"><i class="x_icon-remove"></i>'+xe.cmd_remove_multilingual_text+"</button>").data("lang-target",h),l=a('<a href="#g11n" class="x_add-on modalAnchor" title="'+xe.cmd_set_multilingual_text+'"><i class="x_icon-globe"></i>'+xe.cmd_set_multilingual_text+"</a>").data("lang-target",h);b.parent().addClass("g11n").addClass("x_input-append");
|
||||
b.after(k,j,l);b.parent().find(".vLang").remove();b.hide();l.attr("href","#g11n").xeModalWindow();k.bind("selected.g11n",function(a,b,d){k.width(135).attr("disabled","disabled").val(d).parent(".g11n").addClass("active");k.siblings("#"+k.data("lang-id")).val("$user_lang->"+b);l.trigger("close.mw")});l.bind("open.mw",function(){var b=a(this),d=b.siblings(".displayInput");b.closest(".g11n").hasClass("active")?g.trigger("before-open.g11n",d.prev(".lang_code").val().replace("$user_lang->","")):g.trigger("before-open.g11n");
|
||||
g.data("lang-target",d)});l.bind("before-close.mw",function(){return g.trigger("before-close.g11n")});j.click(function(){var b=a(this);a("#lang_"+b.data("lang-target")).val("").removeAttr("disabled").width(179).parent(".g11n").removeClass("active");b.siblings(".lang_code").val("")});var m=b;k.bind("change keyup",function(){b=a(this);b.closest(".g11n").hasClass("active")||m.val(b.val())});b.bind("reload-multilingual",e);e()}is_loaded_multilingual_window_html||(a().xeLoadMultilingualWindowHtml(),is_loaded_multilingual_window_html=
|
||||
!0);var b=a(this),d=this;b.parent().hasClass("g11n")?b.siblings().remove():b.wrap("<span></span>");var h=b.attr("id");h||(h="__lang_code_"+multilingual_id_count,multilingual_id_count++,b.attr("id",h));a("#g11n").length?e():b.bind("loaded-multilingualWindow",e)});return this};a('.vLang[type="hidden"]').each(function(){var e=a(this);e.removeClass("vLang").addClass("lang_code");e.parent().find(".editUserLang").remove()});a(".lang_code").xeApplyMultilingualUI()});
|
||||
function getOffset(a,e){for(var b=0,d=0;a&&a!=e;)b+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:b,left:d}};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue