Commit Graph

915 Commits

Author SHA1 Message Date
Tim Abbott 5d4bcb7f3e zephyr_mirror: Made debugging output more brief.
(imported from commit 521b9631ddb9c1ec9ea8f37574591d3449a76336)
2012-09-28 15:57:51 -04:00
Jessica McKellar 1adb10d1ae Allow copying and pasting from zephyrs without triggering a compose.
(imported from commit f98a14155904dda11d85ed81acee783494377e4d)
2012-09-28 15:27:39 -04:00
Waseem Daher 1616782f8a Personal message styling, take three.
From the "Don't use black" school of design.

(imported from commit 7362208f2cf7967fd1186ed29e86c5544da8b991)
2012-09-28 14:48:11 -04:00
Tim Abbott 8ffba78d89 Wrap messages sent back to zephyr.
(imported from commit 7c307a2fe461e94b2cf96d11511249a9f73dbe55)
2012-09-28 14:39:50 -04:00
Tim Abbott fd944c3c81 zephyr_mirror: Automatically add Tim's python-zephyr to sys.path.
(imported from commit 045d24c6c5c04747287f47f14540dc0dc9b4295e)
2012-09-28 14:39:42 -04:00
Waseem Daher d13dd0a953 Restyle personals, attempt #2.
(imported from commit a8bdf6ad1d7e3dd24b8d42b0f46472ba2db15900)
2012-09-28 14:34:09 -04:00
Waseem Daher ecfed97bc6 Attempt at restyling personals for more emphasis.
(imported from commit 28adc1c6144632bf973272b096a22d8315648502)
2012-09-28 13:32:59 -04:00
Waseem Daher 9acd5b57c9 Provide framework for styling personal message differently with CSS.
Basically, we add personal-message on to every div, etc. if it's
a personal, and we'll use CSS to style them differently.

(imported from commit d9b7b8e3b422bcf921c8c61ce794cc055edcbdae)
2012-09-28 13:32:59 -04:00
Waseem Daher 1cb8947e86 Clean up zephyr template slightly.
(imported from commit 999e6261785a0714bf72a8fe8f2c05c20cf59db9)
2012-09-28 13:32:59 -04:00
Keegan McAllister b930e0fad8 gitignore text fixtures
(imported from commit 25b03147b924c32dbf660aa2b6cc7972dd955c56)
2012-09-28 11:55:43 -04:00
Jessica McKellar f2b808a976 Now that mouseover doesn't select, show_email needs to take an ID.
(imported from commit dfa737e78da0772e99fda34318ed879896fb5655)
2012-09-28 10:59:39 -04:00
Jessica McKellar 9cbdbc4893 Don't update the selected zephyr on mouseover.
But do keep the pointer on the screen as you scroll, and smoothly
scroll all the way up to the top or all the way down to the bottom.

(imported from commit 6acad2a16339ee5eeeebd62a853000c21e4b7152)
2012-09-28 10:59:38 -04:00
Jessica McKellar bf7e9f55fb Add jquery-mousewheel library.
(imported from commit 4b970283b7fb13e64bfc508cc66d4b7a9fcd62dd)
2012-09-28 10:58:52 -04:00
Tim Abbott b872536621 Remove the tabbott-test4 handicap on syncing class messages.
(imported from commit dc6545ec7da73bde72d16b752b69132e4a086ad9)
2012-09-27 17:54:47 -04:00
Waseem Daher 1c63c2b19c Compose box UI experiment.
(imported from commit cf95f39da1a8c6558d2a3c3629efe425e274e80d)
2012-09-27 17:39:54 -04:00
Tim Abbott 8b87ba04ef Fix apply_markdown option in new get_updates_api function.
(imported from commit 971010fff6408d691c5942c5a651c58413c2c091)
2012-09-27 17:39:28 -04:00
Tim Abbott b43dd303b6 Use tornado for new /api/get_updates query.
(imported from commit 84b85fc5bb0de4144fde00ea13d14f74b1dd9bd1)
2012-09-27 17:37:05 -04:00
Tim Abbott ccee128d61 New prototype zephyr mirroring system with bidirectional support.
(imported from commit cfb95ae8d0a241e7c068106e561dc18e16461596)
2012-09-27 17:33:21 -04:00
Tim Abbott f7b8d371cd Make the last_received parameter optional.
(imported from commit 001806356286cac85f79f521a48c09686d6f6bb6)
2012-09-27 16:42:15 -04:00
Keegan McAllister 3429e77178 Don't display the "Loading..." indicator if the user has no messages
(imported from commit a050218ccde3b82c570a9373cbab5e3fb22abcde)
2012-09-27 16:15:10 -04:00
Keegan McAllister 4e846f9059 Change the home page back to the register form, but go to login on log out.
This reverts commit 5c21c3b44ebc69377177ceb50b43dfd560f0b4d1.

(imported from commit ef983386ee11cbe3a75a7f0555f81ac71240c4c0)
2012-09-27 15:54:33 -04:00
Keegan McAllister 20240d869c Rename get_updates_longpoll to get_updates
(imported from commit 15635904584b324bdfa1414caea12c3bc4ce54c8)
2012-09-27 15:46:36 -04:00
Waseem Daher cd296da113 CSS cleanup.
(imported from commit a7a13e57cf43368d66e94d01ef25ec14d0c15657)
2012-09-27 15:40:11 -04:00
Waseem Daher fbf7f7bc07 Restyle compose window slightly.
(imported from commit 390dcdfade8ceab5d20b29271a79476d74bb2525)
2012-09-27 15:40:11 -04:00
Waseem Daher 42ac10b9c3 Restyle narrowbar slightly.
This removes the duplicate 'x' and '<-' issue that Tim identified
previously.

(imported from commit 0572978731d12eb6689edec105f8e0e35c74f0e0)
2012-09-27 15:40:11 -04:00
Tim Abbott 5a80f5248a zephyr_mirror: Truncate instances for now.
(imported from commit 43487c86c4847baba4500665a735547c9d8e8098)
2012-09-27 15:17:53 -04:00
Tim Abbott 1a5c18b12c Redirect not logged in users to the login page, not the signup page.
(imported from commit 5c21c3b44ebc69377177ceb50b43dfd560f0b4d1)
2012-09-27 15:01:30 -04:00
Tim Abbott 6394a54db7 Clean up the forge_zephyr workflow.
(imported from commit c559cfde267bc537cf554705a9750dcfe76f88ce)
2012-09-27 15:01:30 -04:00
Tim Abbott 699e05383f Log messages and restore them with populate_db.
(imported from commit 959f038a736e48d32819bc04bd054632a2e911c6)
2012-09-27 15:01:30 -04:00
Tim Abbott 2f4a96e18d Use better random generation of shakespeare lines.
(imported from commit f979a8476f6fd925b9041e15dd38a9c261341be9)
2012-09-27 15:01:30 -04:00
Tim Abbott 8ffd91a6ee Move new user/class creation into their own functions.
(imported from commit 192533c4e2bc55a26e7ea70a32e7d1f64d2ed8c3)
2012-09-27 15:01:30 -04:00
Waseem Daher 0f8f60f30d Round corners on gravatars.
(imported from commit 858bfa920f42e366daa2fa4422a20e41ff11238e)
2012-09-27 14:56:53 -04:00
Luke Faraone b58e2ee575 Enable j/k keyboard shortcuts
(imported from commit 1a172fc6d49506060534ffc52a27160ca0bbca72)
2012-09-27 12:32:46 -04:00
Keegan McAllister d38d575c41 Markdown: disable "safe mode"
We're already escaping HTML input.

(imported from commit 02b5f1033d102a5cb3df89577ec0445202ce7071)
2012-09-27 12:31:09 -04:00
Tim Abbott e65f45d64d zephyr_mirror: Remove markdown import.
(imported from commit 0e7198b9bce5f0f44960918e543c87d4d9165ac1)
2012-09-26 18:26:14 -04:00
Keegan McAllister 9323abddd9 Don't jump the pointer if the user already selected a message during load
(imported from commit 69a3f11059ee4764f1625df7774ff611fff99537)
2012-09-26 17:53:06 -04:00
Keegan McAllister 21d55c152f get_updates_longpoll: Send at most 400 messages at a time
Give the user some messages right away; keep their browser looking active and
responsive.

(imported from commit 435dda62aa47a16114431ae7b19aa92e005d699d)
2012-09-26 17:53:06 -04:00
Luke Faraone 94fbb8b6c1 Remove references to HASH_SALT / MD5_SALT in the settings page.
(imported from commit a474454ce5aa8d11a6a0bcc0f0828b54f5dea81f)
2012-09-26 17:36:25 -04:00
Tim Abbott 9180f6d381 Remove unicode debugging prints.
(imported from commit 111a7e4c78537d4986c8b43c319d3c560f3cecb6)
2012-09-26 17:30:35 -04:00
Keegan McAllister 911f4306db Optimize get_updates_longpoll in the same manner as 805a944
(imported from commit 819826d34ef6a0adbf619d4bf5e740c1838c896c)
2012-09-26 17:23:18 -04:00
Keegan McAllister 35dcc04822 Add an interim "Loading..." indicator
We will probably re-style this eventually.

Also, the animation freezes during template rendering.  And the HTML is a "give
up and use tables" situation.

(imported from commit 847374b616dc7ce909834f23d5ed9522aa457254)
2012-09-26 17:11:00 -04:00
Keegan McAllister c3943ac0c2 Import spin.js
(imported from commit 65c466651a07331e399108f1061c0239b2b8a340)
2012-09-26 17:11:00 -04:00
Keegan McAllister 1e02fc140b Make add_messages do everything relating to message adding
Now that it's only called from get_updates_longpoll, we don't need to break out
specific parts that are only needed there.

(imported from commit 60d1cb25d0044ed1b2325d977b869617587e6a0f)
2012-09-26 17:11:00 -04:00
Keegan McAllister 017c5e87bd Update autocomplete only once per batch
...not up to three times per message.

(imported from commit 1da13c0bc1311627f1bcdce6719097836d9616ca)
2012-09-26 17:11:00 -04:00
Keegan McAllister 21d76b3398 Don't send instance_list in index.html
It gets populated from the zephyrs we receive in the initial get_updates_longpoll.

(imported from commit 83c773d211ea323233a986ccf12fd797236c08a5)
2012-09-26 17:11:00 -04:00
Keegan McAllister 12e458df80 Get initial messages from get_updates_longpoll
(imported from commit 2bb9c51409735abe23bad758338b13121aea4c99)
2012-09-26 17:10:59 -04:00
Keegan McAllister ee75f7ae8d get_{next,prev}_visible: Handle undefined argument
(imported from commit 07956fb7595e8c39fd052aaf0a16df4c3e574f8d)
2012-09-26 17:10:59 -04:00
Keegan McAllister bffae8d550 Set width on the pointer for non-selected messages
This prevents a visual artifact if the pointer disappears for whatever reason.

(imported from commit ee8fbf6d8480b78d0922da05c87bc9f4c0658402)
2012-09-26 17:10:59 -04:00
Tim Abbott 5e318bc961 More unicode debugging.
(imported from commit 9ec3ca2a6c3812055ace4b7c2a3348bb586e8696)
2012-09-26 17:08:13 -04:00
Tim Abbott bdd6e23201 Remove unnecessary debugging print statement.
(imported from commit 252e82f54e481b6c874151f1179135c8bad08510)
2012-09-26 16:58:52 -04:00
Tim Abbott 4458c8f3d7 Fix unicode issues.
(imported from commit 542dc67a3d2e2d44ef212354b38e4f8212ddef64)
2012-09-26 16:46:32 -04:00
Luke Faraone 05e64f904d Use .cleaned_data rather than sanitising identifiers twice.
(imported from commit c691e010f94e623706167a91ccfd505fae02f609)
2012-09-26 16:42:10 -04:00
Luke Faraone 57810d41ac Add a custom validator to ensure email uniqueness, include ommitted fields.
Previously no check was performed to ensure that the same email wasn't used
to register twice. Here we add a validator to perform that check.

We also noted that the domain field was omitted, but checked by a client of
this class. Therefore, we add it directly.

(imported from commit 1411bf0adeb3cd048278376b059a26a0da4c54df)
2012-09-26 16:42:10 -04:00
Luke Faraone 9cf6bc17f7 Display validation errors produced by jQuery.validate in a special div.
This way we don't push things around on the screen.

(imported from commit a8bbe6660e3089676fc0c169f540537fdff7f4fe)
2012-09-26 16:42:10 -04:00
Luke Faraone 873147330e Make the big "Humbug" title a link.
(imported from commit af16043a1562a7a31efbd6f21d626c90d4d277be)
2012-09-26 16:42:10 -04:00
Luke Faraone ae6cfee818 Implement a new login redesign per Waseem. Be a little cute about it.
Split off some content previously placed into base back into index.html.
Move content previously localised in accounts_home to a new content_base
for use in the non-app version of the site.

We wrote up some copy and styled it according to taste.

In our new signup form, we no longer collect a short name and instead
extrapolate from the email.

