mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 18:04:32 +00:00
Rename 'myTable' variable to 'torrentsTable'
This commit is contained in:
parent
2275060022
commit
805f0d4c90
@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#myTable tr:nth-child(even),
|
#torrentsTable tr:nth-child(even),
|
||||||
#filesTable tr:nth-child(even),
|
#filesTable tr:nth-child(even),
|
||||||
#properties #torrentFiles tr.alt,
|
#properties #torrentFiles tr.alt,
|
||||||
#properties #trackers tr.alt,
|
#properties #trackers tr.alt,
|
||||||
@ -51,7 +51,7 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#myTable tr:hover,
|
#torrentsTable tr:hover,
|
||||||
#filesTable tr:hover,
|
#filesTable tr:hover,
|
||||||
#properties #torrentFiles tr.over,
|
#properties #torrentFiles tr.over,
|
||||||
#properties #trackers tr.over,
|
#properties #trackers tr.over,
|
||||||
@ -60,7 +60,7 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#myTable tr:hover,
|
#torrentsTable tr:hover,
|
||||||
#properties #torrentFiles tr.over,
|
#properties #torrentFiles tr.over,
|
||||||
#properties #trackers tr.over,
|
#properties #trackers tr.over,
|
||||||
#transferList tr.over {
|
#transferList tr.over {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
myTable = new TorrentsTable();
|
torrentsTable = new TorrentsTable();
|
||||||
|
|
||||||
var updatePropertiesPanel = function(){};
|
var updatePropertiesPanel = function(){};
|
||||||
var updateMainData = function(){};
|
var updateMainData = function(){};
|
||||||
@ -99,7 +99,7 @@ window.addEvent('load', function () {
|
|||||||
selected_label = hash;
|
selected_label = hash;
|
||||||
localStorage.setItem('selected_label', selected_label);
|
localStorage.setItem('selected_label', selected_label);
|
||||||
highlightSelectedLabel();
|
highlightSelectedLabel();
|
||||||
if (typeof myTable.table != 'undefined')
|
if (typeof torrentsTable.table != 'undefined')
|
||||||
updateMainData();
|
updateMainData();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ window.addEvent('load', function () {
|
|||||||
selected_filter = f;
|
selected_filter = f;
|
||||||
localStorage.setItem('selected_filter', f);
|
localStorage.setItem('selected_filter', f);
|
||||||
// Reload torrents
|
// Reload torrents
|
||||||
if (typeof myTable.table != 'undefined')
|
if (typeof torrentsTable.table != 'undefined')
|
||||||
updateMainData();
|
updateMainData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,9 +230,9 @@ window.addEvent('load', function () {
|
|||||||
return new Element('li', {id: hash, html: html});
|
return new Element('li', {id: hash, html: html});
|
||||||
};
|
};
|
||||||
|
|
||||||
var all = myTable.getRowIds().length;
|
var all = torrentsTable.getRowIds().length;
|
||||||
var unlabelled = 0;
|
var unlabelled = 0;
|
||||||
Object.each(myTable.rows, function(row) {
|
Object.each(torrentsTable.rows, function(row) {
|
||||||
if (row['full_data'].label.length === 0)
|
if (row['full_data'].label.length === 0)
|
||||||
unlabelled += 1;
|
unlabelled += 1;
|
||||||
});
|
});
|
||||||
@ -286,7 +286,7 @@ window.addEvent('load', function () {
|
|||||||
var update_labels = false;
|
var update_labels = false;
|
||||||
var full_update = (response['full_update'] == true);
|
var full_update = (response['full_update'] == true);
|
||||||
if (full_update) {
|
if (full_update) {
|
||||||
myTable.rows.erase();
|
torrentsTable.rows.erase();
|
||||||
label_list = {};
|
label_list = {};
|
||||||
}
|
}
|
||||||
if (response['rid']) {
|
if (response['rid']) {
|
||||||
@ -310,19 +310,19 @@ window.addEvent('load', function () {
|
|||||||
for (var key in response['torrents']) {
|
for (var key in response['torrents']) {
|
||||||
response['torrents'][key]['hash'] = key;
|
response['torrents'][key]['hash'] = key;
|
||||||
response['torrents'][key]['rowId'] = key;
|
response['torrents'][key]['rowId'] = key;
|
||||||
myTable.updateRowData(response['torrents'][key]);
|
torrentsTable.updateRowData(response['torrents'][key]);
|
||||||
if (addTorrentToLabelList(response['torrents'][key]))
|
if (addTorrentToLabelList(response['torrents'][key]))
|
||||||
update_labels = true;
|
update_labels = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (response['torrents_removed'])
|
if (response['torrents_removed'])
|
||||||
response['torrents_removed'].each(function (hash) {
|
response['torrents_removed'].each(function (hash) {
|
||||||
myTable.removeRow(hash);
|
torrentsTable.removeRow(hash);
|
||||||
removeTorrentFromLabelList(hash);
|
removeTorrentFromLabelList(hash);
|
||||||
update_labels = true; // Allways to update All label
|
update_labels = true; // Allways to update All label
|
||||||
});
|
});
|
||||||
myTable.updateTable(full_update);
|
torrentsTable.updateTable(full_update);
|
||||||
myTable.altRow();
|
torrentsTable.altRow();
|
||||||
if (response['server_state']) {
|
if (response['server_state']) {
|
||||||
var tmp = response['server_state'];
|
var tmp = response['server_state'];
|
||||||
for(var key in tmp)
|
for(var key in tmp)
|
||||||
@ -341,7 +341,7 @@ window.addEvent('load', function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
updateMainData = function() {
|
updateMainData = function() {
|
||||||
myTable.updateTable();
|
torrentsTable.updateTable();
|
||||||
clearTimeout(syncMainDataTimer);
|
clearTimeout(syncMainDataTimer);
|
||||||
syncMainDataTimer = syncMainData.delay(100);
|
syncMainDataTimer = syncMainData.delay(100);
|
||||||
}
|
}
|
||||||
@ -374,8 +374,8 @@ window.addEvent('load', function () {
|
|||||||
|
|
||||||
if (queueing_enabled != serverState.queueing) {
|
if (queueing_enabled != serverState.queueing) {
|
||||||
queueing_enabled = serverState.queueing;
|
queueing_enabled = serverState.queueing;
|
||||||
myTable.columns['priority'].force_hide = !queueing_enabled;
|
torrentsTable.columns['priority'].force_hide = !queueing_enabled;
|
||||||
myTable.updateColumn('priority');
|
torrentsTable.updateColumn('priority');
|
||||||
if (queueing_enabled) {
|
if (queueing_enabled) {
|
||||||
$('queueingLinks').removeClass('invisible');
|
$('queueingLinks').removeClass('invisible');
|
||||||
$('queueingButtons').removeClass('invisible');
|
$('queueingButtons').removeClass('invisible');
|
||||||
@ -565,7 +565,7 @@ var keyboardEvents = new Keyboard({
|
|||||||
defaultEventType: 'keydown',
|
defaultEventType: 'keydown',
|
||||||
events: {
|
events: {
|
||||||
'ctrl+a': function(event) {
|
'ctrl+a': function(event) {
|
||||||
myTable.selectAll();
|
torrentsTable.selectAll();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
},
|
},
|
||||||
'delete': function(event) {
|
'delete': function(event) {
|
||||||
|
@ -140,9 +140,9 @@ var ContextMenu = new Class({
|
|||||||
there_are_force_start = false;
|
there_are_force_start = false;
|
||||||
all_are_super_seeding = true;
|
all_are_super_seeding = true;
|
||||||
|
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
h.each(function(item, index){
|
h.each(function(item, index){
|
||||||
var data = myTable.rows.get(item).full_data;
|
var data = torrentsTable.rows.get(item).full_data;
|
||||||
|
|
||||||
if (data['seq_dl'] != true)
|
if (data['seq_dl'] != true)
|
||||||
all_are_seq_dl = false;
|
all_are_seq_dl = false;
|
||||||
|
@ -119,7 +119,7 @@ initializeWindows = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uploadLimitFN = function() {
|
uploadLimitFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
var hash = h[0];
|
var hash = h[0];
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
@ -139,7 +139,7 @@ initializeWindows = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
toggleSequentialDownloadFN = function() {
|
toggleSequentialDownloadFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
new Request({
|
new Request({
|
||||||
url: 'command/toggleSequentialDownload',
|
url: 'command/toggleSequentialDownload',
|
||||||
@ -153,7 +153,7 @@ initializeWindows = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
toggleFirstLastPiecePrioFN = function() {
|
toggleFirstLastPiecePrioFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
new Request({
|
new Request({
|
||||||
url: 'command/toggleFirstLastPiecePrio',
|
url: 'command/toggleFirstLastPiecePrio',
|
||||||
@ -167,7 +167,7 @@ initializeWindows = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
setSuperSeedingFN = function(val) {
|
setSuperSeedingFN = function(val) {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
new Request({
|
new Request({
|
||||||
url: 'command/setSuperSeeding',
|
url: 'command/setSuperSeeding',
|
||||||
@ -182,7 +182,7 @@ initializeWindows = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
setForceStartFN = function() {
|
setForceStartFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
new Request({
|
new Request({
|
||||||
url: 'command/setForceStart',
|
url: 'command/setForceStart',
|
||||||
@ -213,7 +213,7 @@ initializeWindows = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
downloadLimitFN = function() {
|
downloadLimitFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
var hash = h[0];
|
var hash = h[0];
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
@ -233,7 +233,7 @@ initializeWindows = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
deleteFN = function() {
|
deleteFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
id: 'confirmDeletionPage',
|
id: 'confirmDeletionPage',
|
||||||
@ -257,7 +257,7 @@ initializeWindows = function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
pauseFN = function() {
|
pauseFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
h.each(function(hash, index) {
|
h.each(function(hash, index) {
|
||||||
new Request({
|
new Request({
|
||||||
@ -273,7 +273,7 @@ initializeWindows = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
startFN = function() {
|
startFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
h.each(function(hash, index) {
|
h.each(function(hash, index) {
|
||||||
new Request({
|
new Request({
|
||||||
@ -289,7 +289,7 @@ initializeWindows = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
recheckFN = function() {
|
recheckFN = function() {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
h.each(function(hash, index) {
|
h.each(function(hash, index) {
|
||||||
new Request({
|
new Request({
|
||||||
@ -305,7 +305,7 @@ initializeWindows = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
newLabelFN = function () {
|
newLabelFN = function () {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
id: 'newLabelPage',
|
id: 'newLabelPage',
|
||||||
@ -327,7 +327,7 @@ initializeWindows = function() {
|
|||||||
var labelName = '';
|
var labelName = '';
|
||||||
if (labelHash != 0)
|
if (labelHash != 0)
|
||||||
var labelName = label_list[labelHash].name;
|
var labelName = label_list[labelHash].name;
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
new Request({
|
new Request({
|
||||||
url: 'command/setLabel',
|
url: 'command/setLabel',
|
||||||
@ -353,7 +353,7 @@ initializeWindows = function() {
|
|||||||
['pause', 'resume', 'recheck'].each(function(item) {
|
['pause', 'resume', 'recheck'].each(function(item) {
|
||||||
addClickEvent(item, function(e) {
|
addClickEvent(item, function(e) {
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
h.each(function(hash, index) {
|
h.each(function(hash, index) {
|
||||||
new Request({
|
new Request({
|
||||||
@ -377,7 +377,7 @@ initializeWindows = function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
setPriorityFN = function(cmd) {
|
setPriorityFN = function(cmd) {
|
||||||
var h = myTable.selectedRowsIds();
|
var h = torrentsTable.selectedRowsIds();
|
||||||
if (h.length) {
|
if (h.length) {
|
||||||
new Request({
|
new Request({
|
||||||
url: 'command/' + cmd,
|
url: 'command/' + cmd,
|
||||||
|
@ -278,7 +278,7 @@ var loadTorrentFilesData = function() {
|
|||||||
// Tab changed, don't do anything
|
// Tab changed, don't do anything
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var new_hash = myTable.getCurrentTorrentHash();
|
var new_hash = torrentsTable.getCurrentTorrentHash();
|
||||||
if (new_hash == "") {
|
if (new_hash == "") {
|
||||||
fTable.removeAllRows();
|
fTable.removeAllRows();
|
||||||
clearTimeout(loadTorrentFilesDataTimer);
|
clearTimeout(loadTorrentFilesDataTimer);
|
||||||
|
@ -32,7 +32,7 @@ var loadTorrentData = function() {
|
|||||||
// Tab changed, don't do anything
|
// Tab changed, don't do anything
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var current_hash = myTable.getCurrentTorrentHash();
|
var current_hash = torrentsTable.getCurrentTorrentHash();
|
||||||
if (current_hash == "") {
|
if (current_hash == "") {
|
||||||
clearData();
|
clearData();
|
||||||
clearTimeout(loadTorrentDataTimer);
|
clearTimeout(loadTorrentDataTimer);
|
||||||
|
@ -59,7 +59,7 @@ var loadTrackersData = function() {
|
|||||||
// Tab changed, don't do anything
|
// Tab changed, don't do anything
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var new_hash = myTable.getCurrentTorrentHash();
|
var new_hash = torrentsTable.getCurrentTorrentHash();
|
||||||
if (new_hash == "") {
|
if (new_hash == "") {
|
||||||
tTable.removeAllRows();
|
tTable.removeAllRows();
|
||||||
clearTimeout(loadTrackersDataTimer);
|
clearTimeout(loadTrackersDataTimer);
|
||||||
|
@ -59,7 +59,7 @@ var loadWebSeedsData = function() {
|
|||||||
// Tab changed, don't do anything
|
// Tab changed, don't do anything
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var new_hash = myTable.getCurrentTorrentHash();
|
var new_hash = torrentsTable.getCurrentTorrentHash();
|
||||||
if (new_hash == "") {
|
if (new_hash == "") {
|
||||||
wsTable.removeAllRows();
|
wsTable.removeAllRows();
|
||||||
clearTimeout(loadWebSeedsDataTimer);
|
clearTimeout(loadWebSeedsDataTimer);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<tr id="torrentsTableHeader">
|
<tr id="torrentsTableHeader">
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="myTable"></tbody>
|
<tbody id="torrentsTable"></tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -62,5 +62,5 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
myTable.setup('myTable', 'torrentsTableHeader', context_menu);
|
torrentsTable.setup('torrentsTable', 'torrentsTableHeader', context_menu);
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user