Commit Graph

5796 Commits

Author SHA1 Message Date
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
Jessica McKellar f530e3b930 Display the email address for a stream in its stream page detail.
For now, only show it on staging.

(imported from commit fd07fad1c34578d8ddc2cddd1bb6bdcb72f354de)
2013-08-13 14:28:47 -04:00
Jessica McKellar f7784a2f1d Add a handlebars helper for variadic compound AND conditions.
e.g., from a comment in the commit:

// Execute the conditional code if all conditions are true.
// Example usage:
//     {{#if_and cond1 cond2 cond3}}
//         <p>All true</p>
//     {{/if_and}}

We'll use this for the email forwarding UI, but it may also be
generally useful, and easy to generalize to OR.

(imported from commit da601f94d9da300213ff46be50255135c014eca0)
2013-08-13 14:28:47 -04:00
Jessica McKellar 15afdf65eb email forwarder: encode stream names so they are safe in email addresses.
(imported from commit 6699d656e3cae58fad062a1403fb9923429fde89)
2013-08-13 14:28:47 -04:00
Jessica McKellar c4a0797413 Decode MIME-encoded emails before forwarding them to Zulip.
Otherwise you'll see garbage.

(imported from commit 07e68a5e209fdea4f54470396a67986dd9fa4016)
2013-08-13 14:28:47 -04:00
Jessica McKellar befd34d111 [schema][manual] Make Stream.email_token required.
This commit CANNOT be deployed until the previous schema change
([schema] models: add an email_token field to Streams) is on prod.

Before applying this schema change, run the populate-stream-tokens
management command to generate tokens for streams that need them.

(imported from commit 7adc81c8c317ec5d59dd59ba42a4dc1a46174007)
2013-08-13 14:28:47 -04:00
Luke Faraone af4c34330b Switch to checking database is_bot field instead of using a heuristic.
This has the amusing side effect of showing all the Zulip bots in the
administration view because none of them have the is_bot 	 set.

(imported from commit cdec19d2109c092018c1f331aa32f345d1587683)
2013-08-13 14:20:18 -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 78d8153e6b Remove compose box flicker after sending messages.
We remove the calls to clear_box()/hide_box() and start(),
so that we don't mutate a bunch of UI elements needlessly.
Everything that start() does either never made sense in a
just-after-message-sent context, or it was necessary prior to
this fix only because of what happened in clear_box() or
hide_box().

This change closes out trac #1672, "Clean up always-open code."

(imported from commit bedaa719eb05e166a4bac562784da0cce8859700)
2013-08-13 14:12:29 -04:00
Steve Howell 8f11ce7485 Remove redundant calls to send_status.hide()
One of the calls was obviously a typo dup, and the other
call is already covered by clear_box().

(imported from commit 448dc4c0f265cc7260ea08f0468a7d1440903e3c)
2013-08-13 14:12:28 -04:00
Steve Howell 5248c68fb7 Extract compose.show_box_for_msg_type()
(imported from commit 886717cbc73d0d662ccbd96091e94b85864d0049)
2013-08-13 14:12:28 -04:00
Steve Howell 86b337ca75 Extract compose.same_recipient_as_before()
(imported from commit 2ba8589127e3a0e86c00bb52a22be01bcad48a5d)
2013-08-13 14:12:28 -04:00
Steve Howell 6314089e26 Extract compose.fill_in_opts_from_current_narrowed_view.
(imported from commit e89c6c7f42aa8fdfd77e879e6d9f43dd67744ea6)
2013-08-13 14:12:28 -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
Steve Howell 2b2587d70b Stop using old reply recipient in always-open compose.
Due to the code removed in this diff, we would put you
back to your original reply stream/topic/sendee

(imported from commit 6e1f4666e3b32b057e692e015782780f7c734445)
2013-08-13 14:12:28 -04:00
Steve Howell 6686ca04d2 Remove feature_flags.always_open_compose from code.
The flag has been set to true for a while, so we removed
the flag and a bit of dead code associated with it.  This
change should not affect any functionality on any realm.

