Commit Graph

1599 Commits

Author SHA1 Message Date
Jason Michalski 9c4764fe68 Set the read flag on a message in unread.mark_messages_as_read
I could not find where we were setting the read flag on messages in
response to a update_message_flags event. This fixes a bug where a
user's read position will not be correctly synced in muted streams. For
muted streams the cursor updates seem to force the client to mark the
messages as read.

(imported from commit e7e392be4c8cbf6f734abfa7fee748b07fd495bb)
2014-10-15 03:16:13 -04:00
Waseem Daher 752ff34f8f Whitelist Zulipers that can use the dropbox.com realm on prod.
And make this impossible to do in the Desktop app.

(imported from commit 2caa1b05256a3a55fe1b98d44e7dea5ed2dac86f)
2014-07-29 21:46:35 -07:00
Jason Michalski 94ec1f3741 Better previews for dropbox shmodel.
Getting previews for docs using open-graph protocol images.

(imported from commit 11a9b446eeb5786fdbf536681a100f43ad6db978)
2014-07-29 21:46:34 -07:00
Waseem Daher 47873c181b Unbreak 'email hint' tooltip.
Streams no longer have ids, they have stream_ids.

(imported from commit 5080b8452711a1975d4a5bc7e647d8ef2528395b)
2014-07-29 21:46:33 -07:00
Waseem Daher c90b76444d More whitelabeling stragglers.
Most notably:
* Tutorial
* Some Handlebars templates
* Some modals

(imported from commit b9fb92fa2f0f78d1efbd8f7fcd280fa5652059a8)
2014-07-29 21:46:33 -07:00
Waseem Daher 307d367346 Initial support for white-labeling Zulip as "Dropbox Chat" or otherwise.
Known issues:
* No support for whitelabeling in the email
* No whitelabeling for any externally-visible branding

(imported from commit 9eab7b0744e56a87007b8621a8bb18bbb1080256)
2014-07-29 21:46:33 -07:00
Waseem Daher 6c424e8446 Reenable Dropbox integration on Staging.
(imported from commit 3f76b795046ee08d8d5226eb104701dc6765ebc0)
2014-07-14 14:24:04 -07:00
Waseem Daher 70ac98b860 Disable new bot UI, for now.
(imported from commit a5352f3dffd064fcd28b7029006a58db72ab686e)
2014-07-14 14:22:18 -07:00
Jason Michalski 58429a617b Do not save state when reloading due to an expired event queue
When an event queue expires the client is in an unknown state and trying
to restore state during a reload will keep the incorrect state.

(imported from commit e0828626142029aecd86a7c4cec8c77d261eb3eb)
2014-07-04 04:44:09 -07:00
Allen Rabinovich 3cf0d40436 Fix the overflow issues on status messages
(imported from commit 1b204bd95d80f1752b7df889b1a7e436360f144a)
2014-06-10 14:35:05 -06:00
acrefoot 27217fddb3 make bootstrap inline-code preserve whitespace
(imported from commit be7d45663b3a9ecd40968cae5d0fb6c734a05212)
2014-06-10 13:18:02 -07:00
Jason Michalski cb153967ec Fix notifications on chrome
Chrome has removed the webkitNotifications API and not only has the w3c
web notifications API. This adds a shim when webkitNotifications is
missing but Notification is present.

(imported from commit e21c476f9ae6570c297c88bd6ff90a97818688e6)
2014-05-28 20:11:16 -07:00
acrefoot 148959f1b7 Rewrite humbug-user-uploads.s3.amazonaws.com urls
add_messages is a good entrypoint for this, since it gets called by:
1) get_old_messages
2) get_events_success (for new messages, via insert_new_messages)

which is all the places that rewrites should happen, but nowhere
where extra work is being done.

(imported from commit 844c33bc32d35aa39c9cdacf42eb7e8ddf5ae63c)
2014-05-05 22:21:19 -07:00
Jason Michalski d2d9d9cb01 Fix references to local_id and failed_request
Both missed in the refactoring that split global messages and
message_list_view message_containers.

(imported from commit 127d09204a9e363b78eccfe3d72212e78beb2600)
2014-04-30 16:03:38 -04:00
Jason Michalski 1a47683d32 Change data to attr in inline subscribe buttons
(imported from commit 72fef9dd3cb58ff15e74709b0470033a7f8796b4)
2014-04-28 19:43:47 -04:00
Tim Abbott 0494e40c39 Merge zerver/tornado_callbacks.py into zerver/lib/event_queue.py.
It had stopped being a coherently distinct component a while ago.

(imported from commit 0617957bcfe8dcaf69143c88a96ddd51ecb31a98)
2014-04-23 17:22:31 -07:00
Jason Michalski 768b3b5011 [notify customer Z899] Collapse messages in the home view when narrowed
Collapsing a message in a narrow should also collapse that message in the
home view. Previously this would only happed with the message was
rerendered.

(imported from commit fa82888eba51eb2f4f2b93521d4b7daee852898d)
2014-04-18 18:51:14 -04:00
Allen Rabinovich 0b44b7eb4c Switch to a Zulip+Dropbox logo in the header
(imported from commit bbd36b362f4480c83455981fce1c05faca5acabe)
2014-04-16 22:24:35 -07:00
Allen Rabinovich 2fbb13be0a Switch from hiding overflow-y to hiding overflow
(imported from commit 5d595c030b1098165965dd3c693371f7521cf26f)
2014-04-15 12:18:31 -06:00
Zev Benjamin 2f7af69091 Add customizations for CUSTOMER16 employees' realm
CUSTOMER16 wants their employee realm to:
* only use JWT logins
* have name changes be disabled (they want users' full names to be the
  their CUSTOMER16 user name).
* not show the suggestion that users download the desktop app

(imported from commit cb5f72c993ddc26132ce50165bb68c3000276de0)
2014-04-04 16:51:32 -07:00
Zev Benjamin 9114715030 Factor out the check for whether name changes are disabled
(imported from commit 56ddd9cf53ec49e2e096abe82ed44f758912272e)
2014-04-04 16:51:31 -07:00
Allen Rabinovich 56789e55b4 An ultra-compact view for embedded cases
(imported from commit 3012702158a94627d13ffc03e2e60d02bdf667b7)
2014-03-31 19:05:22 -06:00
Jason Michalski 55e762b069 Fix bug with date separators when prepending messages
When the date changes between an existing group and a new group the
existing date separator needs to be updated. This is done by rerendering
the existing group.

