Commit Graph

123 Commits

Author SHA1 Message Date
Vishnu Ks 35b0af2852 Move all_msg_list to message_list.js. 2016-04-21 17:46:21 -07:00
Vishnu Ks ee39f5009f Make message_list.js work like the other modules. 2016-04-20 15:29:30 -07:00
Vishnu Ks 3179434f93 Move keep_pointer_in_view to pointer.js. 2016-04-19 15:23:45 -07:00
Vishnu Ks 35f70e9dac Move 5 legacy global variables to pointer.js.
Move recenter_pointer_on_display, suppress_scroll_pointer_update,
fast_forward_pointer, furthest_read, and server_furthest_read to
a new pointer module in pointer.js.
2016-04-12 10:56:54 -07:00
Ashish 6356584f84 Replace /json/update_pointer with REST style route. 2016-04-11 21:38:23 -07:00
Ashish b8ec8f5ef0 Replace /json/get_profile with REST style route. 2016-04-11 21:38:23 -07:00
Vishnu Ks 2ac5271091 Move global variable have_scrolled_away_from_top to ui.js. 2016-04-10 10:55:16 -07:00
Aristeidis Fkiaras 0058ccbdb0 Move global unread_messages_read_in_narrow to unread.js. 2016-04-08 12:11:47 -07:00
Tim Abbott 12bff0441c Save compose state when reloading due to 'declare bankruptcy'. 2015-11-30 08:49:37 -08:00
Dylan Dumesnil 24b63f30ba Refactor reload.js to allow saving only some state when reloading.
The reload state is now divided into 3 different components:
  pointer, narrow, compose
2015-11-30 08:47:36 -08:00
Steve Howell be2a1c2893 Move resizing code to resize.js.
(imported from commit b6df0007307872751e1a4200af740076e08b5c11)
2014-03-14 20:48:55 -04:00
Leo Franchi 748e5b6da6 Remove disabled summarization code
This experiment has been disabled for everyone for a while: if we
bring something like this back, it is not likely to be exactly the same,
and will be different enough to require a different implementation.

As it is, the summarization code was making a few code paths (rendering
especially) more complex, and is worth removing for simplicity's sake.

(imported from commit 6ac8cdc9f7077a5a1da01ab4268aba3db0bc43f8)
2014-02-27 20:25:23 -05:00
Steve Howell 10b24f77b6 Fix misc. uses of search tuples.
(imported from commit c7dc47c1396eb0d9f6821cafcb3dc90d283b4764)
2014-02-10 15:11:43 -05:00
Tim Abbott 7e6bb801e2 Move message_range to a function on the message list.
(imported from commit c78710a3ccddb15352086b450fb6986e1251f364)
2014-02-03 13:32:02 -05:00
Tim Abbott 4b30afbb27 Fix display of unread counts.
I apparently screwed up when backing up the process_loaded_for_unread
move in a way that just lost the function.

(imported from commit 91dfcf1abc85d439274cb8b0be380e9230942ebb)
2014-01-31 17:53:11 -05:00
Tim Abbott 88fbd5d16a Split out new module message_store.js.
(imported from commit 57cf3f2b8e74d7c56e3baf75859d5b3646282225)
2014-01-31 15:57:28 -05:00
Tim Abbott f5d3a6ddc7 Move suppress_unread_counts to unread.js.
(imported from commit fb64edc27b661d036c9f24715aeb3b4dbdf9463a)
2014-01-31 15:57:28 -05:00
Tim Abbott 004fd0eab8 Move unread-related functions from zulip.js to unread.js.
(imported from commit efc0dd84c2cd30b0203b906af6991475d8a63985)
2014-01-31 14:59:03 -05:00
Tim Abbott c8d57fcafb Split out message_flags.js.
(imported from commit 52afa76fa71141630e325e558cb9c6955d8c03d5)
2014-01-31 14:59:03 -05:00
Tim Abbott 55a88f049c Remove unused within_viewport.
(imported from commit d528e022a0d088052bb0bac5c29864688dae59ca)
2014-01-31 14:59:03 -05:00
Tim Abbott 6e5e5596fd Remove deferred installation of scroll handler.
This is no longer required, now that we're no longer scrolling the
main body of the page.

(imported from commit c2aa0d403c8fd0679b3110fe8e7684d46a7557fa)
2014-01-31 11:15:14 -05:00
Leo Franchi 1056078415 Truncate local ids when loading older messages if messages could be local only
(imported from commit b32ae8f3554632aa84ed2dd039a612bb0fa644e2)
2014-01-30 18:08:48 -05:00
Tim Abbott e505583f52 Split out new module people.js for tracking people.
(imported from commit fb9b769819ade25d1d3d6e452e68c7ee8651cfdd)
2014-01-30 17:32:58 -05:00
Tim Abbott d0ae8795c3 Clean up obsolete fields in get_events_params.
Both pointer and last are fields that were removed when we changed the
protocol to use events like a year ago.

This conveniently allows us to stop exporting get_updates_params to
other modules.

(imported from commit 13651ee240ce6e1bafb241b185e5ef653c348cdf)
2014-01-30 17:23:53 -05:00
Tim Abbott f27edcd50a Move initial call to get_events to server_events.home_view_loaded.
Note that this makes the event fire after the home view has messages
loaded all the way to current; previously it only waited for the first
batch of messages to load.

(imported from commit a5c408ea0136c761f4cc77e8be4977b13acc6d77)
2014-01-30 17:23:52 -05:00
Tim Abbott 1eb294ed11 Rename get_updates to get_events in the frontend.
We did this rename on the backend ages ago.

