From 9705b6abf1212b94909e411c69cb13915d29e558 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Wed, 24 Oct 2012 15:51:49 +0000 Subject: [PATCH] /document/tpl/ UI cleaning. /comment/tpl/ UI cleaning. Deprecated 'checkboxToggleAll()' function removed. git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11888 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/common.js | 62 ---- common/js/xe.js | 62 ---- common/js/xe.min.js | 76 +---- modules/admin/tpl/config_general.html | 6 +- modules/admin/tpl/css/admin.css | 14 +- modules/admin/tpl/css/admin.min.css | 14 +- modules/admin/tpl/js/admin.js | 126 ++++---- modules/admin/tpl/js/admin.min.js | 126 ++++---- modules/comment/tpl/comment_list.html | 276 ++++++++---------- .../comment/tpl/comment_module_config.html | 4 +- modules/comment/tpl/declared_list.html | 63 ++-- modules/comment/tpl/header.html | 4 +- modules/comment/tpl/js/comment_admin.js | 7 +- .../communication/skins/default/friends.html | 2 +- .../communication/skins/default/messages.html | 2 +- modules/document/tpl/checked_list.html | 2 +- modules/editor/tpl/setup_component.html | 4 +- modules/page/tpl/index.html | 2 +- .../modules/communication/friends.html | 2 +- .../modules/communication/messages.html | 2 +- 20 files changed, 346 insertions(+), 510 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index 5aa313bfd..7fd6b2590 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -28,49 +28,6 @@ if(jQuery) jQuery.noConflict(); window.XE = { loaded_popup_menus : new Array(), addedDocument : new Array(), - /** - * @brief 특정 name을 가진 체크박스들의 checked 속성 변경 - * @param [itemName='cart',][options={}] - */ - checkboxToggleAll : function(itemName) { - if(!is_def(itemName)) itemName='cart'; - var options = { - wrap : null, - checked : 'toggle', - doClick : false - }; - - switch(arguments.length) { - case 1: - if(typeof(arguments[0]) == "string") { - itemName = arguments[0]; - } else { - $.extend(options, arguments[0] || {}); - itemName = 'cart'; - } - break; - case 2: - itemName = arguments[0]; - $.extend(options, arguments[1] || {}); - } - - if(options.doClick == true) options.checked = null; - if(typeof(options.wrap) == "string") options.wrap ='#'+options.wrap; - - if(options.wrap) { - var obj = $(options.wrap).find('input[name='+itemName+']:checkbox'); - } else { - var obj = $('input[name='+itemName+']:checkbox'); - } - - if(options.checked == 'toggle') { - obj.each(function() { - $(this).attr('checked', ($(this).attr('checked')) ? false : true); - }); - } else { - (options.doClick == true) ? obj.click() : obj.attr('checked', options.checked); - } - }, /** * @brief 문서/회원 등 팝업 메뉴 출력 @@ -829,25 +786,6 @@ function toggleDisplay(objId) { jQuery('#'+objId).toggle(); } -/* 체크박스 선택 */ -function checkboxSelectAll(formObj, name, checked) { - var itemName = name; - var option = {}; - if(typeof(formObj) != "undefined") option.wrap = formObj; - if(typeof(checked) != "undefined") option.checked = checked; - - XE.checkboxToggleAll(itemName, option); -} - -/* 체크박스를 실행 */ -function clickCheckBoxAll(formObj, name) { - var itemName = name; - var option = { doClick:true }; - if(typeof(formObj) != "undefined") option.wrap = formObj; - - XE.checkboxToggleAll(itemName, option); -} - /** * @brief 에디터에서 사용하되 내용 여닫는 코드 (zb5beta beta 호환용으로 남겨 놓음) **/ diff --git a/common/js/xe.js b/common/js/xe.js index 345459888..98834c701 100644 --- a/common/js/xe.js +++ b/common/js/xe.js @@ -312,49 +312,6 @@ if(jQuery) jQuery.noConflict(); window.XE = { loaded_popup_menus : new Array(), addedDocument : new Array(), - /** - * @brief 특정 name을 가진 체크박스들의 checked 속성 변경 - * @param [itemName='cart',][options={}] - */ - checkboxToggleAll : function(itemName) { - if(!is_def(itemName)) itemName='cart'; - var options = { - wrap : null, - checked : 'toggle', - doClick : false - }; - - switch(arguments.length) { - case 1: - if(typeof(arguments[0]) == "string") { - itemName = arguments[0]; - } else { - $.extend(options, arguments[0] || {}); - itemName = 'cart'; - } - break; - case 2: - itemName = arguments[0]; - $.extend(options, arguments[1] || {}); - } - - if(options.doClick == true) options.checked = null; - if(typeof(options.wrap) == "string") options.wrap ='#'+options.wrap; - - if(options.wrap) { - var obj = $(options.wrap).find('input[name='+itemName+']:checkbox'); - } else { - var obj = $('input[name='+itemName+']:checkbox'); - } - - if(options.checked == 'toggle') { - obj.each(function() { - $(this).attr('checked', ($(this).attr('checked')) ? false : true); - }); - } else { - (options.doClick == true) ? obj.click() : obj.attr('checked', options.checked); - } - }, /** * @brief 문서/회원 등 팝업 메뉴 출력 @@ -1113,25 +1070,6 @@ function toggleDisplay(objId) { jQuery('#'+objId).toggle(); } -/* 체크박스 선택 */ -function checkboxSelectAll(formObj, name, checked) { - var itemName = name; - var option = {}; - if(typeof(formObj) != "undefined") option.wrap = formObj; - if(typeof(checked) != "undefined") option.checked = checked; - - XE.checkboxToggleAll(itemName, option); -} - -/* 체크박스를 실행 */ -function clickCheckBoxAll(formObj, name) { - var itemName = name; - var option = { doClick:true }; - if(typeof(formObj) != "undefined") option.wrap = formObj; - - XE.checkboxToggleAll(itemName, option); -} - /** * @brief 에디터에서 사용하되 내용 여닫는 코드 (zb5beta beta 호환용으로 남겨 놓음) **/ diff --git a/common/js/xe.min.js b/common/js/xe.min.js index f6b3a423f..914b940db 100644 --- a/common/js/xe.min.js +++ b/common/js/xe.min.js @@ -1,75 +1 @@ -/** - * @file common/js/xe.min.js - * @author NHN (developers@xpressengine.com) - * @brief XE Common JavaScript - **/ -(function(a){function b(){return function(){var g=this;a.isArray(this._plugins)&&(this._plugins=[]);this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b)||!/^API_([A-Z0-9_]+)$/.test(c))return true;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(0<=a.inArray(g,this._plugins))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(c,b,d){var e,m=this._messages,b=b.toUpperCase();if(!m["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(c,"BEFORE_"+b,d)){var h=[];if(a.isArray(m[b]))for(e=0;eh.length&&(h=h[0]);(m["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(c,"AFTER_"+b,d);return!/^(?:AFTER|BEFORE)_/.test(b)?h:a.isArray(h)?0>a.inArray(!1,h):"undefined"==typeof h?!0:!!h}}}; -c={oApp:null,cast:function(a,c){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,c||[])},broadcast:function(a,c){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,c||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(c,e){var i=b();a.extend(i.prototype,d,e);i.prototype.getName=function(){return c};return i},createPlugin:function(g,d){var e=b();a.extend(e.prototype,c,d);e.prototype.getName=function(){return g};return e},getApps:function(){return a.makeArray(e)}, -getApp:function(a){a=(a||"").toLowerCase();return"undefined"!=typeof e[a]?e[a]:null},registerApp:function(c){var b=c.getName().toLowerCase();e.push(c);a.isArray(e[b])||(e[b]=[]);e[b].push(c);c.parent=this;a.isFunction(c.activate)&&c.activate()},unregisterApp:function(c){var b=c.getName().toLowerCase(),d=a.inArray(c,e);0<=d&&(e=e.splice(d,1));a.isArray(e[b])&&(d=a.inArray(c,e[b]),0<=d&&(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;dg.length)g=Array(g);if(g.length)for(var j=0;j"+l+" "}}this.loaded_popup_menus[c]=b}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=[],i=0;i';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)){var g="undefined"!=typeof enforce_ssl&&enforce_ssl?"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0":"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0",g='',g=g+(''),j;for(j in c)"undefined"!=c[j]&&""!=c[j]&&(g+='');g+=''}else{if(jQuery.browser.mozilla||jQuery.browser.opera)e=c.autostart&&"false"!=c.autostart?"1":"0";g='.popup"),d,c,e,g;g=a.css({overflow:"scroll"}).offset();d=a.width(10).height(1E4).get(0).scrollWidth+2*g.left;c=a.height(10).width(1E4).get(0).scrollHeight+2*g.top;600>d&&(d=600+2*g.left);e=b.width();b=b.height();d!=e&&window.resizeBy(d-e,0);c!=b&&window.resizeBy(0,c-b);a.width(d-2*g.left).css({overflow:"",height:""})} -function doCallModuleAction(a,b,d){exec_xml(a,b,{target_srl:d,cur_mid:current_mid,mid:current_mid},completeCallModuleAction)}function completeCallModuleAction(a){"success"!=a.message&&alert(a.message);location.reload()}function completeMessage(a){alert(a.message);location.reload()}function doChangeLangType(a){"string"==typeof a?setLangType(a):setLangType(a.options[a.selectedIndex].value);location.href=location.href.setQuery("l","")} -function setLangType(a){var b=new Date;b.setTime(b.getTime()+6048E8);setCookie("lang_type",a,b,"/")} -function doDocumentPreview(a){for(;"FORM"!=a.nodeName;)a=a.parentNode;if("FORM"==a.nodeName){a=a.getAttribute("editor_sequence");a=editorGetContent(a);window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var b=jQuery("#previewDocument");b.length?b=b[0]:(jQuery('
').appendTo(document.body),b= -jQuery("#previewDocument")[0]);b&&(b.content.value=a,b.submit())}} -function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if("undefined"!=typeof b&&b&&"undefined"!=typeof editorRelKeys&&"function"==typeof editorGetContent){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;/\[\]$/.test(b.name)&&(b.name=b.name.replace(/\[\]$/,""));e[b.name]=e[b.name]?e[b.name]+("|@|"+c):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 doDocumentSelect(a){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){1>addedDocument.length||a!=addedDocument.length||(a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[])} -function transRGB2Hex(a){if(!a)return a;if(-1a.toLowerCase().indexOf("rgb"))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,i=e&63,isNaN(c)?j=i=64:isNaN(e)&&(i=64),b=b+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(i);return b},decode:function(a){for(var b="",d,c,e,g,j,i=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");i< -a.length;)d=this._keyStr.indexOf(a.charAt(i++)),c=this._keyStr.indexOf(a.charAt(i++)),g=this._keyStr.indexOf(a.charAt(i++)),j=this._keyStr.indexOf(a.charAt(i++)),d=d<<2|c>>4,c=(c&15)<<4|g>>2,e=(g&3)<<6|j,b+=String.fromCharCode(d),64!=g&&(b+=String.fromCharCode(c)),64!=j&&(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;dc?b+=String.fromCharCode(c):(127c?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;dc?(b+=String.fromCharCode(c),d++):191c?(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("undefined"==typeof resizeImageContents)var resizeImageContents=function(){};if("undefined"==typeof activateOptionDisabled)var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};"undefined"!=typeof a&&(c.wrap=a);"undefined"!=typeof d&&(c.checked=d);XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:!0};"undefined"!=typeof a&&(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){"undefined"==typeof b&&(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"undefined"!=typeof a}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");"undefined"==typeof d&&(d=b.attr("name"));"undefined"!=typeof d&&b.after("find_langcode")});a(document).click(function(b){var d=a("#popup_menu_area");d.length||(d=a('