Commit Graph

398 Commits

Author SHA1 Message Date
Keegan McAllister 5f20d71065 Rename people_hash -> people_set
And use 'true' for consistency with stream_list_as_set.

(imported from commit 1cfb0a64eae368388cb2e0e57162d3b3d5ef88c1)
2012-11-06 17:04:10 -05:00
Zev Benjamin 58684965da Don't show the 'load more' button when the user has no messages
(imported from commit f763535480e5efcf0d345f22e076a97ba1f5809c)
2012-11-06 16:40:52 -05:00
Zev Benjamin c21a255b37 Hide the 'load more' button sooner if there are no more messages to load
(imported from commit ac046851c3a74a6f053e5f3c3b2950526a49cc46)
2012-11-06 16:40:52 -05:00
Zev Benjamin 39db8bf5d5 Use symbolic name for constant
(imported from commit cafb513c082b1ff1cf2169d90c3e4a77a9af5a9e)
2012-11-06 16:40:52 -05:00
Zev Benjamin 9875164908 Select the first ever message the user receives
(imported from commit 0fd6fa03175d9787a5e5a93d6172309a5eb47bfc)
2012-11-06 16:40:52 -05:00
Zev Benjamin df10d184a7 Only load initial messages if we know we will have some
(imported from commit af6bec8bdcd5dc1a643662e7531a3ec75298ffa0)
2012-11-06 16:40:52 -05:00
Jessica McKellar 0700b96f37 Hover the sender name on gravatar and e-mail hovers as well.
This clarifies that clicking on any of those three pieces of
information will pop up the user info tooltip.

(imported from commit 1e57550d66acbb2e8d5d244d2997bbd394c334c3)
2012-11-06 16:33:21 -05:00
Keegan McAllister f1809b8f9c add_display_time: Note unescaped variable
(imported from commit 17d683e2bf0e5eabfb1cb2cdb6a1db18d140b5c9)
2012-11-06 11:25:11 -05:00
Keegan McAllister 080c169e90 same_recipient: Fix spacing
(imported from commit 75247bbbb496870236ab26f827daeb3fbe7bb7f3)
2012-11-06 11:25:11 -05:00
Keegan McAllister b56446513f Don't set default opts in select_message_by_id
These are set again in select_message and we don't use them before then.

(imported from commit 9d1f5ebd7f87890817d6cb4411d62f1e7d1cd053)
2012-11-06 11:25:11 -05:00
Keegan McAllister f9b346666a Comment use of .outerHeight(true)
(imported from commit 1b0f8da2c76dc5bc7504b4d4aa026351d1ab6627)
2012-11-06 11:25:11 -05:00
Jeff Arnold 986b780c69 Increase the bottom line.
(imported from commit c1ac8a3be566713b61f971fb1da0214d2c1aef9c)
2012-11-05 16:03:50 -05:00
Waseem Daher 69b534c0ba Move composebox typeahead code into its own module.
This also cleans up the autocomplete source specifications,
making the three typeaheads all look fairly consistent.

(imported from commit e72655d715db74cfc9ab45b51e7e2ff9e8ea84c5)
2012-11-01 21:56:33 -04:00
Waseem Daher e72279d6a8 Reintroduce XSS issues in composebox typeahead.
This makes the diff a bit cleaner.
Revert "Interim measure: Escape fullnames as well."
This reverts commit a634e6ac39ea337be499889b3ff64b3c4f4fcccb.

Revert "Interim measure: Escape subject names before they go into the typeahead."
This reverts commit 806bc719ab296ec0fe299b33c7aa6767a0c71b9d.

(imported from commit 5a579e3535846b2bc612cf03e43c562c83119812)
2012-11-01 17:16:27 -04:00
Tim Abbott 08b76126b4 Make the mouseover date string always include a timezone.
(imported from commit 5b4a98c6e0cdfc87ba57f6d6454488fff2810603)
2012-11-01 14:07:10 -04:00
Waseem Daher 4d83aa96ff Interim measure: Escape subject names before they go into the typeahead.
This is problematic because if your subject name is <b>hi</b>,
selecting it from the typeahead comes back with:
 &lt;b&gt;hi&lt;/b&gt;
which obviously isn't really OK.

