Commit Graph

162 Commits

Author SHA1 Message Date
Leo Franchi 0a9f54369a Disable desktop-app emoji handler. It breaks copying of formatted text
(imported from commit 14c9ee7ba61d4913da2d2e8c677739b573252525)
2014-02-03 13:07:43 -05:00
Leo Franchi f8a9f36dfa Don't use our copy handler when editing a message
(imported from commit 49e7001d8aa9af4f482b62332da03faad784074f)
2014-02-03 13:07:42 -05:00
Jason Michalski bb0784d9aa Remove tags from selectors to conform to the style guide
(imported from commit 14233e3ec8ca72cae6baa5fcb4e4068bd1524823)
2014-02-01 20:29:15 -05:00
Jason Michalski 80d2ecdd1e Enable custom copy handler when selection starts on a stream header
When users select messages starting with stream header we should format
the text as using the custom copy handler.

(imported from commit 4f9851939484d046619c3e53c71c47ad64797670)
2014-02-01 20:29:15 -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 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 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
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
Jason Michalski 9cc1dc242c Move the mouse handlers from window to app
(imported from commit 0331496a578c47f73b6c9e81d8a79e26e8d7a9a3)
2014-01-30 01:48:15 -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
Tim Abbott 20457d695d Fix starring/unstarring of messages.
This got broken in the local echo refactoring -- we accidentally
switched the update_starred function to be a toggle, which meant that
the message would be marked as starred and then unmarked as starred
moments later, due to the two update_starred calls for the initiating
browser (one from when the click happens, the second from when the
event returns from the server).

(imported from commit 8f83729fe5477cf052124c1c56ed9189b85b885c)
2014-01-30 12:48:36 -05:00
Leo Franchi 1666403850 Find message objects in any lists when updating, as update might come from server
(imported from commit fa70180c9a228bff39efd846d465d0f1fa9bb4e7)
2014-01-28 17:31:02 -05:00
Leo Franchi ea04d027cf Don't allow editing of local-only messages
(imported from commit 4fcac6b4b7a5f917944934d06eae757d7cca8170)
2014-01-24 14:01:19 -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 883122b129 Allow editing of locally echoed messages that failed to be sent
(imported from commit eff8d55af7a1ff123ed2a2e45e58ff74de96beac)
2014-01-23 16:28:55 -05:00
Leo Franchi c3f798297e Show message failure message on hover of error
(imported from commit 8379c3c35c612d3609d2ab378eb6ca2f7ec120b1)
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
Tim Abbott 8fa49388c0 Sync the starred message flag to browsers without reload.
(imported from commit e685104275f471d1cd9b94e1803c26f714628f36)
2014-01-23 13:21:59 -05:00
Tim Abbott 59cd1663df Rename confusing update_message_* functions in ui.js.
(imported from commit eeb2b1f92deb807676a75f1263d994a8c606b249)
2014-01-23 13:21:59 -05:00
Tim Abbott 59b0af835e Use clearer variable name for toggle_star argument.
(imported from commit 6cc604b0cbe8a3a16ff4772e811af1fb4b41aa1e)
2014-01-23 13:21:59 -05:00
Steve Howell 887c2059b1 Make the Administration menu item be show/hide-driven.
Always render the Administration menu item from the back end, but
make it be hidden by default until the page is loaded.  Then, the
client can un-hide it as needed.

(imported from commit 66e607eec430d7179b4d5ac3f5416f5be8ac26c9)
2014-01-22 14:43:29 -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
acrefoot 0d08acaa1b Transition from tables to divs for the message list.
This breaks our casperjs tests.

