Commit Graph

372 Commits

Author SHA1 Message Date
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
Steve Howell 45a23712ff Select first unread msg when narrowing from user sidebars.
(imported from commit a57508fb2084559c968b23ec4643b7484cbba6cb)
2013-12-02 15:43:34 -05:00
Waseem Daher ebfcdfd35e Disable user-visible UI for editing messages, for MIT.
This doesn't actually prevent a user from making the API call into our
servers to actually go and edit a message, so this isn't a bulletproof
solution for realms where messages ABSOLUTELY MUST NOT be edited.

(imported from commit 5bf043a201e2952189b45f93b8c5ca7648f6aee7)
2013-11-30 18:32:14 -05:00
Waseem Daher aeaac45fd0 Hide right-sidebar user/group PM list from MIT.
(imported from commit 2e3ba1ffd3a33450580a164c0aa1ced23eee37c2)
2013-11-30 18:31:05 -05:00
Steve Howell 1080b4239d Move sidebar click handlers into stream_list.js.
(imported from commit b284508b3abd2edc3fa4edf432307eee8f034b58)
2013-11-26 10:34:08 -05:00
Steve Howell 60a8e6e769 Make sure click handlers are called from sidebar menu.
This is a subtle change, to make sure that list items
from stream_filters always go through click handlers, which
ensures, e.g., consistent behavior on opening the compose box.

(imported from commit cd734901def8959c8c8a29c164c7a60730ae0915)
2013-11-26 10:34:08 -05:00
Steve Howell d39141039b Remove dead code related to streamlist_expand class.
(imported from commit b4dd57fdd77b74f9fe570b2267a6f96ec12937d6)
2013-11-26 10:34:08 -05:00
Allen Rabinovich e10549a310 Lighten the message controls and show them on hover
(imported from commit 09953116ebef779ea99327ff7c76428e908e2e31)
2013-11-21 11:05:07 -08:00
Steve Howell 8339a40acd Prevent stale avatars from showing in new messages.
When you upload a 2nd avatar to Zulip, the URL doesn't actually
change, so even new messages can show the old avatar, if your
browser is caching.  We work against the cache by having the
"stamp" argument, which we vary at reload time and also when
we upload the new avatar.  The browser still benefits from
cached images as new messages come in.

(imported from commit 84869c8d7f251c9f2498026a5e9e3b2451784879)
2013-11-19 16:04:41 -05:00
Jessica McKellar 2c841042ae Allow admins to rename any topic.
(imported from commit 5b557e8244e5196c9aa0ee29d4efb00986434528)
2013-11-19 14:31:02 -05:00
Jeff Arnold d0622e796c Simplify the UI by removing the user's own name and avatar
(imported from commit 60d6ff1d677e3efe31e68df2c4387ddd2bd8084d)
2013-11-15 18:48:51 -05:00
Steve Howell d3579c57ec Avoid scrolling the main page by accident with mousewheel.
If you used the mousewheel in certain page sub-elements, scrolling
to the bottom would sometimes turn into scrolling the main page.
We had code to make that not happen, but it was sensitive to
integer rounding, so I added a one pixel fudge factor.

(imported from commit 5ed1f4e717e5f9ce3316383812dee27913afdd49)
2013-11-14 14:29:31 -05:00
Steve Howell 3a7113312c Give some room to GROUP PMs when lots of users.
When GROUP PMs are in the right sidebar, and when there are
lots of users, we set max heights so that both USERS and
GROUP PMs show up.

(imported from commit 4a5a16a8cf03d853769b3a690ac5b0338a2c8461)
2013-11-14 14:29:30 -05:00
Steve Howell b7d8f5d43f Move groups (not just users) from right to left sidebar.
When a user squishes the browser window enough to move users
to the left sidebar, we need to move user groups as well.  More
importantly, when they widen again, we move both of them back
in a way that users stay on top of groups.

(imported from commit d80722b58190d42a2dfc5247bfffaa7708cde21a)
2013-11-14 14:29:30 -05:00
Steve Howell a2df5f18e9 Add expectOne() checks for sidebar logic.
(imported from commit b9e729fd37f291d9e3f17edf77117d71fd129f7c)
2013-11-14 14:29:29 -05:00
acrefoot 9e50781131 Random javascript shortenings
(imported from commit 68a34d67ac38e34035a3e3986518824bf5a96fc5)
2013-11-13 16:41:36 -05:00
Steve Howell 56c39728ba Support /me syntax.
If a user types "/me runs to the store", we put "runs to the store"
in bold after their name.

