mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Move parse/unparse from narrow to Filter.
I'm trying to move well-isolated methods out of narrow.js, so that narrow.js is more strongly focused on UI/ajax interactions and big, heavy lifting stuff. The logical home for parse/unparse seemed to be Filter, and they brought along two private methods with them. The big code moves involved trivial follow ups like s/exports/Filter/. (imported from commit ace0fe5aa1c7abce0334d079ba9eb8d9a57bd10f)
This commit is contained in:
@@ -5,7 +5,7 @@ var exports = {};
|
||||
function narrow_or_search_for_term(search_string) {
|
||||
var search_query_box = $("#search_query");
|
||||
ui.change_tab_to('#home');
|
||||
var operators = narrow.parse(search_string);
|
||||
var operators = Filter.parse(search_string);
|
||||
narrow.activate(operators, {trigger: 'search'});
|
||||
|
||||
// It's sort of annoying that this is not in a position to
|
||||
@@ -90,7 +90,7 @@ exports.initialize = function () {
|
||||
// operators. (The reason the other actions don't call
|
||||
// this codepath is that they first all blur the box to
|
||||
// indicate that they've done what they need to do)
|
||||
narrow.activate(narrow.parse(search_query_box.val()));
|
||||
narrow.activate(Filter.parse(search_query_box.val()));
|
||||
search_query_box.blur();
|
||||
update_buttons_with_focus(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user