From 2801986d1373e3ac85bf63454a16931b68c4cf18 Mon Sep 17 00:00:00 2001 From: taggon Date: Tue, 4 Oct 2011 09:35:01 +0000 Subject: [PATCH] Fixed a bug that an image deson't display user info popup git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9475 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/common.js | 2 +- common/js/xe.js | 2 +- common/js/xe.min.js | 64 ++++++++++++++++++++++----------------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index 9e557dc45..200063f47 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -925,7 +925,7 @@ jQuery(function($){ $area.hide(); var $target = $(evt.target).filter('a,div,span'); - if(!$target.length) $target = $target.parents('a,div,span').eq(0); + if(!$target.length) $target = $(evt.target).closest('a,div,span'); if(!$target.length) return; // 객체의 className값을 구함 diff --git a/common/js/xe.js b/common/js/xe.js index 65da76df5..6a3d1ab03 100644 --- a/common/js/xe.js +++ b/common/js/xe.js @@ -1209,7 +1209,7 @@ jQuery(function($){ $area.hide(); var $target = $(evt.target).filter('a,div,span'); - if(!$target.length) $target = $target.parents('a,div,span').eq(0); + if(!$target.length) $target = $(evt.target).closest('a,div,span'); if(!$target.length) return; // 객체의 className값을 구함 diff --git a/common/js/xe.min.js b/common/js/xe.min.js index 7a1403530..82ed6c8e1 100644 --- a/common/js/xe.min.js +++ b/common/js/xe.min.js @@ -3,25 +3,25 @@ * @author NHN (developers@xpressengine.com) * @brief XE Common JavaScript **/ -(function(a){function b(){return function(){var g=this;if(a.isArray(this._plugins))this._plugins=[];this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b))return!0;if(!/^API_([A-Z0-9_]+)$/.test(c))return!0;var d=RegExp.$1,e=function(a,b){return g[c](a,b)};g._messages?g._messages[d]=[e]:g._binded_fn[d]=e});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,e=[];d={_plugins:[],_messages:{},getPlugin:function(g){g=g.toLowerCase();return a.isArray(this._plugins[g])? -this._plugins[g]:[]},registerPlugin:function(g){var c=this,b=g.getName().toLowerCase();if(a.inArray(g,this._plugins)>=0)return!1;this._plugins.push(g);a.isArray(this._plugins[b])||(this._plugins[b]=[]);this._plugins[b].push(g);a.each(g._binded_fn,function(a,g){c.registerHandler(a,g)});g.oApp=this;a.isFunction(g.activate)&&g.activate();return!0},registerHandler:function(g,c){var b=this._messages,g=g.toUpperCase();a.isArray(b[g])||(b[g]=[]);b[g].push(c)},cast:function(a,c){return this._cast(this,a, -c||[])},broadcast:function(a,c,b){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,c,b)},_cast:function(g,c,b){var d,e=this._messages,c=c.toUpperCase();if(!e["BEFORE_"+c]&&!this["API_BEFORE_"+c]||this._cast(g,"BEFORE_"+c,b)){var h=[];if(a.isArray(e[c]))for(d=0;d=0)return false;this._plugins.push(g);a.isArray(this._plugins[b])||(this._plugins[b]=[]);this._plugins[b].push(g);a.each(g._binded_fn,function(a,g){c.registerHandler(a,g)});g.oApp=this;a.isFunction(g.activate)&&g.activate();return true},registerHandler:function(g,c){var b=this._messages,g=g.toUpperCase();a.isArray(b[g])||(b[g]=[]);b[g].push(c)},cast:function(a,c){return this._cast(this, +a,c||[])},broadcast:function(a,c,b){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,c,b)},_cast:function(g,c,b){var d,e=this._messages,c=c.toUpperCase();if(!e["BEFORE_"+c]&&!this["API_BEFORE_"+c]||this._cast(g,"BEFORE_"+c,b)){var h=[];if(a.isArray(e[c]))for(d=0;d=0&&(e=e.splice(d,1));a.isArray(e[b])&&(d=a.inArray(c,e[b]),d>=0&&(e[b]=e[b].splice(d,1)));a.isFunction(c.deactivate)&&c.deactivate()},broadcast:function(a,c){this._broadcast(this, a,c)},_broadcast:function(a,c,b){for(var d=0;d"+m+" "}}this.loaded_popup_menus[c]=b}if(b)c=a("#popup_menu_area").html("
    "+ -b+"