(imported from commit a3775815e33872b0ec07704dc7ccf5fd2671fa21)
2014-03-29 22:00:00 -04:00
Leo Franchi 1e9efe441a Fold case in people.js' dicts
(imported from commit 971742d2a44d54bc2c8d493b034df7809b646b2f)
2014-03-20 11:33:39 -04:00
Jason Michalski c147daa312 Firefox does not have an innerText so use textContent
textContent is supported on all browsers and IE 9+

(imported from commit ea13d58bf85b6ffb30fdbece20f9dbdcd6c32896)
2014-03-19 17:30:11 -04:00
Jason Michalski 94279c0522 is_me_message is an attribute of the message not the message_container
(imported from commit db36e529de92a82bb9c5df97030833ca2e3e0f80)
2014-03-19 11:43:32 -04:00
Jason Michalski 536449c6a4 Remove the extra zulip emoji autocomplete option
(imported from commit 69afbcafa8fda4de874d97f27c83476ee8c30dad)
2014-03-19 10:11:16 -04:00
Jason Michalski 456e735725 Fix autoscroll forever
(imported from commit 66cc2661767f54de54012b4abf930e748071585e)
2014-03-19 09:38:10 -04:00
Jason Michalski 3158075405 Use the match data on the message not the message_container
(imported from commit 1289108c767732c76efc7369206ef065f2395e0d)
2014-03-18 18:24:23 -04:00
Jason Michalski 7bc98d1634 Update the message group fading to be message_container aware
update_rendered_message_groups needs to use the message not the
message_container when testing to see if the fade states need to be
updated.

(imported from commit b1c3baba07169a369d827c89afdc3c406ada0b79)
2014-03-18 16:13:04 -04:00
Jason Michalski 28245ce4e4 Mark messages as read globally
If you read a message in a narrow it should also be marked as read in
the main list.

(imported from commit e892fad0a5b635b5c8de6ebdc79fbfd2b54fab2b)
2014-03-18 16:03:25 -04:00
Jason Michalski c3ded56a7e Do not try to rerender muted messages
(imported from commit 1430b204cd7d32ddcee273b142bcbc2d699caffb)
2014-03-18 15:46:32 -04:00
Jason Michalski e60f76487f Rename message to message_container
Now that we are not directly using message in the message list view
rename the uses of message that are message_containers.

(imported from commit 5c355703a8934a74864f5de6ecb1e2fd851e5d41)
2014-03-18 15:05:39 -04:00
Jason Michalski 1613cad6f6 Separate the global message data from the list display data
The messages being passed to the handlebars templates were global
messages which we were adding per list details to, show name bar etc.
This causes rendering bugs when you try to rerender a message, because a
different list may have changed it. This commit moves the global message
data to a msg attribute on the message_container which will contain the
per list attributes.

(imported from commit 26b1f0d2c72d6288a6d3e7ed5f8692426f2a97ad)
2014-03-18 15:02:31 -04:00
Jason Michalski c39e657a3b Do not try to incrementally update the DOM when it was cleared
When clear_table is called message_groups must also be cleared.
Otherwise render will try to incrementally update the DOM which will
fail when the expected existing nodes are not found.

(imported from commit 5ec3ce01717741b17c719fabded316619cdc4b25)
2014-03-18 13:20:29 -04:00
Jason Michalski 61c16a20b4 Only message rows should be post processed and added to the DOM
The handlebars template adds a text node with a newline after every
message. So we need to filter the jQuery object to include only the
message rows.

(imported from commit 07513b485e805570e450fb93c07091be89bcbd50)
2014-03-18 10:05:20 -04:00
Jason Michalski 35fe8bf81b _post_process_messages realy wants DOM nodes
(imported from commit c419248ff1f7a4338f503f6705dede32e195ed3b)
2014-03-17 22:31:25 -04:00
Jason Michalski c38c9cf894 Me messages should always display the sender
(imported from commit af42ed8dcb9f4bc44e66d4973b9e613302647e12)
2014-03-16 15:14:57 -04:00
Jason Michalski 441688b41e jQuery object's get method returns an array
Passing anything other than an array of DOM elements to
_post_process_messages is an error. In this case we were passing an
array of arrays of DOM elements.

(imported from commit 9e3be18598c406f3578a867dab36731ffeeac921)
2014-03-15 23:46:27 -04:00
acrefoot c69f1dae3f Prevent resize operations from trying to access the reply() tutorial after the tutorial has finished
I had to move a function to prevent linter errors

(imported from commit 7634bd7d29ca2d204d17566f166ce9d580aaac4b)
2014-03-14 20:49:00 -04:00
Steve Howell e5467d3268 Move ui.js click handlers to click_handlers.js
(imported from commit adfeb1f152cca473bc4c6ba5ccd142b38947b335)
2014-03-14 20:48:59 -04:00
Jason Michalski a9235a74f4 Split the group merging logic form the DOM update logic
The goal is to have a more data centric piece that can be unit tested.
We also try to minimise the number of one off jQuery DOM updates and
rerender handlebars fragments instead. This will prevent the
message_group and DOM from drifting apart and not being able to rerender
correctly.

(imported from commit 03f09803f2bc0c3b8187f76f2cfe90be9f7512a3)
2014-03-14 20:48:59 -04:00
Jason Michalski 4f6ee6744d Split out group creation from rendering
To make the rendering process a bit simpler to read this commit is
refactoring the message group creation into its own function.

(imported from commit b53ce96ed8fee3064d7cf891fc248d0c3d821d1a)
2014-03-14 20:48:59 -04:00
Steve Howell 16faed0a83 Create copy_and_paste.js (with code from ui.js).
(imported from commit 37a06af5489e7da5196e5710f384d1f5a7ee7578)
2014-03-14 20:48:59 -04:00
Jason Michalski fa440d0be2 Only empty the message list DOM on reload
We are seeing error on CUSTOMER4 when clearing the DOM on reload. So
now we will only clear the message list.

