Add a notion of "All messages" to the sidebar.

(imported from commit 740711d1fa925055b26249071f79fc0b287d78c1)
This commit is contained in:
Luke Faraone 2013-02-06 15:24:44 -05:00 committed by Leo Franchi
parent 3a2ece7496
commit 85b6b551f2
2 changed files with 4 additions and 1 deletions

View File

@ -117,6 +117,7 @@ var people_list = [
<div id="global_filters">
{# Special-case this link so we don't actually go to page top. #}
<li data-name="home" class="active-filter"><a href="#" onclick="ui.change_tab_to('#home');narrow.deactivate();return false" >Home <span class="count">(<span class="value"></span>)</span></a></li>
<li data-name="all"><a href="#narrow/in/all">All messages <span class="count">(<span class="value"></span>)</span></a></li>
<li data-name="private" ><a href="#narrow/is/private-message">All private messages <span class="count">(<span class="value"></span>)</span></a></li>
</div>
<hr id="stream_filters_sep">

View File

@ -257,7 +257,9 @@ exports.activate = function (operators, opts) {
$("ul.filters li").removeClass('active-filter');
if (operators.length === 1) {
if (operators[0][0] === "stream") {
if (operators[0][0] === 'in' && operators[0][1] === 'all') {
$('#filtall').addClass('active-filter');
} else if (operators[0][0] === "stream") {
$("#stream_filters li[data-name='" + encodeURIComponent(operators[0][1]) + "']").addClass('active-filter');
} else if (operators[0][0] === "is" && operators[0][1] === "private-message") {
$("#filtpers").addClass('active-filter');