(imported from commit fbc11e99244e1c8fa1c03e4753e706957fcd449e)
2013-11-12 10:49:10 -05:00
Kevin Mehall 59757b37e2 Get user API key without password when SSO is the only login option
(imported from commit 195ff68cc54cd2e7d200702c699bb3a258d3e868)
2013-11-12 10:37:33 -05:00
Kevin Mehall 4a6b7cb20b Disable password change when SSO is the only login option
(imported from commit fd1a14237e2d6ea574331ed178bfc0db5beb18c6)
2013-11-12 10:37:33 -05:00
Steve Howell 52ec258122 [staging only] Show Recent Group PMs in right sidebar.
Show up to 10 of your recent group PM conversations in the right
sidebar.  Clicking on the links narrows to the huddle and opens the
compose box for the huddle.  The green circles have opacity
proportional to the number of users present in the huddle.

This is feature flagged to staging only.

Some of this code was written by Allen before commits were squashed.

Known issue: unread counts disappear on certain refresh events.

(imported from commit 3b44665150ba20594d8b0295cb30df03601c1d52)
2013-11-07 16:54:13 -05:00
Steve Howell 7f3115fa53 Move set_presence_list from ui.js to activity.js.
Since ui.set_presence_list is only called from activity.js, I am
inlining the code into activity.update_users().  This also allows
us to move ui.presence_descriptions into activity.js, which
is the right home for presence-related things.

(imported from commit 0ff239275c544a86c14d517bc386d06726b81cd9)
2013-11-05 15:34:27 -05:00
acrefoot 434b7ac120 Give Feedback in non-obvious cases for sent messages
Displays a notification above the composebox in cases where the message
is not visible (further down), or where it's outside the current narrow or search.

It also offers a link to the appropriate narrow when it makes sense, and offers
timetravel when appropriate. There is currently a bug with timetravel (and you can
see this when using the popover menu) that makes "narrow to messages around this time"
not work for muted messages.

This resolves Trac #1518.

(imported from commit 391ca0b9c07d91496f6585a4fd8e15723d1170e2)
2013-11-01 12:34:39 -04:00
Kevin Mehall 58f7138e07 Collect additional debug information for JS errors
(imported from commit 7c94ad118c2cd33e5b6eec4e27fd22dfa2d56909)
2013-10-31 13:18:43 -04:00
Jessica McKellar f1e90086f5 Remove the onboarding checklist.
Looking at the historical data, fewer than 50% of active users have
completed the checklist, which means that it is just persistent
clutter. We also have other better ways of encouraging people to send
traffic and get the apps now.

This commit removes both the frontend UI and backend work but leaves
the db row for now for the historical data.

(imported from commit e8f5780be37bbc75f794fb118e4dd41d8811f2bf)
2013-10-31 11:34:15 -04:00
Jessica McKellar 69481a0843 Remove 'All messages' sidebar link.
Nobody uses it, and it causes confusion. (How is it different from 'Home'?)

For now, leave in the ability to get to the narrow, although we may
ultimately want to do away with it as well.

(imported from commit 35b3f27e39c4de3391bc5571b32f7242a29f4cfa)
2013-10-31 10:38:49 -04:00
Steve Howell 8449a74fdf Remove obsolete comments.
(imported from commit d360efebd5201129becd22cb547c6c1fd24ed918)
2013-10-29 10:59:42 -04:00
Steve Howell 7cf66b5bb8 Allow users to upload avatars on the Settings page.
We were using Gravatar for user avatars, but now users can
upload their avatars directly to Zulip, and we will store
their avatar for them.  This removes the old Gravatar-related
interface and polling code.

This commit does not attempt to update the avatars in
messages that have already been loaded, either for the user
making the change or other users.

(imported from commit 301dc48f96f83de0136c93de57055638c79e0961)
2013-10-29 10:59:41 -04:00
Steve Howell af6de2053e Give Notifications settings its own alert area.
(imported from commit 1d17b85f383862d1f37b5750af40aa8d9a1d8bf2)
2013-10-29 10:59:41 -04:00
Steve Howell 68942a8f3a Properly split up "Your Account" and "Notifications".
The "Your Account" and "Notifications" boxes on the Settings
page each had their own border and their own "Save changes"
button, but they were within the same form and sending to the
same back end point.

This commit creates a separate form and endpoint for each
of the two boxes.

(imported from commit 04d4d16938f20749a18d2c6887da3ed3cf21ef74)
2013-10-29 10:59:41 -04:00
Jeff Arnold 4b9981c333 Make clicking to the left or right of the compose box close it
Addresses #1819

