A couple of tweaks to make them a little bit better:
1. Make highlighting functions more consistent (this also fixes minuscule bug when no filter item in tracker list is highlighted due to a type mismatch)
2. Use [event delegation](https://javascript.info/event-delegation) to handle filter toggling & item selection
3. Other minor improvements (everything should work like it was previously)
PR #21191.
This PR improves torrent deletion dialog.
1. Now shows different message depending on the number of selected torrents
2. Visually pretty much inline with the GUI
3. Adjusts to content on load
4. Now uses XHR load method. Panels / windows loaded using this method become part of the current document so there is no need to import styles or scripts (they should load marginally faster now).
PR #21185.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
It is now possible to expand & collapse it by clicking directly on tabs, just like in GUI.
In addition, collapse state is saved and applied on page load.
Fixed one minor bug and now files search input is properly hidden even when panel is collapsed.
PR #21209.
The `event` object will be passed as the first parameter to the event handler. So wrap the
event handler with a closure to prevent `event` leaking to other functions.
This allows passing request_data to retrieve_url in order to create a post request.
PR #21184.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
qbt only need to escape double quotes for the sake of HTML attributes. As for single quotes it
can leave them as-is since WebUI enforce using double quotes for strings.
PR #21180.
`innerHTML` & `outerHTML` setter will more or less evaluate the value which could be used to
inject malicious code. So replace them with safer alternatives.
PR #21163.
This PR makes it possible to see common category of selected torrents in context menu. Everything should behave exactly like in GUI.
Closes#12701.
PR #21136.
Remove the torrent row regardless of it being visible.
I've also removed the return value because:
* it doesn't appear to be used by any caller;
* other functions (e.g. updateRowData) do not return any value;
* it's not clear whether true refers to the torrent being removed from the list of all torrents or just the visible ones.
Closes#21070.
PR #21071.
`setInterval()` will always fire a new timeout regardless previous `updateRssFeedList()` has
completed or not. This patch will now wait for previous request to complete before another
timeout.
Notable changes:
1. Prevent excessive engine module imports.
2. Replace trivial usage of `join()`.
3. Keep the output text sorted whenever possible.
4. Close handles properly.
5. Print error to stderr, not stdout.
6. Report search job exit code.
7. Print exception message to stderr if exception was thrown when
running a search job.
8. Utilize XML library to build XML data
And use 2 spaces as indentation.
PR #21098.