mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
Move sidebar click handlers into stream_list.js.
(imported from commit b284508b3abd2edc3fa4edf432307eee8f034b58)
This commit is contained in:
@@ -1380,41 +1380,9 @@ $(function () {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#stream_filters').on('click', 'li .subscription_block', function (e) {
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
return;
|
||||
}
|
||||
if (exports.home_tab_obscured()) {
|
||||
ui.change_tab_to('#home');
|
||||
}
|
||||
var stream = $(e.target).parents('li').attr('data-name');
|
||||
narrow.by('stream', stream, {select_first_unread: true, trigger: 'sidebar'});
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
popovers.register_click_handlers();
|
||||
notifications.register_click_handlers();
|
||||
|
||||
$('#stream_filters').on('click', '.subject_box', function (e) {
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
return;
|
||||
}
|
||||
if (exports.home_tab_obscured()) {
|
||||
ui.change_tab_to('#home');
|
||||
}
|
||||
|
||||
var stream = $(e.target).parents('ul').attr('data-stream');
|
||||
var subject = $(e.target).parents('li').attr('data-name');
|
||||
|
||||
narrow.activate([['stream', stream],
|
||||
['topic', subject]],
|
||||
{select_first_unread: true, trigger: 'sidebar'});
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('.compose_stream_button').click(function (e) {
|
||||
compose.start('stream');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user