Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornacho <nacho@ownyourbits.com>2019-01-04 00:47:01 +0300
committernachoparker <nacho@ownyourbits.com>2019-01-05 04:14:53 +0300
commitb5e6ab60073f4f77ad5fe2897ca943cd4edf37fe (patch)
tree4f4836685f9bc34b2ebfe43846d658c06eab94f1 /ncp-web
parent841322897e063bc4cc819ed8dfcb3a9a18fd4103 (diff)
search box fixes
Diffstat (limited to 'ncp-web')
-rw-r--r--ncp-web/js/ncp.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/ncp-web/js/ncp.js b/ncp-web/js/ncp.js
index e857caf3..809fcf9b 100644
--- a/ncp-web/js/ncp.js
+++ b/ncp-web/js/ncp.js
@@ -440,6 +440,19 @@ $(function()
// search box
function filter_apps(e)
{
+ if (e.key === 'Enter')
+ {
+ ncp_app_list.each( function(app){
+ if (app.id.indexOf(search_box.value) !== -1)
+ {
+ app_clicked($('#' + app.id)); // TODO only first one
+ }
+ } );
+ ncp_app_list.show();
+ search_box.value = '';
+ return;
+ }
+
ncp_app_list.hide();
ncp_app_list.each( function(app){
if (app.id.indexOf(search_box.value) !== -1)
@@ -449,7 +462,7 @@ $(function()
}
var search_box = $$('#search-box');
- var ncp_app_list = $('.ncp-app-list-item');
+ ncp_app_list = $('.ncp-app-list-item');
$('#search-box').on('|keyup', filter_apps );
search_box.value = '';
search_box.focus();