Modify lock icon styles to display it in the stream list swatch or to the right of the stream name in the list

(imported from commit b70ed2520b38229ccaed62ed84786cb9152e50a9)
This commit is contained in:
Allen Rabinovich 2013-08-27 12:05:32 -07:00
parent 908abbbd8b
commit f6ec501505
4 changed files with 19 additions and 5 deletions

View File

@ -96,7 +96,9 @@ function add_narrow_filter(name, type) {
uri: narrow.by_stream_uri(name),
not_in_home_view: (stream_data.in_home_view(name) === false),
invite_only: stream_data.get_sub(name).invite_only,
color: stream_data.get_color(name)};
color: stream_data.get_color(name)
};
args.dark_background = stream_color.get_color_class(args.color);
var list_item = $(templates.render('stream_sidebar_row', args));
$("#" + type + "_filters").append(list_item);
return list_item;

View File

@ -1843,9 +1843,21 @@ table.floating_recipient {
display: inline-block;
vertical-align: middle;
margin-top: 0px;
margin-left: 3px;
position: absolute;
top: 2px;
top: 4px;
left: 4px;
font-size: 12px;
}
.subscription_header .subscription_name {
display: inline-block;
width: auto;
}
.subscription_header .subscription_lock {
font-size: 12px;
display: inline-block;
vertical-align: top;
}
.subscription_settings {

View File

@ -18,7 +18,7 @@
<div class="count"><div class="value"></div></div>
{{#if invite_only}}
<i class="icon-vector-lock"></i>
<i class="icon-vector-lock {{dark_background}}"></i>
{{/if}}
</div>
<span class="arrow"><i class="icon-vector-chevron-down"></i></span>

View File

@ -6,7 +6,7 @@
<span class="color_swatch fade {{#subscribed}}in{{/subscribed}}" style="background-color: {{color}}"></span>
<span class="subscription_block">
<span class="subscription_name">{{name}}</span>
{{#if invite_only}}<i class="icon-vector-lock"></i>{{/if}}
{{#if invite_only}}<span class="subscription_lock">&nbsp;&nbsp;<i class="icon-vector-lock"></i></span>{{/if}}
</span>
<span class="sub_arrow"><i class="icon-vector-chevron-down"></i></span>
<button class="btn sub_unsub_button {{^subscribed}}btn-primary{{/subscribed}}"