mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 15:12:32 -06:00
WebUI: simplify close window implementation
The caller site now take the responsibility to ensure the element is valid. PR #21892.
This commit is contained in:
@@ -21,11 +21,11 @@
|
||||
event.preventDefault();
|
||||
},
|
||||
"Escape": (event) => {
|
||||
window.parent.MochaUI.closeWindow(window.parent.$("newRulePage"));
|
||||
window.parent.qBittorrent.Client.closeFrameWindow(window);
|
||||
event.preventDefault();
|
||||
},
|
||||
"Esc": (event) => {
|
||||
window.parent.MochaUI.closeWindow(window.parent.$("newRulePage"));
|
||||
window.parent.qBittorrent.Client.closeFrameWindow(window);
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@
|
||||
},
|
||||
onSuccess: (response) => {
|
||||
window.parent.qBittorrent.RssDownloader.updateRulesList();
|
||||
window.parent.MochaUI.closeWindow(window.parent.$("newRulePage"));
|
||||
window.parent.qBittorrent.Client.closeFrameWindow(window);
|
||||
}
|
||||
}).send();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user