(imported from commit 8d457f52584173994d0e5e83ca326f892cd90057)
2013-08-13 14:12:27 -04:00
Zev Benjamin 6843cc4479 Add test for zephyr mirror CC de-duplication
(imported from commit 1452c67818f8aa577a95a219fc6b86e9690033eb)
2013-08-13 13:49:09 -04:00
Zev Benjamin 307bba5b29 Add comment to some zephyr mirror CC de-duplication logic
(imported from commit 86680f24329475dccc79731639d51a735fa873bf)
2013-08-13 13:48:32 -04:00
Zev Benjamin 91c0be44a1 Raise JsonableErrors while checking messages instead of returning error strings
(imported from commit 986ad1e19dd508b12386c57cf093b32d3fbcf49e)
2013-08-13 13:45:10 -04:00
Zev Benjamin bfebfbbff5 Make error messages a little more consistent
(imported from commit 77baba591628bef6b8b8b0ae28a9e05ec2fac693)
2013-08-13 13:45:10 -04:00
Zev Benjamin 6fcfcf3f32 Fix comment
(imported from commit 6f8eac90e5b011bd25b09e562ebcb9d2cae39a06)
2013-08-13 13:45:09 -04:00
Zev Benjamin bcc03dd4ab Do full-precision time comparison when checking for duplicated messages
We've had microsecond-resolution timestamps since we migrated to Postgres.

(imported from commit 81fe79f00097ceb40105645aa04a2f0ee29d3a19)
2013-08-13 13:45:09 -04:00
Luke Faraone 8c35db91c0 Unit testing for MIT user name calculation / mailing list protection.
(imported from commit ae7d4c0a1fea0b0887861a71828eae7c3022ec6f)
2013-08-13 10:21:45 -07:00
Luke Faraone 3129b6374d Fix broken parsing of DNS response.
(imported from commit 3a627d45bc313bf244dc699a59df9423c849bc35)
2013-08-13 10:21:24 -07:00
Steve Howell ad10cecdd7 Extract mark_summarized().
(imported from commit 14a1c69392ec6ca8cb0ec72196368a195dd4c6fa)
2013-08-13 11:26:12 -04:00
Steve Howell d27feeed62 Extract code to summary.js.
(imported from commit 51d958b27e53555f5f77d6e6b661eade57190e23)
2013-08-13 11:26:12 -04:00
Waseem Daher 02dba3da11 iframe-bot: Don't show tweets.
(imported from commit 584fdbfa50e2ff1d3526f741e96ef6691fa731e1)
2013-08-13 10:41:02 -04:00
Waseem Daher 7329cedd84 iframe-bot: Properly style emoji (but you need to copy in the images).
(imported from commit 3fbf54a46d4f20e9da21c73cfe9f6a0064749f1c)
2013-08-13 10:36:05 -04:00
Zev Benjamin 62f607fd5e Debounce fading on the leading instead of the trailing edge
(imported from commit 11d0e8938c1f29cfea0678330e7af9884844af21)
2013-08-12 18:07:30 -04:00
Jessica McKellar 29a64b6c59 Only suggest declaring bankruptcy once.
Use information from the server to figure out if we should prompt for
bankruptcy, rather than trying repeatedly inside load_more.

(imported from commit ccb8cb1ce482b8bf3d343e7324fef7981880282d)
2013-08-12 17:33:40 -04:00
Jessica McKellar 1a0cc2b421 Send enough information in page_params for the client to consider bankruptcy.
Previously, we'd determine unread counts client-side as messages got
loaded, which meant:

a) how many unread messages you were known to have kept changing
b) you could bankrupt yourself and then get the bankruptcy message
again as more messages arrived from the server

(imported from commit 90f1af27b493c720f77d37487d8746749faf157e)
2013-08-12 17:33:39 -04:00
Waseem Daher abef6be12f bugdown: Unescape HTML entities in Twitter.
This closes Trac #1071.

(imported from commit 521ffa6ed13df7c08e67218564d426ca90080948)
2013-08-12 17:23:49 -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 932d002ff4 Zulip embedded iframe bot.
Currently running for CUSTOMER3, at MIT.

