diff --git a/js/navigate.js b/js/navigate.js index ed3824c8..834fc454 100644 --- a/js/navigate.js +++ b/js/navigate.js @@ -33,6 +33,7 @@ var fullTextSearch = OCA.FullTextSearch.api; var elements = { searchTimeout: null, search_input: null, + search_size: null, search_submit: null, search_result: null, search_json: null @@ -51,6 +52,7 @@ Navigate.prototype = { var self = this; elements.search_input = $('#search_input'); + elements.search_size = $('#search_size'); elements.search_submit = $('#search_submit'); elements.search_result = $('#search_result'); elements.search_panels = $('#search_navigation'); @@ -78,7 +80,17 @@ Navigate.prototype = { // self.initSearch(true); // } // }); - + + if (typeof (Storage) !== "undefined") { + elements.search_size.on('input', function(){ + localStorage.search_size = elements.search_size.val(); + self.navigateTimedSearch(); + }); + if (localStorage.search_size) { + elements.search_size.val(localStorage.search_size); + } + } + self.initPanels(); }, @@ -100,7 +112,6 @@ Navigate.prototype = { } }, - initPanels: function () { var self = this; $.ajax({ @@ -420,6 +431,7 @@ Navigate.prototype = { var providers = this.getProviders(); var options = this.getOptions(); + var size = elements.search_size.val(); this.displayProviderResults(providers); @@ -427,7 +439,8 @@ Navigate.prototype = { providers: providers, options: options, search: search, - page: curr.page + page: curr.page, + size: size }; fullTextSearch.search(request, this.searchResult); diff --git a/templates/navigate.php b/templates/navigate.php index 6a83d9ea..d007436f 100644 --- a/templates/navigate.php +++ b/templates/navigate.php @@ -48,6 +48,14 @@ +
  • +
    +
    +
    Results:
    +
    +
    +
    +