(imported from commit cd734b13a4bda7f304129379524c4cc96b77b24b)
2012-09-26 16:42:10 -04:00
Waseem Daher 8ef40a9654 Experiment: Restore gravatars (this time with real addr).
(imported from commit 0e1cc56286264c939864ac8b398f206e27d56841)
2012-09-26 16:34:24 -04:00
Waseem Daher deb5cc771a Restyle compose box to be more consistent with our experiment.
(imported from commit a035c82e83a0bb1a2eea24de18044e3022ecdde5)
2012-09-26 16:19:01 -04:00
Tim Abbott df01b016cb Display short_names rather than email addresses for huddles.
(imported from commit 6509305f1b0ee90cfe5c93c74e03350a557a0cc5)
2012-09-26 15:32:35 -04:00
Tim Abbott 5a1c7c4903 zephyr_mirror: Improve unicode handling etc. for forwarding zephyrs.
(imported from commit 75dda82a0abd0c8643f13fdb0111c6dd7e31f746)
2012-09-26 15:31:59 -04:00
Tim Abbott c11f35a749 zephyr-mirror: Testing support for syncing back to MIT.
(imported from commit 4d08311f72c296906035f06e635a60ec99a1a6ab)
2012-09-26 15:27:04 -04:00
Keegan McAllister bec1b55930 Use switch/case in respond_to_zephyr
(imported from commit 4afef9103075a00772f3c0e29d634a28cb5d5b5a)
2012-09-26 15:25:46 -04:00
Keegan McAllister d8714ae3ff Use switch/case in add_zephyr_metadata
(imported from commit f5a2357a4359d3e16d22a0c561561c5f54b16538)
2012-09-26 15:25:45 -04:00
Waseem Daher 6c57d071cc Experiment: Hide gravatars.
(imported from commit ffd1da1dbb97eb6a701e4d3cdf65abd888fc54c7)
2012-09-26 15:17:27 -04:00
Waseem Daher 96d2565d99 Smaller space for classnames.
(imported from commit debc4d42274bf8f2a7041a8575591f41e7b2bc4f)
2012-09-26 15:17:27 -04:00
Tim Abbott 62f6cd77d6 zephyr_mirror: Hopefully fix unicode decoding issues.
(imported from commit 48d88b09b3fe8bc9d6328477ef2bd089ab77e8e6)
2012-09-26 14:51:15 -04:00
Tim Abbott c8220ee057 Don't store the post-markdown HTML in our database content column.
(imported from commit bb81e84acc04ea0930be1026149618fbb60174fd)
2012-09-26 14:51:14 -04:00
Waseem Daher 97b20a8cb6 A new Waseem design candidate.
(imported from commit 0acb3ef0e37752178d4809d77d0281568a75b98e)
2012-09-26 14:29:17 -04:00
Tim Abbott 293c8dcff8 Fix recent display recipient change.
(imported from commit d0f7e7313437a510150f941b0464c972b34a8847)
2012-09-26 13:30:06 -04:00
Tim Abbott d374312509 Use email address for huddle display recipients.
This fixes replying to huddle messages.

(imported from commit 8e6f9ce7d690c926b19c50016ec972d767428994)
2012-09-26 13:24:08 -04:00
Tim Abbott f929593263 Don't try to use in-memory storage on model objects.
It doesn't work.

(imported from commit d5f95c345061e63b12fa12f2a0219f8e3b2e0380)
2012-09-26 10:44:47 -04:00
Tim Abbott 62e2838c58 zephyr_mirror: Rename send_zephyr to send_humbug.
(imported from commit e95b430ee46cb681661b0dd458530150317fe4c7)
2012-09-26 10:44:47 -04:00
Jessica McKellar f60e9de1f2 Linkify URLs in zephyrs.
(imported from commit df7e355648d2c4d6319de049933547ed96402fd8)
2012-09-26 10:33:33 -04:00
Jessica McKellar b2707b39ee Add javascript-linkify library, for linkifying zephyrs.
(imported from commit 90af0192b37bbebbf56d5e7c50f182485ddbca10)
2012-09-26 10:33:33 -04:00
Keegan McAllister 4b19511423 Fetch instance list using a join rather than querying every recipient
(imported from commit d2de941083485f11ea8222451fb32bafe42987f6)
2012-09-25 19:26:06 -04:00
Keegan McAllister c123b5225e Fetch Zephyrs from UserMessage using a join rather than one by one
Cuts about 4 seconds of load time on the current live site.

(imported from commit 805a9444b7685fef259923b208ad734276a05de3)
2012-09-25 19:21:30 -04:00
Keegan McAllister 9efb63f6b8 Display SQL queries when DEBUG = True and URL like /?show_debug=y
(imported from commit dc3efd7aee2975f7d007296ba1ee1f72b262c493)
2012-09-25 18:40:59 -04:00
Jessica McKellar fde0eda122 Indicate that zephyrs are clickable by changing the pointer on mouseover.
(imported from commit 0eb2bb3de3a0fe2664a7256bc06ea4c2fc3c4d31)
2012-09-25 16:18:25 -04:00
Jessica McKellar 455b9863d5 Always clear compose inputs on New Message.
(imported from commit 7c32f8bdc2366695c488563698c282d2f25b65a1)
2012-09-25 13:39:23 -04:00
Jessica McKellar 14ceb7e888 Add hotkeys for composing a new message and toggling betweeen message types.
(imported from commit 5778b12d204f803a4c46b0f32ec19d9410108b36)
2012-09-25 13:00:43 -04:00
Jessica McKellar 810229288b Track and be able to return to your high water mark.
(imported from commit 52a1ce8c84ad3f4eea16b7abaf075ebffc794c9a)
2012-09-25 10:04:34 -04:00
Jessica McKellar 6685bfdd10 Add page up and down arrows to the zephyr list.
(imported from commit e66dfc4eef150e5b84d98ab7346d4d66852699b3)
2012-09-25 10:04:34 -04:00
Keegan McAllister 613e042b7c Get rid of current_view_predicate
Use 'narrowed' for the same role.  (Functions are always true-ish in
Javascript.)

Also, don't add messages to the narrowed table if not narrowed (my bad).

(imported from commit 31707d39abb97472a36d3816c62482e39e732fdc)
2012-09-24 18:42:04 -04:00
Keegan McAllister 877954aa55 Render all new zephyrs with a single template invocation
(imported from commit 13803e0e96901d129d4aefcd5fde63548deb4dc0)
2012-09-24 17:45:52 -04:00
Keegan McAllister 934e3461df Split add_to_table into preprocessing, templating, and postprocessing
(imported from commit ef17ff33f4496fcf619170bda1a46f14734d3e43)
2012-09-24 17:45:52 -04:00
Keegan McAllister 4eae1981f2 Clean up CSS
(imported from commit 406a0de68e43ae5538289ddd1358b03ee91813c2)
2012-09-24 17:45:52 -04:00
Keegan McAllister 6fb5fc57ce Change bad CSS class names
(imported from commit 962f91a593b4ca65bd7aae7d71117fc159c2627a)
2012-09-24 17:45:52 -04:00
Keegan McAllister 6ccf3818d6 Rename add_to_tables -> add_to_table
It only adds to one table.

(imported from commit 7c106331527ceaa056b23214be3c981029c9c005)
2012-09-24 17:45:52 -04:00
Keegan McAllister ad0bed506a Add messages in batches
Not immediately useful, but it will help us speed up templating later.

(imported from commit 48cd554b322eede506b0cbcd4b26ef427cb2c804)
2012-09-24 17:45:52 -04:00
Keegan McAllister 40ac817f4e More JSLint options
(imported from commit a5b7aea68de5403c3f9deb7220f05102de971747)
2012-09-24 17:45:51 -04:00
Keegan McAllister 7724e19a49 Remove ICanHaz.js
(imported from commit 799414525e1566d1bc4641b9663cd7bc306d29f2)
2012-09-24 17:45:51 -04:00
Keegan McAllister 4793cee888 Switch to Handlebars templating
Benchmarks [1] show it's much faster than ICanHaz, though we will have to work
to realize those gains.

[1] http://jsperf.com/jquery-template-table-performance/77

(imported from commit b037a6f15e27fd49af88f814ff949811dbcd48f2)
2012-09-24 17:45:51 -04:00
Keegan McAllister efe4410f9f Import Handlebars.js
(imported from commit efe15705adc034388bd240a37443efbbfb29d430)
2012-09-24 17:45:51 -04:00
Tim Abbott 3b817ecc1c Actually fix deduplication of synced huddle messages.
(imported from commit 63e7fbdc89e1271751f73d20f2185a048b56dd60)
2012-09-24 17:38:21 -04:00
Tim Abbott a3a027f8c7 Another attempt at fixing huddle message deduplication.
(imported from commit 3b0a06d7bee7eacbe4eeb8ff6095bdcd5ce17e95)
2012-09-24 16:34:29 -04:00
Tim Abbott 0be4ce05a6 Another attempt at fixing huddle message deduplication.
(imported from commit 6d48a3488b5ca0b3fc923386d5edfdd8c002112d)
2012-09-24 16:33:50 -04:00
Tim Abbott 1f6e09834b Another attempt at fixing huddle message deduplication.
(imported from commit 9b271d8bcb4ad902aaf2f21b73fc8536840262df)
2012-09-24 16:33:24 -04:00
Tim Abbott 2a1503fd35 Hopefully fix huddle message deduplication with MIT sync.
(imported from commit bccaa67d02e72b1c444d39b019d5bd87800b1441)
2012-09-24 16:30:24 -04:00
Keegan McAllister b21d197418 Factor out same_sender too
(imported from commit 831a24817cd4669507bac9797abf30d644c6a3d9)
2012-09-24 15:43:28 -04:00
Keegan McAllister 67349eca33 Factor out the test for whether two messages have the same recipient
(imported from commit a8cc4858d1eb7933c437adb0dd4c9a612c40e389)
2012-09-24 15:43:28 -04:00
Tim Abbott 11e5e8785d Preparation for syncing messages back to MIT.
(imported from commit 551b697366702de93579de259a9bc644be8d66ec)
2012-09-24 14:31:40 -04:00
Jessica McKellar d6a6516687 Have the pointer stay in view as you page up/down.
(imported from commit 72b58f30d82b103542f53ebeff2363407c4997b6)
2012-09-24 14:14:37 -04:00
Jessica McKellar b276596855 Add page up/down support for all tabs.
This does not yet try to keep the pointer in view.

(imported from commit 865413ba70e271ed12d5cc45d13e56ff9a3275f9)
2012-09-24 14:03:18 -04:00
Keegan McAllister 2a96542e9a Clean up do_narrow calls
(imported from commit 51a694e3dbe7310127580e50fbac0a796f1b09c2)
2012-09-24 13:55:30 -04:00
Keegan McAllister 32f806c032 Save the current view "original message" implicitly in closures
There's no need to pass this around separately and store it in a global
variable.

(imported from commit bb464b1c87fcc9e97aa85a7d139186d4a7169674)
2012-09-24 13:41:22 -04:00
Keegan McAllister 0379d828e1 Don't store into zephyr_dict in get_updates_longpoll
add_message already does this.

(imported from commit 77e6ebf7c02794f6d4e0e9f8a42ecedc44d0402a)
2012-09-24 11:58:37 -04:00
Keegan McAllister 07e1314462 Rename initial_zephyr_array -> zephyr_array
We keep adding stuff to it in get_updates_longpoll.

(imported from commit be33421c9df16191112e5bcc7c4a476080d52859)
2012-09-24 11:58:37 -04:00
Keegan McAllister 2605f29988 Rename get_zephyr -> get_zephyr_row
Now that the primary data store is not these DOM elements.

(imported from commit c8f5b24ea1baf2ed69278fb0e8658a3bf0a85cd0)
2012-09-24 11:41:26 -04:00
Tim Abbott a8e83040e5 Add support for specifying per-user MIT subscription lists.
(imported from commit d6e91917c071e59b5611bfefe326ac47684299c3)
2012-09-24 10:51:49 -04:00
Jessica McKellar 703a1cd6d9 Add error handling for subscription AJAX requests.
(imported from commit 9ed019da01aaa85302000ad62441b85786c2c528)
2012-09-24 10:16:22 -04:00
Keegan McAllister f3aefde0df Simplify goto hotkey code
(imported from commit 2e424b488c82125b036d264baf66fdc3328be0f3)
2012-09-21 18:34:26 -04:00
Keegan McAllister 3f0a6b6087 Fix and clean up Home/End key processing
We had the wrong keycode for End, and much duplication of code.

(imported from commit 0aaa5ab45e45fc9d7209ec1768198abefc08dc86)
2012-09-21 17:55:17 -04:00
Keegan McAllister 4c45baa045 Refactor hotkey narowing
(imported from commit d1559cbe3505090085229271bdb7bc69060e43b2)
2012-09-21 17:55:16 -04:00
Keegan McAllister a3fcf3417d Move get_{next,prev,first,last}_visible into a sensible order
(imported from commit 80697ba55c1fb9bf52a4fffd2f15471b8892f07c)
2012-09-21 17:55:16 -04:00
Keegan McAllister f3ee3fa6eb Simplify get_{next,prev,first,last}_visible
Now that we have two tables, the adjacent zephyrs will always be visible.