(imported from commit 806bc719ab296ec0fe299b33c7aa6767a0c71b9d)
2012-10-31 17:26:13 -04:00
Zev Benjamin 696a04743a Factor reload-related functionality into reload.js module
(imported from commit ef533f3416e8b406a03d28f67b45ca59523cef8e)
2012-10-29 17:38:44 -04:00
Zev Benjamin 2723a54088 Disable pointer sync for alpha rollout
(imported from commit 50a41e49e9b4a7db0b07ee7705d51c3a2abdff35)
2012-10-29 14:18:08 -04:00
Zev Benjamin bc4447f9f8 Prevent compose box from popping back up inappropriately on reload
We weren't listing to compose finish events during reload previously,
which meant that finishing a message was not handled in the same way
as canceling a message.

(imported from commit 4f2576121a8b5354c94348bc2896a2db8c4be000)
2012-10-29 13:58:40 -04:00
Zev Benjamin cee3f87585 Use compose.finish() instead of manually calling ajaxSubmit() in multiple places
(imported from commit 3bbe4a03171d9eace413b576ae2c7ccf99141bf1)
2012-10-29 13:58:40 -04:00
Keegan McAllister 36f4ce0c0b Properly defer send_pointer_update setTimeout
(imported from commit 02a9c648eb420c8aebe84386cbb708bec96ca2e7)
2012-10-26 22:48:21 -04:00
Keegan McAllister 582cb799dd Get rid of the selected_message_class global
Instead we infer this from narrow.active(), with the ability to override during
the narrowing procedure.

(imported from commit fab9c6861f19aedf0ee8af094c1ef4e8a0a73d80)
2012-10-26 21:05:04 -04:00
Keegan McAllister 6e63ac926e Add rows.get_table()
This checks against the table name whitelist before building the jQuery query.

(imported from commit b296f117cdd2707aeb626328f8b0f9e00c723d59)
2012-10-26 21:03:52 -04:00
Keegan McAllister 6bd2087d89 zephyr.js: Combine get_huddle_recipient{,_names}
(imported from commit dcb4c32250f4ff3a3cf32d999d6469916b17b06e)
2012-10-26 20:31:52 -04:00
Zev Benjamin 652c524777 Try loading older messages after user is idle
(imported from commit bb3c39f9b5a9b7befb353647af75001ec168fc8d)
2012-10-26 13:31:14 -04:00
Zev Benjamin 6ed1d38743 Show persistent pointer on narrow again
(imported from commit c871ec931ffad4bc692a908e687bb21c6cb2e7e9)
2012-10-26 11:44:28 -04:00
Zev Benjamin 51a39fdb0a Remove unused variable
(imported from commit 5a2a100aa3d9a577cde2517be3d9bacc2147fa7e)
2012-10-25 18:11:23 -04:00
Zev Benjamin 1c904e8607 Only start get_updates call after we've gotten all old messages
(imported from commit 8af46008a3abcdacb59e6223f38742a94a87b125)
2012-10-25 18:11:23 -04:00
Zev Benjamin a9583f6889 Fix get_updates missing messages between calls
(imported from commit 2b84df2a35a9a006b8548904ebf145a351a2e92b)
2012-10-25 18:11:23 -04:00
Zev Benjamin a798e14d86 Remove more unused code related to get_updates not returning old messages
(imported from commit d2cc795634c46d8a595ed15c093cfbfc113e6d10)
2012-10-25 15:48:35 -04:00
Zev Benjamin 47eeae0d36 Restore the "load more messages" button disappearing when there are no more
(imported from commit 4f46d49c88d9d0dadefe3e770868b6844dc80d64)
2012-10-25 15:45:14 -04:00
Zev Benjamin 451a041919 Remove the ability to fetch old messages via get_updates
Clients should use get_old_messages, instead.