(imported from commit 6d06283cb8a39107151ffc5ce5a85c1455e332f2)
2013-10-28 15:33:11 -04:00
Jeff Arnold 96b4103c80 On click, only focus the compose box if there's no selection
Addresses #4

(imported from commit 4a2400dd4ae95863f7408af1e3c0f058a516adb7)
2013-10-28 14:53:43 -04:00
Leo Franchi 05564ec0e2 [schema] Add a config option for enabling/disabling push notifications
(imported from commit 5649188cd5e0e4edb6e71559ec7d7fc5e92efaf8)
2013-10-24 14:54:30 -04:00
Steve Howell b98e7f8d90 Remove transitional feature_flags.alert_words flag.
(imported from commit f00eba8a12054e9771105e341e2652a53271e298)
2013-10-15 09:57:19 -04:00
Steve Howell 78e4fe6594 Support command-click for stream/topic links.
Allow users to open Zulip windows in new tabs with command-click
from the left sidebar narrowing links and recipient bar
narrowing links.

(imported from commit d60c038c7bf1efccd461f5284d513b9cbfbdaebf)
2013-10-11 11:58:51 -04:00
Steve Howell 8017fc9a15 Move compose.start() calls out of click handlers.
For the two cases where narrowing should open the compose box,
we now put that logic inside of narrow.js.

(imported from commit 570e22e90c2f6d422ba71cce400c075f0b8adf51)
2013-10-10 11:20:49 -04:00
Steve Howell 7007cf203d Move compose.cancel() calls out of click handlers.
Handle closing the compose box inside of narrow.js, to
ensure consistent behavior for all the narrowing UI options.

(imported from commit f17a687491eb2361c73032cd974cedb2a0a2dd85)
2013-10-10 11:20:49 -04:00
Steve Howell a78a1ec36c Use <a> tags for links in the recipient/summary bars.
The main user-facing feature here is that users can open narrows
in new tabs or windows. Internally, it makes the HTML more semantic.

One consequence of making these elements into actual anchor tags
is that clicking on them no longer triggers this logic to
close the compose box when you click outside of it:

        // Unfocus our compose area if we click out of it. Don't let exits out
        // of modals or selecting text (for copy+paste) trigger cancelling.
        if (compose.composing() && !$(e.target).is("a") &&
            ($(e.target).closest(".modal").length === 0) &&
            window.getSelection().toString() === "") {
            compose.cancel();
        }

Instead of patching the above code, I elected to just call
compose.cancel() explicitly in the click handlers for the links
themselves.

We are gonna try to clean up the compose-box behavior globally soon.

(imported from commit c9a01916f1714fe3dd495d25c78cd5e5532105ef)
2013-10-09 17:09:10 -04:00
Kevin Mehall e29855e106 Show floating recipient bar on faded messages.
Trac #1837

(imported from commit 1f90b02a5a07b5ce106ad935a4b1cf18e47a0909)
2013-10-09 16:33:24 -04:00
Luke Faraone 1975a6f693 Cancel a compose if you click on one of the global filters
See trac ticket #1840.

(imported from commit 3e0a781252db575e5c0abb70565919e4cdaa963f)
2013-10-09 15:37:00 -04:00
Allen Rabinovich fe9cc4597f Make settings menu more apparent
(imported from commit 15e5db5c4792d39b54fa5a354f1156cde355160b)
2013-10-09 08:42:54 -07:00
Kevin Mehall 40ad01371f Don't close the compose box on right click in Firefox.
Trac #1737

Firefox has the slightly broken behavior that it emits a click event on
the document when you right click, but not on any of the child nodes, so
our #compose stopPropagation doesn't stop right-click events from closing
compose. Chrome never emits click events on right click.

(imported from commit 2519c542715c93877b6d38e5dcff1f3e011688e4)
2013-10-04 14:38:05 -04:00
Leo Franchi 101a70a7ce Fix selector for gravatar url polling
(imported from commit e0f915a9e5894e3749ca90bab674f36ee9c15347)
2013-10-04 12:10:22 -04:00
Jessica McKellar 4d730c1691 Close the compose box on a stream sidbar narrow.
(imported from commit 6d7d80d29c4e7dc68807a7fcb9ce2d8573c1c3e0)
2013-09-26 11:49:54 -04:00
Kevin Mehall d9185cf455 Fix JS error when un-summarizing old messages.
`Cannot read property 'flags' of undefined` in the
_.each callback in expand_summary_row.

Messages loaded when you scroll up in a narrow are not added to
all_msg_list. Because the user just clicked the message, we know
the message is in current_msg_list, so use that instead.

