mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
org-settings: Add UI for changing the notifications stream.
Added a dropdown in the organization settings page with a search-box and required styles. Also added an element to disable it. Added a method to populate the dropdown using list_rendering.js. Also altered response to the event of deletion of the notifications stream on the frontend. On selection of a new stream or on clicking 'Disable', a patch request is made with stream-id to /json/realm. Fixes: #3708.
This commit is contained in:
@@ -119,6 +119,28 @@ function render(template_name, args) {
|
||||
global.write_handlebars_output("admin-realm-domains-list", html);
|
||||
}());
|
||||
|
||||
(function admin_realm_dropdown_stream_list() {
|
||||
var html = "<ul>";
|
||||
var args = {
|
||||
stream: {
|
||||
name: "Italy",
|
||||
subscriber_count: 9,
|
||||
stream_id: 18,
|
||||
},
|
||||
};
|
||||
html += render("admin-realm-dropdown-stream-list", args);
|
||||
html += "</ul>";
|
||||
|
||||
var link = $(html).find("a");
|
||||
var list_item = $(html).find("li");
|
||||
|
||||
assert.equal(link.text().trim(), "Italy");
|
||||
assert(list_item.hasClass("stream_name"));
|
||||
assert.equal(list_item.attr("data-stream-id"), "18");
|
||||
|
||||
global.write_handlebars_output("admin-realm-dropdown-stream-list", html);
|
||||
}());
|
||||
|
||||
(function admin_default_streams_list() {
|
||||
var html = '<table>';
|
||||
var streams = ['devel', 'trac', 'zulip'];
|
||||
|
||||
Reference in New Issue
Block a user