(imported from commit 67847ef67d8ad4bf4af3f6082f85f0c76a41944c)
2012-10-25 15:31:27 -04:00
Zev Benjamin c047502840 Use get_old_messages in client instead of get_updates for loading initial messages
(imported from commit 169b3720c1fa10606f2351039cac9655bb5165b4)
2012-10-25 12:10:44 -04:00
Keegan McAllister 718018bbf6 select_message_by_id: Fix return value when already selected
(imported from commit c86509f6cf040d6acb771764d7fe2b40afa72fe3)
2012-10-23 19:34:54 -04:00
Keegan McAllister afdd3af1b6 Handle having no selected message more gracefully
(imported from commit ba00c012061b35dfe490bf1312b3fa78a4f6582f)
2012-10-23 17:03:31 -04:00
Keegan McAllister 0744332658 select_message: Reliably return success or failure
(imported from commit 5e6b4066bd53a9b958ec0e752550feb423e52de5)
2012-10-23 17:03:31 -04:00
Zev Benjamin d4c2fd6cb6 Don't update the pointer on the server when the client receives messages
(imported from commit 54a0d10e94d2f4d39a29d4c8596bf4712c1eb45b)
2012-10-23 16:39:05 -04:00
Zev Benjamin 6c4b56517f Revert "Temporarily disable pointer sync"
This reverts commit 7d8f673559ca6359923aa0bdd48edebe0955e921.

(imported from commit 32f7ad925cc4df72220a191602487620a9970f43)
2012-10-23 16:39:04 -04:00
Keegan McAllister e7746e97e8 select_message: Fall back to the last, not first, message
This seems more likely to be what people want when e.g. viewing all huddles.
Later we can get more clever and select the nearest huddle, or something.

(imported from commit 8ec1aa02c050dd25eb868b1e317d114743525c7b)
2012-10-23 16:31:05 -04:00
Keegan McAllister 37ac9d2a91 select_message: Misc cleanup
We can safely call .is(':hidden') on an empty jQuery result and get false.

(imported from commit a73932f63b8fec7c43d8603fca95adcd4f164317)
2012-10-23 16:28:40 -04:00
Keegan McAllister d34bebc584 select_message: Properly fall back to the first visible message
Our old selector here was picking up the floating recipient label, or
something.  This was breaking narrow-to-all-huddles when on a stream message --
you get no selection and the code is sad.

(imported from commit d25fab03bd6d745df6d787c0b1b6452c8c539e32)
2012-10-23 16:28:40 -04:00
Zev Benjamin ce3ea9f019 Temporarily disable pointer sync
(imported from commit 74e6bb347e0b8c01b6450914a50448b78b9749c9)
2012-10-23 15:24:00 -04:00
Zev Benjamin fca4cade34 Ignore long-poll successes with no data
The server will occationally return successfully with no data during
a restart.  Previously, when we would get such responses, the page
would stop working because of JS errors.

(imported from commit 39b89907dc5ae9a9eb54ebf60d0069281e401786)
2012-10-23 12:03:56 -04:00
Tim Abbott 9779ca9e5c Shorten get_updates timeout to under a minute.
(imported from commit fcc87011051c25051861e3c36e442398cd3ca3c0)
2012-10-23 11:31:32 -04:00
Zev Benjamin ed05e28e55 Update server when selected message changes via scrolling
(imported from commit a763baf064e73d358632f3754aba940d188f733d)
2012-10-23 10:30:59 -04:00
Zev Benjamin 899d5c776f Check reason_empty on client when there are no new messages
This fixes a problem where the client would never stop asking for old
messages (bug introduced during rebase)

(imported from commit eef9f19e1e9982b1e0a954eb36a81e1b7ee5b564)
2012-10-22 18:19:14 -04:00
Zev Benjamin 0f474285bf Up idle timeout for reload
(imported from commit 7d9c7dbd77f49865d7e1922ddcee08cd963f4abf)
2012-10-22 17:30:26 -04:00
Zev Benjamin 732ca19729 Synchronize the pointer across sessions
The client may now optionally send its current pointer during
get_updates and the server will return the latest pointer if it
differs and was updated more recently by a different session.

(imported from commit e43b377d7dfb52f83cefb0b1003863d5407caf80)
2012-10-22 16:44:57 -04:00
Zev Benjamin 7e4b7fb881 Add message selection option to not update the server
(imported from commit a5ef9506be24fee7652cd5479cb74789aa365216)
2012-10-22 16:06:38 -04:00
Zev Benjamin bb64eb717f Make select_message and friends take an options argument
The select_and_show_by_id function is now subsumed by select_message_by_id.

(imported from commit 3dbe9cf9d253b64733f269b6dc78c144100927ca)
2012-10-22 16:06:38 -04:00