(imported from commit f5d8d7d36cd1018f7def73ff9eda414387fcec5c)
2014-03-14 20:48:58 -04:00
Steve Howell c5993c2d2d Create gear_menu.js (with code from ui.js).
(imported from commit fc4d058d49d5d4aaaa20ef6237ea3e927eac03e3)
2014-03-14 20:48:58 -04:00
Steve Howell 405c3d7626 Created floating_recipient_bar.js (with code from ui.js).
(imported from commit 2b6631938b0fc8e39c14aacd92f9f1670b68b199)
2014-03-14 20:48:58 -04:00
Steve Howell f8b71fa497 Created condense.js (with code taken from ui.js).
(imported from commit 72b27b48614a7c396170d46936646e52757e2743)
2014-03-14 20:48:58 -04:00
Leo Franchi af3411cab8 Handle removing the selected local message from the message list
(imported from commit 185fc33cc19699ebe61ce9d65262383e39289cf3)
2014-03-14 20:48:57 -04:00
Leo Franchi 9162ef3e0f Fix wrong logic in handling local-only message edit saves
(imported from commit a9074fbfb75884c3280807ddeba576c0fbe313b7)
2014-03-14 20:48:57 -04:00
Luke Faraone bba2eb7622 Send missedmessage notifications as soon as you're idle or offline
Previously, you'd have to be offline to recieve missedmessage
notifications, or maybe idle for an hour. However, I'm pretty sure the
latter code didn't actually work, so we scrap that and just nofity you
via email or push as soon as you're idle.

Closes trac #2350

(imported from commit 899966e0514db575b9640a96865639201824b579)
2014-03-14 20:48:57 -04:00
Steve Howell 84b59d4335 Created scroll_bar.js (with code taken from ui.js).
(imported from commit 0c4e8538031ceb1a0f50eea9a34e315e23e7d9ff)
2014-03-14 20:48:56 -04:00
Steve Howell be2a1c2893 Move resizing code to resize.js.
(imported from commit b6df0007307872751e1a4200af740076e08b5c11)
2014-03-14 20:48:55 -04:00
Leo Franchi f760567b96 Fix topic edits that are initiated from the FRB.
Grab the id of the selected row, whether it's a message, recipient bar, or FRB

(imported from commit 93b9c282d4220ba9bb271733ded4d90d5c051c75)
2014-03-14 20:48:55 -04:00
Steve Howell 7fce920522 Move favicon-related functions to favicon.js
util.reset_favicon -> favicon.reset
util.set_favicon -> favicon.set

(imported from commit 250848ec5dc7ac58649197c8cc4b7b4e7b19f25c)
2014-03-14 20:48:55 -04:00
Steve Howell d52e5e551d Remove {show,destroy}_first_run_message.
We essentially inlined the methods in the three places they
were called.

(imported from commit 622ee718d6dd226187f1e37ff754ee2fa635e6f2)
2014-03-14 20:48:54 -04:00
Steve Howell b12b44579c Set up $.fn.expectOne in setup.js
(imported from commit 77922cf8f506d4eb811498d418215eabf74b76ae)
2014-03-14 20:48:53 -04:00
Steve Howell 3889edd824 Move xhr_error_message() into channel.js
(imported from commit c68c2d475b5673a3dd5f68c75624dfcfe56728ca)
2014-03-14 20:48:53 -04:00
Steve Howell 0e129614cf Remove unused util.recipient_key() function.
(imported from commit cee6a58344971ee1439e6b66ec301f1bd0f80502)
2014-03-14 20:48:53 -04:00
Steve Howell 50bc5401a4 Moved loading_indicator functions to loading.js.
util.make_loading_indicator -> loading.make_indicator
util.destroy_loading_indicator -> loading.destroy_indicator

(imported from commit 8a171622a6096476dd040912d3f1460d53159f20)
2014-03-14 20:48:52 -04:00
Waseem Daher a1538b4bab Eliminate gap at bottom of portico pages.
(imported from commit 0e1d9bde16267f9b6533f256c28374ed98566578)
2014-03-14 20:48:52 -04:00
Waseem Daher c09b6914ba Use new background image for /hello.
(imported from commit 06174760ee28a4c6b323f5c7e66cb20a50709d2a)
2014-03-14 20:48:52 -04:00
Waseem Daher 86ff8cdd8c Add San Francisco image to repository.
This is a public domain work.
Source: http://www.flickr.com/photos/allenr/13127238845/in/photostream/

(imported from commit 90f7e79131302a9da2323125ca27f78d5ac79a78)
2014-03-14 20:48:52 -04:00
Waseem Daher 9cefe46a1f Change /features icon color to match header.
(imported from commit d9cabd13acd8981a5bef93011ae4ea0c45cb451b)
2014-03-14 20:48:51 -04:00
Waseem Daher 202ac0fe10 Restyle /hello to be more consistent with current app style.
(imported from commit 7e1df8cb885908f40569692283e98ac851ca3d2e)
2014-03-14 20:48:51 -04:00
Waseem Daher 4eded59dbe Revert "signup: point to /register at the top too."
This reverts commit 517df29d10182c05780017c15225c9f95b844225.

(imported from commit 7820bb2dad7010579342450040d0f5c72ad2c627)
2014-03-14 20:48:51 -04:00
Leo Franchi c832543168 Remove very confusing dom_id message attribute
(imported from commit c7e3e50bf8827f6f087d7df28ec7b7c173a3c041)
2014-03-14 20:48:51 -04:00
Leo Franchi ef81999f3f Make sure to store raw DOM elements, not jQuery objects, in _rows
(imported from commit ccf85bfd514b5b143c1021d4a186f1448abc700d)
2014-03-14 20:48:50 -04:00
Allen Rabinovich 163d93c15b Move timestamp up when sender is included
(imported from commit a347b397a41028f3ca9642ad1edd704e3255245a)
2014-03-14 20:48:50 -04:00
Leo Franchi 6d2c6f269d Make sure to use the proper dom_id in the proper places
(imported from commit c4852f972d4fe8b2732c87dcc499f91f837e912c)
2014-03-14 20:48:50 -04:00
Leo Franchi 8f7542f34d Use elem.html() instead of elem.replaceWith() when swapping in new rendered messages
(imported from commit 82664bf2eb20faa8e98b7912b4c26174046d2dd6)
2014-03-14 20:48:50 -04:00
Leo Franchi 8b1f0223fe Update the dom_id of message objects when their id changes
(imported from commit e766eff7d966d95616ac192c8cb0cb328bd96b1b)
2014-03-14 20:48:50 -04:00
Leo Franchi 7f3ea34dc5 Make sure to re-select selected after re-ordering
(imported from commit 50878874372d1304014f5285b488db6ab896abbd)
2014-03-14 20:48:49 -04:00
Leo Franchi 26690adc47 Save the correct-from-dom rerendered message in _rows when rerendering
(imported from commit c021beef3106148a6d085ca16f34a1c4bb4fc7af)
2014-03-14 20:48:49 -04:00
Leo Franchi e7c8c322c0 Handle case where _lower_bound returns size of input list
(imported from commit bd91512615b11935eafd5809ca414eeb0cf189c4)
2014-03-14 20:48:49 -04:00
Steve Howell 6ec72a290d Simplify condition for aborting people.reify().
Since it's basically impossible to add a person with an
undefined full_name--even "skeleton" people--there is no
need to check the full_name field to short circuit reify(),
because it will always be defined.

