mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-14 09:21:27 +00:00
moxbox init
This commit is contained in:
42
apps/transmission/web/tr-web-control/plugin.js
Normal file
42
apps/transmission/web/tr-web-control/plugin.js
Normal file
@@ -0,0 +1,42 @@
|
||||
system.plugin = {
|
||||
exec: function(key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
// Replace Tracker
|
||||
case "replace-tracker":
|
||||
system.openDialogFromTemplate({
|
||||
id: "dialog-system-replaceTracker",
|
||||
options: {
|
||||
title: system.lang.dialog["system-replaceTracker"].title,
|
||||
width: 600,
|
||||
height: 220
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
// Automatically match the data directory
|
||||
case "auto-match-data-folder":
|
||||
var rows = system.control.torrentlist.datagrid("getChecked");
|
||||
var ids = new Array();
|
||||
for (var i in rows)
|
||||
{
|
||||
ids.push(rows[i].id);
|
||||
}
|
||||
if (ids.length==0) return;
|
||||
|
||||
system.openDialogFromTemplate({
|
||||
id: "dialog-auto-match-data-folder",
|
||||
options: {
|
||||
title: system.lang.dialog["auto-match-data-folder"].title,
|
||||
width: 530,
|
||||
height: 280
|
||||
},
|
||||
datas: {
|
||||
"ids": ids
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user