(imported from commit a1ac000bfba32faea109d1b35a84fdd30ccc4891)
2012-09-21 17:54:11 -04:00
Keegan McAllister a53cbc9f36 Move hotkeys into a new file
(imported from commit a589cd4623c4707122d5d5936aa0bc555c38557a)
2012-09-21 17:52:02 -04:00
Waseem Daher d3bb97a21f Raise error when subscribing to an already-subscribed-to class.
(imported from commit bc946fb99e6982d37fe8403b9ade803c49b30687)
2012-09-21 17:47:58 -04:00
Waseem Daher f1aa17cf1d Change some URLs associated with subscriptions.
Put all the 'API'-ish URLs in the /json/ namespace so that
/subscriptions and /subscriptions/add, etc. can be real
user-facing URLs if we want them to be.

(imported from commit 1455a32d27e44547ab1874b6289243cb40c85dde)
2012-09-21 17:36:29 -04:00
Keegan McAllister f4483832b2 Force select_zephyr when narrowing even if id has not changed
Fixes a bug where the pointer would vanish.

(imported from commit 0ed950fbc3d5a8673b0bc62556f426cccb5a6459)
2012-09-21 17:33:00 -04:00
Tim Abbott 862ade7578 Use the real timestamps when syncing forged zephyrs.
(imported from commit e25e4c2656c6f442384c08934be68753f7ee7cb0)
2012-09-21 17:23:15 -04:00
Tim Abbott 1c03419cbf If other huddle recipients don't exist, make them.
(imported from commit 5b9d8faf67657dd2ecca117aef136bc2a03f4abf)
2012-09-21 17:19:58 -04:00
Tim Abbott 76c1dfc1ed Make home and end go to first and less messages, respectively.
(imported from commit f85b811f51227cd1ae113c119a430381230d141c)
2012-09-21 17:13:07 -04:00
Waseem Daher 230e725446 Allow spaces in classnames.
(imported from commit 9ef71240ee5e6e0ed9ca0b50d9461b539538b437)
2012-09-21 17:09:46 -04:00
Tim Abbott 919ddfdc31 Send recipient_id values to client and track them there.
(imported from commit 77446f7a226d8a26a287e069d08f28e4beb0b2e3)
2012-09-21 16:57:04 -04:00
Tim Abbott 12013cd7b7 Fix collapsing of huddle messages.
(imported from commit 31391a278f5fe70ab56379bf7cc3fad2d0663007)
2012-09-21 16:44:30 -04:00
Tim Abbott f960c21931 zephyr-mirror: Add support for syncing huddles.
(imported from commit 0709ca40c5510ed9dbf28c666cff96609e8d41c2)
2012-09-21 16:44:26 -04:00
Tim Abbott f9eed538f6 zephyr-mirror: Add support for relaying of personals messages.
(imported from commit d43eb3c3b0eadd2378155184d0c6556f6626e5f6)
2012-09-21 16:44:21 -04:00
Waseem Daher 5a164f19c2 Clean up subscription functions.
Now that 'manage_subscriptions' only removes subscriptions,
let's name it that. Also, since both functions now only
act on one subscription at a time, use them in the singular.

(imported from commit 52cfc7b36eb1533da7aec1bc3a6e460151a56da8)
2012-09-21 16:30:29 -04:00
Waseem Daher a27edbce7d Restyle subscriptions page.
(imported from commit 41339c5af38ae5ea4801fc1e23b7184c277145f3)
2012-09-21 16:04:44 -04:00
Tim Abbott 8be02ce8a3 Fix use of userprofile for user_profile variable in subs code.
All of our other views code uses "user_profile" as the local variable
referring to a user_profile object -- best to be consistent about
that.  We should also consider renaming Subscription model element.

(imported from commit 770cfad8258f016aef8c78c428e4499f5b12f300)
2012-09-21 14:47:40 -04:00
Tim Abbott ed46a453ba Add (mostly unstyled) settings page.
(imported from commit 492c5f498c2fec452e6c724555bc4a5a2c4c151a)
2012-09-21 14:47:26 -04:00
Keegan McAllister 85abb3f274 forge_zephyr: Convert email to lowercase
This fixes failing User.object.get(email=...)

(imported from commit e0d5097520c6a149031e6881ae25f4c5bb967918)
2012-09-21 14:11:34 -04:00
Keegan McAllister a68a3e7ab7 Get the just-created user from create_user
(imported from commit d709c99cc670aa1b0864c40b8c0d5e52b6c90340)
2012-09-21 14:01:43 -04:00
Keegan McAllister 0638c2aada forge_zephyr: fetch the just-created user
(imported from commit a269f30736f1873e6e4ed7202fcaa16c436299a8)
2012-09-21 13:56:20 -04:00
Keegan McAllister 08345098db Use truncated Base32 SHA256 instead of hex MD5 for usernames
There isn't a specific problem with using MD5 here, but there's just no reason
to use a hash function with serious known flaws.

We have to truncate to 30 characters for Django's username field.  Using Base32
instead of hex gives us twice as many bits.  This reduces the chances of a
collision (which are pretty low already) and also provides resistance against a
targetted attack based on some weakness in SHA256.  (There are better ways to
reduce a hash to fewer bits but let's not get too fancy.)

We still need to use MD5 for Gravatar because that's their protocol.

(imported from commit ffe6955312f580676409d4f9c4ed2d7f3d0df62c)
2012-09-21 13:44:13 -04:00
Keegan McAllister 3cbc56a866 Rename MD5_SALT to HASH_SALT
(imported from commit 3112cd805614c3057a9eb8f1b251381f48ab3173)
2012-09-21 13:44:09 -04:00
Tim Abbott efd2cb8fa9 Add both Humbug and MIT internal users.
(imported from commit f300c6513a9756417285ba371cb2d3f6f26fc4a3)
2012-09-21 11:15:19 -04:00
Tim Abbott fc12e6ffbb Fix collapsing with new email addresses instead of usernames.
(imported from commit 26a2391ac1f965f78feaff5092b42cf49f57215f)
2012-09-21 11:15:08 -04:00
Tim Abbott 2d6683f896 Deduplicate user creation code.
(imported from commit bda76a9a44bd5ed7f0726b527fdb93cec109cbed)
2012-09-21 10:45:00 -04:00
Tim Abbott 135c82717d Authenticate by email.
Approach from http://www.micahcarrick.com/django-email-authentication.html.

(imported from commit 796b8e08d8e1f9769cd3cf8ee61d3724ac3847b7)
2012-09-21 10:34:48 -04:00
Tim Abbott ee8f28a084 Use email addresses as unique identifiers rather than usernames.
Note that this code still assumes one's email address (stripped of
domain) is unique.

(imported from commit e98f96601ad109811978fc00b1165e97d8f7b185)
2012-09-21 09:43:22 -04:00
Tim Abbott 967dc37bc2 Put the Shakespeare users in a different realm from the MIT ones.
(imported from commit c75bff78380ee85c00edb4690030b6e0c1b42360)
2012-09-20 18:03:43 -04:00
Luke Faraone 1050300ded Render Huddle titles the way Waseem detailed in his original mockup.
This actually involved refactoring a good bit of existing code; we
in this commit introduce a new property of zephyr called .reply_to, which
is the fully rendered-to-string and pretty-printable version of the person
to which any reply should be addressed.

This is useful for grouping personals, where if you simply went by the
.display_recipient or .sender you would have to check them against
eachother.

We also introduce a new narrow_classish command, which is triggered on
clicking on the "Huddle with…" text. This method intelligently determines
which sort of narrowing to do; we essentially moved out code from the 'r'
key handling section and put it in its own function.

(imported from commit 2406ee0f6f83b990eec83190d2e8858865c06238)
2012-09-20 16:36:49 -04:00
Keegan McAllister fbec2b8d76 Use DOM ids in get_zephyr
This greatly reduces lag on mouseover selection.

(imported from commit 7d9bc0ebce2aa9781c316033d3e9d21e9da6ee3f)
2012-09-20 15:23:41 -04:00
Keegan McAllister 1dabe1cf81 Give each zephyr row a unique DOM id
(imported from commit 4530d0bbbfc94fb86ebba9c6d73074de38e4a78a)
2012-09-20 15:23:41 -04:00
Keegan McAllister 48fea66e34 More consistent naming for #table and #filtered_table
(imported from commit 966ab97522a79fb5cf6dc1e215487ceba01f6d11)
2012-09-20 15:23:41 -04:00
Keegan McAllister d4985ef5f4 Optimize select_zephyr_by_id for the already-selected case
Saves a call to get_zephyr.

(imported from commit 9ce9f2af7e4d8eb5e3a76a3c0ddbfb7f5896a583)
2012-09-20 15:23:41 -04:00
Keegan McAllister a00227c864 Implicitly choose the selected zephyr for showing email address
I erroneously switched halfway in ce4f6289491722d4c1aa84fe8b88b3a5932a3f2a, so
let's just do it for real.

(imported from commit 4c09a7805f6e2322cbbab2f8534e9d362acdc826)
2012-09-20 15:23:39 -04:00
Keegan McAllister 8d994bdb21 Make sure only one email address is displayed at a time
(imported from commit 51b5b2268a154d1136b03185d6658fad7f2922aa)
2012-09-20 15:22:08 -04:00
Keegan McAllister 209bfdf16a populate_db: style fixes
(imported from commit bf16e9a745407a95917e4765257c54dd342fcacc)
2012-09-20 11:22:39 -04:00
Keegan McAllister 16b53fc1ef populate_db: Provide option to create extra users
(imported from commit 13d24c2af3911a06138e73619aa6091a9aeb4f1a)
2012-09-20 10:47:25 -04:00
Keegan McAllister 81ff352ac3 Simplify bookend creation
(imported from commit 8faf260037b7e0508d9e4acea24687ebc06ea0ef)
2012-09-20 00:08:46 -04:00
Keegan McAllister 7d894d8dd1 Merge update_pointer and select_zephyr
Having both is confusing.

(imported from commit becd1ac7a8bab583c4fafdd77256c57f3dc98ea1)
2012-09-19 17:55:58 -04:00
Keegan McAllister 5ff4d22859 Note get_zephyr performance
(imported from commit 215a457d30f5a355d18882a9703ff671248b054f)
2012-09-19 17:55:58 -04:00
Keegan McAllister c3f3a1ef14 Cache the selected zephyr jQuery object
(imported from commit ce4f6289491722d4c1aa84fe8b88b3a5932a3f2a)
2012-09-19 17:35:18 -04:00
Keegan McAllister 5ba760a8f3 Use the zephyr IDs we already have
(imported from commit 6506f30be02cd4d4ee660709fbf8b7530a9276a9)
2012-09-19 16:43:45 -04:00
Keegan McAllister af5282abd4 Add client-side debugging tools
(imported from commit faa87e85f366e91fe33e0f24e00ae1197403605d)
2012-09-19 16:25:23 -04:00
Keegan McAllister 72b98d1d01 Hotkeys: don't go from zephyr to zid and back
(imported from commit e7e80bdc2e0af5dfe9ec4f885cae814543c038de)
2012-09-19 16:25:23 -04:00
Luke Faraone eb1740e1e7 Use emails in the gravatar seed, don't display a static gravatar for the current user.
(imported from commit 64d1fd4f1cd33796bc907fef9778e088d80b8c5a)
2012-09-19 13:39:34 -04:00
Luke Faraone c0805e4846 Remove spurious lines at the top, add lines to the bottom of the view.
We previously weren't actually applying collapsed_parent to any zephyrs,
switching from .children to .find fixes this.

We also don't add a bookend in front of the first zephyr.

Also, borders are handled by the zephyr trs themselves as opposed to the
bookend tr.

(imported from commit 8bdc9bd812833288c85c13a102459a5ef1e36225)
2012-09-19 13:15:12 -04:00
Luke Faraone fed4cd3891 Limit № of autocomplete results so the list doesn't fall off the screen
(imported from commit 311376c1dec35a16ddfb66fc01161501c2eafff0)
2012-09-19 13:11:13 -04:00
Keegan McAllister db7a8277ff Replace create_{user_profile,zephyr_class} with {UserProfile,ZephyrClass}.create
Looks nicer and cuts down on imports.

(imported from commit 4fdbbb45cf6d8ad016481c663cf52fd555b41d91)
2012-09-19 13:01:58 -04:00
Keegan McAllister 5486e148e3 Cache Zephyr.to_dict
(imported from commit 7968244a813111e328fc91c34d64af727a98bb36)
2012-09-19 13:01:58 -04:00
Keegan McAllister 669bb789f8 Add caching decorators
(imported from commit 7a4d9257ea8c6a86a5ffb498f726c4c2eb42bc9f)
2012-09-19 13:01:58 -04:00
Luke Faraone 72eb05dfc5 Switch to Boostrap Typeahead instead of JQuery-UI Autocomplete.
This reduces the number of CSS/JS files we need to load, which is awesome.

(imported from commit 3d34276a185e61f698163402cff2fd2c75ce0bd7)
2012-09-19 11:51:53 -04:00
Luke Faraone b634d26017 Post the newly selected zephyr ID, rather than the old zephyr ID.
Previously update_pointer POSTed the selected_zephyr_id, which in reality
was the ID of the zephyr we just moved off of, rather than the current
zephyr we just higlighted.