(imported from commit e76449a2a2748b96f69a2ab05d288b708d9e3ac0)
2013-09-25 10:19:03 -04:00
Allen Rabinovich 9ed05a1f85 Fix to list height computation
(imported from commit c43b07fa25f41146c8410bc41d90278c1a90a34b)
2013-09-20 12:11:31 -07:00
Allen Rabinovich 5622e59b48 CUSTOMER7-specific left side user list at narrow widths.
(imported from commit 7504d86fe57e4e96f85dee18ede663c542d0144d)
2013-09-18 12:17:32 -07:00
Steve Howell fd81e04e16 Remove topic popovers when redrawing topics
(imported from commit 5350e5026dcfc9542c44b576ee967423adaf2c91)
2013-09-18 12:25:19 -04:00
Steve Howell 8429105c24 Add chevron menu for topics in left sidebar.
The first menu option supported is to narrow to the topic.

The chevron only shows up if you turn on feature_flags.muting.

(imported from commit 17482f538a6d3e4ff96a36c042bad972d34f4b11)
2013-09-17 18:53:27 -04:00
Jessica McKellar 272921800a Open the composebox on sidebar subject selection.
This was requested by CUSTOMER28 and would also bring symmetry with
the user sidebar, which already does this.

(imported from commit 4dca3c957d3a710f00bbb34a7cd7dfe6074da8f7)
2013-09-12 06:04:03 -04:00
Steve Howell 8d67fc2775 Add semantic classes for expanding/collapsing messages
(imported from commit 9d71fd46667058ba92d941b79d6e2c822c721efe)
2013-09-11 14:42:25 -04:00
Steve Howell fcc268b44f Add expectOne() check when clicking to expand/collapse
(imported from commit 7224f618f49de82bd41a5a1f4b0677cf490b5856)
2013-09-11 14:13:17 -04:00
Steve Howell 320eddcf6e Remove feature_flags.edit_appears_on_hover.
(imported from commit ff8b820d8f5c1bfe25ccb6856b5f206bd03663e0)
2013-09-09 13:16:11 -04:00
Scott Feeney 5d800c5186 Fade users when composing
This is feature-flagged to staging only.

There are basically 3 parts to the implementation:

1. In response to typing, fade/unfade the user list.
2. When a compose is aborted, unfade all users.
3. When the presence list is redrawn, fade/unfade the user list again.

(imported from commit cd416de232849a9f69dcacdc8b0fcfc20e3848a2)
2013-09-06 23:13:48 -04:00
Leo Franchi 663fd4653f Feature-flag alert words to staging + reddit
(imported from commit 1fe9c596b26ce6676514719e4ed2e185108685cb)
2013-09-05 10:21:39 -04:00
Allen Rabinovich ddd790e642 Change edit button CSS to keep it from jumping
(imported from commit 17a03ca9294765256af0d4c6eb292b755d06158e)
2013-08-27 15:11:40 -07:00
Tim Abbott 8601c2d766 Disable Webathena-related UI for desktop app.
(imported from commit 4de9ecbd5acd90826da1941593fe03aa8a6bd80c)
2013-08-27 16:21:41 -04:00
Steve Howell 03b58e1528 Make narrowing click handlers work more generally.
Previously, narrowing would only work from recipient rows, not
other message table rows (e.g. summary rows).  This led to the trap
that you could add a narrows_by_recipient class to an element,
expect that narrowing would work, but the actual handler would
break or silently fail if it weren't part of a recipient row.

Now the click handler looks for the closest table row (tr).  It's
encapsulated in rows.get_closest_row(), so if we go to a
non-table-based design, it should be easy to address in one
place.

(imported from commit e116b7573c4bb06599ced84a0adcf8dc23d63593)
2013-08-27 15:46:33 -04:00
Tim Abbott e95a81addb Add Webathena login button to our mirroring page.
(imported from commit 43d8323bb502299027436a8c94c04f55d87bf953)
2013-08-27 15:41:43 -04:00
Tim Abbott 134da30fdf Add webathena authentication button for Zephyr users.
This shows up when you're not running a Zephyr mirroring bot and lets
you use Webathena to have us run it.  Obviously needs more docs.

Current problems include:

* supervisorctl reload ends up recreating /var/run/supervisor.sock
  with the wrong permissions, so it only works once in a row before
  you need to chmod that.

* /etc/supervisor/conf.d needs to be humbug-writeable; this is a clear
  local root vulnerability

* This uses SSH and thus is kinda slow.

