mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 23:42:46 -07:00
WebUI: Update torrent properties immediately
Don't wait for new data to be fetched, request them as soon as they are required, i.e. when a property tab is loaded or when a different torrent is selected.
This commit is contained in:
parent
c54271638b
commit
408cc7101e
5 changed files with 154 additions and 141 deletions
|
@ -24,6 +24,8 @@
|
|||
|
||||
myTable = new dynamicTable();
|
||||
|
||||
var updatePropertiesPanel = function(){};
|
||||
|
||||
var stateToImg = function (state) {
|
||||
if (state == "pausedUP" || state == "pausedDL") {
|
||||
state = "paused";
|
||||
|
@ -320,22 +322,34 @@ window.addEvent('load', function () {
|
|||
tabsOnload : function() {
|
||||
MochaUI.initializeTabs('propertiesTabs');
|
||||
|
||||
updatePropertiesPanel = function() {
|
||||
if (!$('prop_general').hasClass('invisible'))
|
||||
updateTorrentData();
|
||||
else if (!$('prop_trackers').hasClass('invisible'))
|
||||
updateTrackersData();
|
||||
else if (!$('prop_files').hasClass('invisible'))
|
||||
updateTorrentFilesData();
|
||||
}
|
||||
|
||||
$('PropGeneralLink').addEvent('click', function(e){
|
||||
$('prop_general').removeClass("invisible");
|
||||
$('prop_trackers').addClass("invisible");
|
||||
$('prop_files').addClass("invisible");
|
||||
updatePropertiesPanel();
|
||||
});
|
||||
|
||||
$('PropTrackersLink').addEvent('click', function(e){
|
||||
$('prop_trackers').removeClass("invisible");
|
||||
$('prop_general').addClass("invisible");
|
||||
$('prop_files').addClass("invisible");
|
||||
updatePropertiesPanel();
|
||||
});
|
||||
|
||||
$('PropFilesLink').addEvent('click', function(e){
|
||||
$('prop_files').removeClass("invisible");
|
||||
$('prop_general').addClass("invisible");
|
||||
$('prop_trackers').addClass("invisible");
|
||||
updatePropertiesPanel();
|
||||
});
|
||||
},
|
||||
column : 'mainColumn',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue