Jessica McKellar
fb62e808d7
Use an associative array for faster subscription checks.
...
This also helps us manage checking, case-insensitive, for
subscriptions while preserving the casing used by the class creator
for display.
It also fixes a bug where the class_list would become out of sync with
your true subscriptions, allowing you to appear to send messages to
classes to which you had unsubscribed.
(imported from commit 5e8d017bcfb27a71c52f7517733eda7b926d721b)
2012-10-09 17:28:21 -04:00
Keegan McAllister
26906777c1
Use 'reverse' when redirecting from home, for consistency
...
(imported from commit badd2a78cbe9d0007c7c8f515613761e68f01096)
2012-10-09 17:15:35 -04:00
Tim Abbott
2f910a1629
Show success messages on the subscriptions page.
...
(imported from commit 771fa4459e6a09ffc4132ccff12372b204334de2)
2012-10-09 15:44:55 -04:00
Tim Abbott
bcd958f051
Hide all status error messages when switching tabs.
...
(imported from commit 184802bc3bf5c02f992486353c7209d4c5d99b17)
2012-10-09 15:44:29 -04:00
Waseem Daher
8a620cb687
Group chat -> Huddle in narrowbar.
...
(imported from commit aa437792584849d008274886c6a0ca1858fb8ba7)
2012-10-09 15:11:10 -04:00
Waseem Daher
e7dab1f757
Set title text in narrowbar as well (this lets us mouseover if it gets too long).
...
(imported from commit be1e1f604016c2964d7b89cc50bfbc4113215819)
2012-10-09 15:10:20 -04:00
Waseem Daher
6916d02f26
Put class/instance/huddle-recipient names in the title tag.
...
That way you can at least see them by hovering on them if they're
too long. (I'd probably like a better solution long-term,
but this'll do for now.)
(imported from commit 8628be101475ea72865bcaeda7d7f5cfe6453931)
2012-10-09 15:03:45 -04:00
Waseem Daher
bc4a96f813
The animated composebox area must start off hidden to animate the first time.
...
Before this commit, the 'showing' animation works every time but the first.
(imported from commit c9d39ae46a272f35b2a2338057afac5f73beb812)
2012-10-09 14:29:06 -04:00
Waseem Daher
86dfc93f96
Reintroduce composebox animation.
...
So what's now happening here is that the outer div (which we were
previously animating) doesn't get animated at all; instead it is
simply made visible or hidden.
I *believe* this means that it always continues to take the same
amount of space in the DOM; its being added and removed seemed to
cause a slight height-of-page change which caused the scrollHandler to
fire, causing the selected message indicator to move down the page.
So now that this height is fixed, we achieve the animation instead by
animating the inner div -- the one that actually contains the
composebox elements.
(imported from commit 95b2f95d52254e3792633460f42efaac27559efe)
2012-10-09 14:25:18 -04:00
Waseem Daher
8083a149b8
Fix selected-message glitch on composewindow by removing animation.
...
The issue with the animation is that it removes the composebox div
when it's done -- or more relevantly, it "adds" it when the composebox
appears, which causes some DOM elements to get reshuffled slightly
which causes some jitter.
(Similar to what was happening with the email addresses earlier.)
So instead of using display:none, we play with visibility:hidden,
which causes the thing not to show up, but doesn't cause it to
lose its place in the DOM.
(imported from commit a18dbdcd1784b2b54436d48d8425d5fdc8dfbba4)
2012-10-09 14:25:18 -04:00
Tim Abbott
48a0c65bd6
Clear the class/instance values when replying to a huddle message.
...
(imported from commit 8953c6a8911503b4d938588e94d2323773f21c6c)
2012-10-09 14:18:55 -04:00
Tim Abbott
d5c89ffe9d
Fix needing to hit escape twice immediately after hitting "c".
...
(imported from commit 8132d61c14bcd012239c4364a249c3e52dd488c3)
2012-10-09 14:13:58 -04:00
Tim Abbott
1defb363e5
Disable hotkey processing on non-home pages.
...
(imported from commit 0865d2962e94d80cd1451e696e98ca6f9630ba1b)
2012-10-09 14:11:22 -04:00
Tim Abbott
5568e1a79c
Move hotkey.js jslint globals into check-all.js.
...
(imported from commit ec737e658e9f2251025e493abb92e4cf2a7aab72)
2012-10-09 14:11:22 -04:00
Tim Abbott
a5c8b5dc7e
Detect whether the user is currently in an input area correctly.
...
Rather than trying to keep track of whether the last thing that
happened was an input area being focused (which had all kinds of
bugs), just detect whether we're in an input area using the
appropriate jquery selector. Hopefully this has OK performance.
(imported from commit 6150692ffcb0ab9b04244c3d053b5527847ded2d)
2012-10-09 14:11:22 -04:00
Jessica McKellar
ad213fc810
Fix focus on create/sub buttons if you try to send to a new/unsubscribed class.
...
This is a regression introduced by switching from links to buttons,
which get blurred by hide_compose.
(imported from commit f5aa67cb949f3edc7f86a0ef0d7f48b43860138b)
2012-10-09 14:06:56 -04:00
Jessica McKellar
6050a0a251
Advance focus to the next input field after autocompleting class or instance.
...
(imported from commit 068009946f0581834e268f1ed3d5e7e6a940fcde)
2012-10-09 11:45:46 -04:00
Waseem Daher
c32a6a4d88
HTML cleanup since the two compose forms are now unified.
...
This also prevents the "bounciness" associated with the fact
that the stream/huddle selector was an absolutely positioned
div relative to the bottom of the compose window.
(imported from commit 413003a83c187efd45d0281f7cb6c9d0bd550674)
2012-10-09 11:14:21 -04:00
Jessica McKellar
e351439d0b
Don't have clicking on a sender prepare a personal.
...
It is confusing, and clicking on it should behave like clicking
elsewhere in the message.
(imported from commit e56434e8e143f6fa58b095e1c7d311b4aa24313f)
2012-10-09 11:01:28 -04:00
Tim Abbott
ad9f58d90a
Rewrite respond_to_zephyr.
...
The new version is now the only codepath that we use in order to start
a reply to a message.
(imported from commit dd28316d2640fd5fd712f326690d480b7db59c4c)
2012-10-09 10:40:27 -04:00
Tim Abbott
19a0e4a690
Fix totally backwards comparison and don't recompute the result.
...
(imported from commit 90b6711b668449aa550e1fdd6412030866e459aa)
2012-10-09 10:27:52 -04:00
Tim Abbott
67c08dfaf2
Set huddle_recipient even when replying to class messages.
...
(imported from commit dc91d66d87fb1b4c70d7b1842b733282c80b3e4a)
2012-10-09 10:27:52 -04:00
Tim Abbott
d510a62976
Rename huddle recipient field to #huddle_recipient.
...
(imported from commit 8670f06679aa1554003aa2832dec3ed6d00ad1c3)
2012-10-09 10:27:40 -04:00
Keegan McAllister
e1113a6d08
populate_db: Fix mit_subs_list import
...
(imported from commit b67abb47892d561b9e300a324528303694bcf8de)
2012-10-06 17:53:05 -04:00
Keegan McAllister
94e542e3de
Modify the right table in add_to_table
...
(imported from commit 0b4171556cff1e1e46ab1e3c64ec8bc74ac45576)
2012-10-06 17:43:09 -04:00
Jessica McKellar
321c2df67e
Autocomplete on each recipient when composing a huddle.
...
(imported from commit 0a95f431d960f8a39544d4598fd859a8090fbfa3)
2012-10-05 19:41:28 -04:00
Waseem Daher
9ecb978388
Hide the composebox's personal-message bar by default.
...
The form decides which fields to require based on whether
or not the personal-message bar is showing. Hide it by
default.
(Otherwise, both the 'Stream' and 'Huddle' prompts show up,
and you're obligated to fill out both of them.)
(imported from commit 13521ed5b7849f41c0335157d468f5e463c7f62d)
2012-10-05 19:05:14 -04:00
Tim Abbott
358351d423
Use the new_zephyr form for personal zephyrs, rather than a duplicate.
...
(imported from commit 741a785efba9ea40b5c1022d710360f086a2d859)
2012-10-05 17:44:55 -04:00
Tim Abbott
71d87499d8
Fix bug where hotkeys would still work in the compose box.
...
Just for the record, here's what happened:
If you click on a class message to start a reply, then click outside
to unfocus, then click on a huddle message to reply to that instead,
the system would end up calling the focus handler twice and _then_ the
unfocus handler once (why are we unfocusing something? Because we
have two compose windows -- new_zephyr and new_personal_zephyr, and
we're switching between them). the end result is that we'd re-enable
hotkeys with that unfocus handler.
Fix this by being sure to explicitly disable hotkeys after we setup a
reply to a message.
(imported from commit a7735d9a63f0c3c9f6c12d94e8bb107bf3675f44)
2012-10-05 16:38:09 -04:00
Waseem Daher
56bb7ae614
Make extra room when you press down on the last message.
...
This essentially reverts commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a,
though also adds support for this behavior with the 'j' key.
(imported from commit 36c51e0f6bd03c53b84abddc75097cb06fc04e16)
2012-10-05 16:32:47 -04:00
Jessica McKellar
a282f7b32b
Have PageDown at the bottom/PageUp at the top select the last/first zephyr.
...
As opposed to inching towards it message by message.
(imported from commit 31e833dd06bf27336d9b1f293ab992e99537bc21)
2012-10-05 16:06:10 -04:00
Waseem Daher
6de37bc9ad
Break long words in a messagebox.
...
(It's not totally beautiful, though, in that it causes
your timestamp to appear in a weird place, but it's
better than the alternative.)
(imported from commit 217b6545330f7850f2892df2e82df18976463361)
2012-10-05 15:57:59 -04:00
Luke Faraone
6e4daba2aa
Implement respond-to-author bound to the 'R' keypress.
...
(imported from commit d38b57d175a10423c566549371ae70032b02c29d)
2012-10-05 15:53:40 -04:00
Luke Faraone
b16c3f1982
Make hotkeys case sensitive.
...
Previously we triggered all hotkeys on keydown. Now, if the keydown event
is in the range of a character we bail and wait for it to be handled by the
keypress function instead.
We also redefine all of the keycodes for characters to be their lowercase
versions.
(imported from commit 534199de92174c2858220abb21ce774e1ee0e1d3)
2012-10-05 15:53:40 -04:00
Luke Faraone
6094f46b3a
Rename simulate_keypress; we're really faking a keydown event.
...
(imported from commit 2574afb738787311bc32885d36eaed862925d39c)
2012-10-05 15:53:39 -04:00
Tim Abbott
c02c6cc954
Display the date when either it or the recipient changes.
...
This is somewhat experimental and we may need to work on the condition
when it shows up (or move it elsewhere).
Also, maybe it should say "Today/Yesterday" for times super close to
now -- the main issue with doing this is whether it needs to update
without your reloading the page to avoid being super confusing.
(imported from commit e29faf30c83b9574e5d233213f42a24175f9a616)
2012-10-05 15:44:15 -04:00
Tim Abbott
d9f03d9842
Import xdate javascript library.
...
(imported from commit 6a9344a07672c377f38d29f6d8a5d866684c8456)
2012-10-05 15:42:54 -04:00
Tim Abbott
fc71233b9a
Show the sender line again if there is a delay between messages.
...
(imported from commit fffdb5d5fb5804c44af24e8e8037a7b4af14833a)
2012-10-05 15:42:54 -04:00
Waseem Daher
0c3ace82d5
Use throttling on our handling of scroll events.
...
This actually is a bit cleaner than our last approach,
because (I believe) we run our scroll handler code
even after the final scroll event, which prevents the
pointer from getting hidden by rapid scrolls.
(imported from commit 3bde4e8f067cd2406f90c04425c6e4ffb81ea784)
2012-10-05 15:39:10 -04:00
Waseem Daher
8333d44f31
Add jQuery plugin: throttle-debounce.
...
Minified version from
http://benalman.com/code/projects/jquery-throttle-debounce/docs/files/jquery-ba-throttle-debounce-js.html
As found on http://ejohn.org/blog/learning-from-twitter/#postcomment
(imported from commit 6a64017aeb93eacc524d9726f0d3c6baddca8828)
2012-10-05 15:39:10 -04:00
Tim Abbott
38c76266bf
Escape pound sign before running markdown parser.
...
(imported from commit 418f4f76c579b5db9ec7f30cfc92c3f815323756)
2012-10-05 14:59:23 -04:00
Tim Abbott
9cfa8a868f
populate_db: Read from the correct messages log path.
...
(imported from commit ec7ef103ddf06cdc89c02659ceefcab1f64c89e4)
2012-10-05 14:59:23 -04:00
Jessica McKellar
7a88fd71e6
Fix broken math for scrolling at the top or bottom of a stream.
...
(imported from commit 2ba6ab58800b86cd5b31a1b6e235c0be51d985c1)
2012-10-05 14:50:28 -04:00
Jessica McKellar
3166921057
Implement Barnowl-style pointer centering.
...
This keeps the pointer in the middle 3/5ths of the screen and
asymmetrically handles going above or below those bounds.
(imported from commit 9a6033f53365e6d6cd8f82eb096af849e3b22542)
2012-10-05 14:50:28 -04:00
Waseem Daher
0eb6817d6b
Remember scrollbar position as you switch tabs.
...
(imported from commit d71112acd81901fd5e6c6d8ddfae3c9f0a8ff4db)
2012-10-05 14:25:27 -04:00
Waseem Daher
32758e2e4b
Don't have scrollhandler fire when the 'home' tab isn't active.
...
(imported from commit 242591730e5ce108c511e4eeaad7589d768b1b94)
2012-10-05 13:35:23 -04:00
Waseem Daher
6d37154a36
Better, but still not great, small-window behavior.
...
I'd like it to ultimately be the case that if you make the window
too narrow, the menubar goes to the very top and has small icons.
(imported from commit 0a5fe548d4d848c0358c9780df7af1fe1abc93fa)
2012-10-05 11:50:40 -04:00
Waseem Daher
c59cb40a71
CSS cleanup.
...
Try to adhere to Bootstrap grid system a bit more consistently.
Unstyle subscriptions page for consistency.
Still not sure why the "affix" jumps when we switch to "Subscriptions."
(imported from commit 1c28de4e2ef3d6ed3d1bdcfd143eadefba2b46cb)
2012-10-05 11:50:40 -04:00
Tim Abbott
6a7ce4cfe8
Comment out instance validation until we figure out what we want.
...
(imported from commit a1c22f9744f28635c67602a682bdb00cba0037ae)
2012-10-04 18:11:12 -04:00
Luke Faraone
8fc22ab5b4
Clicking on a zsender should populate the stream box, too.
...
(imported from commit d933053c9b081457cb523d90fee4daa0cc65fae1)
2012-10-04 17:59:04 -04:00
Keegan McAllister
8bf693224c
Fix up attributes on links (whether auto-linkified or not)
...
(imported from commit cf362db2a2c9500f62b03a89055ac4585ba00a96)
2012-10-04 16:52:10 -04:00
Keegan McAllister
b8fb58968e
Implement conservative linkification on the server side
...
(imported from commit 970bcb4adf980d386442602fbb6297919fcee4d9)
2012-10-04 16:52:10 -04:00
Keegan McAllister
2ebd708a8d
Remove client-side linkification
...
It causes problems when [un]narrowing, and we already do the rest of formatting
on the server side.
This reverts commit 90af0192b37bbebbf56d5e7c50f182485ddbca10.
This reverts commit df7e355648d2c4d6319de049933547ed96402fd8.
(imported from commit 99d87f0826ec2f49741f86fad6524ed93e76723f)
2012-10-04 16:52:08 -04:00
Tim Abbott
12ea2895ea
Add a json_success style result to updates responses.
...
(imported from commit 6492f98f1e1f5b7622caa2f3427ae60bdfd3df0e)
2012-10-04 16:38:44 -04:00
Tim Abbott
27fdb10cbd
Return clean invalid user errors using the API.
...
(imported from commit 2f1687cbe8797ce42e66b340e87400720acd4054)
2012-10-04 16:38:44 -04:00
Waseem Daher
738fe500f0
Unbreak settings/subscriptions windows with some div cleanup.
...
(imported from commit 427ead3b0cb6ddaf399394ca6c3e363cc8264efe)
2012-10-04 16:35:53 -04:00
Luke Faraone
c3a9d60741
Partially fix a test that wasn't actually setting a variable.
...
This still doesn't work for blocking reasons, but that's a TODO for later.
(imported from commit 8a1ebb5d0d964be95c9f458c254ef5767526bb24)
2012-10-04 15:59:15 -04:00
Waseem Daher
e28373ec13
Properly handle refocusing pointer on both scroll and mousewheel events.
...
When you're at the top of the page, you don't get scroll events
anymore if you're scrolling with a mousewheel. So we need
to listen to mousewheel as well as scroll.
(Why not *just* mousewheel? Because then the scrolling done by
PageUp and PageDown no longer causes the pointer to refocus,
because those trigger scroll events.)
(imported from commit 4ee23004f6e090abaabb836f0a9d7b59d0394ced)
2012-10-04 15:47:21 -04:00
Waseem Daher
93dbb21aff
Prevent glitching on scrolling.
...
This duplicate call to scrollTop is the source of our problems.
(imported from commit 4374e0837d2af5eb20545449469fade7b5d47aca)
2012-10-04 15:47:21 -04:00
Waseem Daher
14daa08726
Restore scrolling behavior in this brave new scrolltheworld world.
...
There still seems to be some glitching when arrowing around,
which still needs some investigation.
(imported from commit 9c4d8f2b0b55fda5077e2fba70cbe4bcd50b823a)
2012-10-04 15:47:21 -04:00
Waseem Daher
a436745ab6
Remove dead CSS: bottom-nav.
...
(imported from commit a1bcadc6933b2c2b8a5ac19f960d96592fc1ab5e)
2012-10-04 15:47:20 -04:00
Waseem Daher
fe3fcd334e
Remove dead code.
...
This code is the start of something that would make your
narrowed-on message remain in the same place post-narrow,
which is possibly a good idea.
(imported from commit 0a557d6492de470928245b33f95ae8c0102db0a6)
2012-10-04 15:47:20 -04:00
Waseem Daher
0fcec1aad9
Remove high water mark code.
...
(imported from commit 308148b2b54709354d219fd7c0ba1ae63f7e7503)
2012-10-04 15:47:20 -04:00
Waseem Daher
c7175f5f43
Delete code that repositioned window on last message.
...
I believe we'll get this for free with the new version of
select_zephyr and our bottom_whitespace div.
(imported from commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a)
2012-10-04 15:47:20 -04:00
Waseem Daher
59a00cb1ab
Eliminate scrolling-tab.
...
scrolling-tab used to be used to target which tab would be a recipient
of the scroll events generated by PgUp, PgDn, etc. Since we now let
the browser handle these natively, we don't need to worry about it.
(Instead, when we hook the 'scroll' event, we should make sure that
home screen.)
(imported from commit c555d960da995a09b370867c96d17f4ce4f2171f)
2012-10-04 15:47:20 -04:00
Waseem Daher
1f669e1c85
Do a little handling of Home, End, PgUp, PgDn ourselves.
...
It turns out it's marginally easier for us to completely handle Home
and End ourselves rather than let the browser do it, because home
scrolls to the top of the page, but it does not select the topmost
message.
With PgUp and PgDn, the default browser behavior is fine,
but it seems like PgUp on a screen where you're already
"scrolled to the top" should not be a no-op.
(imported from commit 609d639f3a4313e75e1fd6138966f15447b70f2e)
2012-10-04 15:47:06 -04:00
Waseem Daher
ff227d3384
Don't absolutely position zephyr_list.
...
This causes #home to expand to contain it, which is great because
now we can bind to things like "click" or "scroll" or "keydown"
that are in #home.
(imported from commit 3efe95a7a96f7aee9983369848bf9e7210e00c66)
2012-10-04 15:45:59 -04:00
Waseem Daher
9c28c6cca8
Hack for bottom_whitespace.
...
(imported from commit c87576c298ec2f33a8cd9ff524a9966c469431b4)
2012-10-04 15:45:59 -04:00
Waseem Daher
86ffd0de7a
Make composebox look better.
...
Make it look as wide as normal messages, and improve the closing 'x'.
(imported from commit 2aae92192ba8fc9bc4ee28a57755c4bd40726fb4)
2012-10-04 15:45:59 -04:00
Waseem Daher
1f9833a08e
Adjust size of narrowbox and compose window to match up.
...
Since we're no longer hiding the scrollbar, we need to make
up for that lost space.
(imported from commit bcedb39578ff74b176ef22f3ba64eb69ae149cad)
2012-10-04 15:45:59 -04:00
Waseem Daher
785485041d
Allow the whole page to scroll for 'Home'.
...
(imported from commit a61627cca0fb3624b343fae5b9a575f1b389e57a)
2012-10-04 15:45:58 -04:00
Waseem Daher
94663ed215
Enable scrolling in a reasonable way on tabs other than 'Home'.
...
(imported from commit 11a7b6e0055b5202003a0cdb93d90f5f9ebedf2a)
2012-10-04 15:45:58 -04:00
Tim Abbott
615e520c00
Add '.' to the list of valid class name characters.
...
(imported from commit 1d6c000434776b0b63f47bb514345746ed18bab9)
2012-10-04 15:17:12 -04:00
Tim Abbott
251177e8cf
Add a server-side check that class/instance names are valid.
...
(imported from commit 4534239e57b08b4d01d2caa68134e205ce6c225a)
2012-10-04 14:48:01 -04:00
Tim Abbott
2a79ff0cc8
Rename 'zephyrs' => 'messages' when formatting a message list to send to clients.
...
(imported from commit bfbb556f2444aca8277f54c363eccb678b6bf2dc)
2012-10-04 14:42:38 -04:00
Tim Abbott
8c11aeb7ee
Rename zephyr_backend => send_message_backend.
...
(imported from commit 78eb5884777a6631dd6a6a82c21295ee8ee49c11)
2012-10-04 14:38:07 -04:00
Tim Abbott
7991e6e281
Replace 'zephyr' => 'message' in code internal to views.py.
...
(imported from commit 92d7bc82bd8f6edae1e59cab3e0bd8b7d035775e)
2012-10-04 14:38:07 -04:00
Tim Abbott
89c73ca25f
Replace 'zephyr' => 'message' in code internal to models.py.
...
(imported from commit 16449713202a915d12d3de2e4b4b6ac56e6d6237)
2012-10-04 14:38:07 -04:00
Tim Abbott
c83efefcc7
Replace 'zephyr' => 'message' in test suite.
...
(imported from commit 550a4b1f3c45e3275181a04b3a892040ef508dc5)
2012-10-04 14:37:36 -04:00
Luke Faraone
d8b678c75d
Emails with plus signs no longer are rendered with spaces in /accounts/login
...
(imported from commit 55fff703924ef28060f0b91af3a6f06a1a636197)
2012-10-04 14:27:49 -04:00
Luke Faraone
15a99f6be2
Remove errant console.log.
...
(imported from commit 3cfb7991e01417274387ab0e36c1c950a0a865c6)
2012-10-04 13:33:59 -04:00
Keegan McAllister
c456e2850a
Allow console.log in debug.js
...
(imported from commit fe965c9687f0080c639ab3526b245ca3304e5672)
2012-10-04 12:36:59 -04:00
Keegan McAllister
f30f10b71d
Remove console.log calls in get_updates
...
We haven't needed these lately. If we see more problems that need diagnosis
"in the wild" then we can revert this commit.
(imported from commit 3885183d08aefa1f7fd7aa8c2c060e917bf215fb)
2012-10-04 12:35:53 -04:00
Keegan McAllister
c1c8ce9e53
More style fixes for signup.js
...
(imported from commit 15303c4e0dbf342da752d5f215cbcb0e8c6652f5)
2012-10-04 11:05:34 -04:00
Keegan McAllister
fcfcf834a1
Replace 'in' with .hasOwnProperty
...
(imported from commit 209aef184f0a6117d1c14e755e7b916a866b8702)
2012-10-04 11:04:26 -04:00
Keegan McAllister
bdf1e7e25c
Introduce a function for controlling whether keydown is interpreted as message input
...
(imported from commit 88194bf560257ec0c4033076703d24c670a2c4ba)
2012-10-04 11:04:26 -04:00
Keegan McAllister
46a788202d
Move go_to_high_water_mark back to zephyr.js
...
(imported from commit 843199811bf16afd4b54c2b0467b3b18d431b73a)
2012-10-04 11:04:25 -04:00
Keegan McAllister
0830799ce4
Move persistent_zephyr_id to the file where it is used
...
(imported from commit 1960e61b638a7c2eb832648b71d6f49f6b409b36)
2012-10-04 11:04:25 -04:00
Keegan McAllister
c944c08e79
Drop JSLint directives
...
(imported from commit 5a091b4cb23bae5c307ad19cb772b878d605fbfe)
2012-10-04 11:04:25 -04:00
Luke Faraone
120d0aa99d
Validate the register.html page.
...
(imported from commit 10ce8b637ae40ab733c01c2adbf6a2ad61a85d82)
2012-10-04 10:59:43 -04:00
Luke Faraone
89ed4441fd
Update to the latest version of bootstrap.
...
(imported from commit 844f0f2f977710da06460cb84c9225f0f1a4e0dd)
2012-10-04 10:54:15 -04:00
Tim Abbott
fbf321c783
Revert "Add hopefully temporary hack to deal with bad zephyrs in DB."
...
This reverts commit 85fc39c39c7602990f4d8be15aa96349c544d16f.
(imported from commit b0c111a9288a92c739d5d439b6dfeaa8a4e78dd8)
2012-10-03 22:40:50 -04:00
Keegan McAllister
2f749afc8d
Tweak JSLint options
...
(imported from commit 7e7582a48228b879ea29c2a27eb22e46e093f9dc)
2012-10-03 18:26:00 -04:00
Keegan McAllister
1cbceeec87
Fix more problems uncovered by lint
...
(imported from commit 7fb8432f362f22770334e6bd1161a61b0bc0e528)
2012-10-03 18:26:00 -04:00
Keegan McAllister
9c6bf90fad
Misc. style fixes
...
(imported from commit b1f32a19a280e3efacf207bfe22bd10eb3aec537)
2012-10-03 18:26:00 -04:00
Keegan McAllister
d4217b4383
Add jslint options to each file
...
(imported from commit f49cdbfd655d8d8fdff792f525c7abc58951dacb)
2012-10-03 18:26:00 -04:00
Keegan McAllister
8e47b33645
Move still more validation
...
(imported from commit a98d145168abc743888fb4a88dc00c925f138b00)
2012-10-03 18:26:00 -04:00
Keegan McAllister
2508e87d03
Fix an undefined variable
...
(imported from commit ed2432b4414617e97d61c84c9636e771e9c05b81)
2012-10-03 18:26:00 -04:00
Keegan McAllister
534cf77265
Simplify validation logic
...
(imported from commit aec56185fae88c3c51611a15fc11d44fa120951e)
2012-10-03 18:26:00 -04:00
Keegan McAllister
d619618fed
Move more validation
...
(imported from commit 62d660a3c34f4aeb170771ee85580362a2c1b8a7)
2012-10-03 18:26:00 -04:00
Keegan McAllister
0c76788ed5
Move some validation functions
...
(imported from commit e482108981b2b4caa6159060729766b4d224db23)
2012-10-03 18:25:59 -04:00
Keegan McAllister
c2ddde2053
Move some settings stuff into ui.js
...
(imported from commit dea0a6fac11fb3349ac09e90c01d9313ee69c001)
2012-10-03 18:25:59 -04:00
Keegan McAllister
ffff63eaad
Move some subscriptions-related code
...
(imported from commit 49f6e525e3aa8a7a5336f713c94e81fee6546dfa)
2012-10-03 18:25:59 -04:00
Keegan McAllister
8d17de1247
Move some early setup code
...
(imported from commit ca57718e4a71f43bbf229d2a6e8c70174bb3583f)
2012-10-03 18:25:59 -04:00
Keegan McAllister
50d84e9ca8
Move some UI-related code
...
(imported from commit 28dc554ed91c14f8a8b4be282a211d3d50cf9873)
2012-10-03 18:25:59 -04:00
Keegan McAllister
37f8445318
Split more files out of zephyr.js
...
I would like to have split this into several commits, but it's hard to do
incrementally, because functions need to be defined before their use in global
data.
(imported from commit 31533396b236f3b657950b073982c317256f082a)
2012-10-03 18:25:59 -04:00
Tim Abbott
6789356b4b
Add hopefully temporary hack to deal with bad zephyrs in DB.
...
(imported from commit 85fc39c39c7602990f4d8be15aa96349c544d16f)
2012-10-03 18:23:45 -04:00
Tim Abbott
e59d7cae48
Rename the Zephyr log to the Message log.
...
(imported from commit 7dedfb76b6b78ea90a2bfd20788e251c9c29ef47)
2012-10-03 18:14:15 -04:00
Tim Abbott
52a36945fe
populated_db: Rename many functions/variables from zephyr => message.
...
(imported from commit d796561eded00511e4dfd7fe2bd5ac102125d4ea)
2012-10-03 18:14:15 -04:00
Tim Abbott
1ab81cff92
[schema] Rename Zephyr => Message in the schema.
...
(imported from commit 4f402f150c45d2097d6b16943935e6e370b4f8d8)
2012-10-03 18:14:15 -04:00
Tim Abbott
6bce5f95b0
Fix the no-apply-markdown case.
...
(imported from commit aeaa2cec9858ff028a58e7c0c8bf06f5d3200c8e)
2012-10-03 18:14:15 -04:00
Tim Abbott
ed8042da73
Fix bug where starnine@mit.edu always gets added to zephyr-forwarded huddles.
...
(imported from commit 3ab930ed8ad6ce917b33483bd5af3cf27452f6da)
2012-10-03 17:55:14 -04:00
Tim Abbott
abd97578c0
Fix zephyr mirror unicode issues, hopefully once and for all.
...
This code successfully sends every message in our corpus of past
zephyrs.
(imported from commit 14d42ca9288e2a218eaad880691d6bd213a045ce)
2012-10-03 17:55:14 -04:00
Keegan McAllister
f2a73985c9
Fix my own variable typo (whoops)
...
(imported from commit d12467db2756281fe0710645825c54c269ab6781)
2012-10-03 17:39:14 -04:00
Keegan McAllister
db224c1c24
Fix other problems in signup.js
...
(imported from commit c4562cae29a635454990f093932ff8dd9879ead3)
2012-10-03 17:34:53 -04:00
Keegan McAllister
d18a79ad07
Fix wtf control flow in signup.js
...
(imported from commit d4cb46cda138c542884e0373b4498b4f7890ef51)
2012-10-03 17:34:53 -04:00
Keegan McAllister
5a6247288a
Fix typo'd variable
...
(imported from commit 971e5d28cb14826b020d6e130cd62e600d88a168)
2012-10-03 17:34:53 -04:00
Tim Abbott
83ceba0a2d
Remove old /api/get_updates view.
...
(imported from commit 5a33a61bfb4b3aa40e28c356f5b4048db775b901)
2012-10-03 16:58:31 -04:00
Tim Abbott
9223f7932c
Convert zephyr_mirror humbug sending to use the API.
...
(imported from commit 948a12a1dca903c47b7427248688f2079c7eecdb)
2012-10-03 16:50:29 -04:00
Luke Faraone
3a7dda5099
Replace usage of send_status.toggle() with the more clear .show()
...
(imported from commit 0593222b16bf845b7bcd9075d02c156a05764c12)
2012-10-03 13:56:35 -04:00
Tim Abbott
40ae6080ee
Wide the deduplication windows for catching huddles to 10 seconds.
...
(imported from commit 0d05ef03a08d285bc4d9967553c25448104586a7)
2012-10-03 13:51:38 -04:00
Luke Faraone
ca50ecb945
Align registration form components for consistency.
...
(imported from commit 7933ea5fbc01c7d2ddd0bda71b5d2344aa6349a5)
2012-10-03 13:51:01 -04:00
Waseem Daher
2c294694fd
Restyle narrowbar to avoid wrapping.
...
Previously, when we narrowed on a super-long class/instance or
a huddle with lots of people, the box overflowed. This is an
attempt to fix that, even if it isn't the prettiest.
(imported from commit 4eb58726a4c4714bd5435a791ad8fea0eabb58ed)
2012-10-03 13:38:33 -04:00
Keegan McAllister
66265aa5bf
Get rid of the send status bar for non-error conditions
...
(imported from commit 999ca5a02e95f4756e00b4769260f5a84e2440da)
2012-10-03 13:15:22 -04:00
Jessica McKellar
97542d1eb5
Re-focus on new subscription input box on an invalid subscription.
...
(imported from commit d4876dc43eabe73655928db58ca5ad1ed74fa336)
2012-10-03 13:08:33 -04:00
Jessica McKellar
aa2e4efc2c
Fix typo preventing focus on new subscriptions box after tabbing over.
...
(imported from commit 45a6dd8e514a2233517cfaea5a5c0b8d94c62f46)
2012-10-03 13:05:58 -04:00
Jessica McKellar
f4e04a045a
Focus on new subscription text box after adding a new subscription.
...
(imported from commit d23bc2d15cce67bc75c2f4ef406de73373b8f3ea)
2012-10-03 13:05:58 -04:00
Tim Abbott
01bc4aaf28
Remove 'zephyr' from invalid message type error.
...
(imported from commit 360ffc5bfbb12f65af83093ee5a83ac7caa5c464)
2012-10-03 12:30:39 -04:00
Tim Abbott
7acfb5c71c
Rename /zephyr/ to /send_message/.
...
(imported from commit 41c2ff67cfc514e53aff8648c36f545526e324ed)
2012-10-03 12:30:37 -04:00
Tim Abbott
828e0d4afb
Rename forge_zephyr to forge_message.
...
(imported from commit aa2dc6e24a9c1bd6be09bfa26241663ae143cef9)
2012-10-03 12:27:34 -04:00
Tim Abbott
6b7a996389
Rename log_zephyr to log_message.
...
(imported from commit 81baa2619148790ca6d814bf83e14651f45f512e)
2012-10-03 12:27:34 -04:00
Tim Abbott
cca5f7b76a
Rename do_send_zephyr to do_send_message.
...
(imported from commit df4dc741bf00a197ca5ab39373bc9a3eda379684)
2012-10-03 12:27:34 -04:00
Keegan McAllister
6cdd1c3e8b
Re-select the selected message by ID after prepending
...
(imported from commit 24f6f17bee8c041fce39a710b8b77f14d3ef7dbe)
2012-10-02 18:39:21 -04:00
Keegan McAllister
f03efcd788
Simplify initial pointer selection
...
This code had decayed from something more substantial into a kind of silly loop.
(imported from commit a6668c19bd6d50325460ac4fa4146d7f82fec58b)
2012-10-02 18:24:54 -04:00
Keegan McAllister
8bc01c85f1
Collapse new with old messages when prepending
...
(imported from commit 0279183c9a2c70b1fe42f60f4423327aaf2dc7b8)
2012-10-02 18:24:54 -04:00
Keegan McAllister
6baacf6815
Exit add_to_table early if we have no messages
...
(imported from commit 3860d97344f6008d57829c0040363eb8491ec231)
2012-10-02 18:24:48 -04:00
Keegan McAllister
08dfe8d56b
Remove unused conditional class on bookend
...
(imported from commit b82be52ff48575fc34672cd5fb2984039622e7e2)
2012-10-02 18:24:03 -04:00
Keegan McAllister
10201460c8
Allow passing the table name to get_zephyr_row
...
(imported from commit 098e64b5003eb7844f8d5ccd8aefd982af1b5c6e)
2012-10-02 18:24:03 -04:00
Keegan McAllister
b8cca0a094
Track the groups of collapsed messages in each table
...
(imported from commit 26df33856966f2ac4dc86de9f3436b4499c17089)
2012-10-02 18:24:03 -04:00
Tim Abbott
d2884ba456
Make connection errors disappear more efficiently.
...
Previously, connection errors would stick around after a problem with
the server until (1) the server was fixed and (2) we later received a
message. This code change eliminates condition (2) by having the
server return immediately with no messages in the event that the
client has accumulated a large number of errors.
(imported from commit 6a9b08e534db6daea0041a71556ef5b708e935ed)
2012-10-02 17:46:06 -04:00
Tim Abbott
e79805847b
Rename the 'new_zephyr' argument to the more descriptive 'content'.
...
(imported from commit b47e2c4823bbfbf2f94cbafb24ed5d78dfbe841b)
2012-10-02 17:29:55 -04:00
Keegan McAllister
5fe3787ded
Maintain one layout-setting row at the top of each table
...
(imported from commit b375ea78d79ca39b486d124256d0d4e89558d83a)
2012-10-02 17:21:20 -04:00
Jessica McKellar
52327a0484
Give a more accurate error message on new subs from home view.
...
(imported from commit 5521e27ad63717d5a8ba325172726619bc8114cf)
2012-10-02 17:17:27 -04:00
Jessica McKellar
f54d1d16cc
views: remove unused variables and imports.
...
(imported from commit 9f421867caac561556e47ce79528432fe1b3b2dc)
2012-10-02 17:17:27 -04:00
Jessica McKellar
555acb1e62
models: remove unused imports.
...
(imported from commit 97855ff47a6a1d58e0d0f5bad4613504437150c3)
2012-10-02 17:17:26 -04:00
Waseem Daher
9fd3d79118
Ellipsize long huddle names, too.
...
(imported from commit 6e3dc5fa50323b23d5e07e906ab8e84f8170f50c)
2012-10-02 17:13:22 -04:00
Tim Abbott
be1a890a09
populate_db: Restore users' pointers to last after database resets.
...
(imported from commit d6c5a58173602e7e07b6851a6d22ed129b4f3733)
2012-10-02 16:58:13 -04:00
Tim Abbott
5a5b5de650
Rename /api/v1/get_updates to /api/v1/get_messages.
...
(imported from commit f856637158cf9fda64ba333b532a5941de8fcbab)
2012-10-02 16:29:34 -04:00
Waseem Daher
61c7558b65
Long class and instance names get auto-abbreviated.
...
This required some serious retooling of the table,
and some thinking about the interactions between
table-layout: fixed and colspan.
And some of it is still a little magic-number-y.
(Like that 97% width on zephyr_compose_box -- without
it, the stream compose box looks weird in Chrome,
but not Firefox.)
(imported from commit 20c426ad2dae5efa3107890b28976a957bb3d1e3)
2012-10-02 16:00:46 -04:00
Jessica McKellar
abb47a6a7d
Fix bad class name comparison in add_zephyr_metadata.
...
(imported from commit 7e03ba4a4b3b8af5b080a273a0b480743b1b7e90)
2012-10-02 15:58:17 -04:00
Tim Abbott
18a3888373
[schema] Add an API for sending/receiving messages.
...
(imported from commit 209d525dc5892fc4c392a8ced1588c838cbb17c4)
2012-10-02 15:49:25 -04:00
Tim Abbott
60cb2daab7
zephyr_mirror: Move to the API subdirectory.
...
(imported from commit cea9809770e66ceb7baf63c444715e01ed97aa8c)
2012-10-02 15:49:25 -04:00
Luke Faraone
4dcde9b11a
Unescape Zephyr content before wrapping.
...
Now we no longer have weird wrapping based on the length of escaped lines.
(imported from commit fa2c9bc0903e22858acc2af4cd6be34e28ea25db)
2012-10-02 15:20:20 -04:00
Jessica McKellar
33ad7817a4
Require that the first character of a class be a number or letter.
...
(imported from commit a4d1c23f784107198045aee7cec1f53ab5114762)
2012-10-02 15:16:26 -04:00
Jessica McKellar
ec36170511
Fix buggy class name validation regex.
...
A-z != A-Z. The former permits problematic characters like "\".
(imported from commit 2bcda8683e630eaa6cbc3a2b9d0bda7a8448a8fa)
2012-10-02 15:16:26 -04:00
Jessica McKellar
588db5b4c5
Make class names case-insensitive.
...
(imported from commit e76e50156ca8dab1f7b3124351997e75ef08e521)
2012-10-02 15:16:26 -04:00
Luke Faraone
0c47459733
Also escape &s.
...
(imported from commit 8a76089492b0e7f7ff2635e7091485db2d7292c4)
2012-10-02 15:11:55 -04:00
Luke Faraone
f2b7d08191
Treat newlines in humbug messages as line breaks, a la StackOverflow/Github
...
(imported from commit d200d24fec80be5702760dda229295125142e9b2)
2012-10-02 14:31:18 -04:00
Luke Faraone
cb76dfe59c
Unescape Humbug→Zephyr messages.
...
Previously, messages containing "<" or ">" would show up HTML-escaped when
forwarded to MIT zephyr.
(imported from commit 9ce6f819878f80ee9c2fe438d02a5e25807e4201)
2012-10-02 14:31:18 -04:00
Tim Abbott
f7689d400f
zephyr_mirror: Improve retries for forwarding back to MIT.
...
(imported from commit b8a4b3b9d0d27eae1e604db2c308b109009278d6)
2012-10-02 14:08:00 -04:00
Waseem Daher
a200edb6ed
Tighten up space between messages.
...
(imported from commit 83989506282dab220f68bbd3d9612db044e73320)
2012-10-02 13:26:51 -04:00
Tim Abbott
45c22c95af
generate-fixtures: Remove zephyrdb.test each time.
...
(imported from commit 08bd0abcbafd8e6277dcd190b0fef1b9cc0f2da5)
2012-10-02 12:02:43 -04:00
Luke Faraone
729d3ac602
Fix registration test, now exercise the email sending and verification code
...
(imported from commit 62979bbfec107ba53a9209c0fe115ce08ffd0e58)
2012-10-02 11:47:28 -04:00
Jessica McKellar
2f1a3dd39c
Don't allow empty class/instance/recipient/message on zephyrs.
...
(imported from commit 2f8e6e0d6a2f046208f5d10d495e50d72197f79f)
2012-10-01 18:14:27 -04:00
Tim Abbott
e9d5532a41
Make the test suite faster.
...
(imported from commit 7baf86f0d615f05eec9873b84cf4c88476798895)
2012-10-01 17:58:40 -04:00
Tim Abbott
029ae76a4a
Fix some of our get_updates tests.
...
(imported from commit 250411476c6fc71cff868b16a2ab766d81c4b6b3)
2012-10-01 16:58:41 -04:00
Keegan McAllister
ae228a9a70
Remove unused get_all_zephyr_rows
...
Arguably incorrect in the multiple-tables world.
(imported from commit 6902972a12c6484e78750d055292510d9637cf42)
2012-10-01 16:42:00 -04:00
Luke Faraone
9f80a2f6b3
/accounts/register now returns bad request; can only be POSTed.
...
(imported from commit a7cf361c43fc41fdd47a58a92afa484c25c4417d)
2012-10-01 16:03:00 -04:00
Jessica McKellar
28e668bb46
Handle home view subscriptions error cases.
...
(imported from commit 7f31b5c4837c524c3ad5a0538ca1f01ad73141a3)
2012-10-01 15:36:10 -04:00
Jessica McKellar
8727b1667c
Check if a class name is valid when checking for existence.
...
(imported from commit f4de50b52c851058b736033d447ea7fa6777a3d4)
2012-10-01 15:36:10 -04:00
Luke Faraone
160744788a
Disable hotkeys when preparing a huddle after clicking on a username.
...
(imported from commit a27ed2734dc3e8ca1a9a1aba8f672c10a6a6fb92)
2012-10-01 15:20:25 -04:00
Keegan McAllister
4bd3f009c0
Prepend to zephyr_array if where === 'top'
...
(imported from commit f1150f36bedd07275749ca7c8dfd84296ebc9438)
2012-10-01 15:03:16 -04:00
Tim Abbott
c36790c7ba
zephyr-mirror: Fix race where we'd miss some messages.
...
(imported from commit b807bf3a487fa67ad4bceece37d899a0b13c4418)
2012-10-01 14:48:04 -04:00
Tim Abbott
864a51f424
Force all zephyr mirror users into @mit.edu domain.
...
(imported from commit 58c9038164d7bddbb4c0d4d27582580448ae8cdc)
2012-10-01 14:36:12 -04:00
Tim Abbott
720813ea7b
Print timestamps to zephyr mirror console.
...
(imported from commit 9aacfc5384d70cd627e78577c4f8ef3d25fc7942)
2012-10-01 14:36:12 -04:00
Tim Abbott
ce979592b0
Don't send zsigs to the Humbug server.
...
(imported from commit 376dcda28063466de3dbc3a461130218bfd49d7b)
2012-10-01 14:36:12 -04:00
Luke Faraone
aca5cef3eb
Redirect to login when attempting to resignup with a used email address.
...
(imported from commit d58a5dda9a0af409a6ee57cfcd30be45020352d2)
2012-10-01 10:45:58 -04:00
Luke Faraone
50dfbf7a1b
Implement confirmation for new user signups.
...
We add a few templates for django-confirmation. We define a
"PreregistrationForm" which is validated by accounts_home, which then
generates a confirmation object and emails the user. This required creating
a new table for a PreregistrationUser with an email and status (confirmed)
field.
The register function now no longer accepts a "email" field in the form
and deals only with confirmation IDs to determine the email used to sign
up a user.
(imported from commit 4fcde04530aa7ad4de84579668daee7290b424ac)
2012-10-01 10:45:58 -04:00
Keegan McAllister
5556bdd0a1
Put the type conversions back into return_messages_immediately
...
This had broken the check 'if last == -1'
(imported from commit 2154dbda696d72ea14c841f43511846a87e4ba0d)
2012-10-01 10:14:47 -04:00
Luke Faraone
1467901f1a
Include a favicon for the Humbug app.
...
(imported from commit 3481d7f3c06ec0c656e15d147f46faf9cd99837a)
2012-09-29 21:31:57 -04:00
Tim Abbott
f224ba72d4
Add TODO for why the current message getting API is bad.
...
(imported from commit 40b80e9ba190e2eba790a39039dafd6485ec469f)
2012-09-28 21:13:51 -04:00
Tim Abbott
b4f7165072
zephyr_mirror: Add print statement for message download retries.
...
(imported from commit 8fc38d709679371ca338e7d819f3cf5e6d061935)
2012-09-28 21:13:16 -04:00
Tim Abbott
85da33c4ee
Fix return_messages_immediately.
...
If the relevant keys don't exist, Django returns a
MultiValueDictKeyError, which wasn't one of the ones we had exceptions
for. This was breaking the API.
(imported from commit 1c1394006afcbdbee9465ad8c8c667ed5de5a346)
2012-09-28 21:08:39 -04:00
Keegan McAllister
25eeaabe47
On load, send a range around the pointer, then fill in later, then earlier
...
This still doesn't handle collapsing entirely correctly for the backfilled
messages.
(imported from commit d1fa3e2249968208e735454c27b8cab20bb78d3f)
2012-09-28 19:40:45 -04:00
Keegan McAllister
d91ec7056f
Add a Django query helper
...
(imported from commit cf1f87eb4fb2b6f44ec0ebafc4cad8dcc9bc5e5c)
2012-09-28 19:33:15 -04:00
Keegan McAllister
c65a387c1e
Factor out the determination of which messages to send immediately
...
(imported from commit 31c688986e4d8f923913083f36dea9c79a4c36ce)
2012-09-28 18:37:12 -04:00
Keegan McAllister
a8ec5c533f
Move the code for new messages immediately available into views.py
...
(imported from commit 4cfa0ead850b1a37a21ec7945b477e12681c5830)
2012-09-28 18:37:12 -04:00
Keegan McAllister
946c901e05
Factor the formatting of the updates response out of get_updates_backend
...
(imported from commit eb6a09363d671630afa7dea4ff23518c2a90fb97)
2012-09-28 18:37:12 -04:00
Keegan McAllister
8d906c9b6f
Allow the server to prepend a block of messages
...
This doesn't handle collapsing yet.
(imported from commit 85a2284f398dea33cc891297924ff7504304be94)
2012-09-28 18:37:12 -04:00
Keegan McAllister
1c48599824
Refactor add_messages slightly
...
(imported from commit 61ac3285c9a55202f390a3b4473483656449cf44)
2012-09-28 18:37:12 -04:00
Keegan McAllister
e9f70c1efb
Track the first received message
...
We don't use this information, yet.
(imported from commit 24a9466823f3e7a287027969d3841c7638954e76)
2012-09-28 18:37:11 -04:00
Keegan McAllister
4e6a239580
populate_db: Default to mit.edu realm on inport
...
This is something of a temporary hack. In the future, we should make
zephyr_mirror.py smarter about fixing up the realms.
(imported from commit bdcff1a834904616538f430b4513ec7619b95e95)
2012-09-28 18:35:38 -04:00
Tim Abbott
13e1984bbd
zephyr_mirror: Fix last hardcoding of starnine@mit.edu.
...
(imported from commit de2a00451428ecdc44380528e4ca88bfeacdb9ab)
2012-09-28 18:09:19 -04:00
Tim Abbott
f5000c16ce
Default to not logging zephyrs sent by tool.
...
(imported from commit 7f4193390b8a7a68b321775d1701a4ddf20c8bfc)
2012-09-28 17:39:35 -04:00
Jessica McKellar
1fa3bbead9
Update the class subscriptions upon subscription removal.
...
This fixes a bug where if you unsubbed from a class and then tried to
send a message to it, you could without error and wouldn't see the
message.
(imported from commit 7a4da2a6cb5bbecfc236628dda7b61972b3082e1)
2012-09-28 17:24:45 -04:00
Tim Abbott
ee1ba168e0
zephyr_mirror: Fix some handling of case when forwarding.
...
(imported from commit 780da6f5486c6901b288cc95ed534b449bd9b6b8)
2012-09-28 16:35:54 -04:00
Tim Abbott
c9edd4085f
zephyr_mirror: Add code to re-login if we lose connection.
...
This isn't totally tested since it's a little hard to produce the
exact behavior, but it's worth a try.
(imported from commit 7f29f181bbf5b82aed2ce63e29a11611b69485e2)
2012-09-28 16:35:54 -04:00
Waseem Daher
8b08cffcbb
Faster composebox show and hide.
...
(imported from commit 55f0465e9aded7c1b8cfe6e53b25bd1bc1185311)
2012-09-28 16:17:29 -04:00
Waseem Daher
f9573c4816
Make huddle colors a bit more consistent.
...
(imported from commit 272636e995173cd0e366b866ddd903b47edad2a0)
2012-09-28 15:59:47 -04:00
Tim Abbott
d6c6e67991
Fix mit_sync_table to run after we save zephyrs.
...
(imported from commit 7522a0f9eb5a4ab99434284c65382b5460abe4d7)
2012-09-28 15:57:51 -04:00
Tim Abbott
06ee153faa
Use zero-width characters for message loop checking.
...
(imported from commit 61f6dca96cd1d8431258afc0181e71d5b709e300)
2012-09-28 15:57:51 -04:00
Tim Abbott
0a4366ea6b
Genericize zsig computation.
...
(imported from commit 264b1f0d2177fe22e0f373b7ecf8f6c75c8438ca)
2012-09-28 15:57:51 -04:00
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