(imported from commit 11bdf6aa08d932fe2586de282f6174e3dba7267a)
2014-01-30 17:23:52 -05:00
Tim Abbott a7b1b29bf0 Move get_updates into a module.
(imported from commit 9a6c0ab1e76dd96abad8626bc5b1fdbd234b2645)
2014-01-30 15:57:28 -05:00
Tim Abbott 33690d1dc6 Clean up argument to get_updates_success.
(imported from commit 2583c79f83e1e3e540a00ba8afae5a07dff70845)
2014-01-30 15:57:28 -05:00
Tim Abbott abbe0f781f Don't wait 1 second before syncing updates manually controlled flags.
(imported from commit 8526f5d77aee078b5bc282da093009e19f016a44)
2014-01-30 12:48:36 -05:00
Leo Franchi 883157893c Use a UserMessage flag to indicate /me messages
(imported from commit ea503b0d3eb6e90230c0859be96ede60faf5c2bd)
2014-01-27 12:07:48 -05:00
Leo Franchi e24dcb3952 Report proper displayed/receive time and local echo data
(imported from commit 63aba6ef05b1a55d61e975831ebbaa074f8ea74f)
2014-01-23 16:28:58 -05:00
Leo Franchi 97a69cbc12 Convert realm filters in client-side markdown parser
(imported from commit ef12b9ed28cf0176881d33caa1973fe4d9b90d0b)
2014-01-23 16:28:57 -05:00
Leo Franchi c0d56c822f Use the batched_flag_updater in ui.js as well as zulip.js
(imported from commit 6dea64d068d013471baf4022a8041f54da5c111e)
2014-01-23 16:28:57 -05:00
Leo Franchi 03ceef0c40 Trigger a JS event on the inital load of messages completing
(imported from commit 9f1dc0c2f631bdd0a0b020b4b9565ee910e07c98)
2014-01-23 16:28:55 -05:00
Leo Franchi 00f64113e9 Support locally echoing messages when sending
(imported from commit 00b5c5f9b933d119553c32cadff0f17b9f7c2879)
2014-01-23 16:28:55 -05:00
Leo Franchi 5b8e46f971 Allow emails in display recipient until local PMs are reified from server
(imported from commit 73f87449206c3789a4d74b8f776588d588ef88e1)
2014-01-23 16:28:55 -05:00
Leo Franchi 49c4ad61a1 Delay render on narrowing to end, to ensure only one render happens
(imported from commit c38574417e339275a90b235ecabc96e0deab95f8)
2014-01-23 13:29:18 -05:00
Steve Howell 2283aa52cb Use "stream" as our type for updates to Stream.name.
(imported from commit 2eedbff5fac77b9e654ba88900167048573e4056)
2014-01-23 13:27:11 -05:00
Tim Abbott 09dbaabcb6 Update unread flags between multiple browser windows.
(imported from commit 1c5e2bc0233c28c72ce4c8253fa0717ae4793f84)
2014-01-23 13:21:59 -05:00
Tim Abbott 8fa49388c0 Sync the starred message flag to browsers without reload.
(imported from commit e685104275f471d1cd9b94e1803c26f714628f36)
2014-01-23 13:21:59 -05:00
Steve Howell 1746af4df6 Reflect is_admin changes on the client.
The client's update_person() method will look for an is_admin
change and update the gear menu as needed, as well as the underlying
data structures that help draw the admin page user list.

(imported from commit af8c173886d63dd102c63336bbca176f49e1036d)
2014-01-22 14:43:29 -05:00
Steve Howell 81d975c5ff Account for update_user not having a full_name field.
Going forward, the back end may supply fields other than
full_name, like is_admin, so we should make sure the field
is in the hash first.

(imported from commit be94b9698bae0866444739e2846ff65a3ab27eb6)
2014-01-22 14:43:28 -05:00
Steve Howell 93deefec8d Remove defensive code in update_person().
The code to keep page_params.people_list and realm_people_dict
values in sync with people_dict was unnecessary, as they are
the same underlying object.

(imported from commit 0a901213977ed21a0587ed1590ab5434be756f51)
2014-01-22 14:43:27 -05:00
Tim Abbott bc22b1eb16 Add support for topic narrows in our embedded narrow widget.
(imported from commit d3ef2db8e0903e445d9ecc2c28d9f249a0042bd9)
2014-01-16 18:05:35 -05:00
Steve Howell 813fc05b5b Do notifications after message edits.
If a message edit causes a message to become notifiable, we send
a notification to the user, but only if they haven't had any previous
notifications for this message.

(imported from commit cee854de2d42c31a7352a350f79490caf94b613c)
2014-01-10 21:39:03 -05:00
Steve Howell 117915edc5 Properly render mentions after message edits.
In update_messages() in zulip.js we now set the mentioned flag
on incoming messages, so that they render properly with the
salmon background.

(imported from commit 6df523edbcd567bf8e1fde144f65f35a00548c4f)
2014-01-10 21:39:03 -05:00
Steve Howell 997eb82f85 Properly highlight alert words after message edits.
After messages are updated, we process the message for alert
word highlighting, just like we do when new messages are
received.

(imported from commit 5538c0f875595df3ec1ac7c4bc45f0fe44c700cc)
2014-01-10 21:39:02 -05:00
Tim Abbott 7f174213ed Add an idempotent flag to the channel module.
(imported from commit d5b867d2a8f176cae76c8b68435c4fab318d998b)
2014-01-10 21:39:00 -05:00
Leo Franchi 651382b313 Keep track of people by full name for client-side usermentions
(imported from commit 6c88b53913ed7eca7d75ad0d2263d63e277ee65c)
2014-01-07 17:33:33 -05:00
Leo Franchi f0e3afe0d3 Remove deduplicate message hack as trac #1062 is fixed
(imported from commit 521af28471af63b2063256585b27ac45ee2c4b7b)
2014-01-07 17:33:33 -05:00