mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
WebUI: Update title immediately when showing/hiding rates
This commit is contained in:
parent
2226f166ac
commit
6ee1c8851f
2 changed files with 17 additions and 17 deletions
|
@ -233,6 +233,23 @@ window.addEvent('load', function () {
|
|||
updateTransferList();
|
||||
};
|
||||
|
||||
updateSpeedInBrowserTitleBarLinkCheckState = function() {
|
||||
if (localStorage.getItem('speed_in_browser_title_bar') == 'true')
|
||||
$(speedInBrowserTitleBarLink).firstChild.style.opacity = '1';
|
||||
else
|
||||
$(speedInBrowserTitleBarLink).firstChild.style.opacity = '0';
|
||||
}
|
||||
|
||||
updateSpeedInBrowserTitleBarLinkCheckState();
|
||||
|
||||
addClickEvent('speedInBrowserTitleBar', function() {
|
||||
var speed_in_browser_title_bar = localStorage.getItem('speed_in_browser_title_bar');
|
||||
speed_in_browser_title_bar = speed_in_browser_title_bar == 'true' ? 'false' : 'true';
|
||||
localStorage.setItem('speed_in_browser_title_bar', speed_in_browser_title_bar);
|
||||
updateSpeedInBrowserTitleBarLinkCheckState();
|
||||
updateTransferInfo();
|
||||
});
|
||||
|
||||
new MochaUI.Panel({
|
||||
id : 'transferList',
|
||||
title : 'Panel',
|
||||
|
|
|
@ -314,23 +314,6 @@ initializeWindows = function() {
|
|||
}).send();
|
||||
});
|
||||
|
||||
updateSpeedInBrowserTitleBarLinkCheckState = function() {
|
||||
if (localStorage.getItem('speed_in_browser_title_bar') == 'true')
|
||||
$(speedInBrowserTitleBarLink).firstChild.style.opacity = '1';
|
||||
else
|
||||
$(speedInBrowserTitleBarLink).firstChild.style.opacity = '0';
|
||||
}
|
||||
|
||||
updateSpeedInBrowserTitleBarLinkCheckState();
|
||||
|
||||
addClickEvent('speedInBrowserTitleBar', function(e) {
|
||||
new Event(e).stop();
|
||||
var speed_in_browser_title_bar = localStorage.getItem('speed_in_browser_title_bar');
|
||||
speed_in_browser_title_bar = speed_in_browser_title_bar == 'true' ? 'false' : 'true';
|
||||
localStorage.setItem('speed_in_browser_title_bar', speed_in_browser_title_bar);
|
||||
updateSpeedInBrowserTitleBarLinkCheckState();
|
||||
});
|
||||
|
||||
// Deactivate menu header links
|
||||
$$('a.returnFalse').each(function(el) {
|
||||
el.addEvent('click', function(e) {
|
||||
|
|
Loading…
Reference in a new issue