Split the DynamicTable class into 2 classes

This commit is contained in:
buinsky 2015-11-11 22:50:14 +03:00
parent c9b74c2742
commit 2275060022
5 changed files with 198 additions and 177 deletions

View file

@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
myTable = new dynamicTable();
myTable = new TorrentsTable();
var updatePropertiesPanel = function(){};
var updateMainData = function(){};
@ -309,6 +309,7 @@ window.addEvent('load', function () {
if (response['torrents']) {
for (var key in response['torrents']) {
response['torrents'][key]['hash'] = key;
response['torrents'][key]['rowId'] = key;
myTable.updateRowData(response['torrents'][key]);
if (addTorrentToLabelList(response['torrents'][key]))
update_labels = true;
@ -424,11 +425,6 @@ window.addEvent('load', function () {
$('DlInfos').addEvent('click', globalDownloadLimitFN);
$('UpInfos').addEvent('click', globalUploadLimitFN);
setSortedColumn = function (column) {
myTable.setSortedColumn(column);
updateMainData();
};
$('showTopToolbarLink').addEvent('click', function(e) {
showTopToolbar = !showTopToolbar;
localStorage.setItem('show_top_toolbar', showTopToolbar.toString());