Commit Graph

1480 Commits

Author SHA1 Message Date
Givorenon 0bf2d171ae Fix fading of messages in dialog and users in side-bar.
Make comparison of emails in compose_fade.js and util.js
case-insensitive to fix fading of users and messages respectively.
2016-06-07 21:31:47 -07:00
Vishnu Ks d30ea0bc44 Move recent_subjects to stream_data. 2016-06-07 17:50:16 -07:00
Tomasz Kolek 29ec2a328b Fix save in topic edit also saving message content edit box.
Fixes #932.
2016-06-07 12:55:58 -07:00
gregmccoy 1844f1b054 Add button to exit the Zulip tutorial.
Fixes: #872.

[Tweaked by tabbott to fix focus and rename to "Exit tutorial".]
2016-06-06 14:38:11 -07:00
Umair Khan 3092f509b0 Fix Handlebars translations.
Change file mapping between Transifex and Zulip. Fix the typo
in the translation file resource url for Chinese.
2016-06-06 09:30:56 -07:00
James Porter d008d96597 Update Emoji set. 2016-06-04 17:05:48 -07:00
Rachel Kelly df36216914 Change instances of 'coworkers' to 'users'.
In order to genericize use of Zulip outside companies,
    all instances of coworkers have been changed to users.
    NOTABLE EXCEPTION: When the Zulip instance is domain-
    locked, the reference to coworkers remains.  The reason
    for this is twofold: first, the majority of Zulip instances
    which require a particular domain will be locked to a
    company, and second, the template variable for the domain
    necessary should be added to the alert so it is clear
    to the user what the domain needs to be for access.

Fixes: #861.
2016-06-02 16:05:27 -07:00
Tomasz Kolek 0820ab591a Refresh page when message with /me is edited.
Fixes: #163.

Thanks to Catherine Nguyen (@cnguye11) for her work on this.
2016-05-31 08:29:07 -07:00
Vishnu Ks 51c86a8e2e Move get_private_message_recipient to message_store.js 2016-05-27 01:03:21 -07:00
Vishnu Ks 89d743787e Move recenter_view to viewport.js. 2016-05-27 01:03:21 -07:00
Vishnu Ks 4be20c4b4a Move scroll_to_selected to navigate.js. 2016-05-27 01:03:21 -07:00
Vishnu Ks e329c9e0f5 Move maybe_scroll_to_selected to navigate.js. 2016-05-27 01:03:21 -07:00
Vishnu Ks dc577343fe Move last_viewport_movement_direction to viewport. 2016-05-27 01:03:21 -07:00
Umair Khan 82b5d9304b [third] Integrate i18next with Handlebars 2016-05-19 22:58:25 -07:00
Kartik Maji 3d77aa49db Add subscribe button in narrowed view when stream has no messages.
A temporary message appears on successful subscription, with a button
offering to unsubscribe in case the user subscribed by accident.
2016-05-18 20:06:30 -07:00
Kartik Maji 206452c867 Add stream subscription button added narrowed views.
Fixes: #273
2016-05-18 20:06:23 -07:00
Aristeidis Fkiaras 3ee210d9e8 Add setting to only allow admins create new streams.
Fixes: #691.

Thanks to Preston Hansen for work on this feature!
2016-05-18 18:53:13 -07:00
Bert Muthalaly 261dac25a5 Fix skipping to latest messages (fast_forward_pointer).
The refactoring in b8ec8f5ef0 had a
slightly wrong URL.
2016-05-10 17:24:42 -07:00
Preston Hansen 635828069f Add feature to mark all in stream/topic as read with mouse.
Fixes #736.
2016-05-08 09:02:46 -07:00
Tim Abbott 5bd94c15c7 Use camo to avoid mixed content warnings when displaying emoji. 2016-05-02 17:21:31 -07:00
Tim Abbott 4241e01854 realm emoji: Fix realm-time updating of admin emoji table.
Previously the realm emoji table on the admin page didn't update
properly in the event that another user added or removed emoji.
2016-05-02 17:00:47 -07:00
Tim Abbott 8df58432f6 Clear user filter after pressing enter to start compose.
Previously, the user list would remain filtered after a user hit enter
to start composing a message to a user, leaving them in a state with a
partial user list.

