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