(imported from commit 3a30cfd583a040f7460739abea1604594c450ffe)
2014-03-14 20:48:47 -04:00
Leo Franchi 065fcf1a1b Handle out-of-order local ids in message_list
(imported from commit e805837d7d2790be90490cc9ec9415882ff9b549)
2014-03-14 20:48:47 -04:00
Leo Franchi 7cd814d92c Keep track of local ids in our message list
(imported from commit d96eaa14bf9f4b315d6893e6cd6c8d3c069c1d14)
2014-03-14 20:48:46 -04:00
Leo Franchi 86d310a984 Pass index of element to util.lower_bound matching function
(imported from commit eb8ba76b4855355bc23d6419cbb0f3a4aad8b6de)
2014-03-14 20:48:46 -04:00
Steve Howell 0d0c427f2b Remove unused bot_data.get_all()
(imported from commit 70ec624667dacede72c00f1bb207d8d18dfdd4c1)
2014-03-14 20:48:45 -04:00
Allen Rabinovich 080f7229fc Make status messages larger
(imported from commit 0545d9d074b828c54fbb9156cd8e647c896e2b17)
2014-03-14 20:48:45 -04:00
Allen Rabinovich f1db96143a Stick 'Edited' tag to the top and darken timestamp further
(imported from commit 682b72001cd317b2236cab23e9392c9e4452784d)
2014-03-14 20:48:45 -04:00
Steve Howell 9a5289b96c Change compose box only for going-forward topic changes.
(imported from commit 69de10fd9866acab2d12f15489c67eb9daab8d3d)
2014-03-12 21:15:22 -04:00
Steve Howell b8de1dd13f Change narrows automatically on topic changes.
(imported from commit 7a8e606cc6fe0f2e4b5a164e1396e302ad969102)
2014-03-12 21:15:22 -04:00
Steve Howell 45002aa03f Close message edit before doing topic-related changes.
Closing the edit box earlier will make future changes less brittle,
when we, for example, re-narrow based on topic edits.

(imported from commit 36219c5129153beebfefe443932825fdf74abc43)
2014-03-12 21:15:22 -04:00
Steve Howell d4fa917c49 Add has_topic() helper to filter.js
(imported from commit 8d8d9c2b6638968b18c7603e070c001d6b16cf21)
2014-03-12 21:15:22 -04:00
Steve Howell 0376d26c79 Add filter_with_new_topic() method.
(imported from commit 2ed9261ec70edf0a4ee1a25989cabfa9ab7907fd)
2014-03-12 21:15:22 -04:00
Steve Howell 65e9d0bead Change compose box for topic changes only if streams match.
(imported from commit 0bd6cd53ea4a8db5a457bb7dd5917f25c7c9434a)
2014-03-12 21:15:21 -04:00
Steve Howell 63097f32e5 Let arrow keys do the right thing for select widgets.
This helps the edit form in particular, when you change a
topic and need to select the propagation option.

(imported from commit c9dd1e62cd9e0b2142855685f04baa06eecf7226)
2014-03-12 21:15:21 -04:00
Steve Howell ff44fb6fcf For topic changes, set the compose subject outside the loop.
If we get a topic change, we can change the subject outside the
loop, since we are passed in event.orig_subject.  Doing it inside
the loop was mostly harmless, since after you encountered the first
message with the old topic, the condition to change the subject
evaluated to false, but it was still technically O(N), and it was
kind of confusing.

This commit changes behavior in the edge case that you have the
compose box open for a changing subject, but you are in a narrow
that does not have any of the affected messages.  After this commit,
the topic in the compose box will still change, which I believe
is the correct behavior.

(imported from commit 2363e432ebe7ae8e07379324ee0bfb52051428e6)
2014-03-12 21:15:20 -04:00
Steve Howell dfc34eb074 Allow negated has:* searches.
Before this change, we were incorrectly trying to do local
filtering on negated has searches.

(imported from commit d1a6f1feef6b3cc1c984eb91a73cd16c4e66874e)
2014-03-12 21:15:20 -04:00
Allen Rabinovich d6617a991c Remove mobile device indicator from template
(imported from commit 48a10a75b30c3f51a6dfa5af43ca138e391289d4)
2014-03-12 21:15:19 -04:00
Allen Rabinovich fcca1549b0 Darken the timestamps
(imported from commit c8934a422d8d770634015210fde80eced34aba64)
2014-03-11 13:26:32 -06:00
Luke Faraone 8b3b33c182 Reword error page; link to Twitter.
We use this error page for all 5xx errors, so I'm removing the error
number from the text.

(imported from commit c0c4c8829d466dd20c76dbbc920fc57cafbd6e6c)
2014-03-11 15:16:19 -04:00
Allen Rabinovich 40164f4398 Move mobile indicator to the right and style it properly
(imported from commit 19f6bd27b30c355c1720d43580f5b6ff6c1c0b4a)
2014-03-11 13:06:23 -04:00
Luke Faraone fd7dd0bc2c Use correct presence names for iOS mobile devices
(imported from commit d75f56c26d272342e2b4d074ea90a6d7fb9cff4e)
2014-03-11 13:06:23 -04:00
Luke Faraone bd20a756f9 Show a mobile icon in the presence list when relevant
We show a user as "on mobile" if:
 * They are only active on mobile
 * They are inactive on all devices and can receive push notifications

(imported from commit 0510b9371727cd19c72f6990df7112921c36ad48)
2014-03-11 13:06:23 -04:00
Waseem Daher 4397c25976 Wrap 'Receive audible notifications'.
This resolves Trac #2366.

(imported from commit 0de4b20e0310980181716f7a29a82a4228a16b1b)
2014-03-11 13:06:23 -04:00
Zev Benjamin bdee9721ec tests: Delay loading old messages and starting get_updates until phantomjs thinks the page has loaded
This doesn't affect code when not in testing.  It shaves 7 seconds off of casper
test time on my machine.

