modify some code

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9122 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2011-09-08 08:13:25 +00:00
parent e4031ad4db
commit ad66c95b31
3 changed files with 25 additions and 27 deletions

View file

@ -403,11 +403,12 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
.x .langEdit .btnArea{white-space:normal}
.x .langEdit .langList,
.x .langEdit .langEditControls{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{margin:0 -1px 0 0}
.x .langEdit .langList{margin:0 -1px 0 0;display:none}
.x .langEdit .langList li{white-space:nowrap;color:#ccc;width:270px}
.x .langEdit .langList li span{display:inline-block;width:80px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#767676}
.x .langEdit .langList li a{display:inline-block;width:80px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.x .langEdit .langList li.active{background:url(../img/iconArrow.gif) no-repeat right -188px}
.x .langEdit.showChild .langList{display:block}
.x .langEdit #langInput{background:#fff}
.x .langEdit #langInput h2{padding:5px 10px;margin:0 0 -1px 0;font-weight:normal;color:#ccc;border:1px solid #eee;border-top-color:#ccc}
.x .langEdit #langInput h2 strong{color:#000}
@ -469,7 +470,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 */

View file

@ -816,7 +816,7 @@ $('.multiLangEdit')
initLayer($layer);
// reset
$layer.trigger('multilang-reset')
$layer.trigger('multilang-reset').removeClass('showChild').find('.langList').empty().end();
$('#langInput li.'+xe.current_lang+' > input').val(text).prev('label').css('visibility','hidden');
// hide suggestion layer
@ -841,23 +841,19 @@ $('.multiLangEdit')
$layer.data('multilang-list', list);
// make language list
$langlist = $layer.find('.langList').empty();
$langlist = $layer.find('.langList');
$.each(list, function(key){
var $li = $('<li />').appendTo($langlist);
$('<button type="button" />')
$('<a href="#langInput" class="langItem" />')
.text(this[xe.current_lang])
.data('multilang-name', key)
.appendTo($li);
});
if(count(list) > 1) {
$langlist.show();
} else {
$langlist.hide();
}
if(count(list) > 1) $layer.addClass('showChild');
$layer.find('.langList>li>button').click();
$layer.find('.langList>li>a:first').click();
};
@ -941,7 +937,7 @@ function initLayer($layer) {
$layer
.trigger('multilang-reset') // reset
.find('a.langItem.active').removeClass('active')
.find('.langList li.active').removeClass('active').end()
.data('multilang-current-name', name);
$this.parent('li').addClass('active');
@ -981,9 +977,13 @@ function initLayer($layer) {
};
function setTitleText() {
$layer.find('h2')
.find('strong').text(mode==MODE_SAVE?cmd_add:cmd_edit).end()
.find('a').text(mode==MODE_SAVE?cmd_edit:cmd_add).end()
if(!$layer.data('multilang-current-name')) {
$layer.find('h2').find('strong').text(cmd_add).end().find('a').hide();
} else {
$layer.find('h2')
.find('strong').text(mode==MODE_SAVE?cmd_add:cmd_edit).end()
.find('a').text(mode==MODE_SAVE?cmd_edit:cmd_add).show().end();
}
};
// process the submit button

View file

@ -56,7 +56,7 @@
<input type="hidden" name="group_titles[]" value="{htmlspecialchars($group_info->title)}" class="vLang"/>
<input type="text" value="{$group_info->title}" class="vLang" />
<div class="suggestion"><ul></ul></div>
<span class="desc"><a href="#langEdit" class="tgAnchor editUserLang">{$lang->cmd_set_multilingual}</a></span>
<span class="desc"><a href="#langEdit" class="tgAnchor editUserLang" data-effect="slide">{$lang->cmd_set_multilingual}</a></span>
</div>
</td>
<td><input type="text" name="descriptions[]" value="{$group_info->description}" style="width:240px" /></td>
@ -90,12 +90,8 @@
</div>
<!-- Multilingual -->
<div id="langEdit" class="form langEdit tgContent showChild">
<ul class="langList">
<li><a href="#langInput">동해물과 <em>백두산</em>이 마르고 닳도록 하느님이 보우하사 우리나라 만세</a> | <span>Dong hae mul ga bak do san</span> | <span>ドンヘムルと白頭山が乾いて</span></li>
<li class="active"><a href="#langInput">동해물과 <em>백두산</em>이 마르고 닳도록 하느님이 보우하사 우리나라 만세</a> | <span>Dong hae mul ga bak do san</span> | <span>ドンヘムルと白頭山が乾いて</span></li>
<li><a href="#langInput">동해물과 <em>백두산</em>이 마르고 닳도록 하느님이 보우하사 우리나라 만세</a> | <span>Dong hae mul ga bak do san</span> | <span>ドンヘムルと白頭山が乾いて</span></li>
</ul>
<div id="langEdit" class="langEdit tgContent">
<ul class="langList"></ul>
<div id="langInput">
<h2>다국어 <strong>수정</strong> | <a href="#langEdit">추가</a></h2>
<ul>
@ -107,12 +103,12 @@
}
<li loop="$lang_supported=>$code,$name" class="{$code}"><label for="{$code}_var1">{$name}</label> <input type="text" value="" id="{$code}_var1" /></li>
</ul>
</div>
<div class="action">
<div class="btnArea">
<span class="btn small"><input type="submit" value="사용|저장 후 사용" /></span>
<div class="action">
<div class="btnArea">
<span class="btn small"><input type="submit" value="사용|저장 후 사용" /></span>
</div>
<p><a href="{getUrl('act','dispModuleAdminLangcode')}">다국어 텍스트 관리</a></p>
</div>
<p><a href="{getUrl('act','dispModuleAdminLangcode')}">다국어 텍스트 관리</a></p>
</div>
</div>
</form>