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
9e3f588276
Install django-jstemplate on new servers
...
(imported from commit 650cc012030a3fe09ebae229ab3bff55e1cd35f0)
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
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