(imported from commit 7e27fa781bcf16f36d9c8f058427ba57c41068bd)
2014-03-11 13:06:22 -04:00
Zev Benjamin f45f0b1df6 Get message row safely in the presence of local ids
(imported from commit 4f8c4742206a9fcba4eb19653152aeb4919159bd)
2014-03-11 13:06:22 -04:00
Zev Benjamin d3f14ae860 message_flags.js: Add comment
(imported from commit 6660076a04f765f67ade35664bd09678691d37c3)
2014-03-11 13:06:21 -04:00
Zev Benjamin 9d04b3d643 Don't tightly recurse when updating flags for local messages
(imported from commit a4a9f5278c9445fae753311ea16f165be15ff8eb)
2014-03-11 13:06:21 -04:00
Zev Benjamin 6071a11419 tests: Defer sockjs object creation when in testing
This speeds up CasperJS tests by 25 seconds per main app page load.

When we switched the SockJS, the casper tests got inexplicably slower.  I
finially figured out what's going on.  The first SockJS XHR request (remember
that we don't get websockets in the test suite) gets considered part of the page
load and therefore the PhantomJS onLoadFinished handler doesn't get called until
the SockJS XHR finishes, which happens at the heartbeat, 25 seconds later.  To
fix this, we simply don't create the SockJS object on page load since it will be
created on demand, anyway.

(imported from commit 845a97526c5102df426cd6fc26182a734e7fcab6)
2014-03-11 13:06:20 -04:00
Zev Benjamin 1c7918495c socket: Factor out SockJS object creation
(imported from commit cedb2b3e6ade0b045e8d4982437f6499ae904222)
2014-03-11 13:06:20 -04:00
Steve Howell 72c9deb59e Handle errors better when rendering messages.
Catch any exceptions that happen in the process of triggering
the message_rendered.zulip event.  This addresses #2356.

(imported from commit ce771483cd2533d312fbd68e9c2753c80b3c8d49)
2014-03-11 13:06:19 -04:00
acrefoot 43d866dd71 fixup copy and paste logic
Our restructuring of the messages (especially grouping) seems to be the culprit for message copy and paste

(imported from commit 14632a67f55efea4f1b53cc718a4f655ac83b387)
2014-03-11 13:06:19 -04:00
Allen Rabinovich c23028ec7a Move timestamps to the right
(imported from commit 1fb3e726b32065755cf1ff28e1371bc75609450e)
2014-03-11 13:06:19 -04:00
Steve Howell e993b8fc40 Replace "/me" with sender's name in notifications.
This fixes #2358.

(imported from commit 579f217687bd2af80ab6919a72435336ab456410)
2014-03-11 13:06:18 -04:00
acrefoot 3d7c3a6de3 Bring the Github integration setup page up to date
We're no longer called 'Humbug', and we have more configuration options.

(imported from commit 56c1c4a25e601def35de102fba86960444ddf513)
2014-03-11 13:06:18 -04:00
Steve Howell bc9a9db9b3 Select message if you click on its pencil icon.
This addresses #2351.  While I could see the argument for
wanting to edit a message without changing your selection,
I think it's just very surprising behavior and inconsistent
with the rest of the UI.

(imported from commit 3bb4faca0656258b76bfaafbd7f4a645810578f6)
2014-03-11 13:06:18 -04:00
Waseem Daher af16f6730e Remove border on message body gravatar.
(imported from commit e642facf6dccfafc35632aa6ad5e4e60ad79bf24)
2014-03-11 13:06:17 -04:00
Leo Franchi 9d8758557b Use global match in alert word regex to match all matches
(imported from commit aaec296ad6b18b20c1c2d1cb017cffef8e3e0512)
2014-03-11 13:06:16 -04:00
Leo Franchi 65b6c80f07 Don't highlight alert words that are in URLs, breaking them
(imported from commit e20ee33a1687f935482f48f829c19a1606ce6db1)
2014-03-11 13:06:16 -04:00
Leo Franchi 246a5737e7 Use a message's position not offset() to detect if it's off the bottom of the page
(imported from commit f7915c567b54ad5fd82daf137f89db566a1b417b)
2014-03-11 13:06:15 -04:00
Waseem Daher 3a8b663eb1 Square off bot avatar.
(imported from commit 628816b490732e03cca77d721614979ba25da2f3)
2014-03-06 21:59:55 -05:00
Waseem Daher b5ec6c9958 Delete unused .profile_picture CSS class.
grepping for it turns up nothing relevant.

(imported from commit c7bb97515c993c0d5ed6de7e4ac9edc99ff83ff2)
2014-03-06 21:59:55 -05:00
Waseem Daher c359499386 Square off avatars in commit messages.
(imported from commit 8c2c505e6b84b50b4498f51bbf170e4dea3af39a)
2014-03-06 21:59:54 -05:00
Waseem Daher b80af20541 Larger emoji.
(imported from commit 3fb9a5df7fde4cd073f344d9aed5cb16c1b0de71)
2014-03-06 21:59:54 -05:00
Waseem Daher 96f6939284 Fix a few more unstyled 'cancel' buttons.
(imported from commit 1d8145fe1576af62b73be0badad9de1b75da816a)
2014-03-06 21:59:53 -05:00
Waseem Daher fb00ee79a0 Fix unstyled button on Settings stream notification propagation.
(imported from commit ebc046e8d0f29a6bbf64005c70f32522a366fa6b)
2014-03-06 12:45:06 -05:00
Steve Howell 8f37c3f5fd Tolerate spaces after language in markdown fences.
See #2357.  We now support `~~~ .py ` with that trailing space.

Note that the test coverage is Python-side only due to
bugdown_matches_marked being set to false, since we don't yet
support language syntax on the client side.

(imported from commit ccd5fcb0eee01478d349161400103480678d7486)
2014-03-06 10:15:20 -05:00
Waseem Daher 91fb286b0d Properly style integration-edit buttons.
(imported from commit dbbe831bbc86b24ba37fa9cb06dfdba32a1e8867)
2014-03-05 17:43:00 -05:00
Waseem Daher ae326c066f Properly style 'Cancel' button in edit dialog.
(imported from commit 8c63567f7f696175b7293fabe26fea2d9c60a15a)
2014-03-05 17:33:01 -05:00
Waseem Daher a9f01e382a Switch streams page over to use consistent buttons.
(imported from commit c4d7f658f361a759a38951349e027ac3e279fe9b)
2014-03-05 17:23:23 -05:00
Waseem Daher 66ecc7a6f2 Slightly tidy up realm name change 'Save' button on admin page.
This commit got lost in an earlier rebase.