Fixes #360.
2016-04-29 15:01:41 -07:00
Ashish Kumar b5ab4d45f9 Replace /json/get_public_streams with REST style route. 2016-04-29 12:57:57 -07:00
Vladislav Manchev f5e6176aea Add custom realm emoji UI to administration page. 2016-04-26 13:15:54 -07:00
Tim Abbott f5fe2d4bf7 Fix case-insensitive typeahead for emoji. 2016-04-26 13:14:28 -07:00
Vishnu Ks fe4a03fd01 Move narrowed_msg_list to message_list.js. 2016-04-26 10:25:11 -07:00
Vishnu Ks ae49ad383d Rename all function on MessageList to all_messages. 2016-04-25 13:45:18 -07:00
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 1bf644369f Delete old route for json/update_active_status. 2016-04-11 21:38:23 -07:00
Ashish a12006d86f Replace /json/update_active_status with REST style route. 2016-04-11 21:38:23 -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
Ashish 679b4e5807 Replace /json/change_enter_sends with REST style route. 2016-04-11 21:38:23 -07:00
Ashish cb8da46bbf Replace /json/get_old_messages with REST style route. 2016-04-11 21:38:23 -07:00
Ashish 8fc8717409 Replace json/set_alert_words with REST style route. 2016-04-11 21:38:22 -07:00
Ashish 41993ef2f5 Replace /json/update_message_flags with REST style route. 2016-04-11 21:38:22 -07:00
Vishnu Ks 2ac5271091 Move global variable have_scrolled_away_from_top to ui.js. 2016-04-10 10:55:16 -07:00
Kumar 4eced69228 Make subscriptions page error bar visible even when scrolled down.
Previously, the Zulip subscriptions page's error bar would always be
at the very top of the scrollable view, and thus would likely be out
of view when an error happened.  This fixes it by having the error bar
always placed below the search box (and thus visible regardless of
where in the scrollable streams view we are).

Fixes: #515.

[commit message and comments expanded by tabbott]
2016-04-08 21:04:43 -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 96eb81e5d5 Add documentation of Zulip's markdown implementation. 2016-04-01 09:56:59 -07:00
Tim Abbott 723d8c288a Add tornado autoreload hook to dump event queues on reload.
It's always been the case that in production, Tornado dumps all the
event queues when shut down so that they can be reloaded by the
replacement Tornado process.  This never worked in development because
the codepath for auto-reload didn't go through either a signal or
sys.exit (it re-execs the process instead).

This meant that we didn't have a mechanism for testing the event queue
dump/load functionality in the development environment.  We fix this
by adding such dumping/loading.  However, this breaks the automatic
reloading of open browser windows on a server restart, so we add that
back in by adjusting the special `restart` events to pass a special
`immediate` flag when used in development.

This also has the benefit of removing the "Bad event queue" errors one
would get on every file save induced restart on the Python console.
2016-03-30 23:09:16 -07:00
Tim Abbott 6d2ae9abbc Fix cleanup_event_queue being called multiple times during reload.
Apparently it isn't always the case that removal of jquery and the DOM
prevents cleanup_event_queue from being called via the postunload
hook, so add a check to avoid it being double-called.
2016-03-30 23:09:16 -07:00
Tim Abbott 44ed90db85 Fix get_events restarting during an ongoing reload.
Previously, the browser might restart a get_events operation even
while it was in the middle of executing a `DELETE /events` query to
cause its event queue to be de-allocated.  This was a rare race
condition when we weren't notifying clients when event queues were
de-allocated, but this will become a common case in the next commit.
2016-03-30 22:28:07 -07:00
Kartik Maji 2b3312cd6e Update unread counts for streams when muting topics.
Fixes #427.
2016-03-27 13:49:52 -07:00
Tim Abbott 9607144bf2 Fix off-by-one error in presence list updating logic.
The original logic for incremental presence list updating from
668d0d9dfa incorrectly attempted to
insert the user 1 spot later than its proper index in the listing.
2016-03-21 20:28:05 -07:00
Tim Abbott 29b8d71871 Remove throttling of presence updates coming from server events.
Now that we're doing presence updates in a performant fashion, we
don't need to throttle processing these events, and in fact the
throttling of these events created a correctness problem, since we're
now doing incremental updates rather than just rerendering everything
after each event.
2016-03-21 20:28:05 -07:00
Tim Abbott 4bb48abc0d Fix quoting bug in user presence update function.
The code in 668d0d9dfa for removing an
existing user from the user list to update the status didn't correctly
quote the email address of the user in its jquery selector.
2016-03-21 20:28:05 -07:00
Alexander Pushin 888f53de13 Fix collapsing messages in narrowed views.
First user-fasing problem is that when user click to "Collapse" button
of message from narrowed list, buttons "Uncollapse" and "[More...]" does
not work. Second, is that when user collapse/uncollapse some message
from narrowed list, the collapsing/uncollapsing of the same message in
home list does not work in appropriate way.

