manage streams: Move stream filter to next line.

Previously, in narrow viewports, the "filter"
option would disappear, which was very confusing.

This commit moves the filter streams input to the
next line, making it visible at all viewport widths.

@showell modified the commit message and got Casper
tests passing.

Fixes #12898.
This commit is contained in:
jiviteshjain
2020-03-21 23:42:23 +05:30
committed by showell
parent f506b05667
commit 3da483487a
4 changed files with 46 additions and 35 deletions

View File

@@ -456,7 +456,7 @@ exports.filter_table = function (query) {
let subscribed_only = true;
exports.get_search_params = function () {
const search_box = $("#add_new_subscription input[type='text']");
const search_box = $("#stream_filter input[type='text']");
const input = search_box.expectOne().val().trim();
const params = {
input: input,
@@ -563,11 +563,16 @@ exports.setup_page = function (callback) {
exports.actually_filter_streams();
stream_create.set_up_handlers();
$("#add_new_subscription input[type='text']").on("input", function () {
$("#stream_filter input[type='text']").on("input", function () {
// Debounce filtering in case a user is typing quickly
filter_streams();
});
$("#clear_search_stream_name").on("click", function () {
$("#stream_filter input[type='text']").val("");
filter_streams();
});
if (callback) {
callback();
}