diff --git a/templates/zephyr/left-sidebar.html b/templates/zephyr/left-sidebar.html index 6fea4441b7..9d49362690 100644 --- a/templates/zephyr/left-sidebar.html +++ b/templates/zephyr/left-sidebar.html @@ -16,7 +16,7 @@
  • Home ()
  • All messages ()
  • -
  • Private messages ()
  • +
  • Private messages ()
  • Starred messages
  • @-mentions()
  • diff --git a/zephyr/static/js/hotkey.js b/zephyr/static/js/hotkey.js index 2ed601ea8e..bee9e9f106 100644 --- a/zephyr/static/js/hotkey.js +++ b/zephyr/static/js/hotkey.js @@ -213,7 +213,7 @@ function process_hotkey(e) { return do_narrow_action(narrow.by_subject); case 'narrow_private': return do_narrow_action(function (target, opts) { - narrow.by('is', 'private-message', opts); + narrow.by('is', 'private', opts); }); } diff --git a/zephyr/static/js/narrow.js b/zephyr/static/js/narrow.js index 232e3b2901..1350011421 100644 --- a/zephyr/static/js/narrow.js +++ b/zephyr/static/js/narrow.js @@ -108,7 +108,7 @@ Filter.prototype = { operand = operators[i][1]; switch (operators[i][0]) { case 'is': - if (operand === 'private-message') { + if (operand === 'private') { if (message.type !== 'private') return false; } else if (operand === 'starred') { @@ -254,7 +254,7 @@ exports.describe = function (operators) { var operand = elem[1]; switch (elem[0]) { case 'is': - if (operand === 'private-message') { + if (operand === 'private') { return 'Narrow to all private messages'; } else if (operand === 'starred') { return 'Narrow to starred messages'; @@ -606,7 +606,7 @@ function pick_empty_narrow_banner() { return $("#empty_star_narrow_message"); } else if (first_operand === "mentioned") { return $("#empty_narrow_all_mentioned"); - } else if (first_operand === "private-message") { + } else if (first_operand === "private") { // You have no private messages. return $("#empty_narrow_all_private_message"); } @@ -651,7 +651,7 @@ exports.narrowed_to_pms = function () { return false; } return (current_filter.has_operator("pm-with") || - current_filter.has_operand("is", "private-message")); + current_filter.has_operand("is", "private")); }; // We auto-reply under certain conditions, namely when you're narrowed diff --git a/zephyr/static/js/stream_list.js b/zephyr/static/js/stream_list.js index a2d2db092e..30d2259b92 100644 --- a/zephyr/static/js/stream_list.js +++ b/zephyr/static/js/stream_list.js @@ -218,7 +218,7 @@ function do_new_messages_animation(message_type) { function animate_private_message_changes(new_private_message_count) { if (new_private_message_count > last_private_message_count) { - do_new_messages_animation('private-message'); + do_new_messages_animation('private'); } last_private_message_count = new_private_message_count; } @@ -252,7 +252,7 @@ exports.update_dom_with_unread_counts = function (counts) { }); // integer counts - exports.set_count("global", "private-message", counts.private_message_count); + exports.set_count("global", "private", counts.private_message_count); exports.set_count("global", "mentioned", counts.mentioned_message_count); exports.set_count("global", "home", counts.home_unread_messages); @@ -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', 'starred', 'mentioned'].indexOf(op_is[0]) !== -1) { $("#global_filters li[data-name='" + op_is[0] + "']").addClass('active-filter'); } } diff --git a/zephyr/static/js/tab_bar.js b/zephyr/static/js/tab_bar.js index b1b608bff6..5e972ca308 100644 --- a/zephyr/static/js/tab_bar.js +++ b/zephyr/static/js/tab_bar.js @@ -33,9 +33,9 @@ function make_tab_data() { stream = filter.operands("stream")[0]; tabs.push(make_tab(stream, hashed, stream, 'stream')); } else if (filter.has_operator("pm-with") || - filter.has_operand("is", "private-message")) { + filter.has_operand("is", "private")) { - tabs.push(make_tab("Private Messages", '#narrow/is/private-message', + tabs.push(make_tab("Private Messages", '#narrow/is/private', undefined, 'private_message ')); if (filter.has_operator("pm-with")) { diff --git a/zephyr/tests/frontend/tests/02-narrow.js b/zephyr/tests/frontend/tests/02-narrow.js index 7d4fe66291..e6e2c1804b 100644 --- a/zephyr/tests/frontend/tests/02-narrow.js +++ b/zephyr/tests/frontend/tests/02-narrow.js @@ -230,7 +230,7 @@ casper.then(function () { }); casper.thenClick('#stream_filters [data-name="Verona"] a', expect_stream); casper.thenClick('#global_filters [data-name="home"] a', expect_home); -casper.thenClick('#global_filters [data-name="private-message"] a', expect_all_pm); +casper.thenClick('#global_filters [data-name="private"] a', expect_all_pm); un_narrow(); diff --git a/zephyr/views.py b/zephyr/views.py index 91b9ebda55..e019e9d4df 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -691,7 +691,7 @@ class NarrowBuilder(object): return Q(**dict((self.prefix + key, kwargs[key]) for key in kwargs.keys())) def by_is(self, operand): - if operand == 'private-message': + if operand == 'private': return (self.pQ(recipient__type=Recipient.PERSONAL) | self.pQ(recipient__type=Recipient.HUDDLE)) elif operand == 'starred':