retouch multilingual

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11908 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-10-26 05:01:20 +00:00
parent fe53b778af
commit fd7dc90dac
2 changed files with 42 additions and 37 deletions

View file

@ -1570,18 +1570,23 @@ jQuery(function($){
});
// load value
$displayInput.val($hiddenInput.val());
var pattern = /^\$user_lang->/;
if(pattern.test($displayInput.val())){
function on_complete2(data){
if(!data || !data.langs) return;
function loadValue(){
$displayInput.val($hiddenInput.val());
var pattern = /^\$user_lang->/;
if(pattern.test($displayInput.val())){
function on_complete2(data){
if(!data || !data.langs) return;
$displayInput.closest('.g11n').addClass('active');
$displayInput.val(data.langs[xe.current_lang]).attr('disabled', 'disabled').width(135);
$displayInput.closest('.g11n').addClass('active');
$displayInput.val(data.langs[xe.current_lang]).attr('disabled', 'disabled').width(135);
}
$.exec_json('module.getModuleAdminLangCode', {'name': $displayInput.val().replace('$user_lang->', '')}, on_complete2);
}
$.exec_json('module.getModuleAdminLangCode', {'name': $displayInput.val().replace('$user_lang->', '')}, on_complete2);
}
$this.bind('reload-multilingual', loadValue);
loadValue();
}
if($('#g11n').length){