(imported from commit 36bfad56fc08f443c3721c880cb4dd3427fd0541)
2014-03-05 16:43:10 -05:00
Waseem Daher 2429ed6eeb Remove old Bootstrap2 button code.
(imported from commit 1483c549a3d41802755fea4db7229324e1595b42)
2014-03-05 16:24:55 -05:00
Waseem Daher 095c82ecc4 Actually switch to Bootstrap3-esque buttons.
(imported from commit ddcecb8c5a63324a666ffe170e2d5a76171776c9)
2014-03-05 16:24:54 -05:00
Waseem Daher 82dfc7b109 Remove border-radius from Bootstrap3-esque buttons.
(imported from commit 1c86fb21ab39f8e489481aa0e3f82dc4247364b3)
2014-03-05 16:24:54 -05:00
Waseem Daher 23155bbbae Rename some class names for Bootstrap2 compatibility.
(imported from commit 6a9b9a9e431902640651cad0a02b848bd2717fbc)
2014-03-05 16:24:54 -05:00
Waseem Daher a983a62ad2 [third] Import button CSS from Bootstrap 3.1.1
(imported from commit 07fea19901d31339d9cb7481f00a6d244b09bdb4)
2014-03-05 16:24:54 -05:00
Waseem Daher 6ef234ba80 Slightly tidy up realm name change 'Save' button on admin page.
(imported from commit dfa8d4a08d1e2f505f4edf8b0ef5314da47292a1)
2014-03-05 16:24:54 -05:00
Allen Rabinovich b343d322fe Fix errant scrollbar in stream list
(imported from commit 7a70bad72adb5d57ea11e926f48301d2a9cc7fd0)
2014-03-05 14:14:27 -07:00
Steve Howell 957486cc95 Fix support for searches like "in:home search:foo".
Previously, if you searched for "in:home search:foo", we
weren't making "in:home" a public operator, so the back end
wouldn't know to exclude muted messages, but the front end
also wouldn't exclude muted messages, because it assumed
that queries with "search:" in them were fully narrowed by
the back end.

Prior commits made it so that the back end is now capable
of doing "in:home" narrowing, so to get the properly narrowed
results, we simply needed to make in:home be a public operator
in this commit.  We also made in:all be public for convenience,
although it's essentially a no-op.

(imported from commit e4a8b10813b50163c431b1721bd316b676be1b83)
2014-03-05 14:56:35 -05:00
Leo Franchi aa9c98ef10 Make the selectable sidebar block width the same width as the overall sidebar
(imported from commit 078765c03dbc015b22b3cbb12df692573f6b33cd)
2014-03-05 14:48:54 -05:00
Jason Michalski 30f89f4669 Convert the bot section of the settings page to use bot_data
(imported from commit 63e6982f96ac46d1cebd2ea16d2a7abc7f8d6597)
2014-03-05 14:16:20 -05:00
Jason Michalski fa37e91e5c Add admin status to bot_data
(imported from commit 47b84b3ef1e97e355dee84f0595e94a4612bf4df)
2014-03-05 14:16:20 -05:00
Jason Michalski 3f6e53db6e Add bot_data module that updated with events
(imported from commit b0bd714258132fc81db763d316a15f5a81b1f4ff)
2014-03-05 14:16:20 -05:00
Jason Michalski 494868d21d Group bot stream options lists by public/private
(imported from commit 940319a25edfd1943d78ff95542ffda6f482a40b)
2014-03-05 14:16:19 -05:00
Jason Michalski f82cbe855f Support editing a bot's default streams
(imported from commit 72ceb5152745ddfcc22dfd929904927950bf46e4)
2014-03-05 14:16:19 -05:00
Jason Michalski eebbf0d4ee Show the new bot's default stream settings in the edit view
(imported from commit d6f1872e0dedd57ebde31da2caf075804195dfb0)
2014-03-05 14:16:19 -05:00
Jason Michalski eb1032c9c2 Add UI to set "all public" default to during bot creation
(imported from commit ec03ccdce309c9fbe866343368044b00ea0f5b81)
2014-03-05 14:16:19 -05:00
Jason Michalski 17b579911e Add UI to set listen on stream during bot creation
(imported from commit b481a55c16f853766c82883b4c6c86de5c87759e)
2014-03-05 14:16:18 -05:00
Jason Michalski 538d76e6ed Add UI to create bots with a default send to stream
(imported from commit 1333de89a75bd972ec85be7f11f6ea11d4fa34cd)
2014-03-05 14:16:18 -05:00
Waseem Daher 54ae946061 Squarify swatches on streams page.
(imported from commit 06d630d90acf4bc40e86c34cb85b7eaca92a7263)
2014-03-05 14:05:40 -05:00
Steve Howell 8efe4c0a1b Support has:attachment/has:image/has:link searches.
This commit finishes up support for has:* searches by adding
the front-end pieces, specifically the part that "has" operators
will not be applied locally.  It also implements basic
descriptions for search suggestions and canonicalization
of operands from plural to singular.

(imported from commit a3285bc33d06d76b5a2b403ebcdd911b4cc03980)
2014-03-05 13:58:53 -05:00
Steve Howell 1b9752e10e [notify] Turn on negated search for all realms.
This fixes #730, which includes any customers we want to notify
about the feature being pushed.

(imported from commit c60959ddd7c61ea8e014e984047e9f7bc0d59296)
2014-03-05 10:54:02 -05:00
Steve Howell 89f10d7e7a Handle negated person-related operators in search suggestions.
(imported from commit e045a0910ff59d9b8569c5ba3b3b644fe2d7dad7)
2014-03-05 10:54:02 -05:00
Steve Howell e5e0ba9e7c Handle negated topics in search suggestions.
Typing "stream:foo -topic:b" leads to "stream:foo -topic:bar" properly
as a suggestion now.

(imported from commit bb0acf52744f7b13977a3db5d3c130d1402b09b7)
2014-03-05 10:54:02 -05:00
Jessica McKellar 5f7df38b8a Unbreak custom alert words on the settings page.
This doesn't change the alerting UI logic, it just turns
alert_words_ui into a module and calls the setup code from settings.js
when the settings page is rendered.

(imported from commit 05f95383b046086641280f82f648be58688efe61)
2014-03-04 18:06:48 -05:00
Luke Faraone f445202ba5 Change the topic in the compose box after a topic rename
This helps reduce "double-mixing", closes #2338, and basically also
closes #2037.

