mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Add link to stream settings from sidebar popover
(Trac #1375) (imported from commit 92fdbc9906f1394f3ae484a91919226224f43631)
This commit is contained in:
parent
0119423d27
commit
42d2c40464
@ -283,6 +283,10 @@ function settings_for_sub(sub) {
|
||||
return $("#subscription_settings_" + id);
|
||||
}
|
||||
|
||||
exports.show_settings_for = function (stream_name) {
|
||||
settings_for_sub(get_sub(stream_name)).collapse('show');
|
||||
};
|
||||
|
||||
function add_sub_to_table(sub) {
|
||||
$('#create_stream_row').after(
|
||||
templates.render('subscription', {subscriptions: [sub]}));
|
||||
|
||||
@ -1533,6 +1533,13 @@ $(function () {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$('body').on('click', '.open_stream_settings', function (e) {
|
||||
var stream = $(e.currentTarget).parents('ul').attr('data-name');
|
||||
ui.hide_stream_sidebar_popover();
|
||||
ui.change_tab_to('#subscriptions');
|
||||
setTimeout(function () { subs.show_settings_for(stream); }, 100);
|
||||
});
|
||||
|
||||
$("body").on('click', function (e) {
|
||||
// Dismiss the popover if the user has clicked outside it
|
||||
if ($('.popover-inner').has(e.target).length === 0) {
|
||||
|
||||
@ -23,6 +23,12 @@
|
||||
Compose a message to stream {{stream.name}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="open_stream_settings">
|
||||
<i class="icon-vector-cog"></i>
|
||||
Stream settings
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="colorpicker-container"><input stream_name="{{stream.name}}" class="colorpicker" type="text" value="{{stream.color}}" /></span>
|
||||
<a class="custom_color">Choose custom color</a>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user