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