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
Tim Abbott
742d8a40a0
Set the homepage as LOGIN_REDIRECT_URL
...
(imported from commit a65eec79d7c64e02969699a7288313227f85b99f)
2012-09-06 15:35:01 -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
Keegan McAllister
b1eb0fd0fd
Inhibit caching of zephyr.css
...
(imported from commit 5e1af66b12454f791f7edfcc3f01be03b00e4b2f)
2012-09-06 14:54:10 -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
Keegan McAllister
db858afe4a
apache: Timeout talking to app after 20 minutes only
...
We need this to be longer than the client-side AJAX timeout (future commit)
(imported from commit a638c8392fd7ee1e5c1bee557012dbdd28f1547f)
2012-09-05 15:53:40 -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