(imported from commit 2b143b34d3042a789b3f6a999117115dd6243782)
2012-09-19 11:13:43 -04:00
Jessica McKellar 28be3581a3 Get gravatars over HTTPS.
(imported from commit 37d12b038e955144e3b7a990db1b72c1fe8a1200)
2012-09-19 10:50:37 -04:00
Jessica McKellar 3ec50a921d Fix loading subscriptions on the live site.
For some reason on both my and Waseem's local instances the lack of a
trailing slash was not an issue, but this does fix the issue on the
live site.

This could be because we are running Django 1.4.1 and the deployment
server is running 1.4.0.

(imported from commit 613732d75f204fd654247382088d92879780560b)
2012-09-19 10:21:34 -04:00
Luke Faraone 7d4693a063 Unbreak adding messages in get_updates_longpoll.
(imported from commit 4dbf0b151c7ac243f23b74feeb85dac2b410c7b9)
2012-09-18 18:02:53 -04:00
Luke Faraone 5b32048ade Implement borders using CSS rather than brs, style the way Waseem wants.
(imported from commit f4e23721a6eb0ffdd2d6e859b28417f0fdfbfe87)
2012-09-18 17:19:29 -04:00
Luke Faraone c5d1897ab3 Reimplement collapsing, for realsies this time.
We no longer break random things! Its pretty grand, actually.

This reworks and reverts commit fbadd6e854722e41cccd2535748ee47f4efd657b.

Conflicts:
	zephyr/static/js/zephyr.js

(imported from commit 534a120290855d3bf2cf979ac174267c2d07bf68)
2012-09-18 15:56:01 -04:00
Keegan McAllister 8aded489b8 Remove a duplicated query
(imported from commit 50ee95e0ec887d5a9d1629051aa816c706bd04d8)
2012-09-18 14:24:52 -04:00
Keegan McAllister c887a5f977 Debug Tornado when Django DEBUG = True
(imported from commit ebd81e5d9344f5fb09c59a2afcaf83e9b1fc2a1d)
2012-09-18 13:45:52 -04:00
Jessica McKellar a8484cb967 Remove subscriptions with an AJAX request.
(imported from commit d34154b31a38ac66cc8f97785c312c98dd53286c)
2012-09-18 12:33:07 -04:00
Jessica McKellar 2126e38ae2 Get and display new subscriptions with an AJAX request.
(imported from commit c9efa7596898ac4b74ec9184ae773566eda65ec3)
2012-09-18 12:32:52 -04:00
Jessica McKellar 1996efa0c7 Give json_success/error the ability to add more data to the results json.
(imported from commit 8fafb983f30e193905616eafa3be2f8aec1143c3)
2012-09-18 12:26:29 -04:00
Jessica McKellar 736f60cf7b Move subscription rows to a Mustache template.
Now that subscriptions are in a tab, we'll need to dynamically
generate the rows.

(imported from commit e8ded6399d28fa52369ece154c5b55102ccbbd8c)
2012-09-18 12:26:29 -04:00
Waseem Daher a70e8dee4d Refactor our different pages into separate templates.
They are all included by index.html in different divs.

(imported from commit bd8b485516007075d33c2614b1de9f08999e927c)
2012-09-18 12:26:29 -04:00
Waseem Daher 5ebac29508 Switch back to 'Home' view when composing new message.
For now the idea is that if you're in the search view (or the
subscriptions view) and you click 'New Message', we should
snap you back to the main view.

This may or may not be the right behavior in the long term.

(imported from commit 43c24e1af9e80225ff9be8a62f4c8c925960436a)
2012-09-18 12:15:24 -04:00
Waseem Daher b6aeb8bca6 Move pointer when you mouseover any part of the message.
Not just the content -- include the class and instance part too.

(imported from commit 055b7c18001590c9ba7bc685b7c013e2f7939bfb)
2012-09-18 10:52:25 -04:00
Waseem Daher 5f49616753 Refactor: Put the zephyr <tr>s in the template.
(imported from commit 8a822d7c8463c248d536f97f07bfb19ca242b83f)
2012-09-18 10:46:11 -04:00
Keegan McAllister 7e929193a1 Ask for Gravatars in the size we use
(imported from commit 8ac41f4e87489d59d2d8dffe9388f5032c1a6191)
2012-09-17 21:57:09 -04:00
Keegan McAllister f003dddebb populate_db: Remove unused variables
(imported from commit 3f8f40134858721b372f3971c3b7ced31f9ed49e)
2012-09-17 21:55:38 -04:00
Keegan McAllister bdb1c1b97e populate_db: Break up a long line
(imported from commit cb9d1a785751af6115cbbffc4f21bc09d38cc0fa)
2012-09-17 21:39:21 -04:00
Keegan McAllister 03150b6ab0 zephyr_mirror: Get the CSRF token from the login form
It's simpler, and avoids BeautifulSoup choking on the huge JSON lines.

(imported from commit 3a0aa0ae063f79b3a4c73a2a9915d325fc19c6e1)
2012-09-17 19:52:04 -04:00
Keegan McAllister de298d732b Override Bootstrap's big blockquotes
(imported from commit ea69c25ba5c02ec13d19e8632927b49476813cba)
2012-09-17 18:11:56 -04:00
Waseem Daher d5bdd84ab7 Colorize the view differently when in narrowed mode.
(imported from commit c7b2d23386ff0895caaea8e9f6e3c116e6744c53)
2012-09-17 17:04:39 -04:00
Waseem Daher 41d99dc716 Make narrowbox appropriate width.
(imported from commit b617d68de412ebdc815f6c090af6466a19a3404c)
2012-09-17 17:03:39 -04:00
Waseem Daher c909e2a78d Resize narrowbox and composebox to account for missing scrollbar.
(imported from commit 1a9c40d4e33c950ccbdfc9d406867dcbe89ae19b)
2012-09-17 16:42:45 -04:00
Keegan McAllister 0e7c99b32e Add missing Pygments style
Whoops.

(imported from commit 51e18e90a3549aa5572fe849572b7996b2c6b8be)
2012-09-17 16:16:25 -04:00
Keegan McAllister bbb7fd0966 Lower margin on blockquotes
(imported from commit 20e06c7424c51ae3e0974472539f2e401cff5d70)
2012-09-17 15:57:58 -04:00
Keegan McAllister 02bee4b4d0 Apply margin to zephyr content more sanely
(imported from commit 93fd1603c1b838cd0bc5f965c573333599ebfe84)
2012-09-17 15:56:04 -04:00
Keegan McAllister f63759679a zephyr_mirror: Change error handling and output
(imported from commit 62a296833b19b810e9d2be58dd7f8b7bb5e69b6b)
2012-09-17 15:40:47 -04:00
Keegan McAllister a1cd13aea5 zephyr_mirror: Let the server handle escaping and line unwrapping (via Markdown)
(imported from commit 65d00bf911231cb15d3a6713e64ed8dff28a613a)
2012-09-17 15:39:01 -04:00
Keegan McAllister c53470c908 Sanitize username, class name, etc
(imported from commit 95730f1f725036649ff60d698b461fdcf33594bb)
2012-09-17 15:24:41 -04:00
Keegan McAllister 7152fe2f73 Format messages with Markdown
(imported from commit 014a4dddd4d3db61d85c6f6bf1987aff6093fb52)
2012-09-17 15:24:41 -04:00
Jessica McKellar 72168b8275 Put focus on class field when you click New Message to compose.
Previously no focus was set and the shown tab was whichever tab you'd
last seen.

