Add chevrons to items on the stream page

(See Trac ticket #1383)

(imported from commit 15e8db20da8f6293150bd89f3616f09444e10568)
This commit is contained in:
Scott Feeney 2013-06-25 11:49:48 -04:00
parent 0f3b6cd863
commit 40aa6bc667
4 changed files with 21 additions and 0 deletions

View File

@ -947,6 +947,20 @@ $(function () {
}
});
});
// Change the down arrow to an up arrow on expansion, and back to a down
// arrow on collapse.
// FIXME: If there's a way, it may be better to do this in pure CSS.
$("#subscriptions_table").on("show", ".subscription_settings", function (e) {
var sub_arrow = $(e.target).closest('.subscription_row').find('.sub_arrow i');
sub_arrow.removeClass('icon-vector-chevron-down');
sub_arrow.addClass('icon-vector-chevron-up');
});
$("#subscriptions_table").on("hide", ".subscription_settings", function (e) {
var sub_arrow = $(e.target).closest('.subscription_row').find('.sub_arrow i');
sub_arrow.removeClass('icon-vector-chevron-up');
sub_arrow.addClass('icon-vector-chevron-down');
});
});
function focus_on_narrowed_stream() {

View File

@ -475,4 +475,5 @@ ul.icons li [class*=" icon-vector-"] {
.icon-vector-question-sign:before { content: "\f059"; }
.icon-vector-remove:before { content: "\f00d"; }
.icon-vector-angle-down:before { content: "\f107"; }
.icon-vector-chevron-up:before { content: "\f077"; }
.icon-vector-chevron-down:before { content: "\f078"; }

View File

@ -1412,6 +1412,11 @@ table.floating_recipient {
float: right;
}
.sub_arrow {
float: right;
padding: 0 5px 0 10px;
}
#create_stream_row td {
background-color: #f3f3f3;
border-color: #BBB;

View File

@ -9,6 +9,7 @@
<span class="subscription_name">{{name}}</span>
{{#if invite_only}}<i class="icon-lock"></i>{{/if}}
</span>
<span class="sub_arrow"><i class="icon-vector-chevron-down"></i></span>
<button class="btn sub_unsub_button {{^subscribed}}btn-primary{{/subscribed}}"
type="button" name="subscription">
{{#subscribed}}