Commit Graph

4965 Commits

Author SHA1 Message Date
Kevin Mehall e80d1f4ad0 Another try at fixing tabbing into the compose box, Trac #1245.
Hopefully this time with fewer stack overflows. It sets the flag
that will break the cycle *before* triggering another focus event.

(imported from commit 5e3ed74f1eeab8a18e36525ae7c8f1f1c756eb58)
2013-06-14 13:19:10 -04:00
Zev Benjamin 501a58c8f9 Proxy the console object when the browser doesn't provide it
Some versions of IE (specifically on Windows Media Center PC, it
seems) lack a console object.  For such browsers, we just black hole
any output we would have sent to the console.

(imported from commit 30151c60a68a47990bf8f9be4476b716352befab)
2013-06-14 11:45:57 -04:00
Steve Howell acc338da0e Remove redundant checks that messages were sent by user.
When a user sends a message, it should be considered to be "read"
by that same user, but all that logic is handled on the back end
now, so we can remove some of the front end code related to
saying that a message is unread.

(imported from commit e4263f86c666882db42d7ae3d399196803d700cd)
2013-06-14 11:10:59 -04:00
Leo Franchi 3fd7c44331 Tweak desktop app JS to support Cocoa WebScript
(imported from commit 6b0c3442f92cffedbd210530479a13d4af5ea266)
2013-06-14 10:46:26 -04:00
Tim Abbott 8678148ad1 narrow: Simplify narrow operand processing code.
(imported from commit 9b353c3fab0d5c6532e844c9de45f10a7c6dc068)
2013-06-14 10:45:05 -04:00
Tim Abbott 6f57f62866 Convert tab_bar.js to not make positional assumptions about operators.
(imported from commit 4ae492951ec21b034b64be1296215862b25e44bd)
2013-06-14 10:45:05 -04:00
Tim Abbott 7642b5bf30 narrow: Fix positional assumptions about order of narrow operators.
This cleans up most of our blocks of code that assume in any narrow
that the only operators present are the ones of interest and that they
always appear in the expected order.

(imported from commit 038707aefbe125b0c14f823fa93472fd40302e20)
2013-06-14 10:45:05 -04:00
Steve Howell 83c80e1ba5 Change ? to & in gravatar URL query string.
(imported from commit f12738d1f8dc5b367eee32240ac0a29fb6255d1e)
2013-06-13 17:26:09 -04:00
Steve Howell 4093021f97 Stop polling for gravatar changes after the first update.
This is essentially a bug fix.  It was pretty clear that the
original author intended to stop polling once the gravatar was
updated, but they checked for the updated flag before the callback
completed, instead of inside the success callback, so it wouldn't
stop polling regardless of the update.

(imported from commit 7998c6890a26a008810b8a6d8e7998a53c6e175d)
2013-06-13 17:24:05 -04:00
Tim Abbott cbbca8319b Restart Tornado _after_ moving the deployment symlink.
Otherwise we end up running Tornado against the _previous_ version of
our code!

Testing of using supervisorctl to stop and then start a process shows
it takes about the same amount of time as doing a supervisorctl
restart, so there's no reason not to split the two commands apart and
make it super clear that nothing is running at the time that we move
the deployment symlink.

(imported from commit c38049da2bfc9fa94320a32dbf3240d1fcba67f7)
2013-06-13 16:32:23 -04:00
Tim Abbott deb89a9c9e Fix display of invite-only streams in new design.
(imported from commit 9960acc7a5c9415c137a36b2e0ac8296346e922b)
2013-06-13 13:09:22 -04:00
acrefoot 9e8b997508 Set sidebar_li attribute when updating stream colors
Before, sidebar_li, used in rebuilding the streams list
during a sort, was set to some HTML rendered from a template.
Now it's set to a jquery object that is updated when the DOM is
updated.

This resolves Trac #1310

(imported from commit ba96d9da4deebf2f674f2c093e81b3f0032a3fe4)
2013-06-13 11:31:35 -04:00
Leo Franchi c97ce3a082 Handle unsubscribing from not-in-home-view streams gracefully
This change makes it so we now keep track of full stream information
for both subscribed and unsubscribed streams in our frontend. Previously,
any unsubscribed streams had no associated data.

(imported from commit c445b19abe11c43c710c264fffcf3af5097deb6c)
2013-06-13 10:06:35 -04:00
Leo Franchi 625f8427e6 Return both subscribed and unsubscribed stream information when listing streams
(imported from commit 0aee84712eefd93aebc1041b371e471182eb7e9b)
2013-06-13 10:06:34 -04:00
Leo Franchi 969e0dd827 Clean up subs.have by splitting it into logical pieces
(imported from commit 0fe55aa62ccc95cae5c9aba565b0e4c04692fb46)
2013-06-13 10:06:34 -04:00
Zev Benjamin a9e4441bee [manual] Serve static files from the same location across prod deploys
This only affects DEPLOYED installations.

