mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 15:12:32 -06:00
Merge pull request #10146 from Piccirello/webui-escape-key
Add Web UI support for escape key
This commit is contained in:
@@ -55,10 +55,30 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<input type="button" value="QBT_TR(Apply)QBT_TR[CONTEXT=HttpServer]" onclick="setDlLimit()" />
|
||||
<input type="button" id="applyButton" value="QBT_TR(Apply)QBT_TR[CONTEXT=HttpServer]" onclick="setDlLimit()" />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Keyboard({
|
||||
defaultEventType: 'keydown',
|
||||
events: {
|
||||
'Enter': function(event) {
|
||||
$('applyButton').click();
|
||||
event.preventDefault();
|
||||
},
|
||||
'Escape': function(event) {
|
||||
window.parent.closeWindows();
|
||||
event.preventDefault();
|
||||
},
|
||||
'Esc': function(event) {
|
||||
window.parent.closeWindows();
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}).activate();
|
||||
|
||||
$('dllimitUpdatevalue').focus();
|
||||
|
||||
MochaUI.addDlLimitSlider(hashes);
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user