(imported from commit 7029979615ffd50b10f126ce2cf9a85a5eefd7a2)
2013-08-26 18:17:25 -04:00
Steve Howell 7fb99761e1 You can only expand rows by clicking on [+].
(imported from commit 23a52feca13232bf36038cd7f59c520f9106ee2c)
2013-08-26 16:38:34 -04:00
Steve Howell 4dbea88aeb Fix click handler and re-enable collapsing experiment.
The click handler for collapsing was too broad, and it overrode
the ability to click to narrow from the recipient bar.

(imported from commit feeaa9becf8e400e319e1a77e5b72a33bb22854c)
2013-08-23 17:54:28 -04:00
Allen Rabinovich 5e38463800 Add retractable left sidebar.
Specifically:
   * Add and style the sidebar toggle button to the header and remove the
     gravatar.
   * Add the logic for retracting the left side bar.
   * Modify the logic for clicking on the referral pane to prevent it from
     closing the sidebar.
   * Modify the logic for clicking on the stream filters to prevent them
     from closing the sidebar.
   * Modify the logic for clicking on the stream settings dropdown and the
     user info dropdown to prevent them from closing the sidebars.

(imported from commit 73e00eb834a6e87cb8d659fdcf6c2e06fff3731d)
2013-08-23 14:16:51 -07:00
Steve Howell 47b1e8adfd Turn off collapsing for now
(imported from commit df25818d70feb1b9fd2463ff4643efa049ff5574)
2013-08-23 16:16:04 -04:00
Steve Howell 4a7bab9a6f Allow collapsing of recipient sections.
This is experimental, for staging only.  There might be a better
way to model this than dueling force_expand/force_collapse flags,
but it works for now.  The code in collapse_recipient_group()
could also be DRYed up relative to expand_summary_row().

(imported from commit 107151d1ecd640970fb7700d41278a003bd1abaa)
2013-08-23 15:57:31 -04:00
Allen Rabinovich 778fa955a9 Make the right sidebar retractable at narrower window widths.
As part of this commit:
   * Add and style a top right button that controls the sidebar
   * Add the necessary styles for the right sidebar when it's in that mode.
   * Add the logic for controlling the sidebar expansion
   * Modify the logic for prevent default click events to generally
     hide popovers correctly.

(imported from commit ca8063f6c62b436799f952e88541ff0ae8ba85fe)
2013-08-23 09:22:31 -07:00
Steve Howell 795248a1d0 Mute any topic named "muted" on zulip.com.
This change will allow us to test the muting feature on
staging.  Any topic named "muted" will automatically be
muted.  You can also mute any other topic on the console:

    muting.mute_topic('devel', 'ios');
    current_msg_list.rerender();

More UI around this experiment will be coming soon, as well
as support for muting entire streams.

The muting module keeps track of which topics are muted, but a
user can expand muted messages, and once that happens, the
messages are marked with the "force_expand" flag that gets
persisted to the back end.

Muted messages are rendered in similar fashion to the summarized
rows, and as part of unifying some of that code, we have
made it so that expanding a summarized section doesn't remove
individual flags related to summaries; instead, the messages
get the force_expand flag set.

(imported from commit acee4190e63813d46850415c41ff8ebfae4a6953)
2013-08-23 12:10:27 -04:00
Steve Howell e4699d6a25 Use new stream_list.set_presence_list_count().
The old API took a dictionary; the new function works for one
person at a time, which allowed us to clean up the calling code
in ui.set_presence_list.

(imported from commit 0ae9d01491238d32915572c7efebf476d05fed4b)
2013-08-22 15:32:30 -04:00
Steve Howell 58c141ad79 Avoid side effects in ui.set_presence_list().
Have ui.set_presence_list() only touch the presence list.

Before this change, it was calling update_unread_counts(), which
has a bunch of side effects unrelated to the presence list.

(imported from commit 690f754d78874a03fa36f8ff8765d5a63e431d28)
2013-08-22 14:46:13 -04:00
Scott Feeney 6de6ced290 Fix PM unread counts not displaying
This was broken in two ways:

1. Commit ad59d6f78042ce89, "Make the left sidebar and right sidebar
more consistent", pushed last Monday, changed the markup for the right
sidebar without changing a selector in stream_list.js that was looking
for the old markup.

2. Even then, whenever new user presence information came in, we would
rerender the user list and blow away the unread counts. This commit
patches around that by updating unread counts after rendering the user
list. I'm not sure what broke this or how it was working before.