This does not take care of removing old versions of static files from
that directory.  The problem is that staticfiles is clever and
doesn't copy files that are already there, so we can't depend on
mtime for detecting which files we no longer need.  Hopefully that
won't be too much of a problem for now.

(imported from commit 4341460dd5bc6544086fd445014ebdac58192910)
2013-06-12 17:46:38 -04:00
Zev Benjamin 614b5396a6 Collect static files directly in the location that will be served
We exclude the original source files for minified files by using a
custom Finder.

(imported from commit a6a25eb6146da53167b71c6d1c44588f75966059)
2013-06-12 17:46:38 -04:00
Zev Benjamin 33fed064e2 Prepend the minified static file header using a custom Storage class
(imported from commit 2b67a6d94de1693bdb8a91f455b92375692f4c41)
2013-06-12 17:46:38 -04:00
Tim Abbott 19d8cfd657 puppet: Properly configure nginx service and disable default site.
(imported from commit 4c526c9333445e2575a85d1e90ccc134717f19f6)
2013-06-12 17:19:33 -04:00
Tim Abbott f0f8ce957a humbug-puppet-apply: Pass through arguments like --noop to puppet.
(imported from commit 3ec5c1402acd7910da399f420290c0269a12c525)
2013-06-12 17:19:33 -04:00
Tim Abbott b762067144 Puppetize Nagios user and ssh configuration for client systems.
(imported from commit 21a350979dc5d0e30b83e33fbc54cc5898755fdc)
2013-06-12 17:19:33 -04:00
Kevin Mehall 9ce86cbad6 gitignore memcached_prefix
(imported from commit ef0190c66c074fabb81a8b62e61a2627e33dbcf2)
2013-06-12 17:16:37 -04:00
Luke Faraone 2d0e803799 Make an audible notification through the desktop bridge if possible.
(imported from commit fefaf528f6cc9da3f124da15c25f41211b394b12)
2013-06-12 17:06:42 -04:00
Allen Rabinovich a222efff66 Fix overflow in stream list and clean up dropdown toggle.
This fixes Trac #1328.

(imported from commit 497147d71c529d0fcfdcb9199c850823b1a4778d)
2013-06-12 16:35:48 -04:00
Waseem Daher 2927b3c3b6 Replace "info" with "chevron down" for message context.
(imported from commit a12d3ce9adfe6b3c019f252f9361a9f6da59ebaf)
2013-06-12 16:35:36 -04:00
Waseem Daher 275d851c56 Draw our left sidebar dropdown arrow in a more reasonable place.
It was previously way way too indented.

(imported from commit c40980451a8851321496c744d379b0d95e19a0f8)
2013-06-12 16:35:36 -04:00
Waseem Daher fda6bfdd4e Make skinny navbar gravatar more consistent with our visual styling.
(imported from commit b9a84dd490bddbdfea85668ad1fcf3c29da2c837)
2013-06-12 16:35:35 -04:00
Waseem Daher 9d62c49c83 Make left sidebar gravatar more consistent with our visual styling.
(imported from commit 0a859184d89fbcfb3ab4e7311f3b86a2f9d89d88)
2013-06-12 16:34:59 -04:00
Allen Rabinovich b7694e5109 Widen the message feed.
(imported from commit 76816ff7b43748d4a16c4b7a5def5ec68262dec3)
2013-06-12 16:34:18 -04:00
Allen Rabinovich d729cb49ce Replace some of the skinny navbar glyphicons with vector icons.
(imported from commit c94a7fa3e0cd303933b2a3824e9f9526b891fa5d)
2013-06-12 16:34:17 -04:00
Allen Rabinovich 743ccda154 Change stream/subject separator to a right chevron (>).
(imported from commit ae64fdc2cac57857431b8962feff40c7be3aaa7f)
2013-06-12 16:34:17 -04:00
Tim Abbott a0bdefb71d Fix 'undefined is not an object' traceback with update_active_status.
This seems to only happen with Firefox for some reason.  We've had
similar issues with other ajax endpoints, so this is probably not the
long-term solution, but I'd like to get this traceback fixed now.

(imported from commit aa552fb56882ae2c73e352c7baf9532a88c5cf0a)
2013-06-12 16:21:10 -04:00
Tim Abbott 34904c51a3 Sync the local user's API key into test database.
(imported from commit 999334fea0d922ced506b454163e640a35a30509)
2013-06-12 16:21:10 -04:00
Steve Howell d740d7c082 Show user-uploaded avatars on the website.
Show user-uploaded avatars on the website for users who have
UserProfile.avatar_source == 'U'.  (Continue to show gravatars
for other users.)  This includes the home page, the visible-phone
div, and the settings page.

