diff --git a/src/webui/www/private/addtrackers.html b/src/webui/www/private/addtrackers.html index 9bebf810a..5b78735a6 100644 --- a/src/webui/www/private/addtrackers.html +++ b/src/webui/www/private/addtrackers.html @@ -11,16 +11,23 @@ 'use strict'; window.addEvent('domready', function() { - var setLocationKeyboardEvents = new Keyboard({ + new Keyboard({ defaultEventType: 'keydown', events: { 'enter': function(event) { $('addTrackersButton').click(); event.preventDefault(); + }, + 'Escape': function(event) { + window.parent.closeWindows(); + event.preventDefault(); + }, + 'Esc': function(event) { + window.parent.closeWindows(); + event.preventDefault(); } } - }); - setLocationKeyboardEvents.activate(); + }).activate(); $('trackersUrls').focus(); $('addTrackersButton').addEvent('click', function(e) { diff --git a/src/webui/www/private/downloadlimit.html b/src/webui/www/private/downloadlimit.html index 52b8eaaf5..08ae92e3f 100644 --- a/src/webui/www/private/downloadlimit.html +++ b/src/webui/www/private/downloadlimit.html @@ -55,10 +55,30 @@ } } - + diff --git a/src/webui/www/private/edittracker.html b/src/webui/www/private/edittracker.html index 7e1d8076f..d5162ec80 100644 --- a/src/webui/www/private/edittracker.html +++ b/src/webui/www/private/edittracker.html @@ -11,16 +11,23 @@ 'use strict'; window.addEvent('domready', function() { - var setLocationKeyboardEvents = new Keyboard({ + new Keyboard({ defaultEventType: 'keydown', events: { 'enter': function(event) { $('editTrackerButton').click(); event.preventDefault(); + }, + 'Escape': function(event) { + window.parent.closeWindows(); + event.preventDefault(); + }, + 'Esc': function(event) { + window.parent.closeWindows(); + event.preventDefault(); } } - }); - setLocationKeyboardEvents.activate(); + }).activate(); var currentUrl = new URI().getData('url'); if (!currentUrl) diff --git a/src/webui/www/private/installsearchplugin.html b/src/webui/www/private/installsearchplugin.html index 7ea7b9d73..61067d245 100644 --- a/src/webui/www/private/installsearchplugin.html +++ b/src/webui/www/private/installsearchplugin.html @@ -30,7 +30,7 @@ 'use strict'; var initInstallSearchPlugin = function() { - var installSearchPluginKeyboardEvents = new Keyboard({ + new Keyboard({ defaultEventType: 'keydown', events: { 'enter': function(e) { @@ -44,8 +44,7 @@ closeSearchWindow('installSearchPlugin'); } } - }); - installSearchPluginKeyboardEvents.activate(); + }).activate(); $('newPluginPath').select(); }; diff --git a/src/webui/www/private/newcategory.html b/src/webui/www/private/newcategory.html index ea313a44e..7e5c5dae9 100644 --- a/src/webui/www/private/newcategory.html +++ b/src/webui/www/private/newcategory.html @@ -11,16 +11,23 @@ - +