Commit Graph

14700 Commits

Author SHA1 Message Date
Waseem Daher d7da9d8bad Switch to using Font Awesome everywhere.
(imported from commit 406ac9e8e24066e45833a71adcdd95b26b5cfb9b)
2013-08-02 14:49:28 -04:00
Steve Howell 6b9b33f769 Use PATCH again for patching bots.
This reverts a prior commit, but the earlier commit is fine
functionally; the earlier commit was a temporary measure.

Revert "Use POST, not PATCH, for patching bots."

This reverts commit c3146b23d5d7d134c2b80507eb87033ca375a4db.

(imported from commit ebfcb2bae72c11767f9750412440d40b7a2a4995)
2013-08-02 11:46:11 -04:00
Kevin Mehall a02fe71788 Make the "Get our app" onboarding popover less obnoxious.
* Only pop up on mouseover if you haven't completed the step previously,
    and only on the first mouseover.
  * Dismiss the popover if you click anywhere but the link

Trac #1471

(imported from commit 08904be59c15526f88a2633ebd6f2a046ec62197)
2013-08-02 10:24:28 -04:00
Scott Feeney 31bee946be Don't autocomplete @-mentions mid-word
Now the @ has to follow a space, newline or certain punctuation, or be
at the beginning of the message. This addresses the frequent complaint
that typing an email address e.g. scott@zulip.com is hard, because after
the @, it would try to autocomplete.

(imported from commit 043953be3928b0acf2a4ab2b4dd1a80e1a1aa882)
2013-08-01 18:42:39 -04:00
Scott Feeney 106c2d6a87 Remove unused Droid Sans CSS link from header
(imported from commit bf45482d34970447db3c21212cba81ad8d2ee51f)
2013-08-01 15:46:59 -04:00
Waseem Daher 0663c7243c Enable always-open-compose for MIT, CUSTOMER4, Zulip.
(imported from commit 43602ebeed5396de038c59240a9d695ec411db89)
2013-08-01 13:00:15 -04:00
Waseem Daher 86cf40c8a9 Move feature_flags into its own file.
(imported from commit b775f85a24422d236b0079810b98b6b984cb60a2)
2013-08-01 13:00:15 -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
Kevin Mehall 112d37de86 Fade message dots faster when marked read by cursor.
(imported from commit a31b0601bf13bce377c24fff96a818023d5bdd1f)
2013-08-01 11:26:55 -04:00
Kevin Mehall 0cbee97ffd Change mark-as-read behavior.
Mark messages as read when with the pointer, but mark all messages
read if the last message is visible.

(imported from commit 4c1a928bd6966111f0f34c5207723656b5f193b9)
2013-08-01 11:26:55 -04:00
Kevin Mehall 0e0ed886e1 Add feature_flags mechanism to enable experiments.
In the future, this could come from the server to enable individual
experiments on a per-realm basis.

(imported from commit 8fd1ba1910b3cfd131f58bab8efbd11a42053bc3)
2013-08-01 11:26:55 -04:00
Steve Howell 0ed73df475 Rename some functions related to bot avatars.
(imported from commit 6f88ee71dda263bfe7b5c15baed02aaf00d35f15)
2013-08-01 11:05:40 -04:00
Steve Howell f7ca0117e6 Allow users to upload new avatars for their bots.
(imported from commit 9d7895a658740815f454c8bba400d7cff821b7f9)
2013-08-01 11:05:40 -04:00
Steve Howell d0060f24ed Add close() method to avatar objects.
The close() method will let you release handlers, as well as
doing everything clear() does.

(imported from commit 3a67c3f2226918cee10cf43598e0408fb186408a)
2013-08-01 11:05:40 -04:00
Steve Howell d505d494c8 avatar.set_up_file_input returns object now
The set_up_file_input() function now returns an object to the user
with a clear field.  This object will grow soon.

(imported from commit 7b3761eafddb392bd2c84a1685aa8d1811028a0f)
2013-08-01 11:05:39 -04:00
Steve Howell 784cab9df2 Use jQuery on() consistently in avatar.js.
(imported from commit c14105dbaa174ef9aec4fc11a12a44f25e74a246)
2013-08-01 11:05:39 -04:00
Steve Howell ab23c534b9 Use POST, not PATCH, for patching bots.
This is a temporary expedient measure to work around our
PATCH not supporting file uploads in our current Django setup.

(imported from commit c3146b23d5d7d134c2b80507eb87033ca375a4db)
2013-08-01 11:05:39 -04:00
Scott Feeney 0d53253f7b Darken the left border on blockquotes
This is a compromise between the old color when selected and when not
selected. It makes the border a little easier to see while still being
subtle.

(imported from commit 7177d8f688af3de15f3e309d6a9c7c248acb1db4)
2013-08-01 10:18:41 -04:00
Scott Feeney 315d27076b Don't change code bg & quote border when selected
Since we no longer change the selected message's background color, it
doesn't make sense for these other colors to still change when the
message is selected.

(imported from commit a7c387e7d390b7f2973dc6bd3168651d88880139)
2013-08-01 10:18:41 -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 1e642ae158 Use _.any instead of _.some
They are synonyms, and Zukeeper consensus is that _.any makes it clearer
what the function does.

(imported from commit 847383e27ccefeaff1ecff15f4cb4177c9e40c25)
2013-08-01 10:16:32 -04:00
Zev Benjamin 905354f7a1 For mit.edu, include .d instances in narrowed views
(imported from commit 502b36d1a62f3f8f7b956c701fd10f580e1927d7)
2013-07-31 18:30:28 -04:00
Zev Benjamin bae5924b53 Fix whitespace
(imported from commit 96937f8225bc7039f2a98163deb9b5b142c71c7f)
2013-07-31 18:30:28 -04:00
Zev Benjamin a637fadd18 Fix regexes for MIT narrows that include un- and -.d streams
The previous regex didn't escape the period in '.d' and was doing a
case-sensitive match to find the base stream name.