This fix does NOT address a few things:
* There is no GUI to actually upload user images yet on the website.
* The !gravatar syntax in bugdown will continue to show gravatar images
  only.
* We are not changing identicon behavior.

(imported from commit 9f5ac0bbe21ba56528048233aab2430e4dd431aa)
2013-06-12 15:34:51 -04:00
Steve Howell 01372b1f9a Configure S3 buckets for avatars.
(imported from commit 1da135a8cf62e204440e14043e148716ec103c51)
2013-06-12 15:34:51 -04:00
Steve Howell ac7c8d18bf [schema] Add avatar_source column to UserProfile.
(imported from commit b4a6788002851b2e8b6f7be61b11af57378c0ee6)
2013-06-12 15:34:40 -04:00
Kevin Mehall a2dc6eb082 Don't hide the compose error immediately after showing it. Trac #1360.
(imported from commit 45d1bc7f771d553d370fcab837abf70aec4f4c11)
2013-06-12 14:26:36 -04:00
Steve Howell e753fd8088 Simplify setup for Humbug internal users.
I moved the list of internal users out of populate_db.py and
into settings.py, and I removed some dead code related to sqlite.

(imported from commit 1e080716dc296c05f51cdd229911082469de64bd)
2013-06-12 11:42:18 -04:00
Leo Franchi 8f75beb9ec Shrink and move connection error to sidebar
(imported from commit 08d7a0106a1faeece81398eeb6a7aa5d8b55ef23)
2013-06-11 17:33:17 -04:00
Leo Franchi 71e14674aa Be more judicious in our showing of errors
Don't show an error banner for any uncaught JS exception, as often the app
will continue to work fine, and there's no way to dismiss it other than
reloading the page.

Also, don't show a transient "could not connect to humbug" error if
the check-for-messages-in-narrow request fails.

(imported from commit 2c634ba088b58c17fa5b2e3353b0589d40b8e357)
2013-06-11 17:33:17 -04:00
Kevin Mehall 5b4493926f Clicking a message that is being edited should not open the
main compose dialog for a reply.

(imported from commit 0a91b3c2ddba12ec33daf993dd13c1e7a7f4065c)
2013-06-11 13:53:59 -04:00
Kevin Mehall b906112c87 Use buttons instead of links in message edit form for the correct
default keyboard behavior. Trac #1322

(imported from commit 2724022f7aa8286b72145dd442c93501f201f6ef)
2013-06-11 13:53:59 -04:00
Kevin Mehall 1989974d43 Fix comment to describe the file it's in rather than a file it may
have been copied from.

(imported from commit 889b5d421c43c62d17a108ae112eff4b7807539f)
2013-06-11 13:53:59 -04:00
Kevin Mehall a08ce5023c Revert "Start compose when box gains focus, whether by click or tab. Trac #1245."
It makes the stream and subject sometimes not auto-fill when replying.

This reverts commit 86603aefbbcd5f766b0c397583483810948046de.

(imported from commit 934e991566fa7a082ab8e2ba661ec973bce46b85)
2013-06-11 13:33:17 -04:00
Kevin Mehall 63babd642c Start compose when box gains focus, whether by click or tab. Trac #1245.
(imported from commit 0c67f6b4eb2387b5e85bcff6d8ea9ed8889ffaea)
2013-06-11 13:17:43 -04:00
Steve Howell c2ab6428b8 Handle shifted hotkeys better.
Treat shift-space like page-up.  Let the browser handle
shift-page-up, shift-escape, and similar keystrokes.

(imported from commit 31d5c5eb1dd4af7228c5e7794fb4cffc4bd8e88b)
2013-06-11 11:49:53 -04:00
Steve Howell 19adec9d2c Make hotkey.js less error prone to modify.
I extracted get_event_name(), which should help isolate
the problem of identifying keys from the specific mechanics of
dispatching actions for given keystroke events.

(imported from commit 058c0749016dc17cce554788e10ccb32438e9dfe)
2013-06-11 11:49:53 -04:00
Leo Franchi 76c9e27a76 Disable composebox experiments on prod
(imported from commit a553320e7d775978ee31af0f8920cbfeb705f5cb)
2013-06-11 11:41:34 -04:00
Tim Abbott 96ad1dd379 Properly escape stream/subject in left sidebar recent subjects narrows.
(imported from commit 4154d0dcd69af66b3a6bb07678c64e5eb39e6b07)
2013-06-10 17:26:21 -04:00
Kevin Mehall da11e2e8df Make error messages visible (trac #1294).
ce4e860a introduced CSS `.alert{display:none;}` because alerts are
always included in `/signup/` and shown by JS. Use a new `.alert-hidden`
class for this purpose to avoid breaking other pages.

(imported from commit 199ba35dd3356bd4093aac2a54181331b3993ee8)
2013-06-10 16:42:43 -04:00