From e6795f75a45db03bd79105ca788e4f971ed3ba7f Mon Sep 17 00:00:00 2001 From: flyskyko Date: Fri, 30 Sep 2011 13:05:18 +0000 Subject: [PATCH] issue 207, create min js git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9465 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/xe.js | 2 +- common/js/xe.min.js | 2 +- modules/admin/tpl/js/admin.min.js | 14 +++++++------- .../components/multimedia_link/tpl/popup.min.js | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/js/xe.js b/common/js/xe.js index d7b13d815..65da76df5 100644 --- a/common/js/xe.js +++ b/common/js/xe.js @@ -620,7 +620,7 @@ function winopen(url, target, attribute) { function popopen(url, target) { if(typeof(target) == "undefined") target = "_blank"; if(typeof(xeVid)!='undefined' && url.indexOf(request_uri)>-1 && !url.getQuery('vid')) url = url.setQuery('vid',xeVid); - winopen(url, target, "left=10,top=10,width=10,height=10,scrollbars=no,resizable=yes,toolbars=no"); + winopen(url, target, "width=650,height=500,scrollbars=yes,resizable=yes,toolbars=no"); } /** diff --git a/common/js/xe.min.js b/common/js/xe.min.js index 66c2c3ed5..7a1403530 100644 --- a/common/js/xe.min.js +++ b/common/js/xe.min.js @@ -19,7 +19,7 @@ String.prototype.setQuery=function(a,b){var d=this.indexOf("?"),c=this.replace(/ c.replace(d,e);d=!1;if(typeof enforce_ssl!="undefined"&&enforce_ssl)d=!0;else if(typeof ssl_actions!="undefined"&&typeof ssl_actions.length!="undefined"&&c.getQuery("act")){e=c.getQuery("act");for(i=0;i-1&&!a.getQuery("vid")&&(a=a.setQuery("vid",xeVid));try{b!="_blank"&&winopen_list[b]&&(winopen_list[b].close(),winopen_list[b]=null)}catch(c){}typeof b=="undefined"&&(b="_blank");typeof d=="undefined"&&(d="");a=window.open(a,b,d);a.focus();b!="_blank"&&(winopen_list[b]=a)} -function popopen(a,b){typeof b=="undefined"&&(b="_blank");typeof xeVid!="undefined"&&a.indexOf(request_uri)>-1&&!a.getQuery("vid")&&(a=a.setQuery("vid",xeVid));winopen(a,b,"left=10,top=10,width=10,height=10,scrollbars=no,resizable=yes,toolbars=no")}function sendMailTo(a){location.href="mailto:"+a}function move_url(a,b){if(!a)return!1;typeof b=="undefined"&&(b="N");b=b=="N"?!1:!0;/^\./.test(a)&&(a=request_uri+a);b?winopen(a):location.href=a;return!1} +function popopen(a,b){typeof b=="undefined"&&(b="_blank");typeof xeVid!="undefined"&&a.indexOf(request_uri)>-1&&!a.getQuery("vid")&&(a=a.setQuery("vid",xeVid));winopen(a,b,"width=650,height=500,scrollbars=yes,resizable=yes,toolbars=no")}function sendMailTo(a){location.href="mailto:"+a}function move_url(a,b){if(!a)return!1;typeof b=="undefined"&&(b="N");b=b=="N"?!1:!0;/^\./.test(a)&&(a=request_uri+a);b?winopen(a):location.href=a;return!1} function displayMultimedia(a,b,d,c){(a=_displayMultimedia(a,b,d,c))&&document.writeln(a)} function _displayMultimedia(a,b,d,c){a.indexOf("files")==0&&(a=request_uri+a);var c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:!1},c||{}),e=c.autostart&&c.autostart!="false"?"true":"false";delete c.autostart;var g="",g=g="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a))g='';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))g='';else if(/\.swf/i.test(a)){g='input:text,>textarea").data("multilang-value",h[p]).val(h[p]).prev("label").css("visibility", "hidden");g=d();j=0;e.val(o[j]);i=s;c();return!1}}).data("layer_index",m).find(".langInput").attr("id","langInput_"+m++),k=b.find("h2 strong").text(),h=b.find("h2 a").text(),f=b.find("input:text,textarea").change(function(){var a=d()==g?0:1;a!=j&&e.val(o[j=a])}),e=b.find("input[type=submit]").click(function(){function c(){b.hide().closest(".multiLangEdit").find(".vLang").eq(0).val("$user_lang->"+h).end().eq(1).val(b.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val()).end()} function e(){var b={};if(h&&i==s)b.lang_name=h;f.each(function(){var d=a(this);b[d.parent("li").attr("class")]=d.val()});a.exec_json("module.procModuleAdminInsertLang",b,t)}function t(a){if(a&&!a.error&&a.name)h=a.name,c()}var h=b.data("multilang-current-name");d()==g?c():e();return!1}),o=e.val().split("|"),e.val(o[0]))}function b(a){var b,d,c={},e;for(b=0,d=a.length;bul");!d||k?(k=!1,c.parent().hide()):(b.data("mle-langkey").val(""),f=setTimeout(function(){b.addClass("loading");c.parent().is(":visible")&&c.parent().hide();a.exec_json("module.getLangListByLangcodeForAutoComplete",{search_keyword:d},function(d){return function(f){var h= -f.results,g,n;if(!f.error&&h&&e==d+1){b.removeClass("loading");c.empty();for(g=0,n=h.length;g').data("langkey",h[g].name).text(h[g].value),a("
  • ").append(f).appendTo(c);j.trigger("show")}}}(e++))},100))},keydown:function(b){var d,c,e=b.which;a(this);b=j.find(">ul");if(!j.is(":visible")||a.inArray(e,[38,40,13,27])<0)return!0;if(e==27)return j.trigger("hide"),!1;d=b.find("button.active");if(e==13)return d.click(),!1;if(!d.length)return b.find("li>button:first").addClass("active"), -!1;e==38?(c=d.parent().prev("li").find(">button"),c.length||(c=b.find(">li:last>button"))):e==40&&(c=d.parent().next("li").find(">button"),c.length||(c=b.find(">li:first>button")));d.removeClass("active");c.addClass("active");return!1},focus:function(){var b=a(this),d=a.trim(b.val()),c=b.closest(".multiLangEdit");b.after(j);b.data("mle-container")||b.data("mle-container",c);b.data("mle-langkey")||b.data("mle-langkey",c.find("input.vLang:first"));(function(){var c=a.trim(b.val());c!=d&&(d=c,b.trigger("textchange")); -g=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(g);g=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(i);i=setTimeout(function(){h?h=!1:b.find(":focus").is(".vLang,button._btnLang")||j.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var e,f,g;e=a(this);f=a(e.attr("href")).insertBefore(e);g=e.closest(".multiLangEdit").find("input.vLang,textarea.vLang");e=g.eq(0).val();g=g.eq(1).val();c(f);f.trigger("multilang-reset").removeClass("showChild").find(".langList").empty().end(); -f.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val(g).prev("label").css("visibility","hidden");j.trigger("hide");/^\$user_lang->(.+)$/.test(e)?(e="module.getModuleAdminLangListByName",g={lang_name:RegExp.$1}):(e="module.getModuleAdminLangListByValue",g={value:g});show_waiting_message=!1;a.exec_json(e,g,function(c){var e=c.lang_list,g;!c.error&&e&&(e=b(e),f.data("multilang-list",e),g=f.find(".langList"),a.each(e,function(b){var c=a("
  • ").appendTo(g),d=f.data("layer_index"); -a('').text(this[xe.current_lang]).data("multilang-name",b).appendTo(c)}),d(e)>1&&f.addClass("showChild"),f.find(".langList>li>a:first").click())});show_waiting_message=!0}}).delegate("button._btnLang",{click:function(){var b=a(this);k=!0;j.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(){h=!0},focus:function(){a(this).mouseover()}, -mouseover:function(){a(this).closest("ul").find("button.active").removeClass("active")}});j=a('
      ').bind("show",function(){a(this).show()}).bind("hide",function(){a(this).hide()});var m=0}); +b++;return b}var g=null,f=null,e=0,i=null,k=!1,h=!1,j;a(".multiLangEdit").delegate("input.vLang:text,textarea.vLang",{textchange:function(){var b=a(this),d=a.trim(b.val()),c;f&&(clearTimeout(f),f=null);b.data("mle-container");c=j.find(">ul");!d||k?(k=!1,c.parent().hide()):(b.data("mle-langkey").val(""),b.prev("input.vLang").val(d),f=setTimeout(function(){b.addClass("loading");c.parent().is(":visible")&&c.parent().hide();show_waiting_message=!1;a.exec_json("module.getLangListByLangcodeForAutoComplete", +{search_keyword:d},function(d){return function(f){var h=f.results,g,n;if(!f.error&&h&&e==d+1){b.removeClass("loading");c.empty();for(g=0,n=h.length;g').data("langkey",h[g].name).text(h[g].value),a("
    • ").append(f).appendTo(c);j.trigger("show")}}}(e++));show_waiting_message=!0},100))},keydown:function(b){var d,c,e=b.which;a(this);b=j.find(">ul");if(!j.is(":visible")||a.inArray(e,[38,40,13,27])<0)return!0;if(e==27)return j.trigger("hide"),!1;d= +b.find("button.active");if(e==13)return d.click(),!1;if(!d.length)return b.find("li>button:first").addClass("active"),!1;e==38?(c=d.parent().prev("li").find(">button"),c.length||(c=b.find(">li:last>button"))):e==40&&(c=d.parent().next("li").find(">button"),c.length||(c=b.find(">li:first>button")));d.removeClass("active");c.addClass("active");return!1},focus:function(){var b=a(this),d=a.trim(b.val()),c=b.closest(".multiLangEdit");b.after(j);b.data("mle-container")||b.data("mle-container",c);b.data("mle-langkey")|| +b.data("mle-langkey",c.find("input.vLang:first"));(function(){var c=a.trim(b.val());c!=d&&(d=c,b.trigger("textchange"));g=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(g);g=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(i);i=setTimeout(function(){h?h=!1:b.find(":focus").is(".vLang,button._btnLang")||j.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var e,f,g;e=a(this);f=a(e.attr("href")).insertBefore(e); +g=e.closest(".multiLangEdit").find("input.vLang,textarea.vLang");e=g.eq(0).val();g=g.eq(1).val();c(f);f.trigger("multilang-reset").removeClass("showChild").find(".langList").empty().end();f.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val(g).prev("label").css("visibility","hidden");j.trigger("hide");/^\$user_lang->(.+)$/.test(e)?(e="module.getModuleAdminLangListByName",g={lang_name:RegExp.$1}):(e="module.getModuleAdminLangListByValue",g={value:g});show_waiting_message=!1;a.exec_json(e, +g,function(c){var e=c.lang_list,g;!c.error&&e&&(e=b(e),f.data("multilang-list",e),g=f.find(".langList"),a.each(e,function(b){var c=a("
    • ").appendTo(g),d=f.data("layer_index");a('').text(this[xe.current_lang]).data("multilang-name",b).appendTo(c)}),d(e)>1&&f.addClass("showChild"),f.find(".langList>li>a:first").click())});show_waiting_message=!0}}).delegate("button._btnLang",{click:function(){var b=a(this);k=!0;j.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(){h=!0},focus:function(){a(this).mouseover()},mouseover:function(){a(this).closest("ul").find("button.active").removeClass("active")}});j=a('
        ').bind("show",function(){a(this).show()}).bind("hide",function(){a(this).hide()});var m=0}); jQuery(function(a){a(".filebox").bind("before-open.mw",function(){function c(f){d.html(f.html);d.find(".lined .select").bind("click",function(){var c=a(this).parent().find("img.filebox_item").attr("src");b.trigger("filebox.selected",[c]);b.trigger("close.mw");return!1});d.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},c);a(window).scrollTop(a(g).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},c);a(window).scrollTop(a(g).find(".modalClose").offset().top);return!1})}var b,d,g;b=a(this);g=b.attr("href");d=a(g).find(".filebox_list");a.exec_json("module.getFileBoxListHtml",{page:"1"},c)})}); function showWaitingFogLayer(){var a=jQuery('');a.height(jQuery(window).height());jQuery(".wfsr").wrap('
        ').before(a)}function hideWaitingFogLayer(){jQuery(".wfsr").prev("span").remove();jQuery(".wfsr").unwrap()}function doInstallModule(a){var c=[];c.module_name=a;exec_xml("install","procInstallAdminInstall",c,completeInstallModule);showWaitingFogLayer()} diff --git a/modules/editor/components/multimedia_link/tpl/popup.min.js b/modules/editor/components/multimedia_link/tpl/popup.min.js index 2caa8fd44..20a71bc7f 100644 --- a/modules/editor/components/multimedia_link/tpl/popup.min.js +++ b/modules/editor/components/multimedia_link/tpl/popup.min.js @@ -2,4 +2,4 @@ * popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여 * 있으면 가져와서 원하는 곳에 삽입 **/ -jQuery(function($){(function(){if(!is_def(opener))return;var $node=$(opener.editorPrevNode).filter('img'),attrs;if(!$node.length)return;attrs={url:$node.attr('multimedia_src'),caption:$node.attr('alt'),width:$node.width()-4,height:$node.height()-4,wmode:$node.attr('wmode')};$.each(attrs,function(key,val){get_by_id('multimedia_'+key).value=val})})();$('a._insert').click(function(){if(!is_def(opener))return;var el_wmode=get_by_id('fo').elements['multimedia_wmode'],attrs={alt:get_by_id('multimedia_caption').value,width:get_by_id('multimedia_width').value||400,height:get_by_id('multimedia_height').value||400,wmode:el_wmode.value||el_wmode.options[0].value,auto_start:get_by_id('multimedia_auto_start').checked?'true':'false',multimedia_src:get_by_id('multimedia_url').value.replace(request_uri,'')};if(!attrs.multimedia_src){window.close();return};var html='';html=html.replace(/(\w+)=""/,function(m0,m1){return attrs[m1]?(m1+'="'+attrs[m1]+'"'):''});opener.editorFocus(opener.editorPrevSrl);var iframe_obj=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(iframe_obj,html);opener.editorFocus(opener.editorPrevSrl);window.close()})}) \ No newline at end of file +jQuery(function($){(function(){if(!is_def(opener))return;var $node=$(opener.editorPrevNode).filter('img'),attrs;if(!$node.length)return;attrs={url:$node.attr('multimedia_src'),caption:$node.attr('alt'),width:$node.width()-4,height:$node.height()-4,wmode:$node.attr('wmode')};$.each(attrs,function(key,val){get_by_id('multimedia_'+key).value=val})})();$('.btnArea button').click(function(){if(!is_def(opener))return;var el_wmode=get_by_id('fo').elements['multimedia_wmode'],attrs={alt:get_by_id('multimedia_caption').value,width:get_by_id('multimedia_width').value||400,height:get_by_id('multimedia_height').value||400,wmode:el_wmode.value||el_wmode.options[0].value,auto_start:get_by_id('multimedia_auto_start').checked?'true':'false',multimedia_src:get_by_id('multimedia_url').value.replace(request_uri,'')};if(!attrs.multimedia_src){window.close();return};var html='';html=html.replace(/(\w+)=""/,function(m0,m1){return attrs[m1]?(m1+'="'+attrs[m1]+'"'):''});opener.editorFocus(opener.editorPrevSrl);var iframe_obj=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(iframe_obj,html);opener.editorFocus(opener.editorPrevSrl);window.close()})}) \ No newline at end of file