issue 2864. fixed a bug. does not override a window.alert() on IE.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12724 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2013-02-07 09:18:19 +00:00
parent 2e8b49acce
commit c790b11694
6 changed files with 97 additions and 16 deletions

View file

@ -2372,7 +2372,7 @@ jQuery(function($){
jQuery(function($){
//_alert = alert;
try {
alert = function(){
window.alert = function(){
return $.xeMsgBox.alert.apply($.xeMsgBox, arguments);
}
setTimeout(function(){$('div.message.info').fadeOut(1000);}, 2500);

File diff suppressed because one or more lines are too long

View file

@ -3,4 +3,4 @@ function getFTPList(a){var b=jQuery("#ftp_form").get(0);b.ftp_root_path.value="u
"error","message"],a,b)}function removeFTPInfo(){var a={};exec_xml("install","procInstallAdminRemoveFTPInfo",a,filterAlertMessage,["error","message"],a)}
function completeGetFtpInfo(a){if(0!=a.error)alert(a.error),alert(a.message);else{var b=jQuery("#ftpSuggestion").empty(),c="";jQuery.isArray(a.list.item)||(a.list.item=[a.list.item]);pwd=jQuery("#ftp_form").get(0).ftp_root_path.value;"/"!=pwd&&(arr=pwd.split("/"),arr.pop(),arr.pop(),arr.push(""),target=arr.join("/"),c=c+"<li><button type='button' onclick=\"getFTPList('"+target+"')\">../</button></li>");for(var e=0;e<a.list.item.length;e++){var d=a.list.item[e];"../"!=d&&"./"!=d&&(c=c+"<li><button type='button' onclick=\"getFTPList('"+
pwd+d+"')\">"+d+"</button></li>")}b.append(jQuery("<ul>"+c+"</ul>"))}}var icon=null;function deleteIcon(a){var b=[];b.iconname=a;exec_xml("admin","procAdminRemoveIcons",b,iconDeleteMessage,["error","message"],b);icon=a}function iconDeleteMessage(a){alert(a.message);"0"==a.error&&("favicon.ico"==icon?jQuery(".faviconPreview img").attr("src","modules/admin/tpl/img/faviconSample.png"):"mobicon.png"==icon&&jQuery(".mobiconPreview img").attr("src","modules/admin/tpl/img/mobiconSample.png"))}
function doRecompileCacheFile(){confirm(xe.lang.confirm_run)&&(exec_xml("admin","procAdminRecompileCacheFile",[],completeCacheMessage),showWaitingFogLayer())}function completeCacheMessage(a){alert(a.message)}function doResetAdminMenu(){if(confirm(xe.lang.confirm_reset_admin_menu)){var a=[];a.menu_srl=admin_menu_srl;exec_xml("admin","procAdminMenuReset",a,completeResetAdminMenu);showWaitingFogLayer()}}function completeResetAdminMenu(){document.location.reload()};
function doRecompileCacheFile(){confirm(xe.lang.confirm_run)&&exec_xml("admin","procAdminRecompileCacheFile",[],completeCacheMessage)}function completeCacheMessage(a){alert(a.message)}function doResetAdminMenu(){if(confirm(xe.lang.confirm_reset_admin_menu)){var a=[];a.menu_srl=admin_menu_srl;exec_xml("admin","procAdminMenuReset",a,completeResetAdminMenu)}}function completeResetAdminMenu(){document.location.reload()};

View file

@ -1,7 +1,7 @@
jQuery(function(b){function k(a){if(moduleList=a.menuList){var c=b("#menuNameList"),e;for(e in moduleList){var f=moduleList[e],a=b('<optgroup label="'+e+'" />').appendTo(c),d;for(d in f)a.append('<option value="'+e+":"+d+'">'+f[d].title+"</option>")}}}var d,h=b("#editForm"),a=b("#listForm");b("a._add").click(function(){d=b(this).parent().prevAll("._item_key").val();h.find("input[name=parent_srl]").val(d);exec_xml("menu","procMenuAdminAllActList",[],k,["menuList"])});b("a._parent_delete").click(function(){var i=
b(this).parent().prevAll("._parent_key").val();a.find("input[name=menu_item_srl]").val(i);a.submit()});b("a._child_delete").click(function(){var i=b(this).parents("li").find("._item_key").val();a.find("input[name=menu_item_srl]").val(i);a.submit()})});
jQuery(function(b){function k(a,b){for(var c=0,e=0;a&&a!=b;)c+=a.offsetTop,e+=a.offsetLeft,a=a.offsetParent;return{top:c,left:e}}b("form.adminMap").delegate("li:not(.placeholder)","dropped.st",function(){var a=b(this),d;d=a.find(">input._parent_key");a.parent("ul").parent("li").length?d.val(a.parent("ul").parent("li").find(">input._item_key").val()):d.val("0")});var d=!1,h=b('<li class="placeholder">');b("form.adminMap>ul").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(a){var i,
c,e,f,m,n,j,l,g;if(!(b(a.target).is("a,input,label,textarea")||1!=a.which)){d=!0;c=b(this);n=c.height();m=c.width();e=c.parentsUntil(".adminMap").filter("ul");f=e.eq(-1);i=a.pageY;j=k(this,f.get(0));$clone=c.clone(!0).attr("target",!0);for(a=e.length-1;a;a--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();l=[];f.find("li").each(function(){if(c[0]===this||c.has(this).length)return!0;var a=k(this,f.get(0));l.push({top:a.top,bottom:a.top+32,$item:b(this)})});$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",
opacity:0.6,width:m,height:n,left:j.left,top:j.top,zIndex:100}).appendTo(f.eq(0));h.css({position:"absolute",opacity:0.6,width:m,height:"10px",left:j.left,top:j.top,zIndex:99}).appendTo(f.eq(0));c.css("opacity",0.6);b(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,d;g=null;a=j.top-(i-a.pageY);b=0;for(c=l.length;b<c;b++)d=l[b],d.top>a||d.bottom<a||(g={element:d.$item},d.$item.hasClass("parent")?(g.state="prepend",h.css("top",d.bottom-5)):d.top>a-12?(g.state="before",
jQuery(function(b){function l(a){if(moduleList=a.menuList){var c=b("#menuNameList"),e;for(e in moduleList){var f=moduleList[e];a=b('<optgroup label="'+e+'" />').appendTo(c);for(var d in f)a.append('<option value="'+e+":"+d+'">'+f[d].title+"</option>")}}}var d,h=b("#editForm"),a=b("#listForm");b("a._add").click(function(){d=b(this).parent().prevAll("._item_key").val();h.find("input[name=parent_srl]").val(d);exec_xml("menu","procMenuAdminAllActList",[],l,["menuList"])});b("a._parent_delete").click(function(){var j=
b(this).parent().prevAll("._parent_key").val();a.find("input[name=menu_item_srl]").val(j);a.submit()});b("a._child_delete").click(function(){var j=b(this).parents("li").find("._item_key").val();a.find("input[name=menu_item_srl]").val(j);a.submit()})});
jQuery(function(b){function l(a,b){for(var c=0,e=0;a&&a!=b;)c+=a.offsetTop,e+=a.offsetLeft,a=a.offsetParent;return{top:c,left:e}}b("form.adminMap").delegate("li:not(.placeholder)","dropped.st",function(){var a=b(this),d;d=a.find(">input._parent_key");a.parent("ul").parent("li").length?d.val(a.parent("ul").parent("li").find(">input._item_key").val()):d.val("0")});var d=!1,h=b('<li class="placeholder">');b("form.adminMap>ul").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(a){var j,
c,e,f,n,p,k,m,g;if(!(b(a.target).is("a,input,label,textarea")||1!=a.which)){d=!0;c=b(this);p=c.height();n=c.width();e=c.parentsUntil(".adminMap").filter("ul");f=e.eq(-1);j=a.pageY;k=l(this,f.get(0));$clone=c.clone(!0).attr("target",!0);for(a=e.length-1;a;a--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();m=[];f.find("li").each(function(){if(c[0]===this||c.has(this).length)return!0;var a=l(this,f.get(0));m.push({top:a.top,bottom:a.top+32,$item:b(this)})});$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",
opacity:0.6,width:n,height:p,left:k.left,top:k.top,zIndex:100}).appendTo(f.eq(0));h.css({position:"absolute",opacity:0.6,width:n,height:"10px",left:k.left,top:k.top,zIndex:99}).appendTo(f.eq(0));c.css("opacity",0.6);b(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,d;g=null;a=k.top-(j-a.pageY);b=0;for(c=m.length;b<c;b++)d=m[b],d.top>a||d.bottom<a||(g={element:d.$item},d.$item.hasClass("parent")?(g.state="prepend",h.css("top",d.bottom-5)):d.top>a-12?(g.state="before",
h.css("top",d.top-5)):(g.state="after",h.css("top",d.bottom-5)));$clone.css({top:a})}).bind("mouseup.st",function(){var a,e;d=!1;b(document).unbind("mousemove.st mouseup.st");c.css("opacity","");$clone.remove();h.remove();e=b("<li />").height(c.height());if(g){a=b(g.element);c.before(e);if("prepend"==g.state)a.find(">ul").length||a.find(">.side").after("<ul>"),a.find(">ul").prepend(c.hide());else a[g.state](c.hide());c.slideDown(100,function(){c.removeClass("active")});e.slideUp(100,function(){var a=
e.parent();e.remove();a.children("li").length||a.remove()});c.trigger("dropped.st")}});return!1}},"mouseover.st":function(){d||b(this).addClass("active");return!1},"mouseout.st":function(){d||b(this).removeClass("active");return!1}}).find("li li").prepend('<button type="button" class="moveTo">Move to</button>').end().end();b('<div id="dropzone-marker" />').css({display:"none",position:"absolute",backgroundColor:"#000",opacity:0.7}).appendTo("body")});

View file

@ -1,6 +1,6 @@
jQuery(function(c){function p(a,c){for(var b=0,g=0;a&&a!=c;)b+=a.offsetTop,g+=a.offsetLeft,a=a.offsetParent;return{top:b,left:g}}var l=!1,k=c('<li class="placeholder">');c("form.siteMap").delegate("li:not(.placeholder)",{"mousedown.st":function(a){var d,b,g,h,n,q,i,m,j;if(!(c(a.target).is("a,input,label,textarea")||1!=a.which)){l=!0;b=c(this);q=b.height();n=b.width();g=b.parentsUntil(".siteMap").filter("ul");h=g.eq(-1);h.css("position","relative");d=a.pageY;i=p(this,h.get(0));$clone=b.clone(!0).attr("target",
!0);for(a=g.length-1;a;a--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();m=[];h.find("li").each(function(){if(b[0]===this||b.has(this).length)return!0;var a=p(this,h.get(0));m.push({top:a.top,bottom:a.top+32,item:this})});$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:0.6,width:n,height:q,left:i.left,top:i.top,zIndex:100}).appendTo(h.eq(0));k.css({position:"absolute",opacity:0.6,width:n,height:"5px",left:i.left,top:i.top,zIndex:99}).appendTo(h.eq(0));
b.css("opacity",0.6);c(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f;j=null;a=i.top-(d-a.pageY);b=0;for(c=m.length;b<c;b++)if(f=a,e=m[b],0==b&&f<e.top&&(f=e.top),b==c-1&&f>e.bottom&&(f=e.bottom),e.top<=f&&e.bottom>=f){b=e.item;3>=Math.abs(e.top-f)?(k.css({top:e.top-3,height:"5px"}),f="before"):3>=Math.abs(e.bottom-f)?(k.css({top:e.bottom-3,height:"5px"}),f="after"):(k.css({top:e.top+3,height:"27px"}),f="prepend");j={element:b,state:f};break}$clone.css({top:a})}).bind("mouseup.st",
function(){var a,d;l=!1;c(document).unbind("mousemove.st mouseup.st");b.css("opacity","");$clone.remove();k.remove();d=c("<li />").height(b.height());if(j){a=c(j.element);b.before(d);if("prepend"==j.state)a.find(">ul").length||a.find(">.side").after("<ul>"),a.find(">ul").prepend(b.hide());else a[j.state](b.hide());b.slideDown(100,function(){b.removeClass("active")});d.slideUp(100,function(){var a=d.parent();d.remove();a.children("li").length||a.remove()});b.trigger("dropped.st")}});return!1}},"mouseover.st":function(){l||
c(this).addClass("active");return!1},"mouseout.st":function(){l||c(this).removeClass("active");return!1}}).find("li").prepend('<button type="button" class="moveTo">Move to</button>').append('<span class="vr"></span><span class="hr"></span>').find("input:text").focus(function(){var a=c(this),d=a.prev("label"),b=a.parent();a.width(b.width()-(parseInt(b.css("text-indent"))||0)-a.next(".side").width()-60).css("opacity","");d.hide()}).blur(function(){var a=c(this),d=a.prev("label"),b=a.val();a.width(0).css("opacity",
0);d.removeClass("no-text").empty().text(b).show();b||d.addClass("no-text").text("---")}).each(function(a){var d=c(this),a="sitemap-id-"+a;d.attr("id",a).css({width:0,opacity:0,overflow:"hidden"}).before("<label />").prev("label").attr("for",a).text(d.val())}).end().end()});
jQuery(function(c){function q(a,c){for(var b=0,g=0;a&&a!=c;)b+=a.offsetTop,g+=a.offsetLeft,a=a.offsetParent;return{top:b,left:g}}var m=!1,l=c('<li class="placeholder">');c("form.siteMap").delegate("li:not(.placeholder)",{"mousedown.st":function(a){var d,b,g,h,p,r,j,n,k;if(!(c(a.target).is("a,input,label,textarea")||1!=a.which)){m=!0;b=c(this);r=b.height();p=b.width();g=b.parentsUntil(".siteMap").filter("ul");h=g.eq(-1);h.css("position","relative");d=a.pageY;j=q(this,h.get(0));$clone=b.clone(!0).attr("target",
!0);for(a=g.length-1;a;a--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();n=[];h.find("li").each(function(){if(b[0]===this||b.has(this).length)return!0;var a=q(this,h.get(0));n.push({top:a.top,bottom:a.top+32,item:this})});$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:0.6,width:p,height:r,left:j.left,top:j.top,zIndex:100}).appendTo(h.eq(0));l.css({position:"absolute",opacity:0.6,width:p,height:"5px",left:j.left,top:j.top,zIndex:99}).appendTo(h.eq(0));
b.css("opacity",0.6);c(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f;k=null;a=j.top-(d-a.pageY);b=0;for(c=n.length;b<c;b++)if(f=a,e=n[b],0==b&&f<e.top&&(f=e.top),b==c-1&&f>e.bottom&&(f=e.bottom),e.top<=f&&e.bottom>=f){b=e.item;3>=Math.abs(e.top-f)?(l.css({top:e.top-3,height:"5px"}),f="before"):3>=Math.abs(e.bottom-f)?(l.css({top:e.bottom-3,height:"5px"}),f="after"):(l.css({top:e.top+3,height:"27px"}),f="prepend");k={element:b,state:f};break}$clone.css({top:a})}).bind("mouseup.st",
function(){var a,d;m=!1;c(document).unbind("mousemove.st mouseup.st");b.css("opacity","");$clone.remove();l.remove();d=c("<li />").height(b.height());if(k){a=c(k.element);b.before(d);if("prepend"==k.state)a.find(">ul").length||a.find(">.side").after("<ul>"),a.find(">ul").prepend(b.hide());else a[k.state](b.hide());b.slideDown(100,function(){b.removeClass("active")});d.slideUp(100,function(){var a=d.parent();d.remove();a.children("li").length||a.remove()});b.trigger("dropped.st")}});return!1}},"mouseover.st":function(){m||
c(this).addClass("active");return!1},"mouseout.st":function(){m||c(this).removeClass("active");return!1}}).find("li").prepend('<button type="button" class="moveTo">Move to</button>').append('<span class="vr"></span><span class="hr"></span>').find("input:text").focus(function(){var a=c(this),d=a.prev("label"),b=a.parent();a.width(b.width()-(parseInt(b.css("text-indent"))||0)-a.next(".side").width()-60).css("opacity","");d.hide()}).blur(function(){var a=c(this),d=a.prev("label"),b=a.val();a.width(0).css("opacity",
0);d.removeClass("no-text").empty().text(b).show();b||d.addClass("no-text").text("---")}).each(function(a){var d=c(this);a="sitemap-id-"+a;d.attr("id",a).css({width:0,opacity:0,overflow:"hidden"}).before("<label />").prev("label").attr("for",a).text(d.val())}).end().end()});

View file

@ -2,5 +2,5 @@ jQuery(function(b){b("#theme,#skin").find("button.showAll").text("Show All").cli
b(this);a.delegate("span.thumb","click",function(){b(this).closest(".a").nextAll("a.prevToggle:first").trigger("toggle.tp");return!1}).append(a.next(".a").find(">li.noDirection:first"))}).end().after('<a href="#toggle-tp" class="prevToggle">Show</a>').next("a.prevToggle").bind("toggle.tp",function(){var a=b(this).prev(".a");a.closest(".thumbPreview").children("li").removeClass("highlight").end();a.parent().toggleClass("active").hasClass("active")?a.slideDown(100).closest("li").addClass("highlight"):
a.slideUp(100)}).click(function(){b(this).trigger("toggle.tp");return!1}).end().find("span.thumb").attr("role","radio").click(function(){b(this).next("input:radio").prop("checked",!0).change()}).end().find("> .i > label").attr("title",function(){return b(this).text()}).end().find("input:radio").bind("redraw",function(){var a=b(this),c=a.closest(".a").prev(".a"),e=a.val();e!=c.find(">li:eq(1)").data("value")&&(c.find(">li:not(.noDirection)").remove(),e?(a.closest("li").clone().find("input:radio").remove().end().find("label").wrapInner("<strong>").find(">strong").text(function(){return b(this).attr("title")}).unwrap().end().end().appendTo(c),
c.find(">li.noDirection").hide()):c.children("li.noDirection").show())}).change(function(){var a=b(this);a.trigger("redraw");"themeItem"!=a.attr("name")&&b("#theme").trigger("select-theme")}).filter(":checked").change().end().filter('[name="themeItem"]').change(function(){var a=b(this),c,e;if(a=(b("#theme").data("themes")||{})[a.val()]){c=b("#skin").find(".i > input:radio").filter('[value=""]').prop("checked",!0).end();for(var d in a)a.hasOwnProperty(d)&&(e="layout"==d?d:d+"-skin",a[d]&&c.filter('[name="'+
e+'"][value="'+a[d]+'"]').prop("checked",!0));c.filter(":checked").trigger("redraw")}}).end();b("#theme").bind("select-theme",function(){function a(a){var b="",c;for(c in a)if(a.hasOwnProperty(c)&&("layout"==c||i.elements[c+"-skin"]))b+=c+"\t"+a[c]+"\n";return b}var c=b(this),e,d,i,f,j={};e=c.data("themes")||{};d=b("#skin").find(".i > input:radio");f=d.filter(':checked[value!=""]').get();i=d.get(0).form;for(var g=0,k=f.length;g<k;g++)d=f[g].name.match(/^layout|(\w+)-skin$/),j[d[1]||d[0]]=f[g].value;
f=a(j);for(var h in e)if(e.hasOwnProperty(h)&&f==a(e[h])){c.find('input:radio[name="themeItem"][value="'+h+'"]').prop("checked",!0).change();return}c.find('input:radio[name="themeItem"][value="user_define"]').prop("checked",!0).change()})});
e+'"][value="'+a[d]+'"]').prop("checked",!0));c.filter(":checked").trigger("redraw")}}).end();b("#theme").bind("select-theme",function(){function a(a){var b="",c;for(c in a)if(a.hasOwnProperty(c)&&("layout"==c||j.elements[c+"-skin"]))b+=c+"\t"+a[c]+"\n";return b}var c=b(this),e,d,j,f,k={};e=c.data("themes")||{};d=b("#skin").find(".i > input:radio");f=d.filter(':checked[value!=""]').get();j=d.get(0).form;for(var g=0,l=f.length;g<l;g++)d=f[g].name.match(/^layout|(\w+)-skin$/),k[d[1]||d[0]]=f[g].value;
f=a(k);for(var h in e)if(e.hasOwnProperty(h)&&f==a(e[h])){c.find('input:radio[name="themeItem"][value="'+h+'"]').prop("checked",!0).change();return}c.find('input:radio[name="themeItem"][value="user_define"]').prop("checked",!0).change()})});