diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-08-08 08:53:02 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2018-08-08 08:53:02 +0300 |
commit | f3ee9559fddba7c7da7bdd0ecb49104d0dfca0f6 (patch) | |
tree | bda3a20046371552c948ae2286bb41c181719051 | |
parent | a031eca36bf69ea1554fc2d1a85b380eec91e929 (diff) | |
parent | 4f14df9ee8363780f7d8a4571f0d407314ccf748 (diff) |
Merge branch 'master' of github.com:/nextcloud/mail into release/0.9.0v0.9.0-beta3
-rw-r--r-- | js/app.js | 7 | ||||
-rw-r--r-- | js/searchproxy.js | 36 | ||||
-rw-r--r-- | js/tests/test-main.js | 11 |
3 files changed, 6 insertions, 48 deletions
@@ -1,5 +1,3 @@ -/* global SearchProxy */ - /** * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @@ -30,6 +28,7 @@ define(function(require) { var Marionette = require('backbone.marionette'); var OC = require('OC'); var AppView = require('views/appview'); + var Search = require('search'); var Radio = require('radio'); var Router = require('router'); var AccountController = require('controller/accountcontroller'); @@ -82,7 +81,9 @@ define(function(require) { * Register the actual search module in the search proxy */ setUpSearch: function() { - SearchProxy.setFilter(require('search').filter); + new OCA.Search(Search.filter, function() { + Search.filter(''); + }); }, /** diff --git a/js/searchproxy.js b/js/searchproxy.js deleted file mode 100644 index 02e7c2369..000000000 --- a/js/searchproxy.js +++ /dev/null @@ -1,36 +0,0 @@ -/* global OC, _ */ - -/** - * Mail - * - * This file is licensed under the Affero General Public License version 3 or - * later. See the COPYING file. - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @copyright Christoph Wurst 2015 - */ - -var SearchProxy = {}; - -(function(OC, _) { - 'use strict'; - - var filter = function() {}; - - SearchProxy = { - attach: function(search) { - search.setFilter('mail', this.filterProxy); - }, - filterProxy: function(query) { - filter(query); - }, - setFilter: function(newFilter) { - filter = newFilter; - } - }; - - if (!_.isUndefined(OC.Plugins)) { - OC.Plugins.register('OCA.Search', SearchProxy); - } - -})(OC, _); diff --git a/js/tests/test-main.js b/js/tests/test-main.js index d39a8b8d5..7c07d7c2b 100644 --- a/js/tests/test-main.js +++ b/js/tests/test-main.js @@ -45,16 +45,9 @@ OC = { } }; -SearchProxy = { - attach: function(search) { +OCA = {}; +OCA.Search = function() { - }, - filterProxy: function(query) { - - }, - setFilter: function(newFilter) { - - } }; // jQuery module stubs |