"),b=e.page_y,e=e.page_x,c.outerHeight()+b>a(window).height()+a(window).scrollTop()&&(b=a(window).height()-c.outerHeight()+a(window).scrollTop()),c.outerWidth()+e>a(window).width()+a(window).scrollLeft()&&(e=a(window).width()-c.outerWidth()+a(window).scrollLeft()),c.css({top:b,left:e}).show()}}})(jQuery); -jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var g=!1,d=[],l=0;l-1?d[a]:l;if(g&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},b.selectedIndex>=0&&b.options[b.selectedIndex].disabled))b.onchange()});var b=a(".xe_content .fold_button");if(b.size()){var d=a("div.fold_container", +(function(a){var b=navigator.userAgent.toLowerCase();a.os={Linux:/linux/.test(b),Unix:/x11/.test(b),Mac:/mac/.test(b),Windows:/win/.test(b)};a.os.name=a.os.Windows?"Windows":a.os.Linux?"Linux":a.os.Unix?"Unix":a.os.Mac?"Mac":"";window.XE={loaded_popup_menus:[],addedDocument:[],checkboxToggleAll:function(b){is_def(b)||(b="cart");var c={wrap:null,checked:"toggle",doClick:false};switch(arguments.length){case 1:typeof arguments[0]=="string"?b=arguments[0]:(a.extend(c,arguments[0]||{}),b="cart");break; +case 2:b=arguments[0],a.extend(c,arguments[1]||{})}if(c.doClick==true)c.checked=null;if(typeof c.wrap=="string")c.wrap="#"+c.wrap;var e=c.wrap?a(c.wrap).find("input[name="+b+"]:checkbox"):a("input[name="+b+"]:checkbox");c.checked=="toggle"?e.each(function(){a(this).attr("checked",a(this).attr("checked")?false:true)}):c.doClick==true?e.click():e.attr("checked",c.checked)},displayPopupMenu:function(b,c,e){var c=e.menu_id,g=b.menus,b="";if(this.loaded_popup_menus[c])b=this.loaded_popup_menus[c];else{if(g){g= +g.item;if(typeof g.length=="undefined"||g.length<1)g=Array(g);if(g.length)for(var j=0;j"+m+" "}}this.loaded_popup_menus[c]= +b}if(b)c=a("#popup_menu_area").html("
    "+b+"
