diff --git a/modules/admin/tpl/_spFooter.html b/modules/admin/tpl/_spFooter.html index 585cada57..b842c1af9 100644 --- a/modules/admin/tpl/_spFooter.html +++ b/modules/admin/tpl/_spFooter.html @@ -3,3 +3,6 @@

Powered by XE.

+ diff --git a/modules/admin/tpl/css/admin.css b/modules/admin/tpl/css/admin.css index b4ed8e89c..8061be026 100644 --- a/modules/admin/tpl/css/admin.css +++ b/modules/admin/tpl/css/admin.css @@ -223,6 +223,8 @@ header,footer,section,article,aside,nav,hgroup,details,menu,figure,figcaption{di .x .prgrs.prgrsLarge .pBar, .x .prgrs.prgrsLarge .pAction, .x .prgrs.prgrsLarge .pNum{height:34px;line-height:34px;font-size:14px} +/* Labels */ +.x label.overlap{position:absolute;color:#aaa} /* Modal Window */ .modal{position:absolute;top:0;left:0;width:100%;_height:100%;min-height:100%;z-index:100} .modal .bg{position:absolute;background:#000;_background:none;width:100%;height:100%;opacity:.5;z-index:2;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);zoom:1} @@ -388,11 +390,13 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */ .x .btnArea:after{content:"";display:block;clear:both} /* Multilingual */ .x .langEdit{background:#fff;position:absolute;*left:0;*margin-top:28px;z-index:10;box-shadow:3px 3px 6px #999;-moz-box-shadow:3px 3px 6px #999;-webkit-box-shadow:3px 3px 6px #999;filter:progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135, strength=5)} +.x .langEdit .langList{float:left} +.x .langEdit .langEditControls{float:right} +.x .langEdit .action{clear:both;border:1px solid #eee;width:268px;padding:0 10px} .x .langEdit ul{border-top:1px solid #ccc;border-left:1px solid #eee;border-right:1px solid #eee;margin:0} .x .langEdit li{padding:.5em 10px} .x .langEdit input[type=text]{width:220px;padding-right:40px} .x .langEdit label{left:15px !important} -.x .langEdit .action{border:1px solid #eee;width:268px;padding:0 10px} .x .langEdit p, .x .langEdit .btnArea{white-space:normal} .x .langEdit li.en input, @@ -451,7 +455,8 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */ .x .suggestion li button{border:0;background:#fff;text-align:left;width:288px;padding:2px 4px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .x .suggestion li button:hover, .x .suggestion li button:active, -.x .suggestion li button:focus{background:#eee} +.x .suggestion li button:focus, +.x .suggestion li button.active{background:#eee} /* Image Mark */ .x #imageMark{right:0} /* Easy Installer */ diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 762f976a6..8a1af948f 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -7,7 +7,8 @@ jQuery(function($){ $('.form li').find('>input:text,>input:password,>textarea') .filter('input[value!=""],textarea:not(:empty)').prev('label').css('visibility','hidden').end().end() .prev('label') - .css({position:'absolute',top:'15px',left:'5px'}) + .addClass('overlap') + .css({top:'15px',left:'5px'}) .next() .focus(function(){ var $label = $(this).prev().stop().animate({opacity:0, left:'25px'},'fast',function(){ $label.css('visibility','hidden') }); @@ -292,12 +293,26 @@ $('a.modalAnchor').xeModalWindow(); // Content Toggler jQuery(function($){ +var dont_close_this_time = false; +var ESC = 27; + $.fn.xeContentToggler = function(){ this .not('.xe-content-toggler') .addClass('xe-content-toggler') .each(function(){ - $($(this).attr('href')).hide().focusout(focusoutContent); + var $anchor = $(this); $layer = $($anchor.attr('href')); + + $layer.hide() + .not('.xe-toggling-content') + .addClass('xe-toggling-content') + .mousedown(function(event){ dont_close_this_time = true }) + .focusout(function(event){ + setTimeout(function(){ + if(!dont_close_this_time && !$layer.find(':focus').length && $layer.data('state') == 'showing') $anchor.trigger('close.tc'); + dont_close_this_time = false; + }, 1); + }); }) .click(function(){ var $this = $(this), $layer; @@ -334,13 +349,15 @@ $.fn.xeContentToggler = function(){ // before event trigger $this.trigger('before-open.tc'); + dont_close_this_time = false; + // When mouse button is down or when ESC key is pressed close this layer $(document) .unbind('mousedown.tc keydown.tc') .bind('mousedown.tc keydown.tc', function(event){ if(event && ( - (event.type == 'keydown' && event.which != ESC_KEY) || + (event.type == 'keydown' && event.which != ESC) || (event.type == 'mousedown' && ($(event.target).is('.tgAnchor,.tgContent') || $layer.has(event.target)[0])) )) return true; @@ -418,13 +435,6 @@ $.fn.xeContentToggler = function(){ $('a.tgAnchor').xeContentToggler(); -function focusoutContent(event) { - var $this = $(this), $anchor = $this.data('anchor'); - setTimeout(function(){ - if(!$this.find(':focus').length && $this.data('state') == 'showing') $anchor.trigger('close.tc'); - }, 1); -}; - }); // Module finder @@ -668,26 +678,38 @@ function getOffset(elem, offsetParent) { // Language selector jQuery(function($){ -var w_timer = null, r_timer = null, r_idx = 0, f_timer = null; -var KEY_UP = 38, KEY_DOWN = 40; +var w_timer = null, r_timer = null, r_idx = 0, f_timer = null, skip_textchange=false; +var ESC=27, UP=38, DOWN=40, ENTER=13; $('.multiLangEdit') .find('input.vLang,textarea.vLang') + .each(function(){ + var $this = $(this), $container; + + $this + .data('mle-container', $container=$this.closest('.multiLangEdit')) + .data('mle-langkey', $container.find('.vLang').eq(0)) + .data('mle-suggestion', $container.find('.suggestion')); + }) .bind('textchange', function(){ - var $this = $(this), val = $.trim($this.val()), $ul, $mle; + var $this = $(this), val = $.trim($this.val()), $ul, $container; if(r_timer) { clearTimeout(r_timer); r_timer = null; } - if(!val) return; + $container = $this.data('mle-container'); + $ul = $this.data('mle-suggestion').find('>ul'); - $mle = $this.closest('.multiLangEdit'); - $ul = $mle.find('.suggestion > ul'); + if(!val || skip_textchange) { + skip_textchange = false; + $ul.parent().hide(); + return; + } // remove lagnauge key - $mle.find('.vLang').eq(0).val(''); + $this.data('mle-langkey').val(''); function request() { $this.addClass('loading'); @@ -713,11 +735,51 @@ $('.multiLangEdit') $btn = $(' - - -
- -
- + +
{$lang->cmd_set_multilingual} @@ -73,13 +70,8 @@
- - -
- -
- + +
{$lang->cmd_set_multilingual}
@@ -98,30 +90,25 @@ -
- +
+ +
+

다국어 수정 | 추가

+
    + {@ + /* move current language to the top */ + $a = array($lang_type=>$lang_supported[$lang_type]); + unset($lang_supported[$lang_type]); + $lang_supported = array_merge($a, $lang_supported); + } +
  • +
+
- -

다국어 텍스트가 변경되었습니다. 업데이트 버튼을 클릭하면 같은 텍스트를 사용하는 다른 페이지에도 반영됩니다. 새로 저장 버튼을 클릭하면 이 페이지에만 적용됩니다.

- - +
- -

다국어 텍스트 관리

+

다국어 텍스트 관리

diff --git a/modules/module/module.admin.model.php b/modules/module/module.admin.model.php index 7ea4c10f0..5d704dbc3 100644 --- a/modules/module/module.admin.model.php +++ b/modules/module/module.admin.model.php @@ -186,18 +186,18 @@ } /** - * @brief Return lang list + * @brief Returns lang list by lang name **/ function getModuleAdminLangListByName() { $args = Context::getRequestVars(); if(!$args->site_srl) $args->site_srl = 0; - $columnList = array('lang_code', 'value'); + $columnList = array('lang_code', 'name', 'value'); $langList = array(); - $args->langName = preg_replace('/\$user_lang->/', '', $args->lang_name); + $args->langName = preg_replace('/^\$user_lang->/', '', $args->lang_name); $output = executeQueryArray('module.getLangListByName', $args, $columnList); if($output->toBool()) $langList = $output->data; @@ -213,26 +213,27 @@ $args = Context::getRequestVars(); if(!$args->site_srl) $args->site_srl = 0; - $langList = array(); - $args->value = $args->lang_name; - // search value $output = executeQueryArray('module.getLangNameByValue', $args); - if ($output->toBool()){ + if ($output->toBool() && is_array($output->data)){ unset($args->value); - $args->langName = $output->data[0]->name; - $columnList = array('lang_code', 'value'); - $output = executeQueryArray('module.getLangListByName', $args, $columnList); + foreach($output->data as $data) { + $args->langName = $data->name; + $columnList = array('lang_code', 'name', 'value'); + $outputByName = executeQueryArray('module.getLangListByName', $args, $columnList); - if($output->toBool()) $langList = $output->data; + if($outputByName->toBool()) { + $langList = array_merge($langList, $outputByName->data); + } + } } $this->add('lang_list', $langList); - $this->add('lang_name', $args->langName); } + /** * @brief Return current lang list **/