(imported from commit 2ca731373327aa71de7472220725b518cb1861d0)
2012-09-17 14:39:32 -04:00
Jessica McKellar aaf537f528 Hide the scrollbar.
I am not thrilled with this hack, even though everyone on the Internet
says this is how you do it
(e.g. http://stackoverflow.com/questions/5820304/hidden-scrollbars-in-firefox-allows-scrolling-but-just-no-scrollbar).

(imported from commit 3a3e782f8f7e489d897187a583e0f7de704b26cd)
2012-09-17 13:51:33 -04:00
Jessica McKellar 3d2de1fa7c Snap back to where you were in the home view upon un-narrowing.
(imported from commit 72458f4006890c392e5ca557f7178260bff7c7f9)
2012-09-17 13:26:09 -04:00
Jessica McKellar 8e1ce1c371 Shorten the compose box fade and collapse time.
(imported from commit 136f0fc02da291c85a4f4b169217a273ff496faf)
2012-09-17 13:26:09 -04:00
Luke Faraone 8a89c56b7b Iterate through an array without using 'in', remove extra spacing.
This corrects some additional bugs introduced in 9128ddd and a5f06bd
identified by Keegan.

We previously used "for i in"-style looping, which is sub-optimal. Move
to a different style.

We also had a weird spacing thing I introduced in a previous commit,
which has now been fixed.

(imported from commit 7334d8ee703564bedeb0ea939b0d64ad2d5fceba)
2012-09-17 13:12:24 -04:00
Luke Faraone de5ff99c21 Don't generate both zephyr_json and zephyr_dict_json on the server.
Previously we were iterating through all zephyrs twice on the server, now
we are moving part of that to the client so the client has an index of
Zephyrs that it generates itself as part of add_message.

(imported from commit c07a6c36911fa2eae6f216c34331be34b2aa8178)
2012-09-17 13:12:22 -04:00
Luke Faraone 50dd1c31b8 Don't directly use showToggle, instead calling upon show_compose.
(imported from commit 4f3f81edf0c19abf34cbc5f39e25bdbad50c6d9a)
2012-09-17 13:11:49 -04:00
Tim Abbott d0b36d506b models: Add database index hints.
(imported from commit 96b94b943aa8cd04c26295af797b8ed9c40f5859)
2012-09-17 11:37:14 -04:00
Tim Abbott da2494004d Make populate_db thread count an option.
(imported from commit b65de0a25a7c345a422e8f4f236bf49025c97886)
2012-09-17 11:37:14 -04:00
Tim Abbott 0b699be7eb Add some caching of userprofile objects.
(imported from commit dd8e1bec2d677e873d90806aa71519c3a37221c8)
2012-09-17 11:37:11 -04:00
Keegan McAllister 2ba583a214 Remove unnecessary padding on <body>
This was copied from a Bootstrap example page and is messing up the topbar on
login, subscriptions, etc.

But I like the padding on the main view left side links, so we'll keep that.

(imported from commit 67ef75a7a0f359d0f2bc2857e56aa2249ec09cbf)
2012-09-17 11:31:05 -04:00
Jessica McKellar 69cc5c02dc Make clicking anywhere in a zephyr start a reply.
Previously you had to be inside the content span.

(imported from commit 0570ddeb9bc948d278b0b1859b4a041b81ff184d)
2012-09-17 11:16:53 -04:00
Jessica McKellar e8a6fee147 Fix the ability to send zephyrs when there are no previous zephyrs.
Previously, select_zephyr was erroring out, preventing New Message
from working.

(imported from commit 570a777318a7078c0c326042876b94dcc496011f)
2012-09-17 10:42:45 -04:00
Tim Abbott 2fb626c106 Fix running populate_db more than once in a row.
(imported from commit 72a59b8e6a8cedeb5ca7d242fdfd40fb3f691bc3)
2012-09-14 16:25:11 -04:00
Jessica McKellar ccfc9f5889 Only register the callback for subbing to a class once.
(imported from commit a6c41f79ea8c6e2f6a6ff5a6b41b98fd53ad4e82)
2012-09-14 15:44:55 -04:00
Jessica McKellar d7f453dfb3 Only register the callback for creating a new class once.
Previously, when trying to send a zephyr to a new class, you would
actually send N zephyrs, where N is the number of times you'd created
a new class.

(imported from commit 2c36b0282c8c2291e05b5ad952f5b25e3f43d406)
2012-09-14 15:44:55 -04:00
Jessica McKellar a12f582d92 Don't let people try to send zephyrs to empty class names.
Also strip leading and trailing whitespace, so 'Bar' and 'Bar' aren't
separate classes.

(imported from commit a39c220d1a4c4d179f4adbf5e1391436eda32f4f)
2012-09-14 15:44:54 -04:00
Jessica McKellar ebfc684a6e css: Add missing semicolon.
(imported from commit 055cae0fdb00db656b4fcea9a384c0f2a3af58fc)
2012-09-14 15:44:54 -04:00
Jessica McKellar 9a7dc0e50b Only hide the compose box on a successful zephyr.
(imported from commit a83e26ce42ae6b80872dd81ed10d5318c193f1ef)
2012-09-14 15:44:54 -04:00
Jessica McKellar 56ea3d12d5 Clear the compose box after successfully sending a zephyr.
You don't care about that content anymore. We probably want to clear
even more aggressively than this.

(imported from commit 29f6910a12e1b722f5801db644b04f54cf5bfd63)
2012-09-14 15:44:54 -04:00
Tim Abbott 09b1285ac1 populate_db: Create the new zephyrs in parallel.
(imported from commit e550d4f6c68502ca27a3dbdc99a495a1c4e710ac)
2012-09-14 13:32:26 -04:00
Tim Abbott 4cc2a7ef60 Restructure populate_db to use more functions.
(imported from commit a2757292c6e2ea33433ebf2028c3322c00b03a2f)
2012-09-14 13:32:25 -04:00
Tim Abbott c6fcbef861 Add simple parallel computation library.
(imported from commit bd17f16c1645f5bb20e0b5e0799948c7f05fede0)
2012-09-14 13:32:25 -04:00
Tim Abbott a3aa83801a [schema] Use a TextField for the content data.
(imported from commit 83765da990ad94233978d24bea90cce8cc66f17b)
2012-09-14 13:32:25 -04:00
Waseem Daher ea586ac581 Restyle compose window slightly, add close button.
I still don't love it visually, but it's getting there.
Some obvious issues:
 Personals window is totally unstyled
 Clicking 'new message' should perhaps give you a fresh new window
  not something prepopulated with old stuff. Think about this.

(imported from commit 8b28fd084d550db404eabbe63c056fa6866c0697)
2012-09-14 12:22:25 -04:00
Waseem Daher bee291afaa Restyle the narrow bar slightly.
Put a little 'x' by the class or class-instance indicator, to make
it more analogous to the planned behavior of the view-in-context
search box.

(imported from commit fa01001cffa6a6094ba5fbdcbdc965addb2efa1c)
2012-09-14 11:40:56 -04:00
Keegan McAllister 5711e953f9 Remove redundant font spec for emails
(imported from commit 335608864107bb3c4b611ba4ba09bfd67e62e562)
2012-09-13 17:45:44 -04:00
Keegan McAllister 67b337ce07 Get rid of selectors like span.foo
Just write .foo.  We shouldn't have to care what type of tag it is.

(imported from commit 86c4eeecbe4f5c9875002e3fd81757cd49050268)
2012-09-13 16:32:21 -04:00
Keegan McAllister 7638dc7279 Less confusing names for some classes
(imported from commit 15475d7dc98702a3935b1eb8a1373ab222913a7c)
2012-09-13 16:32:21 -04:00
Keegan McAllister 1674dea775 Restyle email addresses in zephyrs
(imported from commit 7176758240da9f5b85370bf02d7ea5c9991a44a2)
2012-09-13 16:32:16 -04:00
Keegan McAllister 8b691ec0b2 Don't update pointer when it hasn't actually changed
(imported from commit 41c8b1cd2a586bb9d82b0ff194c076e93f34d98a)
2012-09-13 16:29:47 -04:00
Keegan McAllister d7a5fa3d99 Add some padding on email
(imported from commit 59746e712cf9a5f75bb9dbf3f9a4257a7667dbab)
2012-09-13 16:29:47 -04:00
Keegan McAllister 02fa8e5f17 Whitespace
(imported from commit fa47eddc4978927e3d9d5c913a3a7638535691d3)
2012-09-13 16:29:47 -04:00
Keegan McAllister 3694ecaf4c Only display email while hovering on fullname
(imported from commit 0f366deb69ba49bfda998dd993e32de0d29affe4)
2012-09-13 16:29:47 -04:00
Luke Faraone 17537ffe17 Use zephyr_dict as the authoritative source for data about zephyrs.
Previously we would extract zephyr data from a TR. In the NWO where
sometimes this data is ommitted, we instead need to use the zephyr_dict
object.

(imported from commit a5f06bdadc4fbe13f1718d6dcb41046d0ed040cd)
2012-09-13 14:36:54 -04:00
Luke Faraone 4821175dd5 Provide both a sequential list of zephyrs and an associative array.
The purpose of this is to ensure that we can reference a zephyr by its ID
and get all the data about the zephyr; in the future we may not have all
such data stored in TRs as we do now.

(imported from commit 9128ddd01b46396fd276124ca1e6430538d3dd63)
2012-09-13 14:31:02 -04:00
Waseem Daher fa8dd00f15 Shrink timestamp size slightly.
(imported from commit b4c0a20a4008d8f0f96421e1fa246cb31d3ccc3f)
2012-09-13 13:15:20 -04:00
Keegan McAllister afa608fad8 Only display email on the selected zephyr
(imported from commit fc0ca119abaf31f74e7ad384c6821bfeaedaae87)
2012-09-13 11:58:59 -04:00
Keegan McAllister ea42342031 Distinguish the selected zephyr in CSS
(imported from commit 42e243ff95de5427e78dbc532dfe9e50e9677438)
2012-09-13 11:57:26 -04:00
Keegan McAllister a8dcf09f1e Use get_zephyr
(imported from commit 160eb772992cb18450b859637935f1039c576832)
2012-09-13 11:44:51 -04:00
Keegan McAllister 16b8258924 Fix bad merge
(imported from commit 6d6a4e7da0e3e3dacd732cde19009b427aa813cb)
2012-09-13 11:42:23 -04:00
Jessica McKellar 09bb68e52c Have the pointer follow the mouse.
(imported from commit cfd6bcd7ba506c440f74bd7e40eaacadc06b10c8)
2012-09-13 11:06:29 -04:00
Jessica McKellar 08904cae43 Clicking on a zephyr pops up the compose window and prepares a response.
(imported from commit 00139f7b0c6d1ded198064689f1a1bd8038e72f9)
2012-09-13 11:06:28 -04:00
Waseem Daher 3e5008b143 Remove searchbar from narrowed view.
Today I'm of the mindset that searching is a fundamentally
distinct operation than narrowing, so this reflects that.
(There would be a separate screen and UI for searching,
 I guess.)

(imported from commit 432a4088612dafd06184bec228b63056961325dd)
2012-09-13 10:36:29 -04:00
Keegan McAllister 51e109d043 Show full date hovering over timestamp
(imported from commit 486cd85b4ec21ad8468ced207c541372f341c200)
2012-09-13 01:00:28 -04:00
Keegan McAllister 96abc04fe6 Set email on forged users
(imported from commit ee7c163bf2a674c8b76aa5a7ba86e79c84bcec20)
2012-09-12 22:56:43 -04:00
Keegan McAllister c3c675a872 Fix the size of profile pictures
This fixes a transient display glitch while the image is loading.

(imported from commit a153de8ebb07eaa89a7a0eb215f15a88e950a1f4)
2012-09-12 21:58:12 -04:00
Keegan McAllister 3fc265dac3 zephyr_mirror: Get Athena fullnames from Hesiod
(imported from commit 04c9df5f9a9930bf876992b4875d700e1fdba79c)
2012-09-12 21:41:52 -04:00
Keegan McAllister f4b00d802a forge_zephyr: Take fullname, shortname from POST
(imported from commit a983cfbf4fcb6395dcef64c81c984dd05169c1e9)
2012-09-12 21:10:20 -04:00
Keegan McAllister 054c30a6db Move MIT Zephyr subs list into its own file
(imported from commit 260ed986c1d69c141e42bea4803ebe0396a86715)
2012-09-12 20:30:07 -04:00
Keegan McAllister b0d8f30d91 Make Esc hide the compose pane in every hotkey mode
(imported from commit 487f19265053780a322ea741a08b3bf318821574)
2012-09-12 18:06:28 -04:00
Keegan McAllister a236e29afa Factor out hiding/showing compose pane
And avoid slideToggle, so that we don't have to care about the current state.

(imported from commit 52ddcfda50baa297c56114574600c5a5e0ee47f2)
2012-09-12 18:06:28 -04:00
Waseem Daher e8a1ecad94 Renaming some divs for additional clarity.
unhide -> show_all_messages
narrow_indicator -> currently_narrowed_to
narrow -> searchbox

This is a little clearer about what these buttons/functions
do, which will be useful as we add a little more complexity
associated with searching.

(imported from commit b51e745ea71c212d6735e04011eaea5e71bf6d5a)
2012-09-12 17:31:48 -04:00
Keegan McAllister 7d4fd5b14f Zero-pad hour and minute
(imported from commit 404600ce3cb2233acb1b2e69cdd87c64604d9826)
2012-09-12 17:07:13 -04:00
Keegan McAllister ae5137b5c9 Show timestamps on zephyrs
We use the browser's local timezone.

(imported from commit 6ed6444df6edf2093b9399adb1511dd3ee80def3)
2012-09-12 17:00:02 -04:00
Keegan McAllister f47b88ccc8 Don't take up space with the hidden username span
(imported from commit 9ae4953a583947c259a20ce5f7c25c0216b2cc51)
2012-09-12 16:24:42 -04:00
Keegan McAllister 714eec5594 Select zephyr rows by class
This fixes the bug where the reply box is hidden when narrowed.

(imported from commit 0673b9063818946b7da70f6109ca17403240737d)
2012-09-12 11:47:56 -04:00
Waseem Daher 3f42c8422f Experimentally add a search bar.
I'm not exactly sure that this is the interface we'll want for
this, but it's the start of an experiment.

(imported from commit ea18a9b05106546475bc151229955ddafd8e7b8e)
2012-09-12 11:19:33 -04:00
Waseem Daher 85398abba3 My take on a prettier pointer.
(imported from commit 7d0c37c85781bdd48efb4cf9cec49bb6df7f0954)
2012-09-11 17:38:05 -04:00
Jessica McKellar f5c4bb7ab2 tests: Add new registration fields to registration tests.
(imported from commit c666e0cf89aaed357bb5bea6f9fbaafc5efffa7c)
2012-09-11 17:26:13 -04:00
Keegan McAllister 5090a3fb91 zephyr_mirror: urlencode Unicode properly
(imported from commit 74d58039e4b763a2738bb485ab9ba6aa9c802d92)
2012-09-11 17:17:17 -04:00
Waseem Daher 9a7993a954 Cause class and instance names not to wrap.
This looks ugly, uglier than the alternative, but I want
to encourage us to figure out how to deal with this case
rather than allowing it to wrap.

(imported from commit 9ef9cedeca2e27a0db996083e2e528f3daec3f43)
2012-09-11 16:57:03 -04:00
Waseem Daher 5ca1ac55d6 Make classes and instances always take up 100px.
Setting both max-width and min-width really feels like
a hack -- surely I can just set "width" and be done
with it?

(imported from commit 7650419c5ae8bb7ce3a3d6bd7dabbfb42390586f)
2012-09-11 16:53:30 -04:00
Jessica McKellar a211314240 Add dummy name data for forged zephyr users.
(imported from commit cec8beefe97bc0acbd22a170d41233d4fc642cc6)
2012-09-11 16:39:37 -04:00
Jessica McKellar f5e8f025b7 Bring back preparing a personal when you click on a user.
(imported from commit b9081cb77dafa590605ee3a0892b359cc7ac6d06)
2012-09-11 16:35:01 -04:00
Jessica McKellar 49af4ec000 Don't hide the New Message button when you click on it.
It's not part of the original WaseemUI scheme, and it doesn't ever
reappear.

(imported from commit 3417fae31fc8d1b87d0d8b463548c24f5c2d260c)
2012-09-11 16:35:01 -04:00
Jessica McKellar f52ec24926 For now, compose zephyrs to usernames.
We'll eventually need to normalize emails, autocompleted names,
etc. to one entity we use when talking to the server about senders and
personals recipients, but for now since we've hardcoded usernames
everywhere, just use those.

(imported from commit 4a0e033b301b8dec55d97157eb4993982f6b2641)
2012-09-11 16:35:01 -04:00
Jessica McKellar e60959ab64 populate_db: give users full names.
(imported from commit db78a76d983dab077dfb105431e549b46e4c60d8)
2012-09-11 16:35:00 -04:00
Jessica McKellar bfdf2bef57 [schema] Collect and display names and e-mail addresses.
(imported from commit aa6bceb05fcd5b456c03288cbfed65b14050fe88)
2012-09-11 16:34:53 -04:00
Jessica McKellar 06711afa51 Add a block of whitespace at the bottom of the zephyr feed.
That way you can see new zephyrs as they come in.

(imported from commit 6b72a7f2116130edc0444f601423453801ddb6b5)
2012-09-11 16:27:12 -04:00
Waseem Daher cca0e8f521 Restyle narrowbar slightly.
I have some serious concerns with this implementation,
but I think it's still an incremental improvement.

(imported from commit 6ed8d2545c727e25bf85b98a1528dbf3d155bc92)
2012-09-11 16:20:16 -04:00
Keegan McAllister b4103798f5 Speed up narrowing
(imported from commit e1f06866ebc7d3dae3a5813565002853a6f6d8ba)
2012-09-11 15:37:09 -04:00
Luke Faraone 34a7ad5be0 Revert "Collapse duplicate instance names, add breaks."
This reverts commit 8c47682cd80fec0d221a519abc593f4d83dc90b5.

I accidentally broke.. a lot of things in my last commit. Lets fix those
issues before pushing to master again.

(imported from commit fbadd6e854722e41cccd2535748ee47f4efd657b)
2012-09-11 15:19:51 -04:00
Keegan McAllister a5d105dbae Move styles out of index.html
(imported from commit 8b3732ff67af71dac49886004370b6d4759b140f)
2012-09-11 14:38:33 -04:00
Keegan McAllister 75c34a7f1b Fix a bunch of code style problems
(imported from commit 473ae8fdd64783f7a0989b17cae39826de42d30d)
2012-09-11 14:38:33 -04:00
Luke Faraone c5238e4af5 Collapse duplicate instance names, add breaks.
(imported from commit 8c47682cd80fec0d221a519abc593f4d83dc90b5)
2012-09-11 14:37:24 -04:00
Keegan McAllister 00e3f9d948 Right-align zephyr table within its div
(imported from commit 59365d0ef466bf08fe1cf9ddcac5558579962c84)
2012-09-11 13:46:47 -04:00
Keegan McAllister 94325e63e6 zephyr_mirror: Keep going on exceptions
(imported from commit 606a864e106a2353c7e439ac9c23b14bddd6e94f)
2012-09-11 13:28:44 -04:00
Keegan McAllister a4cf0164ca zephyr_mirror: Unwrap lines using a regex
(imported from commit f882547b79ac2c92ff010d597f28437a4ead8fe5)
2012-09-11 13:25:37 -04:00
Keegan McAllister 8b1b5ddbdb Hide horizontal scrollbar
(imported from commit 5510657c7adfb189e1a332c8f6f2eab9840a8080)
2012-09-11 13:08:18 -04:00
Keegan McAllister bcdfafb37f Tweak class/instance display, esp. for long names
(imported from commit e8b73f2f772e18ea72fbbfb68107659d0b9adb8c)
2012-09-11 13:06:07 -04:00
Keegan McAllister 84cfca1ea0 Shrink messagebox further
(imported from commit 4184f19aec54b764bc205bef067426d90e67d843)
2012-09-11 12:48:57 -04:00
Luke Faraone 34b594b96b Reimplement the narrow bar.
(imported from commit 19e41c1238dff404813a21b9dc318458d5f29c64)
2012-09-11 12:12:02 -04:00
Keegan McAllister 65c6f2dfcb Set messagebox max-width as well
(imported from commit 0ada0fcabf23f38caf7b7cfa7173cc9822d2eefb)
2012-09-11 12:05:28 -04:00
Keegan McAllister e5ac53674a Use fixed table layout
(imported from commit 12eb4882b03e6cf4b633334481a82da70b868ce1)
2012-09-11 11:56:34 -04:00
Keegan McAllister 1c539ac828 Fit compose box to zephyr list
(imported from commit 7b17e637b14ec5b97a890d4c16422259adec8c4c)
2012-09-11 11:51:28 -04:00
Keegan McAllister 7da13a873e Fix size of messagebox
(imported from commit ea236a85cf8a5556242cce79d1911a3744fdf7b4)
2012-09-11 11:49:33 -04:00
Keegan McAllister 8db9a7c1d6 Adjust hover color to match Bootstrap
(imported from commit f43a9d07ce027932e4a22d2fb9efe7711883f318)
2012-09-11 11:49:13 -04:00
Keegan McAllister ad27472b05 Indicate clickable labels
(imported from commit aebd6171bbe45d8e8055ca22526ab919b6e348e1)
2012-09-11 11:32:04 -04:00
Keegan McAllister c32081a366 Make the whole messagebox clickable
(imported from commit 55b4970842e94b35cc138a4a5107ec32e08bac8c)
2012-09-11 11:24:38 -04:00
Keegan McAllister 8440fdd838 Use a fixed width Zephyr list
This is about the same size as Twitter.

(imported from commit b171b0202dfaaf14c535824a4bc2df06d18a1e51)
2012-09-11 11:16:32 -04:00
Luke Faraone 1da8c16367 Make "new message" open the compose window.
(imported from commit d63f4915f884dfa2bc11653d17782e5ee4c6191e)
2012-09-11 10:54:25 -04:00
Tim Abbott de0255d651 zephyr_mirror: Hack to try to eliminate fixed withs of zephyrs.
(imported from commit 58a26863e77d4bbfca3f7b488c008b7e6a4804f3)
2012-09-11 10:50:48 -04:00
Tim Abbott a983276b16 Add support for populate_db adding to the existing messages.
(imported from commit 765243923c67ff4820b4cd873764a5e8172cf177)
2012-09-11 10:50:48 -04:00
Luke Faraone 4503aaae89 Implement gravatars.
(imported from commit 1e07d295ee7c12a95091e0785a9a9c3c4e856ede)
2012-09-10 18:18:09 -04:00
Waseem Daher 0958e380d0 ...but add the padding only on the top.
(imported from commit 2459b639d40aaac44d71a8f754481f90348e72ac)
2012-09-10 15:16:17 -04:00
Waseem Daher f847931dbd ...but add padding so it lines up.
(imported from commit 5d174cd0c72233702dc1681e0118f2da4bb912f2)
2012-09-10 15:14:46 -04:00
Waseem Daher e1b7efe988 Vertically align the pointer.
(imported from commit 5ba1586eb1576439b4f0665cf85ba1f59a197c23)
2012-09-10 15:14:01 -04:00
Waseem Daher 7c10832118 Restyle zephyr window slightly.
Eliminate huge left margin, and don't let long class or instance
names totally break the layout.

(imported from commit 69237d29a60241bdadda0469c4e08aa1d987222a)
2012-09-10 15:06:08 -04:00
Keegan McAllister 7b8544a53f Get class/instance for narrowing more uniformly
(imported from commit 1e9622cb93cf5954cf94f38c77c191524a6e72bc)
2012-09-10 14:46:03 -04:00
Keegan McAllister f2fbb99368 Fix narrowing by click
(imported from commit 776457bb430ed73912325d40a58d67ecb07f5e04)
2012-09-10 14:45:19 -04:00
Luke Faraone 37c226e6b6 Remove spurios padding on instances.
(imported from commit fbcbbe3f0973bbac74574f59d076b010f38951b5)
2012-09-10 14:37:36 -04:00
Luke Faraone cfc42b1d82 Implement portions of Waseem's new UI.
This is mostly working; things that need to be implemented:
 - Ask users for their Real Name
 - Personal replies need skinning
 - Miscl UI changes to match mockups

(imported from commit 3638cf5ec2ba2306004ba6db6fa4c25c47f76517)
2012-09-10 14:32:42 -04:00
Tim Abbott 37b1c1db11 Stop using foo.pk when we mean foo.id.
(imported from commit b86359254415f65b32eeefdfbcb38d7bb862c1ac)
2012-09-10 13:43:17 -04:00
Keegan McAllister afee8630aa Implement hotkey state as a state machine
(imported from commit d4f52cbc6bc9e66643e89c5b49a2201e4c938265)
2012-09-10 11:36:17 -04:00
Keegan McAllister 2798f83dbe Use switch-case for hotkeys
(imported from commit c269119d6e1034508303b1c67f5e7a59376674da)
2012-09-10 11:36:17 -04:00
Keegan McAllister e3307aff39 Factor out hotkey processing
(imported from commit bb7a7269b39481cbe831a9a5872b4e32f0f04234)
2012-09-10 11:36:17 -04:00
Jessica McKellar e23dcd7646 Add tests for get_update_longpoll.
(imported from commit 3dc1957647dd1ca5cb03f3d86cdf60bf318b7317)
2012-09-10 10:17:43 -04:00
Tim Abbott ca132789bb [schema] Store Recipient types more efficiently.
(imported from commit e0625ce9d2382682a5c8d53a5ac31a0399075df8)
2012-09-10 10:03:50 -04:00
Keegan McAllister 11b5a8e193 Add JSLint options
(imported from commit ff01274558cf1145a6ab057218bc16bac5628b2e)
2012-09-07 15:15:16 -04:00
Keegan McAllister b4c2aba14d Reparenthesize an expression
This was supposed to be (x && (y || z)) but was written as
(x && y || z) i.e. ((x && y) || z).

(imported from commit c2d6d385f71e6bc4b8933f6426d88aeee0123f66)
2012-09-07 15:07:50 -04:00
Keegan McAllister 52b6ed0ba4 Move scroll_to_selected definition before first use
(imported from commit 22f3274f8f636950784f241b9b61dc3785b370b0)
2012-09-07 15:07:50 -04:00
Keegan McAllister 8c9d29842d Fix formatting of nested functions
(imported from commit 7777d6bcc3d249d6c5dd51305c88220e5ec6e469)
2012-09-07 15:07:50 -04:00
Keegan McAllister c31e7903e9 Missing semicolons
(imported from commit 76bfb622f5e6a90b4c14dc4db78ab16e7a935df0)
2012-09-07 15:07:50 -04:00
Keegan McAllister b7d7d3da26 Declare all variables at the top of each function
Javascript has function scope only, not block scope, so the block use of 'var'
is misleading.

(imported from commit 6763fa241408e5893392f622fd92b2664a993ed0)
2012-09-07 15:07:43 -04:00
Keegan McAllister fd7a7aaff4 Javascript: Use !== and === instead of != and ==
!= and == will perform type coercions, which can hide bugs.

(imported from commit 42d3d990a659b62e196f3755c176f83f80c9e319)
2012-09-07 15:07:43 -04:00
Keegan McAllister 1211995d2e Fix indentation
(imported from commit 8f4880ceaa2e84fa842ba195ebe40800fc168eab)
2012-09-07 15:07:38 -04:00
Keegan McAllister 7d51dfc0a7 Remove dead function in runtornado.py
The code is buggy; the variable 'escape' is undefined.  Right now we aren't
using this code because we bypass Tornado for login.

(imported from commit 91cf6e8fc9477039c8847c7e9501d645993278b8)
2012-09-07 13:57:32 -04:00
Keegan McAllister f837ec66e8 Remove more dead code/variables in runtornado.py
(imported from commit 0d754ca1f9ce8bc53db878d6165354149016bea5)
2012-09-07 13:57:32 -04:00
Keegan McAllister ffb69ad1c8 Fix (?) logging in runtornado.py
(imported from commit d5158005abebe496959989acaa69db269126e502)
2012-09-07 13:57:32 -04:00
Keegan McAllister 0d857d6855 Remove unused exception variables
(imported from commit 74adf1cecbb2704cdfe8a6d8a73812d9997a8384)
2012-09-07 13:57:32 -04:00
Keegan McAllister 5a38fd2c48 Import something needed by @require_post decorator
(imported from commit a2537ad75ae6e8eeb3e543c425b14214c03775b0)
2012-09-07 13:57:32 -04:00
Keegan McAllister 80c6d09197 Remove unused imports
(imported from commit 9f5c226708e44935e8d32c18ea7dd1ad2615d8d5)
2012-09-07 13:57:32 -04:00
Tim Abbott b6203e7240 Comment on how filter_by_subscriptions is dead.
(imported from commit c13b2ed003d78408b7c4f51ef5080658c2b4bcc7)
2012-09-07 13:54:42 -04:00
Tim Abbott f39c203d2c Cleanup style of filter_by_subscriptions.
(imported from commit 4bc62dcc97eeb98147dd73163c75a142eaf5d3c9)
2012-09-07 13:53:24 -04:00
Tim Abbott 7f6d085ab6 Improve add_callback performance.
(imported from commit 4cea356ee6b0777bddfc996d7b8ee1b5fee391c6)
2012-09-07 13:51:54 -04:00
Tim Abbott a53d4e8177 Fix narrowing by huddles.
(imported from commit 77eb727512e4d90f71943c192fd7a2e16c7041c3)
2012-09-07 13:43:30 -04:00
Tim Abbott 4fd1230265 require login for get_updates_longpoll.
(imported from commit 64dec53e102e47c42109e064efc46e9812943640)
2012-09-07 13:32:20 -04:00
Tim Abbott c7be5cfadc Clean up user_profile getting.
(imported from commit 86be3c8061ac46510d240703c8e88eedb0883a8c)
2012-09-07 13:31:01 -04:00
Tim Abbott d8ade6de5b Add create_zephyr_class helper.
(imported from commit 993fbb799b706e402ae212330e4abbe28bf84ee9)
2012-09-07 13:28:56 -04:00
Tim Abbott 4848ae3c48 Clean up recipient creation for new ZephyrClass objects.
(imported from commit 2aa67fbcc6c01ca1c07f41e0edb6c9efcd336006)
2012-09-07 13:28:56 -04:00
Tim Abbott f170517e0f Add more arguments checking in views.
(imported from commit 389d0b724b88b0097cef2addd27704657b35cabe)
2012-09-07 13:28:56 -04:00
Tim Abbott ce2ad38cc2 Remove dead code in home view.
(imported from commit 5bc0d2d38de23828f19915c047e605e97b733b26)
2012-09-07 13:28:56 -04:00
Tim Abbott 14ab1a7044 get_updates_longpoll: Add error handling for malformed input.
(imported from commit c44758acd2b3b07bed6536f70fa50e23fb4231b6)
2012-09-07 13:28:56 -04:00
Tim Abbott 2486a68621 Use @require_post in a few more places.
(imported from commit d1a643780d6448f66505475c8f7c1f4646981022)
2012-09-07 13:28:56 -04:00
Keegan McAllister 1c64ce8bfc zephyr_mirror: Only resend old messages when invoked with --resend-log
(imported from commit e5a7c8d5b920d796ebbf68efc2beca6b14036695)
2012-09-07 13:18:35 -04:00
Keegan McAllister 028bb9aa8d zephyr_mirror: Log zephyrs and send them on startup
(imported from commit 5ceda51c643ddaf0042e8bb8f89e1353585b49c5)
2012-09-07 13:18:35 -04:00
Tim Abbott 6ed513f4da Update populate_db to add our user accounts.
(imported from commit 24d209c995bf9353652b376fff5d58ae5de07b5a)
2012-09-07 12:50:22 -04:00
Tim Abbott da491de948 Strip whitespace from requested class subscription names.
(imported from commit bb10ba64a2f76c089ff36574b30b76f725da62aa)
2012-09-07 12:50:18 -04:00
Tim Abbott 1e42dc5728 Clear UserMessage table in populate_db as well.
(imported from commit 6d1c9b7a9974373857724ddd7b8d7805ed99c784)
2012-09-07 11:54:04 -04:00
Keegan McAllister 83cb955413 zephyr_mirror: Rename for importing
(imported from commit 251e3d2ac47dc9a6de8205869a757ae673866d1e)
2012-09-07 11:45:42 -04:00
Keegan McAllister 4d12c03260 zephyr-mirror: Make it importable
(imported from commit a029350ed3b7eae401df848b8c52fd0e8c461fbd)
2012-09-07 11:45:15 -04:00
Keegan McAllister 1d35c51b9e zephyr-mirror: Extract CSRF token with BeautifulSoup
(imported from commit 46ba6256fde77dea9188262abd45be852645b85f)
2012-09-07 11:39:36 -04:00
Keegan McAllister a102377bff zephyr-mirror: Style changes
And remove some debugging noise.

(imported from commit 03268673fd9d624ddbde69b9fa2c59268e9c4fe8)
2012-09-07 11:39:36 -04:00
Tim Abbott cc3b90b5a2 Fix some testing problems with new UserMessage class.
(imported from commit abcadca84e6ad21c523f339952ad0dec0868dc50)
2012-09-07 11:30:28 -04:00
Tim Abbott 111cda9f21 Clean up inefficient queries in the home view.
(imported from commit fd958aef79a92eb4418e832b0d2b62a978f5776f)
2012-09-07 11:28:36 -04:00
Tim Abbott 7a0b5ce198 More efficiently populated the personals autocomplete list.
(imported from commit 8e37b8c707ca1c13238a4c1d3b136cb74aec0af7)
2012-09-07 11:28:36 -04:00
Tim Abbott 6c330b2654 [schema] Store zephyr receipts in new UserMessage table.
(imported from commit d909adf7528aba9a489280ebc3572791539cdd44)
2012-09-07 11:27:41 -04:00
Tim Abbott 9696e12c45 zephyr-mirror: Fix bug in zsig splitting.
(imported from commit 26f9784d0771d148dcb92dc4b1fca9d501d3d8f4)
2012-09-06 18:39:51 -04:00
Keegan McAllister 7659937586 Inline a global constant which is now only used in one place
(imported from commit 2c288202f5c46ff62f6044cd23f092e4175d498a)
2012-09-06 17:01:19 -04:00
Keegan McAllister f98c561a69 zephyr-mirror.py: HTML escape messages
(imported from commit 2f5f5b049fe17754d2a99a249fdc38f8770dfabd)
2012-09-06 16:24:49 -04:00
Tim Abbott bd0d6bfbcc Improve zephyr-mirror.py.
(imported from commit 555c145af844485289a85c664717dc609b9a5234)
2012-09-06 16:21:31 -04:00
Jessica McKellar e5d3c192c9 Update test_zephyr_to_nonexistent_class: classes are now created on the fly.
(imported from commit 8d04d3aae650a72f01a18e8e0b7e80e093081be1)
2012-09-06 16:06:26 -04:00
Jessica McKellar 13e5b45815 Return a JSON error on an invalid zephyr type.
(imported from commit 2207464c368666715caf550f32136de45ea37142)
2012-09-06 16:06:26 -04:00
Tim Abbott b235b8bc31 Fix user of UserProfile instead of User.
(imported from commit 08875b4fc7dec48a8fce6d6eab716642493a0708)
2012-09-06 16:04:42 -04:00
Tim Abbott 10873529fd Fix forge_zephyr bug.
(imported from commit 30f69247d9094d17a1af014ce3d6b60d85ae5c41)
2012-09-06 16:01:50 -04:00
Tim Abbott 1775ffe80a Improve forge_zephyr code.
(imported from commit c95c4392b09c932d8de11d30b730ab5d7bcb9e83)
2012-09-06 16:00:39 -04:00
Tim Abbott d9f348a348 Add zephyr_backend RPC call.
(imported from commit e815580e201772e81e94b820174e2410e3069960)
2012-09-06 15:52:48 -04:00
Keegan McAllister 115334c82a Don't bracket $.get with $.ajaxSetup
Instead, use the more general $.ajax which can take these options directly.

(imported from commit bb915e7d25cb6ac675d098903f7e7b57bde5006e)
2012-09-06 15:48:15 -04:00
Keegan McAllister 474f08198b Send zephyr template inline with index.html using django-jstemplate
(imported from commit 58cc8a50d463548aa283658dbe0aae366ecab39f)
2012-09-06 15:48:15 -04:00
Keegan McAllister fce5643d15 Handle Zephyr body clicks like the other clickable elements
(imported from commit 97da4b22aea4e23dd0227b0179481cb3b5f7a65e)
2012-09-06 15:48:15 -04:00
Keegan McAllister 6f269051d1 Partially consolidate the code which knows that zephyrs are <tr>s
(imported from commit ca2a208af9f1d3cc8a3f3980f55a5c008d28147a)
2012-09-06 15:48:15 -04:00
Keegan McAllister 689ab1efd6 Misc stylistic consistency
(imported from commit 624a07f50544d96f9e3c3b417b00369641bd3ae1)
2012-09-06 15:48:15 -04:00
Keegan McAllister 59ab88f886 Rename current_view -> apply_view
And related cleanups.

(imported from commit 4b1a7e7ef19b17c0887e2864f7cc2121eeda361e)
2012-09-06 15:48:15 -04:00
Keegan McAllister 1fa40e515c Style fixes
(imported from commit 311600ad8627d7060f235f59852d77f73a951e81)
2012-09-06 15:48:15 -04:00
Keegan McAllister 5e5b5986af Don't pass the global selected_zephyr_id through the narrow functions
(imported from commit a19232052913f45a6f8d3c08dd8761a6a2b5ec99)
2012-09-06 15:48:15 -04:00
Keegan McAllister a9f45e6e0e Have select_zephyr ensure that we point at a visible zephyr
(imported from commit 91e485742a040cf6c3454d1f55993a6c77a8ca09)
2012-09-06 15:48:15 -04:00
Keegan McAllister 74c97e7d59 Remove duplication between do_narrow and select_zephyr
(imported from commit 84c3e5a0d5682fd8790bd6e277e05e54a47d9aac)
2012-09-06 15:48:15 -04:00
Keegan McAllister d78e1f1bcb Remember the selected zephyr in a Javascript variable rather than querying the DOM
And related cleanups.

(imported from commit aa64980b4e66a64e92735c736159a8e2f717ea09)
2012-09-06 15:48:15 -04:00
Keegan McAllister 03d2a087a7 Organize global variables a bit
(imported from commit d3ad323bad4cda98e55a54ed3c9aec81ccd4008b)
2012-09-06 15:48:15 -04:00
Keegan McAllister 84e618a902 Use 'var' at top level consistently.
This has no effect but is stylistically consistent.

(imported from commit 71d7f615ea140195cc5081fb331677bc5d856fed)
2012-09-06 15:48:15 -04:00
Keegan McAllister 8f1cee0b88 Move third-party components into static/third/
(imported from commit 709c78a6e41afcd4202a8264c9103ac7827158ec)
2012-09-06 15:48:15 -04:00
Jessica McKellar fb8cab21ff tests: Add some basic /zephyr class and personal POST tests.
(imported from commit 7e30ce1d24926f9ab46d9269603f1aae3da2b752)
2012-09-06 15:46:48 -04:00
Jessica McKellar aa8ea169c7 Return our standard JSON success data on /zephyr POST.
(imported from commit 045e209d1a001d27b755a45984f9e159470b80bc)
2012-09-06 15:46:48 -04:00
Jessica McKellar da730ab0b0 tests: Factor out POST result success and error checks.
(imported from commit b818faf145ffeda6deb7d36fcce1313eade8f457)
2012-09-06 15:46:47 -04:00
Tim Abbott ef7786d777 Create a Recipient for classes created by sending a zephyr.
(imported from commit 8556392f84b0a7fc21b6405c87ceac1c49b37a52)
2012-09-06 15:43:35 -04:00
Tim Abbott 47323bf279 Mechanize code to login to our application and forward zephyrs.
(imported from commit bb7aa22a67fe2ca9346d1f192c8d1e1aa102ef43)
2012-09-06 15:39:38 -04:00
Tim Abbott d466738116 Fix creating new classes by sending messages to them.
(imported from commit a85034081d23f5366e0cdc4b906fd42b4b646aba)
2012-09-06 15:35:12 -04:00
Luke Faraone 3d1e956069 Don't check for class existence if we're not sending to a class.
(imported from commit 832de3f899d90ee727cebeede061de6a409b7845)
2012-09-06 15:19:56 -04:00
Jessica McKellar ebfb696ff7 Add tests for POSTs to /update.
(imported from commit e936d0f2abe21da70ef653ce27c290c31dd091c6)
2012-09-06 15:02:27 -04:00
Jessica McKellar 4f04172288 Add error handling on bad POSTs to /update.
(imported from commit 7893e9d339559a6f6e945d0f8d3d9efbdce01f55)
2012-09-06 15:02:27 -04:00
Jessica McKellar df14dc0cf7 tests: Factor out retrieving user profiles from usernames.
(imported from commit 004eabb8684952199b8a132eb29be3ce5daae724)
2012-09-06 15:01:57 -04:00
Luke Faraone f6b481546f Offer to subscribe / create classes if user zwrites to a non-subbed class
Here we check if a class exists. If not, we prompt the user to create, sub,
and send his message to the class. If the class exists but we're not subbed
we prompt the user to sub.

This commit also added a decorator to views.py and refactored out some
redundant code.

(imported from commit 7234ef6c080f2a6de6ff0922635dddd90032f7fe)
2012-09-06 14:33:55 -04:00
Tim Abbott 31ece4d3aa Fix narrowing by instance.
(imported from commit 824f0c113b9b6970bd451f4b0c3285dd3b88d9c4)
2012-09-06 11:17:39 -04:00
Tim Abbott e66e2f3be6 Fix new instance of recipient_id.
(imported from commit 4b3442a3a45138e18c2b33867d6c5af4b4427691)
2012-09-06 11:06:25 -04:00
Tim Abbott ef25dffb92 [schema] Add the realm to the ZepyhrClass objects.
(imported from commit 8189ef27f2feef0c92f9c06a9243c085e36a66f5)
2012-09-06 11:02:34 -04:00
Tim Abbott b761bf030b [schema] Fix names of fields in Subscription.
(imported from commit 5f5c643286d348d16caac03419ba3011a8b81eff)
2012-09-06 11:02:34 -04:00
Tim Abbott 38b30e5997 [schema] Add realms to the schema.
Note that realms aren't actually used for anything, aren't prompted
for, etc, so this is mostly just a schema change and the refactoring
needed to allow setting the realm in the future.

(imported from commit b8b483dcc9601b288702284879e9c99707a50a5c)
2012-09-06 11:02:34 -04:00
Keegan McAllister 4dd1567426 Keep third-party jQuery style in the jquery dir
(imported from commit 9e34277b90c13b3ce71521fe0657014f186fc1c3)
2012-09-06 11:00:34 -04:00
Jessica McKellar aea9682288 Handle zephyring to a huddle with an invalid username.
(imported from commit 953b242aff98782faab8eb2c7a9528ad4bfbcd54)
2012-09-05 18:01:07 -04:00
Jessica McKellar f539b5ec59 Handle trying to send a zephyr to a non-existent class.
(imported from commit 38c6df92ae8dc9dee358aa9af0ef592943b82429)
2012-09-05 18:01:07 -04:00
Jessica McKellar 22c2a868c1 Factor out json success and error handling.
(imported from commit 1891e077a18615d47710faf56b04c4bd160454fa)
2012-09-05 18:01:07 -04:00
Jessica McKellar cede8e59fb Return a 400 and error message instead of 500ing on a personal to an invalid user.
(imported from commit b8cdf342f2919aa0dbd2e30764c7662b6756aa57)
2012-09-05 18:01:06 -04:00
Keegan McAllister 0788f2efe6 get_updates_longpoll: Retry indefinitely, with exponential backoff
The client still won't recognize when it's reconnected, if there is no traffic.
Probably we should have the server send periodic heartbeat messages to the
clients, and make the clients look for them.

(imported from commit 4dab3ddf20bf3c48a65b9395c1e24b635b70aa81)
2012-09-05 16:37:20 -04:00
Keegan McAllister c3aaf54468 get_updates_longpoll: Timeout and retry
We're currently proxying through Apache, which will eventually drop an idle
connection to the app server.  Before that happens, drop it on the client and
retry.  This may also help with flaky Internet connections.  This timeout isn't
really an error condition and is naturally rate-limited, so we retry
indefinitely.

(imported from commit 45fbf812af63ed331fe046d85c64c97c1ec57611)
2012-09-05 16:37:10 -04:00
Luke Faraone 3366346144 Return subs in JSON based on a query of your subs list rather than sorting through recieved zephyrs.
(imported from commit 451435aee2c2cf6ee542468b1c91c4a15edf2032)
2012-09-05 16:15:38 -04:00
Tim Abbott e9b6ce6124 Fix subscriptions page showing huddles.
(imported from commit bed5fd30c509dcd5f169081396f72107dc08c750)
2012-09-05 15:32:06 -04:00
Keegan McAllister 53690d757f Avoid infinite tail recursion in get_updates_longpoll
Javascript doesn't guarantee tail-call optimization.  Also we should yield
control back to the browser in case it needs to catch up on rendering.

(imported from commit 1c35c0c2c39f13311b98bfb6221a1bac1fb22de8)
2012-09-05 14:06:19 -04:00
Keegan McAllister 1f522eddac Move zephyr rendering inside longpoll success callback
(imported from commit f7c2bbb0a31b339892a033e4192e44cb53b0d62c)
2012-09-05 14:06:08 -04:00
Keegan McAllister 162cb075b7 DEBUG: report longpoll events in JS console
(imported from commit f82edf2fcec66ec119319a691281726a16a46b31)
2012-09-05 14:00:56 -04:00
Keegan McAllister 2332fa2c72 Log server events with timestamps
(imported from commit b74274ccafcca716871058b8f9bde8dfe9e081ee)
2012-09-05 13:47:25 -04:00
Tim Abbott 3218f917ae populate_db: Repeat recipients a moderate fraction of the time.
(imported from commit 1a42ec5b585a7a64e24576350c61399601177877)
2012-09-05 13:42:05 -04:00
Tim Abbott 527058a202 Add personals and huddles to populate_db.
(imported from commit 98a8decc18bad4700260f125873ccc4367f73ebe)
2012-09-05 12:38:35 -04:00
Tim Abbott 8eb778dc32 Fix display of which people we're showing personals with.
(imported from commit 4e2f2554c9af4b176dcbbe6300b72c2ce69bc8bd)
2012-09-05 11:48:35 -04:00
Keegan McAllister 04b1c21333 Remove some unnecessary intermediate lists
Use generator comprehensions for efficiency and cleaner code.

(imported from commit 6b4b709515b5c904ef38b8ea33a9d4a4af0f5468)
2012-09-05 11:41:53 -04:00
Tim Abbott 3e51ef8c1c Fix get_huddle handling of id_list.
(imported from commit 0fe1ee15b2fc6b3bef98ac47f1094b89e776c751)
2012-09-05 11:38:09 -04:00
Tim Abbott 254b118bd6 Fix an error in huddle comments.
(imported from commit 85a06b53de1027815e1d2bbd4c6354801495fffe)
2012-09-05 11:32:05 -04:00
Tim Abbott 1f151214c0 Move the huddle recipient uniquification into get_huddle.
(imported from commit 09378b583becce6467d65d6caec71a543e27be2e)
2012-09-05 11:30:40 -04:00
Keegan McAllister 5ac4b4345e Point at the first zephyr if the initial pointer is invalid
(imported from commit 7661a7d23f1d161815f2a22048cd23ede76e1758)
2012-09-05 11:24:29 -04:00
Keegan McAllister 7cb3c05b40 Cleanup / local var in hotkeys
(imported from commit 8df3d84495d0d50b0987037dceb8b16023866119)
2012-09-05 11:24:28 -04:00
Keegan McAllister 49704b84f3 Clean up select_zephyr
Eliminate some global variables, and other style fixes.

(imported from commit 95dfbaa024d709f5b98238afcf904f3e92c8a260)
2012-09-05 11:24:28 -04:00
Tim Abbott 20215eef86 Remove a bunch more trailing whitespace.
(imported from commit 5d1cc8dcb0b26eaf95ddca26574b361b6948cdb8)
2012-09-05 11:23:58 -04:00
Tim Abbott fe43dc008f Clarify comments about huddles.
(imported from commit b4b779c48289e0f78490c0e93ece19b55a6f2dee)
2012-09-05 11:19:31 -04:00
Tim Abbott 08b55de0af Add support for replying to huddle messages.
(imported from commit 21c760838fa87bf524ff178eab6473dfa3c6921c)
2012-09-05 11:19:31 -04:00
Tim Abbott d13e7d5c2a Clean up prepare_personal function.
(imported from commit 497ff1ff2162eba879728755cf37e6317530a641)
2012-09-05 11:19:31 -04:00
Tim Abbott 6e427d4aa1 Remove trailing whitespace in zephyr.js.
(imported from commit d003d9c337239e90f6dbda16f6624c42909a88b7)
2012-09-05 11:19:31 -04:00
Tim Abbott 7105ea9290 Improve the huddle hashing keys.
(imported from commit e8e1f1ac3022f3cecfdd22d1d4f319cc4f1ce886)
2012-09-05 11:19:31 -04:00
Tim Abbott 6de871a698 Fix double-sending to huddle recipients.
(imported from commit 649c01c6d0f1c826d3db9444f48af16ee1eb8d06)
2012-09-05 11:19:31 -04:00
Jessica McKellar 2694183a9d Make clicking on a personals user narrow to the conversation with that user.
Previously, clicking would narrow to all personals. The gp hotkey
combo still does that -- we'll need to think about the UI for making
both types of narrowing easy.

(imported from commit acce1da52de1b9b757ef76a9734d61f399f81a01)
2012-09-05 11:03:53 -04:00
Luke Faraone 3db1766015 Fix broken narrowing on classes with keyboard shortcuts.
(imported from commit e829c55e88a57c4dbe4693c41f15eaf27a025daa)
2012-09-05 10:56:59 -04:00
Luke Faraone be3a69611a Restrict new_zephyrs in add_callback to current user's subs.
(imported from commit 7aab1b081cf9b8602512402547fe3592cf710d82)
2012-09-05 10:43:36 -04:00
Luke Faraone ebff1bc830 Don't show the user's password when registering.
(imported from commit 9268c07560de744abdedf11b8d39cd8045baeff9)
2012-09-05 10:20:39 -04:00
Tim Abbott 2ff6a39976 Some huddle cleanups.
(imported from commit 244bfde4da2a4faeb150182f232937f0cb3a9a85)
2012-09-04 19:41:42 -04:00
Tim Abbott 4d284d8a92 [schema] Add support for multi-user personals ("huddles").
This is controlled by listing multiple comma-separate usernames in the
personal message sending box.

(imported from commit 06c9dadb7977b98f88ad31e5df453b59f1afad96)
2012-09-04 19:15:07 -04:00
Tim Abbott 84ece4b3fe Combine the zephyr() and personal_zephyr() functions.
(imported from commit a39b70f019901d0dd6994d4c440002111e4c29e1)
2012-09-04 19:14:46 -04:00
Tim Abbott f0db139e43 Fix missing import socket in views.py.
(imported from commit e00c3a1a16435b8e65bd3bd445fb049c70aee4be)
2012-09-04 19:11:25 -04:00
Tim Abbott af4ed3a9a1 Eliminate trailing whitespace in views.py.
(imported from commit e69b90a7354e4b8ce1221973788d1a0f80530d56)
2012-09-04 18:51:23 -04:00
Luke Faraone 5a37dd459a Use a list comprehension instead of a set comp. for Py2.6 compatability.
(imported from commit d3764623d2b6df13b4912920a10183928c63ae83)
2012-09-04 18:48:46 -04:00
Tim Abbott c059937f31 Remove fixtures from version control.
(imported from commit 32f17aa1b674e47d730a00cced8b5bed8a136755)
2012-09-04 16:34:39 -04:00
Tim Abbott 8f058937a0 Rename recipient.user_or_class to type.id.
(imported from commit 74639cd08d0f53ae39624fc793f6fe55325b6d45)
2012-09-04 16:34:39 -04:00
Luke Faraone 974b560659 Add autocomplete for personals, classes, and instances.
Here we pull in the jqueryui library and a style sheet to provide a widget
to do autocomplete for various fields. We populate a list of all ever-seen
classes, instances, and people (C/I/P) into JS arrays and then pass them to
jqueryui.

Each time a new C/I/P appears, we reinitialise the autocomplete functions
so they will notice the new data.

(imported from commit f1ab69c99d21f68ccf40c015bd43960f463c6ff2)
2012-09-04 16:14:48 -04:00
Jessica McKellar ee9da75f0f Give populate_db an optional number of zephyrs to generate.
(imported from commit ceebabf7d56ceb3bba00129dc9f334c72a4956da)
2012-09-04 14:28:47 -04:00
Keegan McAllister ac2553cdff Replace get_state with a variable embedded into index.html
(imported from commit 3ef4a0163107248618a25e242ab30fdff5da17e0)
2012-09-04 13:01:00 -04:00
Keegan McAllister e86216dff0 Add missing semicolons
(imported from commit f562f6e63368d5cb48ccba3b72981ff36a9cff30)
2012-09-04 13:01:00 -04:00
Keegan McAllister 9b5e47cd45 Don't select a zephyr until we've loaded them.
(imported from commit 04f72ae1e2ca67dfc1220baee11940008e0d2c91)
2012-09-04 13:01:00 -04:00
Keegan McAllister 2e8b1fa14a Use client-side templating to render zephyrs
(imported from commit 5ac650c3df0fa8caa823407d9d1a65a38f7e63c6)
2012-09-04 13:01:00 -04:00
Keegan McAllister 85215733d8 Import ICanHaz.js (yes, really)
(imported from commit b864603cfac2b3626e01d8ba7c89d030f7c0fa43)
2012-09-04 12:27:17 -04:00
Tim Abbott d85e80483f Eliminate the dummy row.
(imported from commit 4f0cd12e77cbe4d6a29baed9902c7c7074fcff27)
2012-09-04 11:49:13 -04:00
Tim Abbott 87188e2575 Filter newly arriving messages by the current view.
(imported from commit db23824bfc584d3b1bc0d6239d04988ca1b3ca4a)
2012-09-04 11:49:13 -04:00
Tim Abbott 633aceb054 Keep track of the current narrowing rules.
(imported from commit 0af6fc38f0f17a57428f64570139171dbede30fe)
2012-09-04 11:49:13 -04:00
Jessica McKellar 526ba5568f Add a missing @login_required on update.
(imported from commit b41ac9adb8886c736fb59051b8d83d3a9c6c0894)
2012-09-04 11:39:12 -04:00
Jessica McKellar f556702804 Add a missing semicolon.
(imported from commit c0676f077ee8655abd33a382cd01b0330eff4e82)
2012-09-04 11:38:10 -04:00
Jessica McKellar e51ab0cdfa Get pointer state from the server on page load, and scroll to that zephyr.
(imported from commit a1387d89378494a55f084f56ed9eb33c4f719dcb)
2012-09-04 11:36:36 -04:00
Jessica McKellar b0fe09c48e Commit some default fixture data.
This can be regenerated with:

python manage.py populate_db
./zephyr/tests/generate-fixtures

(imported from commit 6498c2bd1ab41a7532336e8102c1c7223e32466a)
2012-09-04 10:58:13 -04:00
Jessica McKellar 8ade4a189a Add basic page access, class, and personal zephyr tests.
(imported from commit 1054ceccb72b4708714cc3821456d73987923cbc)
2012-09-04 10:48:39 -04:00
Jessica McKellar 24abc27c28 Add a script to generate fixtures for use in unit tests.
This dumps the zephyr app tables and the auth_user table (needed for
UserProfile).

(imported from commit 471b84a532af711c263305297399c0cbf2f41eda)
2012-09-04 10:46:19 -04:00
Tim Abbott b784202128 Unify the various narrowing interfaces.
(imported from commit e2ddd5ae3ecaa385f1adf80b75a64534dd5b3950)
2012-08-31 17:58:20 -04:00
Tim Abbott 8506656df1 Fix bug in scroll_to_zephyr removal.
(imported from commit 4aca6534889012fd1b0e59dc88a156494b6ec51f)
2012-08-31 17:58:17 -04:00
Tim Abbott 6369da671b Clean up narrowing code to all use the same pattern.
(imported from commit 7f213ccdb31522a0fcb63cb69e2ea7677e3b352c)
2012-08-31 17:16:39 -04:00
Tim Abbott e4e3fde8a5 Rename narrow to narrow_class.
(imported from commit 8bd0f91ac7496d2da4706128b7d2c32acfad081c)
2012-08-31 17:16:09 -04:00
Keegan McAllister 115edb57b2 Eliminate tab characters from source code
(imported from commit 60c0742b8998ee08189b576b38cd0b4416f22b66)
2012-08-31 16:51:46 -04:00
Luke Faraone cd5b623cfd Reply to the recipient instead of the sender if replying to my own personal
Previously, if hamlet wrote to iago, and then hit "r" on his own message,
the form would prompt hamlet to reply to himself. Now, Humbug will DTRT and
prefill the form with iago instead.

(imported from commit cb3260d1d0bc89b184dac84ebf1e5642d0bc1606)
2012-08-31 16:50:24 -04:00
Luke Faraone 29a41d992e Blur buttons on submitting a zephyrgram.
This way the user can continue using the keyboard to navigate
after sending a message, without pressing additional keys.

(imported from commit 014997194f546fe56da063e19d3818e949a3ee7e)
2012-08-31 16:29:00 -04:00
Luke Faraone 3223d2e0ba Make scrolling Correct (a la Barnowl) without losing messages
Previously the wedge sometimes got lost when you scroll. Now, on a
scrolling action the selected message is moved in to the middle.

We also now use scroll_to_selected as opposed to scroll_to_zephyr because
there wasn't really a usecase for scrolling to a non-selected zephyr.

(imported from commit 5091b3a715f2253dfe302d4c7ea8a087ff9d508e)
2012-08-31 16:20:20 -04:00