In "popovers.js" there is the function that is called on click to the
buttons "Collapse" or "Un-collapse". It should show and hide body of a
message. If a message list is narrowed, it should show/hide message in
home list too. So, the first problem is that "toggle_row()" in this
function call methods "collapse(row)" or "uncollapse(row)" from
"condense.js" twice (for row and home_row) using condition
"if (message.collapsed)". When it happen the first time, the variable
"message.collapsed" is changed. That is why next call of "toggle_row()"
work incorrectly.

The second problem is that the function in "condense.js" that is
called on click to the button "[More...]" contains no code for
collapsing/uncollapsing message from home list. It just calls
"collapse(row)" or "uncollapse(row)" for row from narrowed list.

Now, functions "collapse(row)" and "uncollapse(row)" get row from
current list and change both messages (from current list and home
list). On-click functions call them just once for making all of needed
message changes. So, when user collapse or uncollapse message from
home or narrowed list it works correctly.

Fixes: #516
2016-03-20 16:58:57 -07:00
Vladislav Manchev 753ccf67b1 Fix regression when saving organization settings on administration page.
Saving the organization settings form in the administration did not
work due to a trivial form name mismatch caused by following
revisions: 472898c and 58aba59.
2016-03-17 18:29:04 -07:00
Kartik Maji e804185ae6 Fix subscription button in notification bot announcements.
Fixes #456.
2016-03-09 20:36:42 -08:00
Vladislav Manchev 668d0d9dfa Fix performance issues with user presence list in large realms.
Whenever a user became active, this triggers an immediate presence
update event (to show that user as active).  The implementation for
that event (running on the browsers of all other users in the realm)
would fully rerender the presence list, which can be an expensive
operation in a large realm, just to update the status for that one
user.  This fixes that case to just remove the user from the list and
then re-insert it at the appropriate index.

[Commit message expanded with more details by Tim Abbott]
2016-02-12 20:04:43 -08:00
Tim Abbott e3435b9613 Fix broken link to the cute guinea pig image in tutorial.
This link was broken when we hardened the access model for user file
uploads to not work cross-realm.  The right solution is just to
include the image in the codebase so it's guaranteed to exist.

Fixes #205.
2016-01-09 22:52:35 -08:00
Tim Abbott 1cfde054ff Initialize new_message_count to 0 by default.
860cf68716 introduced calls to
notifications.redraw_title() on narrow activation.  This introduced a
bug when the Zulip desktop app reloads while narrowed --
new_message_count would still be set to undefined when
narrow.activate() is called as the page (re)loads, and thus we'd call
window.bridge.updateCount(undefined), resulting in a traceback.

We fix this by just initializing it to 0, rather than using the old
default value of undefined.
2016-01-09 15:43:20 -08:00
Kara McNair fd66d9f703 Show 5 most recent "Private messages" when clicked.
Like the Stream Subject lists, Private messages are now shown
when the user clicks on the "Private message" link. User can drill in
to get more than 5 conversations. Selecting PMs from the user or group
PM lists on the right sidebar also opens the list & highlights the
selected conversation.

[Edited by tabbott@mit.edu to fix some small bugs.]
2015-12-15 07:52:54 -08:00
Tim Abbott 29fa601328 Rename active-subject-filter to active-sub-filter.
This makes the name more generic so we can reuse it for private
message filters as well.
2015-12-15 07:52:54 -08:00
Tim Abbott 87acb2be09 stream_list: Factor out reset_to_unnarrowed helper. 2015-12-15 07:52:54 -08:00
Tim Abbott c404f3189c stream_list: move remove_expanded_subjects earlier in file. 2015-12-15 07:52:54 -08:00
Tim Abbott 7bb11fe09a topic zoom: Clean up unnecessary jquery selectors. 2015-12-15 07:52:54 -08:00
Liz Sander 860cf68716 Show current narrow in page title.
Fixes issue #157.
2015-12-14 21:21:30 -08:00
Allie Jones 1bd1291f3c Replace json/send_message endpoint usage with json/message. 2015-12-12 18:14:08 -08:00
Allie Jones 29a4b51e52 Replace /json/subscriptions/add usage with /json/users/me/subscription. 2015-12-12 18:14:08 -08:00
Tim Abbott 05acd510c0 Make reload save options required explicit arguments. 2015-11-30 08:49:39 -08:00
Tim Abbott 12bff0441c Save compose state when reloading due to 'declare bankruptcy'. 2015-11-30 08:49:37 -08:00
Dylan Dumesnil 2f4037ae2f Save compose state when reloading due to /json/get_events error.
Fixes #203.
2015-11-30 08:47:36 -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
Tim Abbott cd0a8e7e5a Marshall tutorial route inputs as JSON strings.
These routes previously didn't follow our standard convention of
sending arguments in JSON format, and so broke when we started
checking the argument format in
123d51e3aa.

