Merge pull request #10153 from Piccirello/webui-files-table

Display files hierarchically in Web UI content tab
This commit is contained in:
Mike Tzou 2019-08-06 10:15:22 +08:00 committed by GitHub
commit 733da5ffdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 985 additions and 120 deletions

View file

@ -893,6 +893,7 @@ window.addEvent('load', function() {
$('PropGeneralLink').addEvent('click', function(e) {
$$('.propertiesTabContent').addClass('invisible');
$('prop_general').removeClass("invisible");
hideFilesFilter();
updatePropertiesPanel();
localStorage.setItem('selected_tab', this.id);
});
@ -900,6 +901,7 @@ window.addEvent('load', function() {
$('PropTrackersLink').addEvent('click', function(e) {
$$('.propertiesTabContent').addClass('invisible');
$('prop_trackers').removeClass("invisible");
hideFilesFilter();
updatePropertiesPanel();
localStorage.setItem('selected_tab', this.id);
});
@ -907,6 +909,7 @@ window.addEvent('load', function() {
$('PropPeersLink').addEvent('click', function(e) {
$$('.propertiesTabContent').addClass('invisible');
$('prop_peers').removeClass("invisible");
hideFilesFilter();
updatePropertiesPanel();
localStorage.setItem('selected_tab', this.id);
});
@ -914,6 +917,7 @@ window.addEvent('load', function() {
$('PropWebSeedsLink').addEvent('click', function(e) {
$$('.propertiesTabContent').addClass('invisible');
$('prop_webseeds').removeClass("invisible");
hideFilesFilter();
updatePropertiesPanel();
localStorage.setItem('selected_tab', this.id);
});
@ -921,6 +925,7 @@ window.addEvent('load', function() {
$('PropFilesLink').addEvent('click', function(e) {
$$('.propertiesTabContent').addClass('invisible');
$('prop_files').removeClass("invisible");
showFilesFilter();
updatePropertiesPanel();
localStorage.setItem('selected_tab', this.id);
});
@ -933,6 +938,14 @@ window.addEvent('load', function() {
height: prop_h
});
const showFilesFilter = function() {
$('torrentFilesFilterToolbar').removeClass("invisible");
};
const hideFilesFilter = function() {
$('torrentFilesFilterToolbar').addClass("invisible");
};
let prevTorrentsFilterValue;
let torrentsFilterInputTimer = null;
// listen for changes to torrentsFilterInput