(imported from commit 53ed40139e257e44411e918d1ecdce3a49e9ee51)
2013-08-22 14:46:12 -04:00
Allen Rabinovich 834ff7d750 Remove JS logic for resizing floating recipient bar and composition area and do it with pure CSS instead
(imported from commit b19d1b008cc070f29e08fd93416e9a5d01e2f110)
2013-08-21 12:26:45 -07:00
Luke Faraone a1a5d00e9f Update your presence dot when your activity changes.
(imported from commit ecdc056db987d4404ded01092f5693ac8dd28ae9)
2013-08-21 11:10:31 -04:00
Scott Feeney 371083e698 Keep invite link on screen when user list is long
(imported from commit ae775a6a91a485070fa65f8429ee919b1e33427e)
2013-08-20 17:40:43 -04:00
Jessica McKellar b32219c8eb Don't display unread counts until after making a bankruptcy decision.
Users were getting confused about why the unread count in the sidebar
/ notification bar / Dock was different from what the bankruptcy modal
said, so only show them the true server count until they've made a
decision.

(imported from commit 71d376cd4a85749ccf49936b251e6b8ac21361b7)
2013-08-20 10:26:52 -04:00
acrefoot 395aaae994 Allow anyone to edit a "no topic" message
This change would allow anyone in the realm to set a topic for a "no topic"
message. As soon as the message topic is set, only the sender can change it again.

(imported from commit 0a91a93b8fd14549965cedc79f45ffd869d82307)
2013-08-19 16:29:30 -04:00
Jeff Arnold 12058b0880 Don't break double clicking in the edit compose box to select a word.
(imported from commit 309f9b96b8567e384c83ba4c3a8a954383c6ebc7)
2013-08-16 22:03:47 -04:00
Jeff Arnold e51cfeaed4 Only add an edit icon next to the last paragraph
(imported from commit c6d2893faef144f85518c4d45856282ada33a9d1)
2013-08-16 17:40:07 -04:00
Allen Rabinovich 5571a6e466 Switch body click to document click to account for clicks on the outer edge
(imported from commit bf6c7a61cb2f00741ed3af70ca77b5782f15d148)
2013-08-16 10:51:00 -07:00
Jeff Arnold 5596191666 Make double-clicking on a message highlight the message.
Addresses Trac #4.

(imported from commit d920f473e94e5141f41e887ffae74b3e21f862a6)
2013-08-16 13:46:56 -04:00
Jeff Arnold 41a149140d Show a button for editing messages when the user hovers over them.
Addresses Trac #1691.

Currently enabled only for staging and customer7.invalid.

(imported from commit 181e31adbac113bf62709b171d978c3074c8a799)
2013-08-16 13:02:15 -04:00
Jeff Arnold b166accc33 Revert "Show a button for editing messages when the user hovers over them."
This reverts commit 782e76210ac835d0617d91679933eccff0caad98.

(imported from commit 24889d0e0e38cc46d4b2d06c12a5737a4772fd6c)
2013-08-16 11:44:07 -04:00
Jeff Arnold 66c9c7efee Show a button for editing messages when the user hovers over them.
Addresses Trac #1691.

Currently enabled only for staging and customer7.invalid.

(imported from commit 782e76210ac835d0617d91679933eccff0caad98)
2013-08-16 11:20:15 -04:00
Waseem Daher 90617db8a1 Allow "Share the love" to be expanded and collapsed.
(imported from commit 9e620c5882d58f41d25124a690aa4154f93173db)
2013-08-15 18:04:43 -04:00
Allen Rabinovich 550fd6281c Fix regressions associated with the new fixed sidebar layout.
Specifically:

   * Remove min width setting for the main div as it is no longer necessary.
   * Change max width for the app to 1200 and adjust top margin on the message pane

(imported from commit 846dd3dcd7798efa615e15c61681b0ab7465f5e3)
2013-08-15 12:55:10 -07:00
Kevin Mehall 0f6c7ca7be Use msg_list.get_row(id) instead of rows.get(id, msg_list.table_name)
(imported from commit 953cd24e605269d2bbdc42b878506f0ab01501e8)
2013-08-14 17:08:32 -04:00
Jeff Arnold ec2f013723 Make the left sidebar and right sidebar more consistent.
Addresses Trac #1500.

(imported from commit ad59d6f78042ce89a99ad60c7c34f67144e9c776)
2013-08-13 16:34:16 -04:00
Luke Faraone ecc42bc9f8 Add administrative panel to allow for user deactivations etc.
We now show a list of users and allow you to deactivate a user using the
same process as `python manage.py deactivate_user`.

We add a new menu item accessible from the gear icon which will eventually
have much more than just this, but we have a good start here.

