From 805f0d4c90fe7c8bf81ba737a47b9c6979676e65 Mon Sep 17 00:00:00 2001 From: buinsky Date: Wed, 11 Nov 2015 22:58:30 +0300 Subject: [PATCH] Rename 'myTable' variable to 'torrentsTable' --- src/webui/www/public/css/dynamicTable.css | 6 ++-- src/webui/www/public/scripts/client.js | 28 +++++++++---------- src/webui/www/public/scripts/contextmenu.js | 4 +-- src/webui/www/public/scripts/mocha-init.js | 28 +++++++++---------- src/webui/www/public/scripts/prop-files.js | 2 +- src/webui/www/public/scripts/prop-general.js | 2 +- src/webui/www/public/scripts/prop-trackers.js | 2 +- src/webui/www/public/scripts/prop-webseeds.js | 2 +- src/webui/www/public/transferlist.html | 4 +-- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/webui/www/public/css/dynamicTable.css b/src/webui/www/public/css/dynamicTable.css index e4e282a1d..fe3751880 100644 --- a/src/webui/www/public/css/dynamicTable.css +++ b/src/webui/www/public/css/dynamicTable.css @@ -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 { diff --git a/src/webui/www/public/scripts/client.js b/src/webui/www/public/scripts/client.js index f1d9214bb..0819308e1 100644 --- a/src/webui/www/public/scripts/client.js +++ b/src/webui/www/public/scripts/client.js @@ -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) { diff --git a/src/webui/www/public/scripts/contextmenu.js b/src/webui/www/public/scripts/contextmenu.js index 89be32b92..ff427a66c 100644 --- a/src/webui/www/public/scripts/contextmenu.js +++ b/src/webui/www/public/scripts/contextmenu.js @@ -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; diff --git a/src/webui/www/public/scripts/mocha-init.js b/src/webui/www/public/scripts/mocha-init.js index f74e5cf79..d5987a3c2 100644 --- a/src/webui/www/public/scripts/mocha-init.js +++ b/src/webui/www/public/scripts/mocha-init.js @@ -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, diff --git a/src/webui/www/public/scripts/prop-files.js b/src/webui/www/public/scripts/prop-files.js index 471e8bd4c..d5bc8f777 100644 --- a/src/webui/www/public/scripts/prop-files.js +++ b/src/webui/www/public/scripts/prop-files.js @@ -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); diff --git a/src/webui/www/public/scripts/prop-general.js b/src/webui/www/public/scripts/prop-general.js index 4e80ee15d..e51ad9576 100644 --- a/src/webui/www/public/scripts/prop-general.js +++ b/src/webui/www/public/scripts/prop-general.js @@ -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); diff --git a/src/webui/www/public/scripts/prop-trackers.js b/src/webui/www/public/scripts/prop-trackers.js index 9bcb701da..d7d0a0066 100644 --- a/src/webui/www/public/scripts/prop-trackers.js +++ b/src/webui/www/public/scripts/prop-trackers.js @@ -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); diff --git a/src/webui/www/public/scripts/prop-webseeds.js b/src/webui/www/public/scripts/prop-webseeds.js index 39a69421f..0d5903b6f 100644 --- a/src/webui/www/public/scripts/prop-webseeds.js +++ b/src/webui/www/public/scripts/prop-webseeds.js @@ -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); diff --git a/src/webui/www/public/transferlist.html b/src/webui/www/public/transferlist.html index 5102c8bc4..76db6ebac 100644 --- a/src/webui/www/public/transferlist.html +++ b/src/webui/www/public/transferlist.html @@ -3,7 +3,7 @@ - +