mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
Show lock icon in compose box for invite-only streams (811)
(imported from commit c563fa605d850f39c3b3f0ae9530700f1d1b6e73)
This commit is contained in:
@@ -19,6 +19,9 @@
|
|||||||
<td colspan="2" class="message_header message_header_stream left_part">
|
<td colspan="2" class="message_header message_header_stream left_part">
|
||||||
</td>
|
</td>
|
||||||
<td class="message_header message_header_stream right_part">
|
<td class="message_header message_header_stream right_part">
|
||||||
|
<span id="compose-lock-icon">
|
||||||
|
<i class="icon-lock" title="This is an invite-only stream"></i>
|
||||||
|
</span>
|
||||||
<input type="text" class="recipient_box" name="stream" id="stream"
|
<input type="text" class="recipient_box" name="stream" id="stream"
|
||||||
maxlength="30"
|
maxlength="30"
|
||||||
value="" placeholder="Stream" autocomplete="off" tabindex="120"/>
|
value="" placeholder="Stream" autocomplete="off" tabindex="120"/>
|
||||||
|
|||||||
@@ -56,12 +56,22 @@ function show(tabname, focus_area) {
|
|||||||
notifications_bar.maybe_disable();
|
notifications_bar.maybe_disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_lock_icon_for_stream(stream_name) {
|
||||||
|
var icon = $("#compose-lock-icon");
|
||||||
|
if (subs.get_invite_only(stream_name)) {
|
||||||
|
icon.show();
|
||||||
|
} else {
|
||||||
|
icon.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// In an attempt to decrease mixing, make the composebox's
|
// In an attempt to decrease mixing, make the composebox's
|
||||||
// stream bar look like what you're replying to.
|
// stream bar look like what you're replying to.
|
||||||
// (In particular, if there's a color associated with it,
|
// (In particular, if there's a color associated with it,
|
||||||
// have that color be reflected here too.)
|
// have that color be reflected here too.)
|
||||||
exports.decorate_stream_bar = function (stream_name) {
|
exports.decorate_stream_bar = function (stream_name) {
|
||||||
var color = subs.get_color(stream_name);
|
var color = subs.get_color(stream_name);
|
||||||
|
update_lock_icon_for_stream(stream_name);
|
||||||
$("#stream-message .message_header_stream")
|
$("#stream-message .message_header_stream")
|
||||||
.css('background-color', color)
|
.css('background-color', color)
|
||||||
.removeClass(subs.color_classes)
|
.removeClass(subs.color_classes)
|
||||||
|
|||||||
Reference in New Issue
Block a user