Here we also add a property to UserProfile which determines whether you're
eligible to access the administration panel, and then have code which shows
the menu option if so.

This introduces a new JS file, admin.js.

(imported from commit 52296fdedb46b4f32d541df43022ffccfb277297)
2013-08-13 14:20:18 -04:00
Steve Howell 0879648f0e Remove respond_to_cursor flag.
The prior commit, which was a functional fix, made the
flag obsolete.

(imported from commit 203a080106b00e0355a1223f783bbe579430b4ad)
2013-08-13 14:12:28 -04:00
Waseem Daher 9ea08a35c5 Refactor: move attachment-related code into compose.js
(imported from commit 4436f0799a9c1a00e964962d4d0d165e03b641b7)
2013-08-12 17:22:23 -04:00
Waseem Daher dfb60ee966 File uploads using Dropbox.
(imported from commit c552133fc7025eca526fbfef24fd544260d7111b)
2013-08-12 17:22:23 -04:00
Waseem Daher 8aa80f6800 Disable browser spellcheck in desktop app.
This fixes Trac #1567.

This is kind of a big hammer approach, though. If we did support
spellcheck on other platforms (without doing more work), this might
actually potentially disable it.

But we don't, so this is mostly a non-issue for now.

(imported from commit 74dcb42b19c37e1e8d1e9a2b265e1e6ae0cc2c67)
2013-08-09 18:53:22 -04:00
Zev Benjamin ec9322fc87 Use Dict everywhere we have keys based on potentially dangerous, user-supplied data
There are also one or two places we don't need to use it for security
purposes, but we do so for consistencey.

(imported from commit aa111f5a22a0e8597ec3cf8504adae66d5fb6768)
2013-08-09 17:35:14 -04:00
Kevin Mehall e03f3dabc1 Make Enter on a summary row expand it.
(imported from commit 4ad44a96a225f6cfbb7d4f62ebf7c62298dd730b)
2013-08-08 13:04:01 -04:00
Jessica McKellar ccd2433345 Let the browser scroll happen before our scrolling on a (re)load.
On a page load or reload, the browser will, at an idle time, scroll to
the top of the page. We can't intercept this browser-induced scroll,
so to make sure it doesn't in interfere with our scrolling to the
correct place in your message feed, we let the browser scroll happen
before the work we do on page load.

(imported from commit f5f441ab90bcdb8404e05caea3c6da81a3a6fc1e)
2013-08-07 13:51:47 -04:00
Jessica McKellar a1f760dedb ui: Move the scroll handlers into top-level functions.
We'll need to be able to invoke them in event handlers.

(imported from commit 4487f711b59af0ccbc3f94c34e99c96228942add)
2013-08-07 13:51:46 -04:00
Kevin Mehall eac6463031 Implement message summarization experiment.
When you read messages in a narrow and then un-narrow, collapse
adjacent messages read in the narrow into a summary row that can
be clicked to expand those messages.

Scoped to staging with feature flags.

The implementation of this within our current MessageList is rather ugly.

(imported from commit bcb3a39d8c0c334136fe86318f18ead03f0f50bf)
2013-08-07 10:24:03 -04:00
Tim Abbott 1f1af26048 Change Humbug => Zulip in text/comments.
(imported from commit 2f9d73431ae40e1b9e9e11bc2f4f62f566ae758a)
2013-08-07 10:00:07 -04:00
Zev Benjamin 237953f656 Completely hide the "share the love" elements when the user has no invites.
(imported from commit 6fe383dbbafb5e91998b6cdd52d01d92af31badb)
2013-08-06 17:18:40 -04:00
Zev Benjamin 262fb9b14c Factor out resizing page components from the resize handler
(imported from commit 18410406f6a2401b21a9d5336a8ae14046fc0375)
2013-08-06 17:18:40 -04:00
Zev Benjamin 5e1d893509 Revert "Temporarily remove "Share the love" from DOM & JS"
This reverts commit fc7af47400f6c96161913dcc98be128c116d90c5.

(imported from commit 8f58425ec3bd95220e109eeb7be21fa449508427)
2013-08-06 17:18:40 -04:00
Scott Feeney 29b3b42ac7 Temporarily remove "Share the love" from DOM & JS
(imported from commit fc7af47400f6c96161913dcc98be128c116d90c5)
2013-08-06 10:47:42 -04:00
Scott Feeney 950d271bc3 Fix wrong pointer position on narrow
This was introduced in a71867c2435790, intended to fix #1287.

Very subtle bug. The problem was that we were attaching a click handler
to two selectors, a link, and a div that the link is inside of.

