mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
issue 160, fixed a bug related multiple toggle contents of multi language
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9359 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cb18ff3064
commit
17803c5a14
6 changed files with 21 additions and 17 deletions
|
|
@ -378,10 +378,10 @@ body.modalContainer{_height:100%;_width:100%} /* IE6 only */
|
|||
.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-size:12px;font-weight:normal;color:#666;border:1px solid #eee;border-top-color:#ccc}
|
||||
.x .langEdit #langInput h2 strong{color:#000;font-size:14px}
|
||||
.x .langEdit.showChild #langInput{position:absolute;left:285px;top:0}
|
||||
.x .langEdit .langInput{background:#fff}
|
||||
.x .langEdit .langInput h2{padding:5px 10px;margin:0 0 -1px 0;font-size:12px;font-weight:normal;color:#666;border:1px solid #eee;border-top-color:#ccc}
|
||||
.x .langEdit .langInput h2 strong{color:#000;font-size:14px}
|
||||
.x .langEdit.showChild .langInput{position:absolute;left:285px;top:0}
|
||||
.x .langEdit li.en input,
|
||||
.x .langEdit li.en textarea,
|
||||
.x .mLangEdit li.en textarea{background:url(../img/flag.us.gif) no-repeat 99% 5px}
|
||||
|
|
|
|||
|
|
@ -835,7 +835,7 @@ $('.multiLangEdit')
|
|||
|
||||
// reset
|
||||
$layer.trigger('multilang-reset').removeClass('showChild').find('.langList').empty().end();
|
||||
$('#langInput li.'+xe.current_lang).find('>input:text,>textarea').val(text).prev('label').css('visibility','hidden');
|
||||
$layer.find('.langInput li.'+xe.current_lang).find('>input:text,>textarea').val(text).prev('label').css('visibility','hidden');
|
||||
|
||||
// hide suggestion layer
|
||||
$suggest.trigger('hide');
|
||||
|
|
@ -863,7 +863,8 @@ $('.multiLangEdit')
|
|||
$.each(list, function(key){
|
||||
var $li = $('<li />').appendTo($langlist);
|
||||
|
||||
$('<a href="#langInput" class="langItem" />')
|
||||
var anchor_id = $layer.data('layer_index');
|
||||
$('<a href="#langInput_'+anchor_id+'" class="langItem" />')
|
||||
.text(this[xe.current_lang])
|
||||
.data('multilang-name', key)
|
||||
.appendTo($li);
|
||||
|
|
@ -912,6 +913,7 @@ $suggest = $('<div class="suggestion"><ul></ul></div>')
|
|||
$(this).hide();
|
||||
});
|
||||
|
||||
var layer_index = 0;
|
||||
function initLayer($layer) {
|
||||
var $submit, $input, value='', current_status = 0, mode, cmd_add, cmd_edit, status_texts=[];
|
||||
var USE = 0, UPDATE_AND_USE = 1, MODE_SAVE = 0, MODE_UPDATE = 1;
|
||||
|
|
@ -923,7 +925,7 @@ function initLayer($layer) {
|
|||
.bind('multilang-reset', function(){
|
||||
$layer
|
||||
.data('multilang-current-name', '')
|
||||
.find('#langInput li').find('>input:text,>textarea').val(' ').prev('label').css('visibility','visible');
|
||||
.find('.langInput li').find('>input:text,>textarea').val(' ').prev('label').css('visibility','visible');
|
||||
|
||||
mode = MODE_SAVE;
|
||||
setTitleText();
|
||||
|
|
@ -945,7 +947,7 @@ function initLayer($layer) {
|
|||
if(!list || !list[name]) return;
|
||||
list = list[name];
|
||||
|
||||
$controls = $('#langInput');
|
||||
$controls = $layer.find('.langInput');
|
||||
|
||||
$layer
|
||||
.trigger('multilang-reset') // reset
|
||||
|
|
@ -968,7 +970,9 @@ function initLayer($layer) {
|
|||
setTitleText();
|
||||
|
||||
return false;
|
||||
});
|
||||
})
|
||||
.data('layer_index', layer_index)
|
||||
.find('.langInput').attr('id', 'langInput_' + layer_index++);
|
||||
|
||||
cmd_edit = $layer.find('h2 strong').text();
|
||||
cmd_add = $layer.find('h2 a').text();
|
||||
|
|
@ -1006,7 +1010,7 @@ function initLayer($layer) {
|
|||
function use_lang() {
|
||||
$layer.hide().closest('.multiLangEdit').find('.vLang')
|
||||
.eq(0).val('$user_lang->'+name).end()
|
||||
.eq(1).val($('#langInput li.'+xe.current_lang).find('>input:text,>textarea').val()).end();
|
||||
.eq(1).val($layer.find('.langInput li.'+xe.current_lang).find('>input:text,>textarea').val()).end();
|
||||
};
|
||||
|
||||
function save_lang() {
|
||||
|
|
@ -1156,4 +1160,4 @@ jQuery(function($){
|
|||
if($('.x>.body>.lnb').length == 0){ // When it have no lnb
|
||||
$('.x>.body>.content').addClass('single'); // Add class single
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
<!-- Multilingual -->
|
||||
<div id="langEdit" class="langEdit tgContent">
|
||||
<ul class="langList"></ul>
|
||||
<div id="langInput">
|
||||
<div class="langInput">
|
||||
<h2>다국어 <strong>수정</strong> | <a href="#langEdit">추가</a></h2>
|
||||
<ul>
|
||||
{@
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ xe.lang.confirm_delete = "{$lang->confirm_delete}";
|
|||
<!-- Multilingual -->
|
||||
<div id="langEdit" class="langEdit tgContent">
|
||||
<ul class="langList"></ul>
|
||||
<div id="langInput">
|
||||
<div class="langInput">
|
||||
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
|
||||
<ul>
|
||||
{@
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<block cond="$use_multilang">
|
||||
<div id="langEdit" class="langEdit tgContent">
|
||||
<ul class="langList"></ul>
|
||||
<div id="langInput" class="form">
|
||||
<div class="langInput form">
|
||||
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
|
||||
<ul>
|
||||
{@
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</block>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<div id="langEditTextarea" class="langEdit tgContent">
|
||||
<ul class="langList"></ul>
|
||||
<div id="langInput" class="form">
|
||||
<div class="langInput form">
|
||||
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
|
||||
<ul>
|
||||
{@
|
||||
|
|
@ -24,4 +24,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</block>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue