mirror of
https://github.com/ronggang/transmission-web-control.git
synced 2025-04-12 22:12:27 +00:00
增加新的语言字段
This commit is contained in:
parent
c62c903b58
commit
aca1d62943
|
@ -205,7 +205,8 @@ system.lang = {
|
|||
"saving": "正在保存...",
|
||||
"show-bt-servers": "在『服务器分布』中显示『BT』服务器列表。",
|
||||
"restore-default-settings": "恢复界面默认设置(含主题)",
|
||||
"language": "界面语言:"
|
||||
"language": "界面语言:",
|
||||
"loading": "正在加载..."
|
||||
},
|
||||
"public": {
|
||||
"button-ok": "确定",
|
||||
|
|
|
@ -205,7 +205,8 @@ system.lang = {
|
|||
"saving": "儲存中...",
|
||||
"show-bt-servers": "在『伺服器分佈』中顯示『BT』伺服器列表。",
|
||||
"restore-default-settings": "恢復界面默認設置(含主題)",
|
||||
"language": "界面語言:"
|
||||
"language": "界面語言:",
|
||||
"loading": "加載中..."
|
||||
},
|
||||
"public": {
|
||||
"button-ok": "確定",
|
||||
|
|
6
src/tr-web-control/script/min/system.min.js
vendored
6
src/tr-web-control/script/min/system.min.js
vendored
|
@ -93,8 +93,8 @@ c+=f.replace(/[+|\/|=]/g,"0");f=this.panel.left.tree("find",c);var g=transmissio
|
|||
function(b){return'<a href="'+b+'" target="_blank">'+b+"</a>"})},readConfig:function(){this.readUserConfig();var a=this.getStorageData(this.configHead+".system");if(a)this.config=$.extend(true,this.config,JSON.parse(a));for(var b in this.storageKeys.dictionary)this.dictionary[b]=this.getStorageData(this.storageKeys.dictionary[b])},saveConfig:function(){this.setStorageData(this.configHead+".system",JSON.stringify(this.config));for(var a in this.storageKeys.dictionary)this.setStorageData(this.storageKeys.dictionary[a],
|
||||
this.dictionary[a]);this.saveUserConfig()},readUserConfig:function(){var a=window.localStorage[this.configHead];if(a){a=JSON.parse(a);this.userConfig=$.extend(true,this.userConfig,a)}},saveUserConfig:function(){window.localStorage[this.configHead]=JSON.stringify(this.userConfig)},uploadTorrentFile:function(a,b,c,d){if(window.FileReader){var e=$("input[id='"+a+"']")[0].files;$.each(e,function(f,g){transmission.addTorrentFromFile(g,b,c,d,e.length)})}else alert(system.lang.publit["text-browsers-not-support-features"])},
|
||||
checkUpdate:function(){$.ajax({url:this.checkUpdateScript,dataType:"json",success:function(a){if(a&&a.update)if(system.codeupdate<a.update){$("#area-update-infos").show();$("#msg-updateInfos").html(a.update+" -> "+a.infos)}else $("#area-update-infos").hide()}})},changeLanguages:function(a){if(!(a==this.lang.name||!a)){this.config.defaultLang=a;this.saveConfig();location.href="?lang="+a}},getStorageData:function(a,b){return window.localStorage[a]==null?b:window.localStorage[a]},setStorageData:function(a,
|
||||
b){window.localStorage[a]=b},openDialogFromTemplate:function(a){a=$.extend(true,{id:null,options:null,datas:null},a);if(a.id!=null){var b=a.id,c=a.options,d=a.datas,e=$("#"+b);if(e.length){e.dialog("open");d&&$.each(d,function(f,g){e.data(f,g)});e.dialog({content:system.templates[b]})}else{c=$.extend(true,{title:"",width:100,height:100,resizable:false,cache:true,content:system.lang.dialog["system-config"].loading,modal:true},c);$("<div/>").attr("id",b).appendTo(document.body).dialog(c);$.get(system.rootPath+"template/"+b+".html?time="+
|
||||
new Date,function(f){system.templates[b]=f;d&&$.each(d,function(g,h){$("#"+b).data(g,h)});$("#"+b).dialog({content:f})})}}},debug:function(a,b){window.console&&window.console.log&&window.console.log(a,b)},initThemes:function(){this.themes&&$("#select-themes").combobox({groupField:"group",data:this.themes,editable:false,panelHeight:"auto",onChange:function(a){var b=(a+";").split(";"),c=b[0];b=b[1]||"logo.png";$("#styleEasyui").attr("href","tr-web-control/script/easyui/themes/"+c+"/easyui.css");$("#logo").attr("src",
|
||||
"tr-web-control/"+b);system.config.theme=a;system.saveConfig()},onLoadSuccess:function(){$(this).combobox("setValue",system.config.theme||"default")}})}};$(document).ready(function(){$.getScript(system.rootPath+"lang/default.js");$.getScript(system.rootPath+"lang/_languages.js",function(){system.init(location.search.getQueryString("lang"),location.search.getQueryString("local"))})});
|
||||
b){window.localStorage[a]=b},openDialogFromTemplate:function(a){a=$.extend(true,{id:null,options:null,datas:null},a);if(a.id!=null){var b=a.id,c=a.options,d=a.datas,e=$("#"+b);if(e.length){e.dialog("open");d&&$.each(d,function(f,g){e.data(f,g)});e.dialog({content:system.templates[b]})}else{c=$.extend(true,{title:"",width:100,height:100,resizable:false,cache:true,content:system.lang.dialog["system-config"].loading,modal:true},c);$("<div/>").attr("id",b).appendTo(document.body).dialog(c);$.get(system.rootPath+
|
||||
"template/"+b+".html?time="+new Date,function(f){system.templates[b]=f;d&&$.each(d,function(g,h){$("#"+b).data(g,h)});$("#"+b).dialog({content:f})})}}},debug:function(a,b){window.console&&window.console.log&&window.console.log(a,b)},initThemes:function(){this.themes&&$("#select-themes").combobox({groupField:"group",data:this.themes,editable:false,panelHeight:"auto",onChange:function(a){var b=(a+";").split(";"),c=b[0];b=b[1]||"logo.png";$("#styleEasyui").attr("href","tr-web-control/script/easyui/themes/"+
|
||||
c+"/easyui.css");$("#logo").attr("src","tr-web-control/"+b);system.config.theme=a;system.saveConfig()},onLoadSuccess:function(){$(this).combobox("setValue",system.config.theme||"default")}})}};$(document).ready(function(){$.getScript(system.rootPath+"lang/default.js");$.getScript(system.rootPath+"lang/_languages.js",function(){system.init(location.search.getQueryString("lang"),location.search.getQueryString("local"))})});
|
||||
function pagerFilter(a){if(typeof a.length=="number"&&typeof a.splice=="function")a={total:a.length,rows:a};var b=$(this),c=b.datagrid("options"),d=b.datagrid("getPager"),e=b.data("buttons");d.pagination({onSelectPage:function(h,i){c.pageNumber=h;c.pageSize=i;d.pagination("refresh",{pageNumber:h,pageSize:i});b.datagrid("loadData",a)},buttons:e});if(!a.originalRows)a.originalRows=a.rows;var f=(c.pageNumber-1)*parseInt(c.pageSize),g=f+parseInt(c.pageSize);a.rows=a.originalRows.slice(f,g);if(e&&e.length)for(f=
|
||||
0;f<e.length;f++){g=e[f];g.id&&g.title&&$("#"+g.id,d).attr("title",g.title)}return a};
|
||||
|
|
Loading…
Reference in New Issue
Block a user