From b2839a6442ffa66ecc33a3641b0dec880ad7bbbe Mon Sep 17 00:00:00 2001 From: buinsky Date: Wed, 20 Jan 2016 12:13:27 +0300 Subject: [PATCH] WebUI: Fix unnecessary updates of torrent peers table --- src/webui/www/public/scripts/dynamicTable.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/webui/www/public/scripts/dynamicTable.js b/src/webui/www/public/scripts/dynamicTable.js index ef6b1c32c..2da1c048b 100644 --- a/src/webui/www/public/scripts/dynamicTable.js +++ b/src/webui/www/public/scripts/dynamicTable.js @@ -212,8 +212,11 @@ var DynamicTable = new Class({ if (tr.hasClass('selected')) tr.removeClass('selected'); } + this.onSelectedRowChanged(); }, + onSelectedRowChanged : function () {}, + updateRowData : function (data) { var rowId = data['rowId']; var row; @@ -350,7 +353,6 @@ var DynamicTable = new Class({ } else { // Simple selection this._this.selectRow(this.rowId); - updatePropertiesPanel(); } } return false; @@ -720,6 +722,10 @@ var TorrentsTable = new Class({ getCurrentTorrentHash : function () { return this.getSelectedRowId(); + }, + + onSelectedRowChanged : function () { + updatePropertiesPanel(); } });