From 838dab9b5962b8476c77a6ac418c70570207fc2e Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Mon, 9 Jan 2017 15:43:56 +0100 Subject: [PATCH] fix searchprovider --- js/main.js | 14 +++++--------- templates/main.php | 3 --- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/js/main.js b/js/main.js index 1a8a347..58420ef 100644 --- a/js/main.js +++ b/js/main.js @@ -1,4 +1,4 @@ -$(window).on('load', function(){ +$(function(){ $('body').on('click', 'tr', function() { var stationid = $(this).attr('data-id'); @@ -73,7 +73,8 @@ $(window).on('load', function(){ method: "POST", url: url, data: { - name: query + name: query, + limit: 20 }, dataType: 'json', success: render_result @@ -100,12 +101,6 @@ $(window).on('load', function(){ } } - $('#radiosearch').submit(function() { - $("tbody > tr").remove(); - var query = $('#radioquery').val(); - radio_query(0, query); - }); - $('a.nav-icon-files').click(function() { switch_menu(0); }); @@ -119,7 +114,8 @@ $(window).on('load', function(){ }); function mySearch(query){ - alert('test'); + $("tbody > tr").remove(); + radio_query(0, query); }; OC.Plugins.register('OCA.Search', { diff --git a/templates/main.php b/templates/main.php index ff1e285..703d269 100755 --- a/templates/main.php +++ b/templates/main.php @@ -25,9 +25,6 @@
-
- -