mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
WebUI: Submit the label in the new label dialog on pressing enter key
This commit is contained in:
parent
3591a0cedd
commit
c04f502863
@ -7,6 +7,17 @@
|
|||||||
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
|
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="scripts/mootools-1.2-more.js" charset="utf-8"></script>
|
<script type="text/javascript" src="scripts/mootools-1.2-more.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var newLabelKeyboardEvents = new Keyboard({
|
||||||
|
defaultEventType: 'keydown',
|
||||||
|
events: {
|
||||||
|
'enter': function (event) {
|
||||||
|
$('newLabelButton').click();
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
newLabelKeyboardEvents.activate();
|
||||||
|
|
||||||
window.addEvent('domready', function() {
|
window.addEvent('domready', function() {
|
||||||
$('newLabel').focus();
|
$('newLabel').focus();
|
||||||
$('newLabelButton').addEvent('click', function(e) {
|
$('newLabelButton').addEvent('click', function(e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user