(imported from commit 43ef13733987e50dcead06b7bd3e768cb4395998)
2013-07-31 18:30:28 -04:00
Tim Abbott d6acd8fce9 Add support for narrowing to a single message ID.
This is mostly useful for sending someone a link to a single Humbug
message.

(imported from commit b0994a2bf503c84690b13ce89bbcf5bab829bf0c)
2013-07-31 14:59:05 -04:00
Tim Abbott ed6f5ac470 Fix time travel by adding new near: operator.
(imported from commit 727a68016090164b586cbe59e692676a00e8cd3a)
2013-07-31 14:59:01 -04:00
Scott Feeney 473a96fd1f Fix #1629 (wrong scroll pos on narrow)
(imported from commit ac78077f104b079406e745c3eb9ff11b759d033e)
2013-07-31 14:35:48 -04:00
Scott Feeney c56353138d Fix tracebacks on reload while composing
(imported from commit 5ba1c93b8af015197e77bd16ef9178a6e743a849)
2013-07-30 13:10:50 -04:00
Scott Feeney a35fff90cc Replace $.extend
(imported from commit 2c1ee3c2714d388f2a71398fe81c049cc54ff94d)
2013-07-30 12:12:59 -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 5842d5c335 Replace $.inArray with _.indexOf
(imported from commit 6bd9c87ac98b8951411fc050e1bff83684cf8618)
2013-07-30 12:12:03 -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
Steve Howell 6cf5b64b3c Update module.exports for various modules.
(This makes them play nice with node-style unit tests.)

(imported from commit 44fa97c9d38d0b7e82366b49db1425508b6aed67)
2013-07-30 08:54:23 -04:00
Steve Howell f11cc9e6a2 Extract search.get_suggestions().
(This makes testing a bit easier, plus it dedents some code.)

(imported from commit 80532990608cc51ca55d3354bd300734afd7942e)
2013-07-30 08:54:22 -04:00
Steve Howell 2275809103 Shorten names of internal functions in avatar.js.
Just have accept() and clear() for brevity sake.

(imported from commit 7bf9b4d89f1b7978ae7b07b5fba87b654c90e314)
2013-07-30 08:41:09 -04:00
Steve Howell 1c69b7ea46 Extract avatar.set_up_file_input.
(imported from commit c85087a4e098b1af2e4d26c97d0cb69c42d4f671)
2013-07-30 08:41:09 -04:00
Steve Howell e6609b3695 DRY up jQuery calls in avatar.js.
Extract some local variables to set up the next refactoring, where
we can parameterize the function.

(imported from commit 1c2801131c19a54713a0d5c2cc26c419412339b0)
2013-07-30 08:40:49 -04:00
Steve Howell e18b9ae3d7 Use get_file_input() to specify hidden file input for avatar uploads.
(imported from commit 898216219b36a65519439da73158da4e5996649b)
2013-07-30 08:40:49 -04:00
Steve Howell c5013c0ba1 Introduce validate_avatar function
(imported from commit 4d6d20e4b1c3b0998d0c40ca9b5c74cb7f3319e5)
2013-07-30 08:40:49 -04:00
Steve Howell 032415fcb4 Move bot avatar code to avatar.js (from settings.js).
This step of the refactoring really just moves the code.

(imported from commit 4d551c43d25723b2556448f47b6b61228e782f54)
2013-07-30 08:40:49 -04:00
Scott Feeney 209471a6c0 Fix disappearing stream sidebar chevron (#1587)
My mistake when refactoring popovers.js a month ago. Sorry everyone!

(imported from commit a588b44723a58fb01b6c3996d308e4e8ea11ec2f)
2013-07-29 19:23:09 -04:00
Steve Howell 546ae1023c Remove smartSpaceBar option from typeahead and search.
The option caused some race conditions on Firefox, and it is
really made moot by the naturalSearch option anyway.

(imported from commit dc7080c905ced9b2f4ad4275d82549acf09a59f7)
2013-07-29 16:42:14 -04:00
Scott Feeney 0de1d3dc1f Fix "a[n] invite-only stream"
(imported from commit a4572dc1541b10f30ec0618e29371d6a187c1809)
2013-07-29 14:53:16 -04:00
Steve Howell a004a15ff5 [important] Fix paths related to recent zephyr/static changes.
This fixes the previous commit to master.

(imported from commit 43637dcf0832a4e91de9fd98ebb777c77a3eee19)
2013-07-29 14:02:20 -04:00
Steve Howell 46c4a6a9b3 Add unit test coverage to unread.js.
This covers most of the module's functionality, with special
emphasis on lines that use underscore.js (_.each and _.filter).

(imported from commit 074181a0273286a258504be634bdd1cead2eecd5)
2013-07-29 13:47:57 -04:00
Steve Howell 3d8ce28964 Use underscore in unread.js
(imported from commit 91befaaaff5d9a791a3c1bb4ff99f4085c27c4cb)
2013-07-29 13:47:57 -04:00
Steve Howell f92b3a9129 (css) Remove #bots_list width setting.
The width setting was unintentional, and it interferes with
the inline-block settings for the image and bot info.

(imported from commit 741c82829efed00b6d47badcf14b26223b47a7a9)
2013-07-29 13:17:26 -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