mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 14:49:56 +09:00
issue 160, fix a bug for do not display user defined language when modify widget code
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9245 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2a6f6e3c04
commit
5e4638ae94
5 changed files with 52 additions and 3 deletions
30
modules/widget/tpl/js/multi_lang.js
Normal file
30
modules/widget/tpl/js/multi_lang.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
(function($){
|
||||
|
||||
xe.MultiLangManager = xe.createApp("MultiLangManager", {
|
||||
$keyObj: null,
|
||||
|
||||
init: function(key){
|
||||
var $keyObj = this.$keyObj = $('.extra_vars input[name='+key+']');
|
||||
},
|
||||
|
||||
API_MULTILANG_SYNC: function(){
|
||||
var self = this;
|
||||
var regexp = /^\$user_lang\-\>/;
|
||||
|
||||
var langCode = this.$keyObj.val();
|
||||
if (!regexp.test(langCode)) return;
|
||||
|
||||
function on_complete(data){
|
||||
if (data.error){
|
||||
alert(data.message);
|
||||
return;
|
||||
}
|
||||
|
||||
$('#' + self.$keyObj.attr('name')).val(data.lang);
|
||||
}
|
||||
|
||||
$.exec_json('module.getLangByLangcode', {'langCode': langCode}, on_complete);
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue