mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 11:49:01 +03:00
WebUI: Submit the label in the new label dialog on pressing enter key
This commit is contained in:
parent
3591a0cedd
commit
c04f502863
1 changed files with 11 additions and 0 deletions
|
@ -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 a new issue