(imported from commit 1c29d3fb3fbf29b9ea633e9fc102e7737eba4fd7)
2013-08-12 17:09:48 -04:00
Zev Benjamin 90bf2ec9d0 referral: Fix some finicky element movement
(imported from commit 4f90bb1c18eb42ca29036d0392d05f0337a51bba)
2013-08-12 17:03:33 -04:00
Waseem Daher 5f7662d4ee font-awesome: icon- becomes icon-vector-.
(imported from commit 8d83e4c0d13a706ed7e1b957bbc3f27c3d3b5bca)
2013-08-12 16:55:29 -04:00
Waseem Daher 319d90be48 Upgrade Font Awesome to v3.2.1.
(imported from commit 3a2f8ff8de5570113fd28aa3bf297eb7e9f5dfeb)
2013-08-12 16:55:29 -04:00
Waseem Daher 6a1486a4cd fonts: Move our custom icon to the top.
(imported from commit 511ee1dc74a1437518f7c72f47e0dce3605db2fe)
2013-08-12 16:55:29 -04:00
Waseem Daher 067bd390ac Remove kiosk mode.
We instead implemented the ~desired functionality here using the
API and a bot to make a totally read-only, static, slowly-updating
view into the Zuliverse.

This is the moral equivalent of reverting deb035b4c702fcdb0e660ed549fe74c682abb6d9

(imported from commit 9d743fe82f197b37f005e5a038f77cc4b8566024)
2013-08-12 16:19:53 -04:00
Waseem Daher f44176020e kiosk: Suppress user-info popover.
(imported from commit bda1714a49ea0cfa4ad0ec6447c7bb3fcf8b866b)
2013-08-12 16:19:53 -04:00
Luke Faraone 0cb741d7cc Removed confusing ALLOW_REGISTER setting.
ALLOW_REGISTER was no longer being used in determining whether you could
register for the app, so I've removed it to avoid additional local-dev /
production issues.

This closes #1613.

(imported from commit c928c6d350602d35f745ae1e60d734e4567885fc)
2013-08-12 16:16:26 -04:00
Luke Faraone f3c8806d30 Allow open realm signups with non-real-user MIT addresses.
This allows me to use a mail alias with CUSTOMER3, and closes #1671.

(imported from commit 581d1145fb112b9d35ad522fa06f81a25b4b8d3b)
2013-08-12 16:16:24 -04:00
Luke Faraone cb2e993393 Allow any user with a @mit.edu to register for Zulip.
We add a new validator that ensures that people who sign up with @mit.edu
addresses are in fact MIT users.

This closes #1612.

(imported from commit 1e30794b1615dd57cb0e367d1fa186a877253357)
2013-08-12 13:09:20 -07:00
Luke Faraone 368ace069c Use PyDNS instead of shelling out to `host`
On Debian systems, this is found in the `python-dns` package.

On OS X and others, install "pydns" using your Python package manager.

(imported from commit 17827d0a1d3d72b12945df5563295a1573bfa1ed)
2013-08-12 13:09:19 -07:00
Zev Benjamin 9c8a9ac947 Correctly return the message id for already mirrored zephyr messages
This was previously causing us to generate a traceback every time we
hit a duplicated zephyr due to CC'ing.

(imported from commit 240e1559655d0166dcd864e84649ab97b87a29ad)
2013-08-12 15:49:19 -04:00
Allen Rabinovich fb0d038b77 Make more space for the 24-hour timestamp
(imported from commit d1e145e8b6b6f3fb62732c0d59311cc47bbcf9e5)
2013-08-12 11:54:47 -07:00
Steve Howell 878ee2b3fd Move Filter class to filter.js from narrow.js.
1) The class Filter now lives in its own module.
2) The function canonicalized_operators() is now a class method on Filter.
3) The function message_in_home moved to filter.js and became private.
4) Various calling code had to change, of course.
5) Splitting out Filter helped simplify a few tests.

(imported from commit e41d792b46d3d6a30d3bd03db0419f129d0a2a7b)
2013-08-12 13:58:32 -04:00
Zev Benjamin 46eb90a238 referral: Clean up display of validation errors
* We now clear the validation errors when the input box is de-focused
* We make the left sidebar height accommodate the validation error messages

(imported from commit 4b39bfd3e8e8dd707722492a3f98967ee4ccf0ab)
2013-08-12 12:50:33 -04:00
Zev Benjamin 51beeba854 referral: Prevent empty form submission
(imported from commit cc012e84c21bc424adaaa79611f09415480a2ba5)
2013-08-12 12:50:32 -04:00