diff --git a/release/transmission-control-full.tar.gz b/release/transmission-control-full.tar.gz index d5dc030..6832bb5 100644 Binary files a/release/transmission-control-full.tar.gz and b/release/transmission-control-full.tar.gz differ diff --git a/src/tr-web-control/script/min/system.min.js b/src/tr-web-control/script/min/system.min.js index 81d15c8..37714b9 100644 --- a/src/tr-web-control/script/min/system.min.js +++ b/src/tr-web-control/script/min/system.min.js @@ -1,4 +1,4 @@ /*! transmission-web-control 2017-05-04 */ -function pagerFilter(a){"number"==typeof a.length&&"function"==typeof a.splice&&(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(e,f){c.pageNumber=e,c.pageSize=f,d.pagination("refresh",{pageNumber:e,pageSize:f}),b.datagrid("loadData",a)},buttons:e}),a.originalRows||(a.originalRows=a.rows);var f=(c.pageNumber-1)*parseInt(c.pageSize),g=f+parseInt(c.pageSize);return a.rows=a.originalRows.slice(f,g),a}var system={version:"1.1 Beta",rootPath:"tr-web-control/",codeupdate:"20170504",configHead:"transmission-web-control",config:{autoReload:!0,reloadStep:5e3,pageSize:30,defaultSelectNode:null,autoExpandAttribute:!1,defaultLang:""},storageKeys:{dictionary:{folders:"dictionary.folders"}},dictionary:{folders:null},checkUpdateScript:"https://transmission-control.googlecode.com/svn/resouces/checkupdate.js",contextMenus:{},panel:null,lang:null,reloading:!1,autoReloadTimer:null,downloadDir:"",islocal:!1,B64:new Base64,currentTorrentId:0,control:{tree:null,torrentlist:null},userConfig:{torrentList:{fields:[],sortName:null,sortOrder:"asc"}},serverConfig:null,serverSessionStats:null,templates:{},setlang:function(a,b){a||(a=this.config.defaultLang?this.config.defaultLang:navigator.language||navigator.browserLanguage),a||(a="zh-CN"),-1!=a.indexOf("-")&&(a=a.split("-")[0].toLocaleLowerCase()+"-"+a.split("-")[1].toLocaleUpperCase()),this.languages[a]||(a="en"),$.getScript(system.rootPath+"lang/"+a+".js",function(){system.lang=$.extend(!0,system.defaultLang,system.lang),system.resetLangText(),$.getScript(system.rootPath+"script/easyui/locale/easyui-lang-"+a.replace("-","_")+".js").done(function(a,c){b&&b()}).fail(function(a,c,d){$.getScript(system.rootPath+"script/easyui/locale/easyui-lang-en.js",function(){b&&b()})})})},init:function(a,b,c){this.readConfig(),this.islocal=1==b,this.panel={main:$("#main"),top:$("#m_top"),toolbar:$("#m_toolbar"),left_layout:$("#m_left_layout"),left:$("#m_left"),body:$("#m_body"),layout_body:$("#layout_body"),list:$("#m_list"),attribute:$("#m_attribute"),bottom:$("#m_bottom"),title:$("#m_title"),status:$("#m_status"),statusbar:$("#m_statusbar"),status_text:$("#status_text"),droparea:$("#dropArea")},null==this.lang?this.setlang(a,function(){system.initdata()}):this.initdata()},resetLangText:function(parent){parent||(parent=$);var items=parent.find("*[system-lang]");$.each(items,function(key,item){var name=$(item).attr("system-lang");"["==name.substr(0,1)?$(item).html(eval("system.lang"+name)):$(item).html(eval("system.lang."+name))}),items=parent.find("*[system-tip-lang]"),$.each(items,function(key,item){var name=$(item).attr("system-tip-lang");"["==name.substr(0,1)?$(item).attr("title",eval("system.lang"+name)):$(item).attr("title",eval("system.lang."+name))})},initdata:function(){$(document).attr("title",this.lang.system.title+" "+this.version);var a=new Array,b=""+this.lang.title.left+"";a.push("");for(var c in this.lang.tree.toolbar.nav){var d=this.lang.tree.toolbar.nav[c];a.push(''+d+"")}if(a.push(""),a.length>1){b+=a.join(""),this.panel.left_layout.panel("setTitle",b);for(var c in this.lang.tree.toolbar.nav)$("#tree-toolbar-nav-"+c).linkbutton()}else this.panel.left_layout.panel("setTitle",b);b=""+this.lang.title.list+"",a.length=0,a.push("");for(var c in this.lang["torrent-head"].buttons){var d=this.lang["torrent-head"].buttons[c];a.push(''+d+"")}if(a.push(""),a.length>1){b+=a.join(""),this.panel.body.panel("setTitle",b);for(var c in this.lang["torrent-head"].buttons)switch($("#torrent-head-buttons-"+c).linkbutton(),c){case"autoExpandAttribute":system.config.autoExpandAttribute?$("#torrent-head-buttons-"+c).linkbutton({iconCls:"icon-enabled"}).data("status",1):$("#torrent-head-buttons-"+c).linkbutton({iconCls:"icon-disabled"}).data("status",0)}}else this.panel.body.panel("setTitle",b);this.panel.status.panel("setTitle",this.lang.title.status),this.panel.attribute.panel({title:this.lang.title.attribute,onExpand:function(){0!=system.currentTorrentId&&$(this).data("isload")?system.getTorrentInfos(system.currentTorrentId):system.clearTorrentAttribute()},onLoad:function(){$(this).data("isload")||($(this).data("isload",!0),0!=system.currentTorrentId&&setTimeout(function(){system.getTorrentInfos(system.currentTorrentId)},500))}}),$.each(this.languages,function(a,b){$("