Tim Abbott
4fd1230265
require login for get_updates_longpoll.
...
(imported from commit 64dec53e102e47c42109e064efc46e9812943640)
2012-09-07 13:32:20 -04:00
Tim Abbott
c7be5cfadc
Clean up user_profile getting.
...
(imported from commit 86be3c8061ac46510d240703c8e88eedb0883a8c)
2012-09-07 13:31:01 -04:00
Tim Abbott
d8ade6de5b
Add create_zephyr_class helper.
...
(imported from commit 993fbb799b706e402ae212330e4abbe28bf84ee9)
2012-09-07 13:28:56 -04:00
Tim Abbott
4848ae3c48
Clean up recipient creation for new ZephyrClass objects.
...
(imported from commit 2aa67fbcc6c01ca1c07f41e0edb6c9efcd336006)
2012-09-07 13:28:56 -04:00
Tim Abbott
f170517e0f
Add more arguments checking in views.
...
(imported from commit 389d0b724b88b0097cef2addd27704657b35cabe)
2012-09-07 13:28:56 -04:00
Tim Abbott
ce2ad38cc2
Remove dead code in home view.
...
(imported from commit 5bc0d2d38de23828f19915c047e605e97b733b26)
2012-09-07 13:28:56 -04:00
Tim Abbott
14ab1a7044
get_updates_longpoll: Add error handling for malformed input.
...
(imported from commit c44758acd2b3b07bed6536f70fa50e23fb4231b6)
2012-09-07 13:28:56 -04:00
Tim Abbott
2486a68621
Use @require_post in a few more places.
...
(imported from commit d1a643780d6448f66505475c8f7c1f4646981022)
2012-09-07 13:28:56 -04:00
Keegan McAllister
1c64ce8bfc
zephyr_mirror: Only resend old messages when invoked with --resend-log
...
(imported from commit e5a7c8d5b920d796ebbf68efc2beca6b14036695)
2012-09-07 13:18:35 -04:00
Keegan McAllister
028bb9aa8d
zephyr_mirror: Log zephyrs and send them on startup
...
(imported from commit 5ceda51c643ddaf0042e8bb8f89e1353585b49c5)
2012-09-07 13:18:35 -04:00
Tim Abbott
6ed513f4da
Update populate_db to add our user accounts.
...
(imported from commit 24d209c995bf9353652b376fff5d58ae5de07b5a)
2012-09-07 12:50:22 -04:00
Tim Abbott
da491de948
Strip whitespace from requested class subscription names.
...
(imported from commit bb10ba64a2f76c089ff36574b30b76f725da62aa)
2012-09-07 12:50:18 -04:00
Tim Abbott
1e42dc5728
Clear UserMessage table in populate_db as well.
...
(imported from commit 6d1c9b7a9974373857724ddd7b8d7805ed99c784)
2012-09-07 11:54:04 -04:00
Keegan McAllister
83cb955413
zephyr_mirror: Rename for importing
...
(imported from commit 251e3d2ac47dc9a6de8205869a757ae673866d1e)
2012-09-07 11:45:42 -04:00
Keegan McAllister
4d12c03260
zephyr-mirror: Make it importable
...
(imported from commit a029350ed3b7eae401df848b8c52fd0e8c461fbd)
2012-09-07 11:45:15 -04:00
Keegan McAllister
1d35c51b9e
zephyr-mirror: Extract CSRF token with BeautifulSoup
...
(imported from commit 46ba6256fde77dea9188262abd45be852645b85f)
2012-09-07 11:39:36 -04:00
Keegan McAllister
a102377bff
zephyr-mirror: Style changes
...
And remove some debugging noise.
(imported from commit 03268673fd9d624ddbde69b9fa2c59268e9c4fe8)
2012-09-07 11:39:36 -04:00
Tim Abbott
cc3b90b5a2
Fix some testing problems with new UserMessage class.
...
(imported from commit abcadca84e6ad21c523f339952ad0dec0868dc50)
2012-09-07 11:30:28 -04:00
Tim Abbott
111cda9f21
Clean up inefficient queries in the home view.
...
(imported from commit fd958aef79a92eb4418e832b0d2b62a978f5776f)
2012-09-07 11:28:36 -04:00
Tim Abbott
7a0b5ce198
More efficiently populated the personals autocomplete list.
...
(imported from commit 8e37b8c707ca1c13238a4c1d3b136cb74aec0af7)
2012-09-07 11:28:36 -04:00
Tim Abbott
6c330b2654
[schema] Store zephyr receipts in new UserMessage table.
...
(imported from commit d909adf7528aba9a489280ebc3572791539cdd44)
2012-09-07 11:27:41 -04:00
Tim Abbott
9696e12c45
zephyr-mirror: Fix bug in zsig splitting.
...
(imported from commit 26f9784d0771d148dcb92dc4b1fca9d501d3d8f4)
2012-09-06 18:39:51 -04:00
Keegan McAllister
7659937586
Inline a global constant which is now only used in one place
...
(imported from commit 2c288202f5c46ff62f6044cd23f092e4175d498a)
2012-09-06 17:01:19 -04:00
Keegan McAllister
f98c561a69
zephyr-mirror.py: HTML escape messages
...
(imported from commit 2f5f5b049fe17754d2a99a249fdc38f8770dfabd)
2012-09-06 16:24:49 -04:00
Tim Abbott
bd0d6bfbcc
Improve zephyr-mirror.py.
...
(imported from commit 555c145af844485289a85c664717dc609b9a5234)
2012-09-06 16:21:31 -04:00
Jessica McKellar
e5d3c192c9
Update test_zephyr_to_nonexistent_class: classes are now created on the fly.
...
(imported from commit 8d04d3aae650a72f01a18e8e0b7e80e093081be1)
2012-09-06 16:06:26 -04:00
Jessica McKellar
13e5b45815
Return a JSON error on an invalid zephyr type.
...
(imported from commit 2207464c368666715caf550f32136de45ea37142)
2012-09-06 16:06:26 -04:00
Tim Abbott
b235b8bc31
Fix user of UserProfile instead of User.
...
(imported from commit 08875b4fc7dec48a8fce6d6eab716642493a0708)
2012-09-06 16:04:42 -04:00
Tim Abbott
10873529fd
Fix forge_zephyr bug.
...
(imported from commit 30f69247d9094d17a1af014ce3d6b60d85ae5c41)
2012-09-06 16:01:50 -04:00
Tim Abbott
1775ffe80a
Improve forge_zephyr code.
...
(imported from commit c95c4392b09c932d8de11d30b730ab5d7bcb9e83)
2012-09-06 16:00:39 -04:00
Tim Abbott
d9f348a348
Add zephyr_backend RPC call.
...
(imported from commit e815580e201772e81e94b820174e2410e3069960)
2012-09-06 15:52:48 -04:00
Keegan McAllister
115334c82a
Don't bracket $.get with $.ajaxSetup
...
Instead, use the more general $.ajax which can take these options directly.
(imported from commit bb915e7d25cb6ac675d098903f7e7b57bde5006e)
2012-09-06 15:48:15 -04:00
Keegan McAllister
474f08198b
Send zephyr template inline with index.html using django-jstemplate
...
(imported from commit 58cc8a50d463548aa283658dbe0aae366ecab39f)
2012-09-06 15:48:15 -04:00
Keegan McAllister
fce5643d15
Handle Zephyr body clicks like the other clickable elements
...
(imported from commit 97da4b22aea4e23dd0227b0179481cb3b5f7a65e)
2012-09-06 15:48:15 -04:00
Keegan McAllister
6f269051d1
Partially consolidate the code which knows that zephyrs are <tr>s
...
(imported from commit ca2a208af9f1d3cc8a3f3980f55a5c008d28147a)
2012-09-06 15:48:15 -04:00
Keegan McAllister
689ab1efd6
Misc stylistic consistency
...
(imported from commit 624a07f50544d96f9e3c3b417b00369641bd3ae1)
2012-09-06 15:48:15 -04:00
Keegan McAllister
59ab88f886
Rename current_view -> apply_view
...
And related cleanups.
(imported from commit 4b1a7e7ef19b17c0887e2864f7cc2121eeda361e)
2012-09-06 15:48:15 -04:00
Keegan McAllister
1fa40e515c
Style fixes
...
(imported from commit 311600ad8627d7060f235f59852d77f73a951e81)
2012-09-06 15:48:15 -04:00
Keegan McAllister
5e5b5986af
Don't pass the global selected_zephyr_id through the narrow functions
...
(imported from commit a19232052913f45a6f8d3c08dd8761a6a2b5ec99)
2012-09-06 15:48:15 -04:00
Keegan McAllister
a9f45e6e0e
Have select_zephyr ensure that we point at a visible zephyr
...
(imported from commit 91e485742a040cf6c3454d1f55993a6c77a8ca09)
2012-09-06 15:48:15 -04:00
Keegan McAllister
74c97e7d59
Remove duplication between do_narrow and select_zephyr
...
(imported from commit 84c3e5a0d5682fd8790bd6e277e05e54a47d9aac)
2012-09-06 15:48:15 -04:00
Keegan McAllister
d78e1f1bcb
Remember the selected zephyr in a Javascript variable rather than querying the DOM
...
And related cleanups.
(imported from commit aa64980b4e66a64e92735c736159a8e2f717ea09)
2012-09-06 15:48:15 -04:00
Keegan McAllister
03d2a087a7
Organize global variables a bit
...
(imported from commit d3ad323bad4cda98e55a54ed3c9aec81ccd4008b)
2012-09-06 15:48:15 -04:00
Keegan McAllister
84e618a902
Use 'var' at top level consistently.
...
This has no effect but is stylistically consistent.
(imported from commit 71d7f615ea140195cc5081fb331677bc5d856fed)
2012-09-06 15:48:15 -04:00
Keegan McAllister
8f1cee0b88
Move third-party components into static/third/
...
(imported from commit 709c78a6e41afcd4202a8264c9103ac7827158ec)
2012-09-06 15:48:15 -04:00
Jessica McKellar
fb8cab21ff
tests: Add some basic /zephyr class and personal POST tests.
...
(imported from commit 7e30ce1d24926f9ab46d9269603f1aae3da2b752)
2012-09-06 15:46:48 -04:00
Jessica McKellar
aa8ea169c7
Return our standard JSON success data on /zephyr POST.
...
(imported from commit 045e209d1a001d27b755a45984f9e159470b80bc)
2012-09-06 15:46:48 -04:00
Jessica McKellar
da730ab0b0
tests: Factor out POST result success and error checks.
...
(imported from commit b818faf145ffeda6deb7d36fcce1313eade8f457)
2012-09-06 15:46:47 -04:00
Tim Abbott
ef7786d777
Create a Recipient for classes created by sending a zephyr.
...
(imported from commit 8556392f84b0a7fc21b6405c87ceac1c49b37a52)
2012-09-06 15:43:35 -04:00
Tim Abbott
47323bf279
Mechanize code to login to our application and forward zephyrs.
...
(imported from commit bb7aa22a67fe2ca9346d1f192c8d1e1aa102ef43)
2012-09-06 15:39:38 -04:00
Tim Abbott
d466738116
Fix creating new classes by sending messages to them.
...
(imported from commit a85034081d23f5366e0cdc4b906fd42b4b646aba)
2012-09-06 15:35:12 -04:00
Luke Faraone
3d1e956069
Don't check for class existence if we're not sending to a class.
...
(imported from commit 832de3f899d90ee727cebeede061de6a409b7845)
2012-09-06 15:19:56 -04:00
Jessica McKellar
ebfb696ff7
Add tests for POSTs to /update.
...
(imported from commit e936d0f2abe21da70ef653ce27c290c31dd091c6)
2012-09-06 15:02:27 -04:00
Jessica McKellar
4f04172288
Add error handling on bad POSTs to /update.
...
(imported from commit 7893e9d339559a6f6e945d0f8d3d9efbdce01f55)
2012-09-06 15:02:27 -04:00
Jessica McKellar
df14dc0cf7
tests: Factor out retrieving user profiles from usernames.
...
(imported from commit 004eabb8684952199b8a132eb29be3ce5daae724)
2012-09-06 15:01:57 -04:00
Luke Faraone
f6b481546f
Offer to subscribe / create classes if user zwrites to a non-subbed class
...
Here we check if a class exists. If not, we prompt the user to create, sub,
and send his message to the class. If the class exists but we're not subbed
we prompt the user to sub.
This commit also added a decorator to views.py and refactored out some
redundant code.
(imported from commit 7234ef6c080f2a6de6ff0922635dddd90032f7fe)
2012-09-06 14:33:55 -04:00
Tim Abbott
31ece4d3aa
Fix narrowing by instance.
...
(imported from commit 824f0c113b9b6970bd451f4b0c3285dd3b88d9c4)
2012-09-06 11:17:39 -04:00
Tim Abbott
e66e2f3be6
Fix new instance of recipient_id.
...
(imported from commit 4b3442a3a45138e18c2b33867d6c5af4b4427691)
2012-09-06 11:06:25 -04:00
Tim Abbott
ef25dffb92
[schema] Add the realm to the ZepyhrClass objects.
...
(imported from commit 8189ef27f2feef0c92f9c06a9243c085e36a66f5)
2012-09-06 11:02:34 -04:00
Tim Abbott
b761bf030b
[schema] Fix names of fields in Subscription.
...
(imported from commit 5f5c643286d348d16caac03419ba3011a8b81eff)
2012-09-06 11:02:34 -04:00
Tim Abbott
38b30e5997
[schema] Add realms to the schema.
...
Note that realms aren't actually used for anything, aren't prompted
for, etc, so this is mostly just a schema change and the refactoring
needed to allow setting the realm in the future.
(imported from commit b8b483dcc9601b288702284879e9c99707a50a5c)
2012-09-06 11:02:34 -04:00
Keegan McAllister
4dd1567426
Keep third-party jQuery style in the jquery dir
...
(imported from commit 9e34277b90c13b3ce71521fe0657014f186fc1c3)
2012-09-06 11:00:34 -04:00
Jessica McKellar
aea9682288
Handle zephyring to a huddle with an invalid username.
...
(imported from commit 953b242aff98782faab8eb2c7a9528ad4bfbcd54)
2012-09-05 18:01:07 -04:00
Jessica McKellar
f539b5ec59
Handle trying to send a zephyr to a non-existent class.
...
(imported from commit 38c6df92ae8dc9dee358aa9af0ef592943b82429)
2012-09-05 18:01:07 -04:00
Jessica McKellar
22c2a868c1
Factor out json success and error handling.
...
(imported from commit 1891e077a18615d47710faf56b04c4bd160454fa)
2012-09-05 18:01:07 -04:00
Jessica McKellar
cede8e59fb
Return a 400 and error message instead of 500ing on a personal to an invalid user.
...
(imported from commit b8cdf342f2919aa0dbd2e30764c7662b6756aa57)
2012-09-05 18:01:06 -04:00
Keegan McAllister
0788f2efe6
get_updates_longpoll: Retry indefinitely, with exponential backoff
...
The client still won't recognize when it's reconnected, if there is no traffic.
Probably we should have the server send periodic heartbeat messages to the
clients, and make the clients look for them.
(imported from commit 4dab3ddf20bf3c48a65b9395c1e24b635b70aa81)
2012-09-05 16:37:20 -04:00
Keegan McAllister
c3aaf54468
get_updates_longpoll: Timeout and retry
...
We're currently proxying through Apache, which will eventually drop an idle
connection to the app server. Before that happens, drop it on the client and
retry. This may also help with flaky Internet connections. This timeout isn't
really an error condition and is naturally rate-limited, so we retry
indefinitely.
(imported from commit 45fbf812af63ed331fe046d85c64c97c1ec57611)
2012-09-05 16:37:10 -04:00
Luke Faraone
3366346144
Return subs in JSON based on a query of your subs list rather than sorting through recieved zephyrs.
...
(imported from commit 451435aee2c2cf6ee542468b1c91c4a15edf2032)
2012-09-05 16:15:38 -04:00
Tim Abbott
e9b6ce6124
Fix subscriptions page showing huddles.
...
(imported from commit bed5fd30c509dcd5f169081396f72107dc08c750)
2012-09-05 15:32:06 -04:00
Keegan McAllister
53690d757f
Avoid infinite tail recursion in get_updates_longpoll
...
Javascript doesn't guarantee tail-call optimization. Also we should yield
control back to the browser in case it needs to catch up on rendering.
(imported from commit 1c35c0c2c39f13311b98bfb6221a1bac1fb22de8)
2012-09-05 14:06:19 -04:00
Keegan McAllister
1f522eddac
Move zephyr rendering inside longpoll success callback
...
(imported from commit f7c2bbb0a31b339892a033e4192e44cb53b0d62c)
2012-09-05 14:06:08 -04:00
Keegan McAllister
162cb075b7
DEBUG: report longpoll events in JS console
...
(imported from commit f82edf2fcec66ec119319a691281726a16a46b31)
2012-09-05 14:00:56 -04:00
Keegan McAllister
2332fa2c72
Log server events with timestamps
...
(imported from commit b74274ccafcca716871058b8f9bde8dfe9e081ee)
2012-09-05 13:47:25 -04:00
Tim Abbott
3218f917ae
populate_db: Repeat recipients a moderate fraction of the time.
...
(imported from commit 1a42ec5b585a7a64e24576350c61399601177877)
2012-09-05 13:42:05 -04:00
Tim Abbott
527058a202
Add personals and huddles to populate_db.
...
(imported from commit 98a8decc18bad4700260f125873ccc4367f73ebe)
2012-09-05 12:38:35 -04:00
Tim Abbott
8eb778dc32
Fix display of which people we're showing personals with.
...
(imported from commit 4e2f2554c9af4b176dcbbe6300b72c2ce69bc8bd)
2012-09-05 11:48:35 -04:00
Keegan McAllister
04b1c21333
Remove some unnecessary intermediate lists
...
Use generator comprehensions for efficiency and cleaner code.
(imported from commit 6b4b709515b5c904ef38b8ea33a9d4a4af0f5468)
2012-09-05 11:41:53 -04:00
Tim Abbott
3e51ef8c1c
Fix get_huddle handling of id_list.
...
(imported from commit 0fe1ee15b2fc6b3bef98ac47f1094b89e776c751)
2012-09-05 11:38:09 -04:00
Tim Abbott
254b118bd6
Fix an error in huddle comments.
...
(imported from commit 85a06b53de1027815e1d2bbd4c6354801495fffe)
2012-09-05 11:32:05 -04:00
Tim Abbott
1f151214c0
Move the huddle recipient uniquification into get_huddle.
...
(imported from commit 09378b583becce6467d65d6caec71a543e27be2e)
2012-09-05 11:30:40 -04:00
Keegan McAllister
5ac4b4345e
Point at the first zephyr if the initial pointer is invalid
...
(imported from commit 7661a7d23f1d161815f2a22048cd23ede76e1758)
2012-09-05 11:24:29 -04:00
Keegan McAllister
7cb3c05b40
Cleanup / local var in hotkeys
...
(imported from commit 8df3d84495d0d50b0987037dceb8b16023866119)
2012-09-05 11:24:28 -04:00
Keegan McAllister
49704b84f3
Clean up select_zephyr
...
Eliminate some global variables, and other style fixes.
(imported from commit 95dfbaa024d709f5b98238afcf904f3e92c8a260)
2012-09-05 11:24:28 -04:00
Tim Abbott
20215eef86
Remove a bunch more trailing whitespace.
...
(imported from commit 5d1cc8dcb0b26eaf95ddca26574b361b6948cdb8)
2012-09-05 11:23:58 -04:00
Tim Abbott
fe43dc008f
Clarify comments about huddles.
...
(imported from commit b4b779c48289e0f78490c0e93ece19b55a6f2dee)
2012-09-05 11:19:31 -04:00
Tim Abbott
08b55de0af
Add support for replying to huddle messages.
...
(imported from commit 21c760838fa87bf524ff178eab6473dfa3c6921c)
2012-09-05 11:19:31 -04:00
Tim Abbott
d13e7d5c2a
Clean up prepare_personal function.
...
(imported from commit 497ff1ff2162eba879728755cf37e6317530a641)
2012-09-05 11:19:31 -04:00
Tim Abbott
6e427d4aa1
Remove trailing whitespace in zephyr.js.
...
(imported from commit d003d9c337239e90f6dbda16f6624c42909a88b7)
2012-09-05 11:19:31 -04:00
Tim Abbott
7105ea9290
Improve the huddle hashing keys.
...
(imported from commit e8e1f1ac3022f3cecfdd22d1d4f319cc4f1ce886)
2012-09-05 11:19:31 -04:00
Tim Abbott
6de871a698
Fix double-sending to huddle recipients.
...
(imported from commit 649c01c6d0f1c826d3db9444f48af16ee1eb8d06)
2012-09-05 11:19:31 -04:00
Jessica McKellar
2694183a9d
Make clicking on a personals user narrow to the conversation with that user.
...
Previously, clicking would narrow to all personals. The gp hotkey
combo still does that -- we'll need to think about the UI for making
both types of narrowing easy.
(imported from commit acce1da52de1b9b757ef76a9734d61f399f81a01)
2012-09-05 11:03:53 -04:00
Luke Faraone
3db1766015
Fix broken narrowing on classes with keyboard shortcuts.
...
(imported from commit e829c55e88a57c4dbe4693c41f15eaf27a025daa)
2012-09-05 10:56:59 -04:00
Luke Faraone
be3a69611a
Restrict new_zephyrs in add_callback to current user's subs.
...
(imported from commit 7aab1b081cf9b8602512402547fe3592cf710d82)
2012-09-05 10:43:36 -04:00
Luke Faraone
ebff1bc830
Don't show the user's password when registering.
...
(imported from commit 9268c07560de744abdedf11b8d39cd8045baeff9)
2012-09-05 10:20:39 -04:00
Tim Abbott
2ff6a39976
Some huddle cleanups.
...
(imported from commit 244bfde4da2a4faeb150182f232937f0cb3a9a85)
2012-09-04 19:41:42 -04:00
Tim Abbott
4d284d8a92
[schema] Add support for multi-user personals ("huddles").
...
This is controlled by listing multiple comma-separate usernames in the
personal message sending box.
(imported from commit 06c9dadb7977b98f88ad31e5df453b59f1afad96)
2012-09-04 19:15:07 -04:00
Tim Abbott
84ece4b3fe
Combine the zephyr() and personal_zephyr() functions.
...
(imported from commit a39b70f019901d0dd6994d4c440002111e4c29e1)
2012-09-04 19:14:46 -04:00
Tim Abbott
f0db139e43
Fix missing import socket in views.py.
...
(imported from commit e00c3a1a16435b8e65bd3bd445fb049c70aee4be)
2012-09-04 19:11:25 -04:00
Tim Abbott
af4ed3a9a1
Eliminate trailing whitespace in views.py.
...
(imported from commit e69b90a7354e4b8ce1221973788d1a0f80530d56)
2012-09-04 18:51:23 -04:00
Luke Faraone
5a37dd459a
Use a list comprehension instead of a set comp. for Py2.6 compatability.
...
(imported from commit d3764623d2b6df13b4912920a10183928c63ae83)
2012-09-04 18:48:46 -04:00
Tim Abbott
c059937f31
Remove fixtures from version control.
...
(imported from commit 32f17aa1b674e47d730a00cced8b5bed8a136755)
2012-09-04 16:34:39 -04:00
Tim Abbott
8f058937a0
Rename recipient.user_or_class to type.id.
...
(imported from commit 74639cd08d0f53ae39624fc793f6fe55325b6d45)
2012-09-04 16:34:39 -04:00
Luke Faraone
974b560659
Add autocomplete for personals, classes, and instances.
...
Here we pull in the jqueryui library and a style sheet to provide a widget
to do autocomplete for various fields. We populate a list of all ever-seen
classes, instances, and people (C/I/P) into JS arrays and then pass them to
jqueryui.
Each time a new C/I/P appears, we reinitialise the autocomplete functions
so they will notice the new data.
(imported from commit f1ab69c99d21f68ccf40c015bd43960f463c6ff2)
2012-09-04 16:14:48 -04:00
Jessica McKellar
ee9da75f0f
Give populate_db an optional number of zephyrs to generate.
...
(imported from commit ceebabf7d56ceb3bba00129dc9f334c72a4956da)
2012-09-04 14:28:47 -04:00
Keegan McAllister
ac2553cdff
Replace get_state with a variable embedded into index.html
...
(imported from commit 3ef4a0163107248618a25e242ab30fdff5da17e0)
2012-09-04 13:01:00 -04:00
Keegan McAllister
e86216dff0
Add missing semicolons
...
(imported from commit f562f6e63368d5cb48ccba3b72981ff36a9cff30)
2012-09-04 13:01:00 -04:00
Keegan McAllister
9b5e47cd45
Don't select a zephyr until we've loaded them.
...
(imported from commit 04f72ae1e2ca67dfc1220baee11940008e0d2c91)
2012-09-04 13:01:00 -04:00
Keegan McAllister
2e8b1fa14a
Use client-side templating to render zephyrs
...
(imported from commit 5ac650c3df0fa8caa823407d9d1a65a38f7e63c6)
2012-09-04 13:01:00 -04:00
Keegan McAllister
85215733d8
Import ICanHaz.js (yes, really)
...
(imported from commit b864603cfac2b3626e01d8ba7c89d030f7c0fa43)
2012-09-04 12:27:17 -04:00
Tim Abbott
d85e80483f
Eliminate the dummy row.
...
(imported from commit 4f0cd12e77cbe4d6a29baed9902c7c7074fcff27)
2012-09-04 11:49:13 -04:00
Tim Abbott
87188e2575
Filter newly arriving messages by the current view.
...
(imported from commit db23824bfc584d3b1bc0d6239d04988ca1b3ca4a)
2012-09-04 11:49:13 -04:00
Tim Abbott
633aceb054
Keep track of the current narrowing rules.
...
(imported from commit 0af6fc38f0f17a57428f64570139171dbede30fe)
2012-09-04 11:49:13 -04:00
Jessica McKellar
526ba5568f
Add a missing @login_required on update.
...
(imported from commit b41ac9adb8886c736fb59051b8d83d3a9c6c0894)
2012-09-04 11:39:12 -04:00
Jessica McKellar
f556702804
Add a missing semicolon.
...
(imported from commit c0676f077ee8655abd33a382cd01b0330eff4e82)
2012-09-04 11:38:10 -04:00
Jessica McKellar
e51ab0cdfa
Get pointer state from the server on page load, and scroll to that zephyr.
...
(imported from commit a1387d89378494a55f084f56ed9eb33c4f719dcb)
2012-09-04 11:36:36 -04:00
Jessica McKellar
b0fe09c48e
Commit some default fixture data.
...
This can be regenerated with:
python manage.py populate_db
./zephyr/tests/generate-fixtures
(imported from commit 6498c2bd1ab41a7532336e8102c1c7223e32466a)
2012-09-04 10:58:13 -04:00
Jessica McKellar
8ade4a189a
Add basic page access, class, and personal zephyr tests.
...
(imported from commit 1054ceccb72b4708714cc3821456d73987923cbc)
2012-09-04 10:48:39 -04:00
Jessica McKellar
24abc27c28
Add a script to generate fixtures for use in unit tests.
...
This dumps the zephyr app tables and the auth_user table (needed for
UserProfile).
(imported from commit 471b84a532af711c263305297399c0cbf2f41eda)
2012-09-04 10:46:19 -04:00
Tim Abbott
b784202128
Unify the various narrowing interfaces.
...
(imported from commit e2ddd5ae3ecaa385f1adf80b75a64534dd5b3950)
2012-08-31 17:58:20 -04:00
Tim Abbott
8506656df1
Fix bug in scroll_to_zephyr removal.
...
(imported from commit 4aca6534889012fd1b0e59dc88a156494b6ec51f)
2012-08-31 17:58:17 -04:00
Tim Abbott
6369da671b
Clean up narrowing code to all use the same pattern.
...
(imported from commit 7f213ccdb31522a0fcb63cb69e2ea7677e3b352c)
2012-08-31 17:16:39 -04:00
Tim Abbott
e4e3fde8a5
Rename narrow to narrow_class.
...
(imported from commit 8bd0f91ac7496d2da4706128b7d2c32acfad081c)
2012-08-31 17:16:09 -04:00
Keegan McAllister
115edb57b2
Eliminate tab characters from source code
...
(imported from commit 60c0742b8998ee08189b576b38cd0b4416f22b66)
2012-08-31 16:51:46 -04:00
Luke Faraone
cd5b623cfd
Reply to the recipient instead of the sender if replying to my own personal
...
Previously, if hamlet wrote to iago, and then hit "r" on his own message,
the form would prompt hamlet to reply to himself. Now, Humbug will DTRT and
prefill the form with iago instead.
(imported from commit cb3260d1d0bc89b184dac84ebf1e5642d0bc1606)
2012-08-31 16:50:24 -04:00
Luke Faraone
29a41d992e
Blur buttons on submitting a zephyrgram.
...
This way the user can continue using the keyboard to navigate
after sending a message, without pressing additional keys.
(imported from commit 014997194f546fe56da063e19d3818e949a3ee7e)
2012-08-31 16:29:00 -04:00
Luke Faraone
3223d2e0ba
Make scrolling Correct (a la Barnowl) without losing messages
...
Previously the wedge sometimes got lost when you scroll. Now, on a
scrolling action the selected message is moved in to the middle.
We also now use scroll_to_selected as opposed to scroll_to_zephyr because
there wasn't really a usecase for scrolling to a non-selected zephyr.
(imported from commit 5091b3a715f2253dfe302d4c7ea8a087ff9d508e)
2012-08-31 16:20:20 -04:00
Keegan McAllister
2d30c9440d
Retry if long polling fails
...
(imported from commit fc2d09976231974bf48efbcf5dfc480be36e26ec)
2012-08-31 15:33:04 -04:00
Keegan McAllister
d07a1b914c
Code style consistency
...
(imported from commit a5345b0fda9701c62b65c367f71ac871a7e15d60)
2012-08-31 15:04:15 -04:00
Keegan McAllister
57bdc40b87
Fix superfluous use of .html
...
(imported from commit 4f165669c1d09efa811169c26e1e7541fbfb45f6)
2012-08-31 14:55:28 -04:00
Luke Faraone
8342c2c2ee
Ensure that the ▶ stays after clicking on a selected message.
...
(imported from commit 2af024f0090383f429bd5727fe3ceb8b32cd2021)
2012-08-31 14:43:49 -04:00
Luke Faraone
6a7b183e06
Clicking on a Zephyr now sets the pointer to that Zephyr.
...
(imported from commit 2707f22997892c1414965c988a80609ef8d93388)
2012-08-31 11:10:19 -04:00
Jessica McKellar
15516b52dc
Auto-sub to personals on account creation.
...
(imported from commit 5b8b5b0c670bdd4c9663837a15dd80bcbc6ddcb1)
2012-08-31 10:58:09 -04:00
Jessica McKellar
390f6c83c7
Fix displaying personal zephyrs you send.
...
(imported from commit 2357cd273933268556bbdebe540f29a45c66a245)
2012-08-31 10:11:23 -04:00
Luke Faraone
266f6397a2
Correctly handle 'r' for personals.
...
(imported from commit 7f60fbc6aa737d32d710b2ec2c5c9d6fe9b047e4)
2012-08-30 17:45:06 -04:00
Luke Faraone
148738447c
Select the value of "content" when replying to a zephyr.
...
(imported from commit ef8759911b602a67b594f085772d33251ad94dde)
2012-08-30 17:45:06 -04:00
Luke Faraone
833cf8b1ff
Implement hotkeys for filters, let ESC break out of input boxes.
...
Here we added code to enable users to use shortcuts like "g-c" or "g-a" to
go between zoomed-to-class and showing-all and related forms.
Documented on the wiki in (Hotkeys).
(imported from commit ee3bdf070a560d503c6537ccb1d213707bc11f66)
2012-08-30 17:45:06 -04:00
Luke Faraone
e9ee6e365a
Only allow hotkeys when not focused on input/textarea/button elements.
...
Here we bind to the focus and blur events to keep track of when elements
we care about are in focus. Elsewhere, we test whether hotkeys are allowed
before... using hotkeys.
(imported from commit 50f8f8cb4874209411db59512f77c8dd33d837f5)
2012-08-30 17:45:05 -04:00
Jessica McKellar
03401bd8d7
Remove stray print statements :-(
...
(imported from commit 77d332e9903d99e760557656cee439d313738d0d)
2012-08-30 17:40:30 -04:00
Jessica McKellar
5355b4ea1f
Add missing active check on subscriptions for new zephyrs.
...
(imported from commit 58d2a30d221b0849d6e8ed063d75f8781e38f536)
2012-08-30 17:34:44 -04:00
Jessica McKellar
546c61a979
Fix a bug (using the wrong id) when filtering subscriptions.
...
(imported from commit 030d208640e532045e9a06fceac7ad2d396b61b6)
2012-08-30 17:17:59 -04:00
Jessica McKellar
172c3f0c81
Use named parameters to condense some of the new ORM object creation code.
...
(imported from commit e172f24956f67fe1f68ff288244b67918eb91acf)
2012-08-30 17:17:59 -04:00
Jessica McKellar
99925f4aaf
Add the ability to add new subscriptions.
...
(imported from commit 0a7fdc17087240b13631627a053c580c2e4b5319)
2012-08-30 17:17:59 -04:00
Jessica McKellar
7e56e7a0f4
Add a navigation link for managing subscriptions (for starters, just unsubbing).
...
(imported from commit 23274a8790bf1f017e9c33db52bf746e291f23ba)
2012-08-30 17:17:47 -04:00
Jessica McKellar
111dde0075
Add an active bit on subscriptions.
...
(imported from commit abf7ea7dc51e830c503204a319b6cbda09e032e8)
2012-08-30 16:48:40 -04:00
Keegan McAllister
ba13f8b06a
Don't redirect the Ajax message send to /
...
(imported from commit 24f95b53001d06ced77a9368f346760df1899756)
2012-08-30 16:41:09 -04:00
Keegan McAllister
41adbfc92d
Allow the user to dismiss send errors
...
(imported from commit bcce5f0a1cdc0d5eec2586e72f8a5945574697ad)
2012-08-30 16:41:09 -04:00
Keegan McAllister
2313498891
Build zephyrs using DOM manipulation rather than string munging
...
(imported from commit 521fafe3a393ffffa215cee42519edeee8d48b3f)
2012-08-30 16:41:09 -04:00
Keegan McAllister
d57d19e562
Move all zephyr HTML generation to the client
...
(imported from commit 3afec768a5cd220c14ce615e03c29ee22754fdf2)
2012-08-30 16:41:09 -04:00
Keegan McAllister
ddacce81b7
More responsive UI for sending messages
...
(imported from commit 8a6c4e78788f46dde4fe166e17828eb9e7bdcaff)
2012-08-30 16:19:44 -04:00