(imported from commit dadb70ae85d572d642bba4ac6c3b30f31f104ce0)
2014-03-04 18:06:09 -05:00
Leo Franchi a4a47db9e0 Error out gracefully if edited message is muted
(imported from commit 1aefd61d5633ed67a919cccd2d8c68f7ba8e7bfc)
2014-03-04 17:19:59 -05:00
Jason Michalski 55fef4d60e Enable cleanup_before_reload for CUSTOMER4
(imported from commit dd81a22a64e8a1098bf3a6b875919a2a25499bb8)
2014-03-04 17:07:05 -05:00
Jason Michalski 09dfc9a89b Split selecting a message and hiding the empty narrow message
We should hide the empty narrow message message whenever the narrow is
not empty, but we should only select a message if non are currently
selected.

(imported from commit 22f6b0827dc84ed587a83b5d713b12c1d5d4c0a0)
2014-03-04 16:43:00 -05:00
Leo Franchi 12c04151e9 Prevent click on user filter from collapsing popped-out user list
(imported from commit 182d82f41218e12faeaf07cd92cbee88a9fa6624)
2014-03-04 11:11:31 -05:00
Leo Franchi 60d4c620b9 Disable left-side-userlist on staging, as only CUSTOMER7 uses it
(imported from commit 62d9e908cdb3132e22a58efcceee1d06a68d71bb)
2014-03-04 11:11:31 -05:00
Jason Michalski 16df239f39 Use the first unread from server on reload
When reloading the page we want to narrow to the location that is
restored from the query parameters. This is only done if we ask narrow
to use the first unread message from the server.

(imported from commit b585ef51cbb85788b24d90d831b42c45fd188569)
2014-03-03 18:17:15 -05:00
Jason Michalski c753dfc9a8 Move reload initiation to an explicit initialize function
The reload initiation is required to run before other parts of the site
are started so that page_params will be setup correctly. This moves that
initiation out of an on ready handler to an explicit initialize call
near where the rest of the app is started.

(imported from commit b8994311299327aa3cfa57e3d9e92124a47123f4)
2014-03-03 18:17:15 -05:00
Leo Franchi f2e8929b8a Hide rerender_message and use rerender_messages() in all cases.
rerender_messages() does extra work such as making rerendering in narrows
safe, as well as updating recipient bars. That should be the only valid entry
point for rerendering individual messages

(imported from commit f91aeb2070b1056ab95e01d68a342558c2813ae8)
2014-03-04 10:47:44 -05:00
Leo Franchi ca031304b9 When rerendering single messages, grab messages from the view's own list
(imported from commit 5b3b5cefd65952b81406adcbd6208551228f0c5d)
2014-03-04 10:38:12 -05:00
Leo Franchi 1af7a9db1f Reify skeleton person objects that local echo creates when sending out-of-realm PMs
(imported from commit c0fcdba736f1270d8c05d00546444ee539301877)
2014-03-04 10:09:40 -05:00
Leo Franchi bdaf8b2cfe Update message group recipient bars when rerendering messages individually
(imported from commit 3fb1386fee12c3a4a3f46810368cdd5d8cfb04d8)
2014-03-04 10:09:40 -05:00
Leo Franchi 6f67d94fc4 Split the recipient row of a message group into a partial
(imported from commit 660514daf932235b7c47ac4c22f963da17c7fc8b)
2014-03-04 10:09:40 -05:00
Jessica McKellar df7f85d3c3 Don't show in-app notifications if stream desktop notifications are disabled.
(imported from commit efa29afaa40b65557149ea8a2cbc60e1bc44bee2)
2014-03-03 17:22:17 -05:00
Allen Rabinovich 2761f1338d Fix stream color changes
(imported from commit 37c0a2a5fba10404d9c51d1e4cdce7f45e18f54b)
2014-03-03 14:46:38 -07:00
Jessica McKellar fae92685ae Convert /json/subscriptions/property to supporting bulk property updates.
This includes removing GET support for the endpoint, which is unused
and doesn't map well to this being a bulk endpoint.

(imported from commit 348ff9dfa84be1661368c6d7d35aebf2ae2a9ae0)
2014-03-03 16:08:33 -05:00
Jessica McKellar 66edc784f9 Generate and handle client-side events for global notification changes.
(imported from commit 40056e8ae284da27db0215e7d8320c8f7db2c52b)
2014-03-03 16:08:33 -05:00
Jessica McKellar 87635b9e32 Convert settings from static HTML to a template.
This will make life much easier for handling update events.

(imported from commit 66b101eb5fae89b4eec6fc797fee8be26ac99bfb)
2014-03-03 16:08:32 -05:00
Jessica McKellar c96ceeaea4 Add a handlebars helper for variadic compound OR conditions.
(imported from commit 9f08e998f9f699c05ccf3f5948fe3361a3834ba1)
2014-03-03 16:08:32 -05:00
Jessica McKellar 88c8472a31 Clarify the cases in which you receive notifications.
(imported from commit 7b41b8a1f4baedbc744a6b222fa0ff3127e7a228)
2014-03-03 16:08:32 -05:00
Jessica McKellar 07bb7b2fee Give users the option to propagate global stream changes.
This helps the common case of not liking our default of having audible
and desktop notifications enabled, and not making users adjust the
settings on every existing stream to fix it.

(imported from commit be75edb2c1385d1bd9a289416e2dffd8007f5e0a)
2014-03-03 16:08:32 -05:00
Jessica McKellar e0bd15669a Don't post checkbox data directly to /json/notify_settings/change.
They have weird properties like not sending anything for unchecked
boxes, which makes it hard to wrap a client-agnostic API around.

(imported from commit fef73a57a55b218b55dab6be3453dd6eac73c789)
2014-03-03 16:08:32 -05:00
Jessica McKellar 7829e809c7 Factor notification settings success and error callbacks into functions.
(imported from commit 3bce060ac6ecbad075dbdb8b9ec5514b191f0f95)
2014-03-03 16:08:31 -05:00
Jessica McKellar d89696291f Remove Notification (?) explanation popover.
(imported from commit f261f87c9571a76b8b0e2538ccb3bb4826ef449e)
2014-03-03 16:08:31 -05:00
Jessica McKellar dfc462c24d Grey out per-stream notifications when you mute the stream.
This helps clarify that muting trumps notifications in most cases.