(imported from commit c63181c73a24eed4a80bfa56966d1f0871c5edb2)
2013-12-19 18:28:11 -05:00
Tim Abbott 795930c803 Add channel module wrapping our various JSON requests to the server.
(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
2013-12-19 16:52:47 -05:00
Waseem Daher fa17fb0da1 Place "autoscroll" option in a "Zulip Labs" section.
(imported from commit 31e8d0b5c1454932398cf732c0c4ad0702e5274b)
2013-12-16 10:43:49 -05:00
acrefoot 07501cd12c only show 'auto-scroll forever' setting for zulip.com and customer28.invalid
(imported from commit 329ea6a4f715a093a1ab56777964ca751300ac0c)
2013-12-13 11:50:11 -05:00
acrefoot 59bbe33954 Cinch up whitespace during some cases. This is for when enable_autoscroll_past_unread is set
basically this tries to turn scroll-the-world into not-scroll-the-world
This is not very good--maybe Allen has a better idea. The best solution would be to
turn off scroll-the-world. Look for it after the tables->divs change happens.

(imported from commit ae0b6976bca57986f95022f2470bc7117eda7fa3)
2013-12-13 11:50:11 -05:00
acrefoot 1bd420f12c Show auto-scroll forever setting in /#settings
(imported from commit fa66cbe52836f230e551f25c47bd755b705387d2)
2013-12-13 11:50:11 -05:00
Steve Howell da69fc19de Fix width checks for skinny mode.
We now use window.innerWidth to check for CUSTOMER7's skinny
mode, which empirically seems to be more consistent with
CSS's max-width @media settings.

I tested under FF, Safari, and Chrome.

(imported from commit d440998634633c11b471fe732104be252c979cd4)
2013-12-12 15:41:17 -05:00
Steve Howell 009d1ed88a DRY up check for feature_flags.left_side_userlist.
(imported from commit d7cbb1eee0e83ddf811451e10dd6dcd03c86ffd0)
2013-12-12 15:41:16 -05:00
Steve Howell b53513a5e7 Uncondense messages that have recently become "short."
It's possible for a message to be considered "long" at one point,
and then if you narrow to it later, it should be considered "short",
because either the screen's wider or taller.  This commit makes
sure that we remove the "condensed" flag from short messages,
and it also fixes the "More..." click handler's assumption that
could-be-condensed will always be true for condensed messages.

(imported from commit 77e4a1ad299c09f12e5609a972d5668472bd4a81)
2013-12-12 15:38:38 -05:00
Steve Howell 7427fb8d98 Cache message heights for ui.condense_and_collapse().
Cache the height of messages to speed up ui.condense_and_collapse()
to make narrows work more quickly.  The height of the message
determines whether it is auto-condensed or not.  We clear specific
cache entries when messages get edited, and we reset the entire
cache when the window width changes.

(imported from commit 7c12070a3eb3e2e1a2dfeb8d9109f3404a46c032)
2013-12-12 15:38:38 -05:00
Allen Rabinovich c51a2355ee Make white background permanent
(imported from commit a9164b8f800cbc992ec72e9125a5adb08bb97615)
2013-12-10 11:30:28 -07:00
Steve Howell e4f917aa9c Remove "Invite coworkers" link from left sidebar for CUSTOMER7.
(imported from commit 3955b7e10a639fef67948bc49b2f535acd5bc765)
2013-12-06 17:17:26 -05:00
Steve Howell 1c5d642672 Show Group PMs in CUSTOMER7's left sidebar.
(imported from commit ee8068e1cb0408a6bc42381333d05d4d09689d35)
2013-12-06 17:17:26 -05:00
Steve Howell f607b24ee5 Make size_blocks work for > 2 blocks.
This changes the algorithm slightly for the 2-block case, because
I simplified the logic to just divvy up the space naively based
on the relative size of the blocks.

(imported from commit 9498edd916f65e07fb64d138276691d0d5cc0e55)
2013-12-06 17:17:26 -05:00
Steve Howell 90d97a39c6 Extract ui.confine_to_range().
(imported from commit d95fd01e9783d01908a1155e260bac52339eb6ca)
2013-12-06 17:17:26 -05:00
Steve Howell c1dcf38b0a Use size_blocks() in ui.left_userlist_get_new_heights().
This is a functional change.  Before this change, the stream
list and user list were allowed to take equal space in the left
sidebar; now, we take the size of each list in deciding which
proportion each block gets.

(imported from commit febedcb0518353825e18a6ebe60d1883b98bc78d)
2013-12-06 17:17:25 -05:00
Steve Howell c2034c210c Extract ui.size_blocks().
This is just moving code, nothing fancy.

(imported from commit a753aa36fc976409e79e5a3c11ffdf59197b32f6)
2013-12-06 17:17:25 -05:00
Steve Howell f519fa907c Don't let CUSTOMER7 share the love when in narrow mode.
I don't think share-the-love is turned on for CUSTOMER7 in the
first place, but even if it is, we should hide it when they go
into narrow mode, to make room for streams and users.

(imported from commit 2e80eec0f2ddee06753f48248dca5ac4745db6f1)
2013-12-06 17:17:25 -05:00
Steve Howell 6354b712fc Limit jQuery calls in ui.left_userlist_get_new_heights().
Calling $('#foo') is expensive, so if you need it twice, you
should store it in a variable.  I did this for stream_filters
and user_presences, and added the expectOne() call for them as
well.

(imported from commit 69e689e28b1248a93ef426a89c14033d2fb36104)
2013-12-06 17:17:24 -05:00
Steve Howell 2f6d722d9b Extract ui.set_user_list_heights().
This is a simple extraction--just moving code, nothing fancy.

(imported from commit 6c3717db43728b1ef73b17dd923eec4f7d6f6e4c)
2013-12-06 17:17:24 -05:00
Steve Howell f923c15ba8 Change signature of ui.process_condensing().
I renamed ui.process_condensing() to ui.condense_and_collapse(),
and, more importantly, it now takes a list of elements, not a single
element, which allows us to do some computations outside the loop.

(imported from commit d5984088030c2a0d4ec8b258c7fcec3e84caf2b1)
2013-12-05 16:42:07 -05:00
Steve Howell 983f29eac4 Inline ui.could_be_condensed().
This sets us up for the next commit, where we will change
process_condensing to loop over several elements, and we will
not need to recompute height_cutoff every time.

(imported from commit 1cc5b44598b85d1e301bc84492e4dc38f41ec16e)
2013-12-05 16:42:06 -05:00
Allen Rabinovich 30de0b3e77 Add a method for switching to full width and a feature flag to enable full width on staging.
(imported from commit bc7b3a5c8c17ca84e192a63711663cd605425b7f)
2013-12-05 12:41:25 -07:00
Waseem Daher 010475d49f Enable experimental background color for staging.
(imported from commit 833b25ae48e44bc7749463b7dd26418d6e25703a)
2013-12-04 14:15:23 -05:00
Allen Rabinovich 9f226e4cd2 Add a background switcher function.
(imported from commit a9bd0403637c5da04d93c0ff5e1dd0272238f0a6)
2013-12-04 11:07:12 -07:00
Jessica McKellar c1058355f6 Add a digest emails checkbox to your settings page.
(imported from commit cf1dbae6ca30d2489a77e822c34941a986b93bbd)
2013-12-02 18:58:03 -05:00