Bold @-mentions link when you click on it.

This fix also cleans up the search operators so that @-mentions
and Private messages have a more similar naming convention.

(imported from commit fb1a2119aab5aa9e179c6e321a8d2ef2e90290cf)
This commit is contained in:
Steve Howell
2013-07-08 21:24:01 -04:00
parent 58e57d7462
commit f87b27a9c3
4 changed files with 6 additions and 6 deletions

View File

@@ -18,7 +18,7 @@
<li data-name="all" class="hidden-filter"><i class="icon-vector-list"></i> <a href="#narrow/in/all">All messages <span class="count">(<span class="value"></span>)</span></a></li>
<li data-name="private-message"><i class="icon-vector-user"></i> <a href="#narrow/is/private-message">Private messages <span class="count">(<span class="value"></span>)</span></a></li>
<li data-name="starred"><i class="icon-vector-star"></i> <a href="#narrow/is/starred">Starred messages</a></li>
<li data-name="mentioned-message"><i class="icon-vector-tag"></i> <a href="#narrow/is/mentioned">@-mentions<span class="count">(<span class="value"></span>)</span></a></li>
<li data-name="mentioned-message"><i class="icon-vector-tag"></i> <a href="#narrow/is/mentioned-message">@-mentions<span class="count">(<span class="value"></span>)</span></a></li>
</ul>
<ul id="stream_filters" class="filters scrolling_list"></ul>
</div>

View File

@@ -115,7 +115,7 @@ Filter.prototype = {
if (!message.starred) {
return false;
}
} else if (operand === 'mentioned') {
} else if (operand === 'mentioned-message') {
if (!message.mentioned) {
return false;
}
@@ -258,7 +258,7 @@ exports.describe = function (operators) {
return 'Narrow to all private messages';
} else if (operand === 'starred') {
return 'Narrow to starred messages';
} else if (operand === 'mentioned') {
} else if (operand === 'mentioned-message') {
return 'Narrow to mentioned messages';
}
break;
@@ -598,7 +598,7 @@ function pick_empty_narrow_banner() {
if (first_operand === "starred") {
// You have no starred messages.
return $("#empty_star_narrow_message");
} else if (first_operand === "mentioned") {
} else if (first_operand === "mentioned-message") {
return $("#empty_narrow_all_mentioned");
} else if (first_operand === "private-message") {
// You have no private messages.

View File

@@ -274,7 +274,7 @@ $(function () {
}
var op_is = event.filter.operands('is');
if (op_is.length !== 0) {
if (['private-message', 'starred', 'mentioned'].indexOf(op_is[0]) !== -1) {
if (['private-message', 'starred', 'mentioned-message'].indexOf(op_is[0]) !== -1) {
$("#global_filters li[data-name='" + op_is[0] + "']").addClass('active-filter');
}
}

View File

@@ -52,7 +52,7 @@ function make_tab_data() {
} else if (filter.has_operand("is", "starred")) {
tabs.push(make_tab("Starred", hashed));
} else if (filter.has_operand("is", "mentioned")) {
} else if (filter.has_operand("is", "mentioned-message")) {
tabs.push(make_tab("Mentions", hashed));
} else if (filter.has_operator("sender")) {
var sender = filter.operands("sender")[0];