Libraries added

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12396 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
nagoon97 2012-12-14 06:00:42 +00:00
parent c97fc42be9
commit 50c487a756
4 changed files with 5089 additions and 1 deletions

View file

@ -0,0 +1,46 @@
jQuery(function(a){a(".form li").find('>input:text:not(".notmulti"),>input:password,>textarea').filter('input[value!=""],textarea:not(:empty)').prev("label").css("visibility","hidden").end().end().prev("label").addClass("overlap").css({top:"15px",left:"5px"}).next().focus(function(){var b=a(this).prev().stop().animate({opacity:0,left:"25px"},"fast",function(){b.css("visibility","hidden")})}).blur(function(){var b=a(this);""==a.trim(b.val())&&b.prev().stop().css("visibility","visible").animate({opacity:1,
left:"5px"},"fast")}).end().parent().css("position","relative");var d=a("input:radio+label,input:checkbox+label").prev("input");d.change(function(){var b=a(this).attr("name");d.filter(function(){return this.name==b}).next("label").css("font-weight","normal").end().filter(":checked").next("label").css("font-weight","bold").end()}).change();a(".form th>input:checkbox").change(function(){var b=a(this),e=b.data("name");b.closest("table").find("input: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.fn.xePagination=function(){this.not(".xe-pagination").addClass("xe-pagination").find("span.tgContent").css("whiteSpace","nowrap").end().find("a.tgAnchor").each(function(){var b=a(this);b.after(a(b.attr("href")))}).end();return this};a(".pagination").xePagination();a(".portlet .action").css({display:"none",position:"absolute"}).parent().mouseleave(function(){a(this).find(">.action").fadeOut(100)}).mouseenter(function(){a(this).find(">.action").fadeIn(100)}).focusin(function(){a(this).mouseenter()}).focusout(function(){var b=
a(this),e;clearTimeout(b.data("timer"));e=setTimeout(function(){b.find(":focus").length||b.mouseleave()},10);b.data("timer",e)});a(window).resize(function(){1300>a(document).width()?(a(".dashboard>.section>br").remove(),a(".dashboard>.section>.portlet:odd").after('<br style="clear:both" />')):(a(".dashboard>.section>br").remove(),a(".dashboard>.section>.portlet:eq(2),.dashboard>.section>.portlet:eq(5)").after('<br style="clear:both" />'))});a(window).resize();a(".header>.siteTool>a.i").bind("before-open.tc",
function(){a(this).addClass("active").next("div.tgContent").find(">.section:gt(0)").hide().end().find(">.btnArea>button").show()}).bind("after-close.tc",function(){a(this).removeClass("active")}).next("#siteMapList").find(">.section:last").after('<p class="btnArea"><button type="button">&rsaquo; more</button></p>').find("+p>button").click(function(){a(this).hide().parent().prevAll(".section").show()});a.fn.xeMask=function(){this.each(function(){var b=a(this),e=b.text();/^([\w\-\.]+?)@(([\w-]+\.)+[a-z]{2,})$/ig.test(e)&&
b.html(e.replace(/(@.+)$/,'<span class="ellipsis">...</span><span class="cover">$1</span>')).find(">.ellipsis").css({position:"absolute",zIndex:1}).hover(function(){a(this).next(".cover").mouseover()},function(){a(this).next(".cover").mouseout()}).end().find(">.cover").css({zIndex:2,opacity:0}).hover(function(){a(this).css("opacity",1).prev("span").css("visibility","hidden")},function(){a(this).css("opacity",0).prev("span").css("visibility","visible")}).end()})};a(".masked").xeMask()});
jQuery(function(a){a.fn.xeMenu=function(){this.attr("role","navigation").find(">.nav-gnb>li").attr("role","menuitem").filter(":has(>ul)").attr("aria-haspopup","true").end().end().find(">.nav-gnb").mouseover(function(){a(this).parent(".gnb").addClass("active").end().find(">li>ul").css("height","auto").end()}).mouseleave(function(){a(this).parent(".gnb").removeClass("active").end().find(">li>ul").css("height","0").end()}).focusout(function(){var d=a(this);setTimeout(function(){d.find(":focus").length||
d.mouseleave()},1)}).delegate("a",{focus:function(){a(this).mouseover()}})};a("div.gnb").xeMenu();a(".gnb>.mnv").change(function(){window.location.href=a(this).find("option:selected").val()})});
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 d=a(this),b,e;b=a(d.attr("href"));b.parent("body").length||(e=a('<button type="button" class="modalClose" title="Close this layer">X</button>'),e.click(function(){b.data("anchor").trigger("close.mw")}),b.prepend('<span class="bg"></span>').append('<\!--[if IE 6]><iframe class="ie6"></iframe><![endif]--\>').find(">.fg").prepend(e).append(e.clone(!0)).end().appendTo("body"));
b.data("anchor",d);"showing"==b.data("state")?d.trigger("close.mw"):d.trigger("open.mw");return!1}).bind("open.mw",function(){var d=a(this),b,e;b=a.Event("before-open.mw");d.trigger(b);if(b.isDefaultPrevented())return!1;b=a(d.attr("href"));e=d.data("duration")||"fast";b.data("state","showing");a("html,body").addClass("modalContainer");a(document).bind("keydown.mw",function(a){if(27==a.which)return d.trigger("close.mw"),!1});b.fadeIn(e,function(){d.trigger("after-open.mw")}).find(">.bg").height(a(document).height()).end().find("button.modalClose:first").focus()}).bind("close.mw",
function(){var d=a(this),b,e;b=a.Event("before-close.mw");d.trigger(b);if(b.isDefaultPrevented())return!1;b=a(d.attr("href"));e=d.data("duration")||"fast";b.data("state","hiding");a("html,body").removeClass("modalContainer");b.fadeOut(e,function(){d.trigger("after-close.mw")});d.focus()})};a("a.modalAnchor").xeModalWindow();a("div.modal").addClass("x").hide()});
jQuery(function(a){var d=!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(){d=!0}).focusout(function(){setTimeout(function(){!d&&(!$layer.find(":focus").length&&"showing"==$layer.data("state"))&&b.trigger("close.tc");d=!1},1)})}).click(function(){var b=a(this),e;e=a(b.attr("href"));e.data("anchor",b);"showing"==
e.data("state")?b.trigger("close.tc"):b.trigger("open.tc");return!1}).bind("open.tc",function(){function b(){e.trigger("after-open.tc")}var e=a(this),j,g,f;j=a(e.attr("href"));g=e.data("effect");f=e.data("duration")||"fast";j.data("state","showing");e.trigger("before-open.tc");d=!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")||j.has(b).length)))return!0;
e.trigger("close.tc");return!1});switch(g){case "slide":j.slideDown(f,b);break;case "slide-h":g=j.css({"overflow-x":"",width:""}).width();j.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:g},f,function(){j.css({"overflow-x":"",width:""});b()});break;case "fade":j.fadeIn(f,b);break;default:j.show(),e.trigger("after-open.tc")}}).bind("close.tc",function(){function b(){e.trigger("after-close.tc")}var e=a(this),d,g,f;a(document).unbind("mousedown.tc keydown.tc");d=a(e.attr("href"));g=e.data("effect");
f=e.data("duration")||"fast";d.data("state","hiding");e.trigger("before-close.tc");switch(g){case "slide":d.slideUp(f,b);break;case "slide-h":d.animate({width:0},f,function(){d.hide();b()});break;case "fade":d.fadeOut(f,b);break;default:d.hide(),e.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,b,e;d=a(this);b=a(d.attr("href")).find(">ul");e=d.prev("input:text").val();a.exec_json("admin.getSiteAllList",{domain:e},function(e){var g=e.site_list,f,k;b.empty();d.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled");if(e.error||!a.isArray(g))d.trigger("close.tc");else{f=0;for(k=g.length;f<
k;f++)e=a("<li />").appendTo(b),a('<button type="button" />').text(g[f].domain).data("site_srl",g[f].site_srl).appendTo(e)}})}).end().find(".tgContent.suggestion").delegate("button","click",function(){var d,b;d=a(this);b=d.closest(".modulefinder");b.find("a.tgAnchor.findsite").trigger("close.tc");a.exec_json("module.procModuleAdminGetList",{site_srl:d.data("site_srl")},function(e){var d=e.module_list,g;if(!e.error&&d){e=b.find(".moduleList").data("module_list",d).removeAttr("disabled").empty();for(g in d)d.hasOwnProperty(g)&&
a("<option />").attr("value",g).text(d[g].title).appendTo(e);e.prop("selectedIndex",0).change().focus();e.is(":visible")||e.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 d,b,e;d=a(this);b=d.val();e=d.data("module_list");if(e[b]){e=e[b].list;d=d.closest(".modulefinder").find(".moduleIdList").removeAttr("disabled").empty();for(var j in e)e.hasOwnProperty(j)&&
a("<option />").attr("value",e[j].module_srl).text(e[j].browser_title).appendTo(d);d.prop("selectedIndex",0).change()}});return this};a(".modulefinder").xeModuleFinder()});
jQuery(function(a){_xeModuleSearch=function(){function d(a,b){var e;a.find("li div").width("");a.css("height","");a.css("overflow-y","");a.height()>b&&(e=a.find("li div"),e.width(e.width()-20+"px"),a.css("height",b+"px"),a.css("overflow-y","auto"))}function b(b){var e,f=RegExp(b,"ig"),g=q;h.empty();i=0;for(c=g.length;i<c;i++){e=g[i].domain;if(b){if(!e.match(f))continue;e=e.replace(f,function(a){return'<span class="highlight">'+a+"</span>"})}$li=a("<li />").appendTo(h);a("<a>").attr("href","#").html("<div>"+
e+'</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)}d(h,x-l.parent("DIV").height())}var e=this,j=a(this),g=j.find(".moduleSearchWindow"),f=g.find(".siteList"),k=g.find(".moduleTypeList"),n=g.find(".moduleInstanceList"),h=f.find("UL"),o=k.find("UL"),m=n.find("SELECT"),l=g.find("INPUT.siteListSearchInput"),q,x=280;l.keyup(function(){b(l.val())});"undefined"==typeof console&&(console={log:function(){}});
j.not(".xe-module-search").addClass("xe-module-search").find("a.tgAnchor.moduleSearch").bind("before-open.tc",function(){var e;e=a(this);h.empty();m.empty();k.hide();n.hide();a.exec_json("admin.getSiteAllList",{domain:""},function(d){var h=d.site_list;d.error||!a.isArray(h)?e.trigger("close.tc"):(q=h,b(l.val()),l.focus())})}).end().find(".tgContent .siteListUL").delegate("a","click",function(b){var e;e=a(this);e.closest(".modulefinder");o.empty();n.hide();a.exec_json("module.procModuleAdminGetList",
{site_srl:e.data("site_srl")},function(b){var f=b.module_list,l;if(!b.error&&f){for(l in f)f.hasOwnProperty(l)&&($li=a("<li />").appendTo(o),a("<a>").attr("href","#").html("<div>"+f[l].title+'</div><span class="icon-circle-arrow-right" style="display:inline-block;float:right;width:16px;height:16px;"></span>').data("moduleInstanceList",f[l].list).appendTo($li));g.find(".moduleTypeList").show();d(o,x);h.find("li").removeClass("on");e.parent("li").addClass("on")}});b.preventDefault()}).end().find(".moduleTypeListUL").delegate("a",
"click",function(b){var f,h;f=a(this);if(h=f.data("moduleInstanceList")){e.sSelectedModuleType=f.text();m.empty();for(var l in h)h.hasOwnProperty(l)&&($li=a("<option />").html(h[l].browser_title).appendTo(m).val(h[l].module_srl).data("mid",h[l].module_srl).data("module_srl",h[l].module_srl).data("layout_srl",h[l].layout_srl).data("browser_title",h[l].browser_title));n.show();d(m,x);o.find("li").removeClass("on");f.parent("li").addClass("on");b.preventDefault()}}).end().find(".moduleSearch_ok").click(function(b){var d=
[];j.find(".moduleInstanceListSelect option:selected").each(function(){d.push({type:e.sSelectedModuleType,module_srl:a(this).data("module_srl"),layout_srl:a(this).data("layout_srl"),browser_title:a(this).data("browser_title")})});j.trigger("moduleSelect",[d]);a(".tgAnchor.moduleSearch").trigger("close.tc");b.preventDefault()});return this};a.fn.xeModuleSearch=function(){a(this).each(_xeModuleSearch)};a(".moduleSearch").xeModuleSearch()});
jQuery(function(a){function d(a,b){for(var d=0,f=0;a&&a!=b;)d+=a.offsetTop,f+=a.offsetLeft,a=a.offsetParent;return{top:d,left:f}}var b=a('<tr class="placeholder"><td>&nbsp;</td></tr>');a.fn.xeSortableTable=function(){this.not(".xe-sortable-table").addClass("xe-sortable-table").delegate("button.dragBtn","mousedown.st",function(e){var j,g,f,k,n,h,o,m,l,q;if(1==e.which){g=a(this);f=g.closest("tr");k=g.closest("table");q=k.get(0).offsetParent;g=f.height();n=f.width();before_event=a.Event("before-drag.st");
k.trigger(before_event);if(before_event.isDefaultPrevented())return!1;j=e.pageY;h=d(f.get(0),q);$clone=f.attr("target",!0).clone(!0).appendTo(k);l=(e=k.find("thead th")).length;e.filter("[colspan]").attr("colspan",function(a,b){l+=b-1});b.find("td").attr("colspan",l);o=[];k.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),e;e=d(this,q);o.push({top:e.top,bottom:e.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:n,height:g,
left:h.left,top:h.top,zIndex:100});b.css({position:"absolute",opacity:0.6,width:n,height:"10px",left:h.left,top:h.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(k);f.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var e,d,f;m=null;a=h.top-(j-a.pageY);e=0;for(d=o.length;e<d;e++)f=o[e],e&&f.top>a||e<d-1&&f.bottom<a||(m={element:f.$item},f.top>a-12?(m.state="before",b.css("top",f.top-5)):(m.state="after",b.css("top",f.bottom-5)));$clone.css({top:a})}).bind("mouseup.st",
function(){var e;a(document).unbind("mousemove.st mouseup.st");f.removeAttr("target").css("opacity","");$clone.remove();b.remove();m&&(e=a(m.element),e[m.state](f),k.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable()});
jQuery(function(a){var d=null,b=null,e=0,j=null,g=!1,f=!1,k;a(".multiLangEdit").delegate("input.vLang:text,textarea.vLang",{textchange:function(){function d(){f.addClass("loading");l.parent().is(":visible")&&l.parent().hide();show_waiting_message=!1;a.exec_json("module.getLangListByLangcodeForAutoComplete",{search_keyword:m},function(b){return function(d){var h=d.results,g,m;f.removeClass("loading");if(!d.error&&h&&!(0===h.length||e!=b+1)){l.empty();g=0;for(m=h.length;g<m;g++)d=a('<button type="button" class="_btnLang" />').data("langkey",
h[g].name).text(h[g].value),a("<li />").append(d).appendTo(l);k.trigger("show")}}}(e++));show_waiting_message=!0}var f=a(this),m=a.trim(f.val()),l;b&&(clearTimeout(b),b=null);f.data("mle-container");l=k.find(">ul");!m||g?(g=!1,l.parent().hide(),f.prev("input.vLang").val("")):(f.data("mle-langkey").val(""),f.prev("input.vLang").val(m),b=setTimeout(d,100))},keydown:function(b){var e,d,f=b.which;a(this);b=k.find(">ul");if(!k.is(":visible")||0>a.inArray(f,[38,40,13,27]))return!0;if(27==f)return k.trigger("hide"),
!1;e=b.find("button.active");if(13==f){if(0===e.length)return!0;e.click();return!1}if(!e.length)return b.find("li>button:first").addClass("active"),!1;38==f?(d=e.parent().prev("li").find(">button"),d.length||(d=b.find(">li:last>button"))):40==f&&(d=e.parent().next("li").find(">button"),d.length||(d=b.find(">li:first>button")));e.removeClass("active");d.addClass("active");return!1},focus:function(){var b=a(this),e=a.trim(b.val()),f=b.closest(".multiLangEdit");b.after(k);b.data("mle-container")||b.data("mle-container",
f);b.data("mle-langkey")||b.data("mle-langkey",f.find("input.vLang:first"));(function(){var f=a.trim(b.val());f!=e&&(e=f,b.trigger("textchange"));d=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(d);d=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(j);j=setTimeout(function(){f?f=!1:b.find(":focus").is(".vLang,button._btnLang")||k.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var b,e,d;b=a(this);
e=a(b.attr("href")).insertBefore(b);d=b.closest(".multiLangEdit").find("input.vLang,textarea.vLang");b=d.eq(0).val();d=d.eq(1).val();var f=e,g=function(){var a=[];v.each(function(){a.push(this.value)});return a.join("\n")},j=function(){f.data("multilang-current-name")?f.find("h2").find("strong").text(p==y?t:z).end().find("a").text(p==y?z:t).show().end():f.find("h2").find("strong").text(t).end().find("a").hide()},r,v,w="",s=0,p,t,z,u=[],y=0;f.data("init-multilang-editor")||(f.data("init-multilang-editor",
!0).bind("multilang-reset",function(){f.data("multilang-current-name","").find(".langInput li").find(">input:text,>textarea").val("").prev("label").css("visibility","visible");p=y;j()}).find("h2 a").click(function(){p=!p;j();return!1}).end().delegate("a.langItem","click",function(){var b=a(this),e,d,h;d=f.data("multilang-list");h=b.data("multilang-name");if(d&&d[h]){d=d[h];e=f.find(".langInput");f.trigger("multilang-reset").find(".langList li.active").removeClass("active").end().data("multilang-current-name",
h);b.parent("li").addClass("active");for(var k in d)d.hasOwnProperty(k)&&e.find("li."+k).find(">input:text,>textarea").data("multilang-value",d[k]).val(d[k]).prev("label").css("visibility","hidden");w=g();s=0;r.val(u[s]);p=1;j();return!1}}).data("layer_index",n).find(".langInput").attr("id","langInput_"+n++),z=f.find("h2 strong").text(),t=f.find("h2 a").text(),v=f.find("input:text,textarea").change(function(){var a=g()==w?0:1;a!=s&&r.val(u[s=a])}),r=f.find("input[type=submit]").click(function(){function b(){f.hide().closest(".multiLangEdit").find(".vLang").eq(0).val("$user_lang->"+
d).end().eq(1).val(f.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val()).end()}function e(a){a&&(!a.error&&a.name)&&(d=a.name,b())}var d=f.data("multilang-current-name");if(g()==w)b();else{var h={};d&&1==p&&(h.lang_name=d);v.each(function(){var b=a(this);h[b.parent("li").attr("class")]=b.val()});a.exec_json("module.procModuleAdminInsertLang",h,e)}return!1}),u=r.val().split("|"),r.val(u[0]));e.trigger("multilang-reset").removeClass("showChild").find(".langList").empty().end();
e.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val(d).prev("label").css("visibility","hidden");k.trigger("hide");/^\$user_lang->(.+)$/.test(b)?(b="module.getModuleAdminLangListByName",d={lang_name:RegExp.$1}):(b="module.getModuleAdminLangListByValue",d={value:d});show_waiting_message=!1;a.exec_json(b,d,function(b){var d=b.lang_list,f;if(!b.error&&d){var b=d,g,h={},j,d=0;for(g=b.length;d<g;d++){j=b[d];h[j.name]||(h[j.name]={});h[j.name][j.lang_code]=j.value}d=h;e.data("multilang-list",
d);f=e.find(".langList");a.each(d,function(b){var d=a("<li />").appendTo(f),g=e.data("layer_index"),h=this[xe.current_lang];if(!h)for(lang_code in this){h=this[lang_code];break}a('<a href="#langInput_'+g+'" class="langItem" />').text(h).data("multilang-name",b).appendTo(d)});var b=d,d=0,k;for(k in b)b.hasOwnProperty(k)&&d++;d>1&&e.addClass("showChild");e.find(".langList>li>a:first").click()}});show_waiting_message=!0}}).delegate("button._btnLang",{click:function(){var b=a(this);g=!0;k.trigger("hide");
b.closest(".multiLangEdit").find("input.vLang,textarea.vLang").eq(0).val(b.data("langkey")).end().eq(1).val(b.text()).end();return!1},mousedown:function(){f=!0},focus:function(){a(this).mouseover()},mouseover:function(){a(this).closest("ul").find("button.active").removeClass("active")}});k=a('<div class="suggestion"><ul></ul></div>').bind("show",function(){a(this).show()}).bind("hide",function(){a(this).hide()});var n=0});
jQuery(function(a){a(".filebox").bind("before-open.mw",function(){function d(g){e.html(g.html);e.find(".lined .select").bind("click",function(){var d=a("input.select_checkbox:checked");0==d.length?(d=a(this).parent().find("img.filebox_item").attr("src"))?(b.trigger("filebox.selected",[d]),b.trigger("close.mw")):alert("None selected!"):(b.trigger("filebox.selected",[d]),b.trigger("close.mw"));return!1});e.find(".pagination").find("a").filter(function(){return a(this).hasClass("tgAnchor")?!1:!0}).bind("click",
function(){var b=a(this).attr("page");a.exec_json("module.getFileBoxListHtml",{page:b},d);a(window).scrollTop(a(j).find(".modalClose").offset().top);return!1});a("#FileBoxGoTo").find("button").bind("click",function(){var b=a(this).prev("input").val();a.exec_json("module.getFileBoxListHtml",{page:b},d);a(window).scrollTop(a(j).find(".modalClose").offset().top);return!1})}var b,e,j;b=a(this);j=b.attr("href");e=a(j).find(".filebox_list");a.exec_json("module.getFileBoxListHtml",{page:"1"},d)})});
function showWaitingFogLayer(){var a=jQuery('<span class="bg"></span>');a.height(jQuery(window).height());jQuery(".wfsr").wrap('<div class="wfsr_fog" />').before(a)}function hideWaitingFogLayer(){jQuery(".wfsr").prev("span").remove();jQuery(".wfsr").unwrap()}function doInstallModule(a){var d=[];d.module_name=a;exec_xml("install","procInstallAdminInstall",d,completeInstallModule);showWaitingFogLayer()}
function doUpdateModule(a){var d=[];d.module_name=a;exec_xml("install","procInstallAdminUpdate",d,completeInstallModule);showWaitingFogLayer()}function completeInstallModule(a){alert(a.message);location.reload()}
jQuery(function(a){a("body").ajaxComplete(function(){hideWaitingFogLayer()});0==a(".x>.body .lnb").length&&a(".x>.body").addClass("single");var d=a(".x .dsTg span.side>button.text");a(".x .dsTg td.title").each(function(){var b=a(this);0==b.find("p.update").length?b.addClass("tg").find(">p:not(:first-child)").hide():b.addClass("up")});var b=a(".x .dsTg td.tg>p:not(:first-child)");d.click(function(){d.toggleClass("details");b.slideToggle(200)});a(".x .content .h2, .x .content .h3").not(".portlet .h2, .modal .h2").each(function(){var b=
a('<button type="button" class="sTog" title="Open/Close"><i class="icon-chevron-up"></i></button>');a(this).append(b);b.click(function(){var b=a(this),d=b.parent().nextUntil(".h2, .h3").not(".langEdit, .tgContent, .modal");b.parent().next().is(":hidden")?(b.find("i").attr("class","icon-chevron-up"),d.slideDown(200)):(b.find("i").attr("class","icon-chevron-down"),d.slideUp(200))})})});

View file

@ -935,7 +935,20 @@ jQuery(function($){
$('.module_search').xeModuleSearchHtml();
});
/*
// Menu Selector
jQuery(function($){
var tmpCount = 0;
_xeModuleSearch = function(){
var t = this;
var $t = $(this);
var is_multiple = $t.data('multiple');
if(!is_multiple) is_multiple = '';
var id = '__module_searcher_' + tmpCount;
tmpCount++;
}
});
*/
// Sortable table
jQuery(function($){
var

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,484 @@
/*!
* jQuery Templates Plugin 1.0.0pre
* http://github.com/jquery/jquery-tmpl
* Requires jQuery 1.4.2
*
* Copyright 2011, Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function( jQuery, undefined ){
var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,
newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = [];
function newTmplItem( options, parentItem, fn, data ) {
// Returns a template item data structure for a new rendered instance of a template (a 'template item').
// The content field is a hierarchical array of strings and nested items (to be
// removed and replaced by nodes field of dom elements, once inserted in DOM).
var newItem = {
data: data || (data === 0 || data === false) ? data : (parentItem ? parentItem.data : {}),
_wrap: parentItem ? parentItem._wrap : null,
tmpl: null,
parent: parentItem || null,
nodes: [],
calls: tiCalls,
nest: tiNest,
wrap: tiWrap,
html: tiHtml,
update: tiUpdate
};
if ( options ) {
jQuery.extend( newItem, options, { nodes: [], parent: parentItem });
}
if ( fn ) {
// Build the hierarchical content to be used during insertion into DOM
newItem.tmpl = fn;
newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem );
newItem.key = ++itemKey;
// Keep track of new template item, until it is stored as jQuery Data on DOM element
(stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem;
}
return newItem;
}
// Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core).
jQuery.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
var ret = [], insert = jQuery( selector ), elems, i, l, tmplItems,
parent = this.length === 1 && this[0].parentNode;
appendToTmplItems = newTmplItems || {};
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
ret = this;
} else {
for ( i = 0, l = insert.length; i < l; i++ ) {
cloneIndex = i;
elems = (i > 0 ? this.clone(true) : this).get();
jQuery( insert[i] )[ original ]( elems );
ret = ret.concat( elems );
}
cloneIndex = 0;
ret = this.pushStack( ret, name, insert.selector );
}
tmplItems = appendToTmplItems;
appendToTmplItems = null;
jQuery.tmpl.complete( tmplItems );
return ret;
};
});
jQuery.fn.extend({
// Use first wrapped element as template markup.
// Return wrapped set of template items, obtained by rendering template against data.
tmpl: function( data, options, parentItem ) {
return jQuery.tmpl( this[0], data, options, parentItem );
},
// Find which rendered template item the first wrapped DOM element belongs to
tmplItem: function() {
return jQuery.tmplItem( this[0] );
},
// Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template.
template: function( name ) {
return jQuery.template( name, this[0] );
},
domManip: function( args, table, callback, options ) {
if ( args[0] && jQuery.isArray( args[0] )) {
var dmArgs = jQuery.makeArray( arguments ), elems = args[0], elemsLength = elems.length, i = 0, tmplItem;
while ( i < elemsLength && !(tmplItem = jQuery.data( elems[i++], "tmplItem" ))) {}
if ( tmplItem && cloneIndex ) {
dmArgs[2] = function( fragClone ) {
// Handler called by oldManip when rendered template has been inserted into DOM.
jQuery.tmpl.afterManip( this, fragClone, callback );
};
}
oldManip.apply( this, dmArgs );
} else {
oldManip.apply( this, arguments );
}
cloneIndex = 0;
if ( !appendToTmplItems ) {
jQuery.tmpl.complete( newTmplItems );
}
return this;
}
});
jQuery.extend({
// Return wrapped set of template items, obtained by rendering template against data.
tmpl: function( tmpl, data, options, parentItem ) {
var ret, topLevel = !parentItem;
if ( topLevel ) {
// This is a top-level tmpl call (not from a nested template using {{tmpl}})
parentItem = topTmplItem;
tmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl );
wrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level
} else if ( !tmpl ) {
// The template item is already associated with DOM - this is a refresh.
// Re-evaluate rendered template for the parentItem
tmpl = parentItem.tmpl;
newTmplItems[parentItem.key] = parentItem;
parentItem.nodes = [];
if ( parentItem.wrapped ) {
updateWrapped( parentItem, parentItem.wrapped );
}
// Rebuild, without creating a new template item
return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) ));
}
if ( !tmpl ) {
return []; // Could throw...
}
if ( typeof data === "function" ) {
data = data.call( parentItem || {} );
}
if ( options && options.wrapped ) {
updateWrapped( options, options.wrapped );
}
ret = jQuery.isArray( data ) ?
jQuery.map( data, function( dataItem ) {
return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;
}) :
[ newTmplItem( options, parentItem, tmpl, data ) ];
return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret;
},
// Return rendered template item for an element.
tmplItem: function( elem ) {
var tmplItem;
if ( elem instanceof jQuery ) {
elem = elem[0];
}
while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, "tmplItem" )) && (elem = elem.parentNode) ) {}
return tmplItem || topTmplItem;
},
// Set:
// Use $.template( name, tmpl ) to cache a named template,
// where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc.
// Use $( "selector" ).template( name ) to provide access by name to a script block template declaration.
// Get:
// Use $.template( name ) to access a cached template.
// Also $( selectorToScriptBlock ).template(), or $.template( null, templateString )
// will return the compiled template, without adding a name reference.
// If templateString includes at least one HTML tag, $.template( templateString ) is equivalent
// to $.template( null, templateString )
template: function( name, tmpl ) {
if (tmpl) {
// Compile template and associate with name
if ( typeof tmpl === "string" ) {
// This is an HTML string being passed directly in.
tmpl = buildTmplFn( tmpl );
} else if ( tmpl instanceof jQuery ) {
tmpl = tmpl[0] || {};
}
if ( tmpl.nodeType ) {
// If this is a template block, use cached copy, or generate tmpl function and cache.
tmpl = jQuery.data( tmpl, "tmpl" ) || jQuery.data( tmpl, "tmpl", buildTmplFn( tmpl.innerHTML ));
// Issue: In IE, if the container element is not a script block, the innerHTML will remove quotes from attribute values whenever the value does not include white space.
// This means that foo="${x}" will not work if the value of x includes white space: foo="${x}" -> foo=value of x.
// To correct this, include space in tag: foo="${ x }" -> foo="value of x"
}
return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl;
}
// Return named compiled template
return name ? (typeof name !== "string" ? jQuery.template( null, name ):
(jQuery.template[name] ||
// If not in map, and not containing at least on HTML tag, treat as a selector.
// (If integrated with core, use quickExpr.exec)
jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null;
},
encode: function( text ) {
// Do HTML encoding replacing < > & and ' and " by corresponding entities.
return ("" + text).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;");
}
});
jQuery.extend( jQuery.tmpl, {
tag: {
"tmpl": {
_default: { $2: "null" },
open: "if($notnull_1){__=__.concat($item.nest($1,$2));}"
// tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions)
// This means that {{tmpl foo}} treats foo as a template (which IS a function).
// Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}.
},
"wrap": {
_default: { $2: "null" },
open: "$item.calls(__,$1,$2);__=[];",
close: "call=$item.calls();__=call._.concat($item.wrap(call,__));"
},
"each": {
_default: { $2: "$index, $value" },
open: "if($notnull_1){$.each($1a,function($2){with(this){",
close: "}});}"
},
"if": {
open: "if(($notnull_1) && $1a){",
close: "}"
},
"else": {
_default: { $1: "true" },
open: "}else if(($notnull_1) && $1a){"
},
"html": {
// Unecoded expression evaluation.
open: "if($notnull_1){__.push($1a);}"
},
"=": {
// Encoded expression evaluation. Abbreviated form is ${}.
_default: { $1: "$data" },
open: "if($notnull_1){__.push($.encode($1a));}"
},
"!": {
// Comment tag. Skipped by parser
open: ""
}
},
// This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events
complete: function( items ) {
newTmplItems = {};
},
// Call this from code which overrides domManip, or equivalent
// Manage cloning/storing template items etc.
afterManip: function afterManip( elem, fragClone, callback ) {
// Provides cloned fragment ready for fixup prior to and after insertion into DOM
var content = fragClone.nodeType === 11 ?
jQuery.makeArray(fragClone.childNodes) :
fragClone.nodeType === 1 ? [fragClone] : [];
// Return fragment to original caller (e.g. append) for DOM insertion
callback.call( elem, fragClone );
// Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data.
storeTmplItems( content );
cloneIndex++;
}
});
//========================== Private helper functions, used by code above ==========================
function build( tmplItem, nested, content ) {
// Convert hierarchical content into flat string array
// and finally return array of fragments ready for DOM insertion
var frag, ret = content ? jQuery.map( content, function( item ) {
return (typeof item === "string") ?
// Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM.
(tmplItem.key ? item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : item) :
// This is a child template item. Build nested template.
build( item, tmplItem, item._ctnt );
}) :
// If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}.
tmplItem;
if ( nested ) {
return ret;
}
// top-level template
ret = ret.join("");
// Support templates which have initial or final text nodes, or consist only of text
// Also support HTML entities within the HTML markup.
ret.replace( /^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function( all, before, middle, after) {
frag = jQuery( middle ).get();
storeTmplItems( frag );
if ( before ) {
frag = unencode( before ).concat(frag);
}
if ( after ) {
frag = frag.concat(unencode( after ));
}
});
return frag ? frag : unencode( ret );
}
function unencode( text ) {
// Use createElement, since createTextNode will not render HTML entities correctly
var el = document.createElement( "div" );
el.innerHTML = text;
return jQuery.makeArray(el.childNodes);
}
// Generate a reusable function that will serve to render a template against data
function buildTmplFn( markup ) {
return new Function("jQuery","$item",
// Use the variable __ to hold a string array while building the compiled template. (See https://github.com/jquery/jquery-tmpl/issues#issue/10).
"var $=jQuery,call,__=[],$data=$item.data;" +
// Introduce the data as local variables using with(){}
"with($data){__.push('" +
// Convert the template into pure JavaScript
jQuery.trim(markup)
.replace( /([\\'])/g, "\\$1" )
.replace( /[\r\t\n]/g, " " )
.replace( /\$\{([^\}]*)\}/g, "{{= $1}}" )
.replace( /\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function( all, slash, type, fnargs, target, parens, args ) {
var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect;
if ( !tag ) {
throw "Unknown template tag: " + type;
}
def = tag._default || [];
if ( parens && !/\w$/.test(target)) {
target += parens;
parens = "";
}
if ( target ) {
target = unescape( target );
args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : "");
// Support for target being things like a.toLowerCase();
// In that case don't call with template item as 'this' pointer. Just evaluate...
expr = parens ? (target.indexOf(".") > -1 ? target + unescape( parens ) : ("(" + target + ").call($item" + args)) : target;
exprAutoFnDetect = parens ? expr : "(typeof(" + target + ")==='function'?(" + target + ").call($item):(" + target + "))";
} else {
exprAutoFnDetect = expr = def.$1 || "null";
}
fnargs = unescape( fnargs );
return "');" +
tag[ slash ? "close" : "open" ]
.split( "$notnull_1" ).join( target ? "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" : "true" )
.split( "$1a" ).join( exprAutoFnDetect )
.split( "$1" ).join( expr )
.split( "$2" ).join( fnargs || def.$2 || "" ) +
"__.push('";
}) +
"');}return __;"
);
}
function updateWrapped( options, wrapped ) {
// Build the wrapped content.
options._wrap = build( options, true,
// Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string.
jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()]
).join("");
}
function unescape( args ) {
return args ? args.replace( /\\'/g, "'").replace(/\\\\/g, "\\" ) : null;
}
function outerHtml( elem ) {
var div = document.createElement("div");
div.appendChild( elem.cloneNode(true) );
return div.innerHTML;
}
// Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance.
function storeTmplItems( content ) {
var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m;
for ( i = 0, l = content.length; i < l; i++ ) {
if ( (elem = content[i]).nodeType !== 1 ) {
continue;
}
elems = elem.getElementsByTagName("*");
for ( m = elems.length - 1; m >= 0; m-- ) {
processItemKey( elems[m] );
}
processItemKey( elem );
}
function processItemKey( el ) {
var pntKey, pntNode = el, pntItem, tmplItem, key;
// Ensure that each rendered template inserted into the DOM has its own template item,
if ( (key = el.getAttribute( tmplItmAtt ))) {
while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { }
if ( pntKey !== key ) {
// The next ancestor with a _tmplitem expando is on a different key than this one.
// So this is a top-level element within this template item
// Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment.
pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0;
if ( !(tmplItem = newTmplItems[key]) ) {
// The item is for wrapped content, and was copied from the temporary parent wrappedItem.
tmplItem = wrappedItems[key];
tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode] );
tmplItem.key = ++itemKey;
newTmplItems[itemKey] = tmplItem;
}
if ( cloneIndex ) {
cloneTmplItem( key );
}
}
el.removeAttribute( tmplItmAtt );
} else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) {
// This was a rendered element, cloned during append or appendTo etc.
// TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem.
cloneTmplItem( tmplItem.key );
newTmplItems[tmplItem.key] = tmplItem;
pntNode = jQuery.data( el.parentNode, "tmplItem" );
pntNode = pntNode ? pntNode.key : 0;
}
if ( tmplItem ) {
pntItem = tmplItem;
// Find the template item of the parent element.
// (Using !=, not !==, since pntItem.key is number, and pntNode may be a string)
while ( pntItem && pntItem.key != pntNode ) {
// Add this element as a top-level node for this rendered template item, as well as for any
// ancestor items between this item and the item of its parent element
pntItem.nodes.push( el );
pntItem = pntItem.parent;
}
// Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering...
delete tmplItem._ctnt;
delete tmplItem._wrap;
// Store template item as jQuery data on the element
jQuery.data( el, "tmplItem", tmplItem );
}
function cloneTmplItem( key ) {
key = key + keySuffix;
tmplItem = newClonedItems[key] =
(newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent ));
}
}
}
//---- Helper functions for template item ----
function tiCalls( content, tmpl, data, options ) {
if ( !content ) {
return stack.pop();
}
stack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options });
}
function tiNest( tmpl, data, options ) {
// nested template, using {{tmpl}} tag
return jQuery.tmpl( jQuery.template( tmpl ), data, options, this );
}
function tiWrap( call, wrapped ) {
// nested template, using {{wrap}} tag
var options = call.options || {};
options.wrapped = wrapped;
// Apply the template, which may incorporate wrapped content,
return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item );
}
function tiHtml( filter, textOnly ) {
var wrapped = this._wrap;
return jQuery.map(
jQuery( jQuery.isArray( wrapped ) ? wrapped.join("") : wrapped ).filter( filter || "*" ),
function(e) {
return textOnly ?
e.innerText || e.textContent :
e.outerHTML || outerHtml(e);
});
}
function tiUpdate() {
var coll = this.nodes;
jQuery.tmpl( null, null, null, this).insertBefore( coll[0] );
jQuery( coll ).remove();
}
})( jQuery );