"),b=e.page_y,e=e.page_x,c.outerHeight()+b>a(window).height()+a(window).scrollTop()&&(b=a(window).height()-c.outerHeight()+a(window).scrollTop()),c.outerWidth()+e>a(window).width()+a(window).scrollLeft()&&(e=a(window).width()-c.outerWidth()+a(window).scrollLeft()),c.css({top:b,left:e}).show()}}})(jQuery); +jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var g=false,d=[],l=0;l-1?d[a]:l;if(g&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},b.selectedIndex>=0&&b.options[b.selectedIndex].disabled))b.onchange()});var b=a(".xe_content .fold_button");if(b.size()){var d=a("div.fold_container", b);a("button.more",b).click(function(){a(this).hide().next("button").show().parent().next(d).show()});a("button.less",b).click(function(){a(this).hide().prev("button").show().parent().next(d).hide()})}});String.prototype.getQuery=function(a){var b=this.indexOf("?");if(b==-1)return null;var d={};this.substr(b+1,this.length).replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,g){d[b]=g});a=d[a];typeof a=="undefined"&&(a="");return a}; String.prototype.setQuery=function(a,b){var d=this.indexOf("?"),c=this.replace(/#$/,"");if(d!=-1){var e=c.substr(d+1,this.length),g={},j=[],c=this.substr(0,d);e.replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){g[b]=c});g[a]=b;jQuery.each(g,function(a,b){jQuery.trim(b)&&j.push(a+"="+decodeURI(b))});e=j.join("&");c+=e?"?"+e:""}else b.toString().trim()&&(c=c+"?"+a+"="+b);d=/https:\/\/([^:\/]+)(:\d+|)/i;if(e=d.exec(c))e="http://"+e[1],typeof http_port!="undefined"&&http_port!=80&&(e+=":"+http_port),c= -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,"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 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 false;typeof b=="undefined"&&(b="N");b=b=="N"?false:true;/^\./.test(a)&&(a=request_uri+a);b?winopen(a):location.href=a;return false} 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(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))g='';else if(/\.swf/i.test(a)){g='';g+='';for(var j in c)c[j]!="undefined"&&c[j]!=""&&(g+='');g+=''}else{if(jQuery.browser.mozilla||jQuery.browser.opera)e=c.autostart&&c.autostart!="false"?"1":"0";g='').appendTo(document.body),b= jQuery("#previewDocument")[0]);if(b)b.content.value=a,b.submit()}} -function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if(typeof b!="undefined"&&b&&typeof editorRelKeys!="undefined"&&typeof editorGetContent=="function"){var c=editorGetContent(b);editorRelKeys[b].content.value=c}var e={},c=jQuery(a.form).serializeArray();jQuery.each(c,function(a,b){var c=jQuery.trim(b.value);if(!c)return!0;if(/\[\]$/.test(b.name))b.name=b.name.replace(/\[\]$/,"");e[b.name]?e[b.name]+="|@|"+c:e[b.name]=b.value});exec_xml("document", -"procDocumentTempSave",e,completeDocumentSave,["error","message","document_srl"],e,a.form);editorRelKeys[b].content.value=d;return!1}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))} +function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if(typeof b!="undefined"&&b&&typeof editorRelKeys!="undefined"&&typeof editorGetContent=="function"){var c=editorGetContent(b);editorRelKeys[b].content.value=c}var e={},c=jQuery(a.form).serializeArray();jQuery.each(c,function(a,b){var c=jQuery.trim(b.value);if(!c)return true;if(/\[\]$/.test(b.name))b.name=b.name.replace(/\[\]$/,"");e[b.name]?e[b.name]+="|@|"+c:e[b.name]=b.value});exec_xml("document", +"procDocumentTempSave",e,completeDocumentSave,["error","message","document_srl"],e,a.form);editorRelKeys[b].content.value=d;return false}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))} function doDocumentSelect(a){if(opener&&opener.objForSavedDoc)opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite");window.close()}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo")}var addedDocument=[];function doAddDocumentCart(a){addedDocument[addedDocument.length]=a.value;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)} function callAddDocumentCart(a){if(!(addedDocument.length<1||a!=addedDocument.length))a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[]} function transRGB2Hex(a){if(!a)return a;if(a.indexOf("#")>-1)return a.replace(/^#/,"");if(a.toLowerCase().indexOf("rgb")<0)return a;a=a.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=a.split(",");for(var a="",b=0;b>2,d=(d&3)<<4|c>>4,j=(c&15)<<2|e>>6,l=e&63,isNaN(c)?j=l=64:isNaN(e)&&(l=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(l);return b},decode:function(a){for(var b="",d,c,e,g,j,l=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l< a.length;)d=this._keyStr.indexOf(a.charAt(l++)),c=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),j=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|c>>4,c=(c&15)<<4|g>>2,e=(g&3)<<6|j,b+=String.fromCharCode(d),g!=64&&(b+=String.fromCharCode(c)),j!=64&&(b+=String.fromCharCode(e));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",d=0;d127&&c<2048?b+=String.fromCharCode(c>> 6|192):(b+=String.fromCharCode(c>>12|224),b+=String.fromCharCode(c>>6&63|128)),b+=String.fromCharCode(c&63|128))}return b},_utf8_decode:function(a){for(var b="",d=0,c=c1=c2=0;d191&&c<224?(c2=a.charCodeAt(d+1),b+=String.fromCharCode((c&31)<<6|c2&63),d+=2):(c2=a.charCodeAt(d+1),c3=a.charCodeAt(d+2),b+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63),d+=3);return b}}; -if(typeof resizeImageContents=="undefined")var resizeImageContents=function(){};if(typeof activateOptionDisabled=="undefined")var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};if(typeof a!="undefined")c.wrap=a;if(typeof d!="undefined")c.checked=d;XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:!0};if(typeof a!="undefined")d.wrap=a;XE.checkboxToggleAll(b,d)} +if(typeof resizeImageContents=="undefined")var resizeImageContents=function(){};if(typeof activateOptionDisabled=="undefined")var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};if(typeof a!="undefined")c.wrap=a;if(typeof d!="undefined")c.checked=d;XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:true};if(typeof a!="undefined")d.wrap=a;XE.checkboxToggleAll(b,d)} function svc_folder_open(a){jQuery("#_folder_open_"+a).hide();jQuery("#_folder_close_"+a).show();jQuery("#_folder_"+a).show()}function svc_folder_close(a){jQuery("#_folder_open_"+a).show();jQuery("#_folder_close_"+a).hide();jQuery("#_folder_"+a).hide()}function open_calendar(a,b,d){typeof b=="undefined"&&(b="");var c="./common/tpl/calendar.php?";a&&(c+="fo_id="+a);b&&(c+="&day_str="+b);d&&(c+="&callback_func="+d);popopen(c,"Calendar")}var loaded_popup_menus=XE.loaded_popup_menus; function createPopupMenu(){}function chkPopupMenu(){}function displayPopupMenu(a,b,d){XE.displayPopupMenu(a,b,d)}function GetObjLeft(a){return jQuery(a).offset().left}function GetObjTop(a){return jQuery(a).offset().top}function replaceOuterHTML(a,b){jQuery(a).replaceWith(b)}function getOuterHTML(a){return jQuery(a).html().trim()}function setCookie(a,b,d,c){a=a+"="+escape(b)+(!d?"":"; expires="+d.toGMTString())+"; path="+(!c?"/":c);document.cookie=a} function getCookie(a){if(a=document.cookie.match(RegExp(a+"=(.*?)(?:;|$)")))return unescape(a[1])}function is_def(a){return typeof a!="undefined"}function ucfirst(a){return a.charAt(0).toUpperCase()+a.slice(1)}function get_by_id(a){return document.getElementById(a)} jQuery(function(a){a(".lang_code").each(function(){var b=a(this),d=b.attr("id");typeof d=="undefined"&&(d=b.attr("name"));typeof d!="undefined"&&b.after("find_langcode")});a(document).click(function(b){var d=a("#popup_menu_area");d.length||(d=a('