Commit Graph

41993 Commits

Author SHA1 Message Date
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 6bb1dabed5 Add a 500 error template
(imported from commit 54c1e9a30cf87e28349eb39a566bf721ffdd4cf9)
2012-09-21 13:47:41 -04:00
Keegan McAllister e4b63aae95 Fix autofocus of the email field
...which is still called id_username.

(imported from commit f3ca47a5675bccf8c8acde536db042a88bc4b7b5)
2012-09-21 13:44:13 -04:00
Keegan McAllister 6a71cd9a51 Use a proper <label> for the username field
(imported from commit c7ddab5f4a41f30352bbbae9bff41f877f4b27b4)
2012-09-21 13:44:13 -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 f1476963bf Fix display of email address.
(imported from commit 3be3319dff6aa9d24ae3a7275a8e6d2c1c1113f4)
2012-09-21 11:33:56 -04:00
Waseem Daher 03a936f046 Add settings page, iconify menu.
I don't love some of these icons, so I view them as pretty temporary.
(I'd like, e.g., settings to be a gear.)

(imported from commit 0433f226082acc37392e97b20648be8eee704b7b)
2012-09-21 11:28:42 -04:00
Tim Abbott 94cab0042b Remove 'username' label in login form.
(imported from commit 474e8ac5f4946ea3a08f44f7653a8f1b9cef9c89)
2012-09-21 11:27:12 -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
Tim Abbott b040615cbe Move our server configuration into puppet.
(imported from commit fb1c096b46f23c56f2e08952cbbcc99b34ae0586)
2012-09-20 17:00:24 -04:00
Tim Abbott 1d36bbecef puppet-apt: Make priorities configurable.
(imported from commit 82ca93e510ec07251fed4c32bc0165c6e9187d6b)
2012-09-20 17:00:24 -04:00
Tim Abbott d757b630bf Import puppet-common from https://github.com/camptocamp/puppet-common.git
(imported from commit bb3ccac0dd0cc5688be0f1487092cbe34b107002)
2012-09-20 17:00:24 -04:00
Tim Abbott 5a4a5b0fc0 Import puppet-apt from https://github.com/camptocamp/puppet-apt.git.
(imported from commit 4940c1479b518971e1f3513315b046a571323604)
2012-09-20 17:00:24 -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