Fixes #333.
2015-11-24 22:46:25 -08:00
Chris Chapman 44a9e1dff5 Fix for setting file upload size through settings file.
(Slightly tweaked by Tim Abbott to change the variable name, docs, and
default values).

Fixes #276.
2015-11-24 06:06:46 -08:00
Tim Abbott 5f25974737 Fix Javascript whitespace issues with {. 2015-11-10 10:01:34 -08:00
Allie Jones 85809e6140 Add webpack build process. 2015-11-06 09:13:25 -08:00
Tim Abbott ae04744606 admin: Refactor to remove unnecessary selections of active_user_row. 2015-11-04 08:15:55 -08:00
Tim Abbott 958ada9f44 admin: Fix deactivating bot users.
The previous code was using the same codepath as for real users, which
was unfortunate in two ways:
* It hit the wrong endpoint on the server and thus failed
* It popped up the "remove a user prompt" which described a bunch of
  things not relevant to bots.
2015-11-04 08:03:28 -08:00
Tim Abbott 5161891fbd admin: Fix reactivating bot users.
Because the `owner` field had the class email, we were sending the
concatination of the user and owner email addresses as the email
address in the reactivate requests.

Fixes #243.
2015-11-04 08:03:17 -08:00
Elizabeth Sander 2ba01f4900 Defer permission for notifications until after tutorial.
In the process, remove old mozilla notifications hack since the
notifications_api shim should handle that case correctly.

Fixes #17.
2015-10-26 09:44:15 -07:00
Allie Jones cd1fa6a42e Fix notifications in Firefox by calling the constructor with 'new'. 2015-10-01 09:31:05 -07:00
Tim Abbott 45a8b050ac Change get_events restart log notices to log level (not error).
(imported from commit 52c3828d1c880545303f00bdf68585bdac844599)
2015-09-25 03:57:39 -07:00
Tim Abbott 23a81af8ad Clarify the left_side_userlist comment.
(imported from commit d2aa403d3165096776b68e59cef9814bc5dec00a)
2015-09-19 23:39:54 -07:00
Tim Abbott 7fc7e5ee8c Remove now-unused og_zuliper_emails variable.
(imported from commit f89e1931ca05f163c51315d567425e71458e131f)
2015-09-19 23:37:48 -07:00
Tim Abbott eff0d31dcd Fix existing tab-based whitespace in the codebase.
(imported from commit 3bd8f51d1bb303455597d238af47b1b5541aed04)
2015-09-19 23:23:02 -07:00
Tim Abbott 176e3f4a54 Fix buggy yellow alert bar at top of admin page.
One of the alert rows Was missing a "-status" at the end.

While we're fixing this, make it more robust by adding .expectOne().

(imported from commit 8cb0a560701e2ee48f78471ef8fe5cfa060782af)
2015-09-19 23:23:01 -07:00
Tim Abbott f340778798 Ensure gear_menu.js is initialized before hashchange.js.
This fixes a bug where loading directly to /#settings didn't work.

(imported from commit 4472373749a01db669e68866c7ce1a7a7c280ed6)
2015-09-19 23:23:01 -07:00
David Roe 3ac95ddc1a Add UserProfile flag to control whether we have a left side userlist.
Previously this was hardcoded for a single customer.

(imported from commit a6b7095050aa10cef976541505d9b09a35453f48)
2015-09-19 23:22:59 -07:00
Tim Abbott a59e41b5ee Simplify twenty-four-hour time logic to be more generic.
(imported from commit bda4972b32b17a36518eddef701748f3a548e376)
2015-09-19 23:22:26 -07:00
David Roe 9590d988c5 Clean up code duplication in settings.js error reporting.
We can save a bunch of code by using the handle ui.js error reporting
helpers.

(imported from commit 7e993cae6e314c84d4ba8eaefd2ff7711c4bc19d)
2015-09-19 23:16:05 -07:00
Tim Abbott fcec80461b Remove the SSO-only realm integration.
It's messy code, only one customer ever used it, and it's not in use
today.

(imported from commit af3f512ac6af74af66c588c7d40d699e98514d0a)
2015-09-19 21:54:51 -07:00
Tim Abbott 25a9ccccf1 Clean up comments in feature_flags.js.
(imported from commit aad58c3f8b3d21ee9d5a3a45dbf2440b3d51c6e8)
2015-09-19 21:54:51 -07:00
Tim Abbott cecbab3609 Remove now-unused is_customer4 flag.
(imported from commit 4ccd2126d7faef82c588f9523f3fe771fff273af)
2015-08-22 12:48:54 -07:00
David Roe 3f7cb34b00 enterprise => voyager
(imported from commit 04be792bb480d5e5db1c91d296d1000cf1682571)
2015-08-21 10:33:35 -07:00
Anders Kaseorg bded0d9d54 Remove corporate beta signup form
(imported from commit 1b3a0cd8a59a124905fa4cbd3121a78d23aeb3a2)
2015-08-20 18:40:34 -07:00
Tim Abbott 222ea05a3a Warn users that twenty-four-hour-time doesn't update without a reload.
(imported from commit e3c00082746284fb0e6f9b958a887b9d1a1b86a3)
2015-08-20 17:59:16 -07:00
Kate Buckner 4d0f7c7ea4 Add a user-visible setting for 24-hour time display.
(imported from commit d934824fd6b72e64a455aac9ff4585b262145f02)
2015-08-20 17:33:16 -07:00
David Roe 5b7f3466ba Add feature where only admins can invite new users.
This is controlled through the admin tab and a new field in the Realms table.

(imported from commit e78a6f48160e2a1bbc68d278beb726fe31515266)
2015-08-20 15:29:46 -07:00
David Roe 809efc4f2b Add realm option to show or not show digest e-mail.
(imported from commit e9cfe519aa9f2857a1dcc7c75f5e1889834fcb86)
2015-08-20 15:29:45 -07:00
David Roe e5cb2a468f Enable Lab features for all users
(imported from commit 4e2658d28a5e02067ad472fec76c66f46592d520)
2015-08-20 15:29:45 -07:00
David Roe 90e2f5053f Add mandatory topics as a realm option.
(imported from commit 929a884b8610669aa24a167367b899683e33a045)
2015-08-20 15:29:45 -07:00
Reid Barton 5a747ab690 Make the CasperJS frontend tests work again
(At least when PhantomJS doesn't crash...)

(imported from commit 62936b12883e4c6bbd3701da80783b4bffe46025)
2015-08-20 13:33:07 -07:00
Anders Kaseorg dfb1601aed Turn on cleanup_before_reload for everyone
(imported from commit 724a7b2bb5a0679b58eac62eaaf41d8397726c38)
2015-08-20 11:10:39 -07:00
Anders Kaseorg 62973fce0f Remove unused zulip_mit_emails, is_zulip_mit_user
(imported from commit 8d49bd9a490a367c58befa09e0922f66e7923e77)
2015-08-20 11:10:39 -07:00
Tim Abbott dc5a5ce1de Fix lint error.
(imported from commit 4c0897d109ddb229989afd8e4b4db270569e558a)
2015-08-19 23:24:56 -07:00
David Roe 472898cfc6 Allow adding users to realms more easily in Dev VM.
Include new field on Realm to control whether e-mail invitations are required
separately from whether the e-mail domain must match.
Allow control of these fields from admin panel.
Update logic in registration page to use these fields.

(imported from commit edc7f0a4c43b57361d9349e258ad4f217b426f88)
2015-08-19 22:24:53 -07:00
Zev Benjamin 466a678c2c Remove "More messages below" indicator
It's been very buggy for a while, has limited usefulness compared with
unread counts, and profiling over the weekend indicates that it's very
slow.

(imported from commit 716fe47f2bbec1bd8a6e4d265ded5c64efe2ad5c)
2015-03-30 15:44:36 -07:00
Zev Benjamin d3822c5d7b Fix initial stream subscription notification settings
(imported from commit 899577caaf5f5ea9bcff43e1bd97f8c6be453ac1)
2015-02-12 15:02:26 -08:00
Zev Benjamin 2c760ae735 Remove mixpanel
(imported from commit 9b6cc58ee9be483db8bf2d2eaaaecabc14f821e4)
2015-02-06 13:59:30 -08:00
Jacob Hurwitz d401d1cb47 Fix the scrolldown bug (T27850)
(imported from commit 4ae017908b9cc37231ba201c058a6630ceed908f)
2015-01-15 15:26:25 -08:00
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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 a9f01e382a Switch streams page over to use consistent buttons.
(imported from commit c4d7f658f361a759a38951349e027ac3e279fe9b)
2014-03-05 17:23:23 -05: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
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
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
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 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 99036efa06 Disable keyboard scrolling in sidebar
(imported from commit eca509a90df175d21d85eb409c0db9c8fbb931ea)
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