(imported from commit 1a6df169219d9501b1232cc7d2c64abec6fd03ea)
2014-03-03 16:08:31 -05:00
Jessica McKellar b07f4efc13 Use new stream-level notification settings when notifying.
(imported from commit 8db2cf5a44ddc8a9ce285c5f0e50e049fea06573)
2014-03-03 16:08:31 -05:00
Jessica McKellar 53021bf7d3 Pass per-stream notification settings between frontend and backend.
(imported from commit 42e9b80a4c55e0911d457991d53ce71ca31625bb)
2014-03-03 16:08:31 -05:00
Jessica McKellar c673b3b0b1 Pass global stream notification settings between frontend and backend.
(imported from commit 28ec021e8e5166d3b270c81c5a4ad543d2185aa5)
2014-03-03 16:08:30 -05:00
Allen Rabinovich 2d0b9e2aa2 Make right side chevrons visible, lighten usernames, adjust stream list scrolling speed
(imported from commit 8068bdf1ae7fd817fda36d7e32ea94e850ab5675)
2014-03-01 15:11:45 -07:00
acrefoot 7a97d01719 Fix broken viewport.message_viewport_info() calculations
`#tab_bar_underpadding` overlaps some with `.message_header`,
so adding `#tab_bar_underpadding.bottom + .message_header.height`
gave us a nonsense message viewport top.

Doing the calculation this way is more robust, as long as:
1) `$(".floating_recipient").offset().top` continues to give us a sensical number
   and is the last element just before the top of the viewport.
2)  nothing appears between the composebox and viewport.

In this commit I also removed the other couple of places where the #tab_bar_underpadding
was being used as a viewport reference, that no longer makes sense.

(imported from commit c7f35e41309900c581d5e2329c1becf161d501d3)
2014-03-01 11:52:46 -05:00
Leo Franchi de9d26126a Only cycle through stream elements when cycling through streams
(imported from commit 244d72e88e18cc49f32ecfada791f032140390f2)
2014-02-28 16:48:45 -05:00
Allen Rabinovich ba0d3605ae Fix stream list scrollbar visibility
(imported from commit ef1f860ecd7f3ae908a69ac7c35a45d959505966)
2014-02-28 16:27:13 -05:00
Steve Howell 0983809e6f Fix URLs for stream/topic narrowing links in recipient bar.
(imported from commit 4e104cde912521dc360df1a32ce149a5082f9a67)
2014-02-28 16:27:13 -05:00
Steve Howell 6b200b3088 Fix broken link for "Link to this conversation".
(imported from commit bb07a1fe729c532cdc48eee63188b7b812fe07ff)
2014-02-28 16:27:12 -05:00
Leo Franchi 5807a44aee Activity ping handling during a reload should not error out
(imported from commit 63c9f935985cdd4f3d795191aae5aa8ab8bad02b)
2014-02-28 16:27:12 -05:00
Leo Franchi dda8bf6d8a Don't error out if we somehow have a top message group but can't find a recipient row
(imported from commit 3b51f6a5e6e7998c33bf994316d5ba16e5cc0378)
2014-02-28 16:27:12 -05:00
Allen Rabinovich dc15546ba3 Fix horizontal scroll on stream list
(imported from commit 2d28ea608c24e38b8cf58f3993976dcd67353831)
2014-02-27 23:15:55 -05:00
Allen Rabinovich 99036efa06 Disable keyboard scrolling in sidebar
(imported from commit eca509a90df175d21d85eb409c0db9c8fbb931ea)
2014-02-27 20:25:41 -05:00
Allen Rabinovich a2d2438f03 Restyle pointer to make it visible at lower zoom levels
(imported from commit ef5f9e8878181350c823f796138fe652c9d14161)
2014-02-27 20:25:41 -05:00
Allen Rabinovich 8ea941e783 Fix bottom padding on stream list
(imported from commit 5f92b313919eadaa114da3a2fb1160f2eb3a30f5)
2014-02-27 20:25:41 -05:00
Allen Rabinovich 1eae686443 Add slim scrollbar to stream list
(imported from commit 58b64081db68fe9b1d2addcaece10167332d1a1b)
2014-02-27 20:25:41 -05:00
Jason Michalski 1788f5c576 Revert "Revert "Change out the gemoji emoji for android version""
This reverts commit 4d32b4ccf9a5134819a4d942699b4d97e2c0fd55.

(imported from commit 6aefec41f294ee83d19aebbfd9a99b2657e0ff83)
2014-02-27 20:25:39 -05:00
Luke Faraone 0ac73e4d73 Use a dict in presence_info rather than strings
This allows us to extend it to contain more details, as we will shortly.

(imported from commit 59b14592609810c5ac634a8237928ce029f33a83)
2014-02-27 20:25:38 -05:00
Allen Rabinovich 3fb3b564ae Make slow fade longer for unread markers
(imported from commit 728e977f1f128d4e9b3f5f602538b7b2caaa9303)
2014-02-27 20:25:34 -05:00
Leo Franchi f605a7df22 Return an empty list instead of undefined when no groups are visible
(imported from commit 5a02b6b94acb20948c9959e9620df7fa5f945625)
2014-02-27 20:25:34 -05:00
Leo Franchi 63bcf98e71 Fade properly via groups when toggling fade on compose
(imported from commit 865c9daf8a267cfa65f7daceddff55a816b9c22c)
2014-02-27 20:25:34 -05:00
Leo Franchi 9275901277 Refactor viewport.visible_messages and add a viewport.visible_groups
(imported from commit 2cd29c41c1fb7ffc4c88673e81e638bbaad91f5f)
2014-02-27 20:25:34 -05:00
Leo Franchi 840ba90512 Show on-hover topic edits in message list
(imported from commit c2cd996c5e17b801e4e10b0a28451c0fb51c5e21)
2014-02-27 20:25:34 -05:00
Leo Franchi b51ea69db0 Handle topic edits and rerender view if topics have changed
(imported from commit b59f6b532138d660e0acfb949b2eb223b5c5ed0e)
2014-02-27 20:25:33 -05:00
Zev Benjamin a547043831 Fix search highlighting for message content and topics
Previously topics weren't being highlighted at all and messages had their
highlighting persist across different narrows (because we were only checking
whether the message object had a match_content property, not whether it should
currently be used).

(imported from commit 44c91c6d5799dcdf765e19e1a17bd727ce80c918)
2014-02-27 20:25:33 -05:00
Zev Benjamin 865c57fa72 Allow our template partials to take additional named arguments
(imported from commit 20e7dae7b5d27ee34936d400394357fc31c8e628)
2014-02-27 20:25:32 -05:00