Since the link was a descendant of the other selector, clicking the link
created TWO click events, and the second click on a stream box while
already narrowed to that stream jumped you to the end.

We should be careful of this in the future — never attach an event
handler to two selectors, one of which is contained in the other.

(imported from commit f428f593280e80c90b2665d1dfbff1df8a39bd35)
2013-08-05 18:37:29 -04:00
Waseem Daher c16651bf23 [schema] Add referral system
For now, we just get emails about referrals that we have to follow up
on manually.

I don't love using the name "referral" in some places and "invite" in
others, but we already use the verb "invite" to mean something else
and "invite" is a canonical noun.

(imported from commit 0814c18395952fcdef234c1584984f71ca1b6f37)
2013-08-05 17:14:51 -04:00
Steve Howell 770bc5c96a Fix pointer motion at top/bottom of viewport.
We always intended to move the pointer up when you were at the
top of the viewport and scrolling up, and we always intended to
move the pointer down when you were at the bottom of the viewport
and scrolling down.  We didn't intend to move the pointer up
when you were at the bottom, or vice versa.  This commit fixes
that bug, simplifies the code, and inlines the code into ui.js.

(imported from commit 77e2ace9d2fc1025e1349e3be13c76c3a397fd38)
2013-08-02 18:18:04 -04:00
Jeff Arnold e04eae82ce In the left sidebar, make the entire row clickable.
Addresses Trac #1287.

(imported from commit a71867c2435790ce8548fa0b27604b5b1844d624)
2013-08-02 17:44:44 -04:00
Scott Feeney c3fc279423 Remove extra space in presence descriptions
(imported from commit 46d47cc71a72aad4f8c7447451982cfeb10cc54e)
2013-08-02 16:26:46 -04:00
Waseem Daher 0bb304a516 Request Gravatars at 2x the size we need.
This is a bit wasteful on most systems, but will result in their
looking pretty sharp on Retina displays.

(I also go and actually fix up the size we request for a bunch of
these so that they actually match the size of the gravatar in the
document -- previously we were requesting a size 30 gravatar when we
were displaying it in a size 25 space, which leads to unnecessary
ugliness upon resize.)

(imported from commit 9152e6e128e0ac38d97d893cb8243e3b9185351b)
2013-08-02 15:58:55 -04:00
Tim Abbott 5a320db3c1 Add curly braces for all javascript if statements lacking them.
(imported from commit 32c7643d1a6ecdfaf634424d217938c8a368dade)
2013-08-01 11:47:54 -04:00
Scott Feeney 38abee8e66 Refactor code to show/hide "All messages" link
Code prior to this commit was functionally working, but semantically
flawed — returning false does not short-circuit _.each like it does with
$.each. It now uses _.every, as suggested by Steve.

In addition I renamed the function to be more descriptive, added a
comment, and eliminated needless double negation.

(imported from commit b0666dfa01b2677b4eaf577fe9ced90ed0db2438)
2013-08-01 10:16:32 -04:00
Scott Feeney 8703134a23 Replace $.each with _.each
In a few cases the $.each was doing something imperatively that was
terser and easier to understand by using a different Underscore method,
so a few of these I rewrote.

Some code was using the fact that jQuery sets `this` in the callback to
be the item; I rewrote those to use an explicit parameter.

Some code was using $(some selector).each(callback). I converted these
to _.each($(some selector), callback).

One function, ui.process_condensing, was written to be a jQuery $.each
callback despite being in a totally different module from code using it.
I noticed this and updated the function's args.

(imported from commit bf5922a35f257c168cc09ec1d077415d6ef19a03)
2013-07-30 12:12:58 -04:00
Scott Feeney 375b1f9eb3 Replace $.map with _.map
(imported from commit 97c7a6612d8d56d19f8650db0ea8906afc0f20ef)
2013-07-30 12:09:18 -04:00
Scott Feeney 88952fb2b1 Replace $.grep with _.filter
(imported from commit 3a8830f697551a91f94f06b37d01a3687d8c583d)
2013-07-30 12:06:22 -04:00
Tim Abbott bc4d7c687d Rename our custom JS events to use Zulip, not Zephyr.
(imported from commit 61ac456d394a6dbc14f3e9183a53313990db5059)
2013-07-29 12:11:26 -04:00
Tim Abbott 3bba0cc927 Move zephyr/static to just static.
It's not really a part of the server (aka the rest of zephyr/).

(imported from commit 27f6b6b064938ad927075a68d873e4b68710d279)
2013-07-29 12:11:26 -04:00