search: Add search_pill_widget.js.

Also adds the file to the static asset pipeline.
search_pill_widget.js will be used to access the pills object for
the search query box. It will act in a similar way to
compose_pm_pill.js. Why is this needed: Consider you've initiated
a pills object in search.js for the search query box. Now you want to
also access that pills object to pre-populate pills after a reload in
hashchange.js. search_pill_widget.js makes this easy without the use
of events.
This commit is contained in:
Shubham Padia 2018-06-08 13:46:04 +05:30 committed by Tim Abbott
parent 8803ac4af8
commit 5e93922a7d
3 changed files with 14 additions and 1 deletions

View File

@ -194,7 +194,8 @@
"panels": false,
"PerfectScrollbar": false,
"search_pill": false,
"Sortable": false
"Sortable": false,
"search_pill_widget": false
},
"plugins": [
"eslint-plugin-empty-returns"

View File

@ -191,6 +191,7 @@ import "js/compose_ui.js";
import "js/panels.js";
import 'js/settings_ui.js';
import 'js/search_pill.js';
import 'js/search_pill_widget.js';
// Import Styles

View File

@ -0,0 +1,11 @@
var search_pill_widget = (function () {
var exports = {};
return exports;
}());
if (typeof module !== 'undefined') {
module.exports = search_pill_widget;
}
window.search_pill_widget = search_pill_widget;