Keegan McAllister
d9195cd189
update-deployment: Fix undefined name
...
(imported from commit 3b9ffea14b1e643dd2dacf1212f9f2fbd9e2f33e)
2012-10-19 20:51:56 -04:00
Zev Benjamin
88e09c6166
Only reload the page when the user is idle
...
Also, clean up reload-related function names a bit
(imported from commit 4c2e17c06d7567e71b92f6e1b04a44aeff419bff)
2012-10-19 15:53:05 -04:00
Keegan McAllister
f109d23bba
Restart runtornado on deploy, as well
...
We need this for client auto-reload on static file changes, because the server
generation comes from get_updates.
(imported from commit c5e97421883383c12891fdcb177d0f6fda4b4857)
2012-10-18 16:50:01 -04:00
Keegan McAllister
95f8eea14b
Module pattern for subs.js
...
(imported from commit adfe466ea892fbfe5f13a5f346e4fd00f194c42a)
2012-10-18 15:46:58 -04:00
Keegan McAllister
2a2c0187c5
Rename subscribe.js -> subs.js
...
(imported from commit c3ce92e31916548206ad5752da8911f22d23f106)
2012-10-18 15:42:08 -04:00
Keegan McAllister
eb9140a0a2
Pseudo-module pattern for rows.js
...
It's actually simpler than a full module, due to lack of local state or functions.
(imported from commit b9180f1cdc26aed3f2e1f35dfae9ed4240b64446)
2012-10-18 15:11:25 -04:00
Keegan McAllister
01061e95e0
Rename dom_access -> rows
...
(imported from commit 66f6f88cf15f5be614440b826433d5c1cfd6803e)
2012-10-18 15:11:25 -04:00
Keegan McAllister
e7661f7b2f
Module pattern for compose.js
...
(imported from commit 8ea9d949b793285e8722bebcef30991d06e5673e)
2012-10-18 15:11:25 -04:00
Keegan McAllister
c4bf81a312
Module pattern for narrow.js
...
(imported from commit f1df2e884216560cfe80f29a7e3eda5cea17cefe)
2012-10-18 14:41:24 -04:00
Keegan McAllister
1398641aa3
Module pattern for hotkey.js
...
(imported from commit 56616bc8eeaa594ca70bb92bf17a88f97027fd35)
2012-10-18 14:35:42 -04:00
Keegan McAllister
d0db047035
post-receive: Send the bot message before killing the server
...
Otherwise the server isn't running when we try to send.
(imported from commit a5ed6ef2111d426c44914c607444dc09b2e33b59)
2012-10-18 10:47:28 -04:00
Keegan McAllister
2c9cc7d393
Restart runfcgi on deploy
...
(imported from commit b6316135b5ab9e7fcedf404e81dc74b2cf9495c5)
2012-10-17 23:47:10 -04:00
Keegan McAllister
6de3321f02
run-dev: Update for new get_updates URL
...
(imported from commit 2617ddd1c2ec377d6f17f1aafd0da251226d39b8)
2012-10-17 18:24:15 -04:00
Keegan McAllister
91209f9304
Get initial server generation from first get_updates result
...
Embedding this in index.html won't work anymore, because the Django FastCGI and
the Tornado servers might have been started at different times.
(imported from commit 187909d0593449cf2989857671f9ca526723e451)
2012-10-17 18:24:15 -04:00
Keegan McAllister
21ed4d2506
Add a script for running a local dev instance of the app
...
(imported from commit 29813060ef17360d3a7dcc6fe1873992404457c2)
2012-10-17 18:23:01 -04:00
Tim Abbott
5c50375e02
Display a message and disable compose while reloading.
...
(imported from commit f998d2e4053e7e2d676f7fe08ee274118dd9faba)
2012-10-17 14:59:49 -04:00
Tim Abbott
8a7779ad49
Tab should toggle stream/huddle even if you clicked the compose botton.
...
(imported from commit a705c7cd0d6067dc05da7a64f29fb3ef42838785)
2012-10-17 12:05:43 -04:00
Keegan McAllister
bd8a4cb4ab
post-receive: Use a different subject name for each push
...
(imported from commit 983c34faa52bec9a7af4d26a326bbb8cc4a08bea)
2012-10-17 01:11:33 -04:00
Keegan McAllister
2c9830ac5b
post-receive: Truncate long commit subjects
...
(imported from commit 9d4b04cb4000d6f03d31ecdd5106ca53ba96c152)
2012-10-17 01:11:33 -04:00
Keegan McAllister
110a7afec5
post-receive: Conspicuously display commits removed by a push -f
...
(imported from commit 6ed7810c2f20e5f7ac618b31880142ca7da63419)
2012-10-17 01:11:33 -04:00
Keegan McAllister
94bc4dae2a
post-receive: Use Gravatars in bot message
...
(imported from commit 7e662173653aed98d47e5204900947bfb12be96c)
2012-10-17 01:11:33 -04:00
Keegan McAllister
e843427e6c
post-receive: Split into update_deployment and send_bot_message
...
(imported from commit 3e89cb21cf4aa192f6a31457fd91aa5f52e6baa8)
2012-10-17 01:01:19 -04:00
Zev Benjamin
fab64fd7b0
Make the client reload the page when it detects a server restart
...
If the client is not composing a message, we can just force a page
reload. However, if he is composing a message, we must preserve that
message while still reloading as soon as possible.
We take the following approach: if the client has not completed the
composition after 5 minutes, do a compose-preserving reload
(described below). If he sends the message before the timeout
expires, reload the page after a successful send. If the send fails
(not due to server timeout), however, we do a compose-perserving
reload in case the error was due to the data format changing. If the
send failed due to server timeout, we don't reload because the reload
will probably also fail.
In a compose-preserving reload, we redirect to an URI that has a
fragment indicating we are doing a reload and containing all the
necessary information for restoring the compose window to its
previous state. On page load, we check the fragment to see if we
just did a compose-preserving reload, and, if we did, we restore the
compose window (or just try the send again in the case of send
failure). The URI fragment looks like:
(imported from commit af4eeb3930c24118e088057d4da456748fbd2229)
2012-10-16 15:30:41 -04:00
Zev Benjamin
103bf321b4
Have client and server exchange a server generation number
...
This will allow the client to detect when the server has restarted.
(imported from commit 89e75916719d967beb2520be6263f79f897d9ec1)
2012-10-16 15:30:09 -04:00
Keegan McAllister
2bd9a6953c
django-template-graph: Replace slashes with newlines
...
Makes the graph fit better on the screen.
(imported from commit 7d42caca478634143c6b291f47a4642acfdd1128)
2012-10-16 01:45:37 -04:00
Keegan McAllister
37c51b80cc
Add a tool to draw the Django template inheritance graph
...
(imported from commit e10bb719d62a76abfea76c7fc69093a3cc33272e)
2012-10-16 01:33:15 -04:00
Waseem Daher
b76422d8d0
Cache the window selector as 'viewport' in an attempt to improve performance.
...
(imported from commit 3e01382260938737fbee663f6a9e94ad495ef21e)
2012-10-15 22:47:42 -04:00
Keegan McAllister
80e60c3120
check-all: Show unused imports if passed --imports
...
(imported from commit ecae64a3257b3ebd40656717718177270d02111a)
2012-10-15 16:16:10 -04:00
Zev Benjamin
084608ebda
Clear compose box when replying to a message
...
(imported from commit 1fe21a6d1a5f6f946e14583dc81ede961dbf57c9)
2012-10-15 15:45:15 -04:00
Zev Benjamin
a85c1f62d2
Visually distinguish when a message is persistently vs. temporarily selected
...
(imported from commit d626b3460a3a3ad46bd9ebfb65d73a6c267c2251)
2012-10-15 13:25:39 -04:00
Zev Benjamin
b42cf1d4c8
Fix persistent message selection across narrows
...
(imported from commit 958ce299108f8bbc8579e7446053d7fc9f018b81)
2012-10-15 13:25:39 -04:00
Keegan McAllister
deffda072f
Add a tool for removing stale *.pyc files
...
(imported from commit c0fcfb171932f523fff13f14f09ecf5b3a6b21de)
2012-10-12 13:28:09 -04:00
Zev Benjamin
35342481dc
Scope subject autocomplete to the stream
...
(imported from commit 6e9972c93d5f56f29db37b522e20768b8fb641df)
2012-10-12 13:15:06 -04:00
Tim Abbott
2f1d68e09a
do-schema-change: Recreate the auth_user email index.
...
This index is important since we are searching by email address.
(imported from commit 49c8dab68a0c7857d1c9620b856e4de5c4b8c669)
2012-10-12 11:09:53 -04:00
Zev Benjamin
adf75d48e1
Make pressing escape also un-narrow
...
(imported from commit 17d2cc3e8074af332f98588ad201ec342476d51f)
2012-10-11 14:30:51 -04:00
Keegan McAllister
b3c029472a
post-receive: Include an abbrev sha1 in the message
...
(imported from commit 97eea18bb4426270d085e398680f1db8028235db)
2012-10-11 11:49:24 -04:00
Tim Abbott
b5bb6b9921
Rename test-settings.py to test_settings.py
...
(imported from commit c9ad55821bc66a7c11668ac0b40ca13c2e05986e)
2012-10-10 18:13:45 -04:00
Tim Abbott
ac3f4393ff
Rename instance to subject.
...
(imported from commit 6b4693da03f106448c137cf81cf9801cac44f2b8)
2012-10-10 18:01:39 -04:00
Tim Abbott
413fdeb655
Rename class_name to stream_name.
...
(imported from commit e610f5de5edf756ef0a71c5361fcd507adbb1605)
2012-10-10 17:48:17 -04:00
Tim Abbott
ef3b8a2ce5
Rename class_list to stream_list.
...
(imported from commit c9f5b10acdb20d3e923cf7f32bc5a3f37aa40705)
2012-10-10 17:48:17 -04:00
Tim Abbott
08e832e093
Change send_message to accept a stream, not a class.
...
(imported from commit 0f58de2502bec227f5f33e44692d03f2f28d6f63)
2012-10-10 17:48:17 -04:00
Tim Abbott
44e9e4cebf
Rename Recipient.CLASS to Recipient.STREAM.
...
(imported from commit a530194163f7260c73921137fa1ff671f14516f6)
2012-10-10 17:47:13 -04:00
Waseem Daher
48cda57d84
Fix issue where arrowing-down near end of page would skip a message.
...
We had this fascinating behavior where pressing a down arrow near the
end of the page would advance the pointer, call recenter_view, which
would trigger a scroll event, which would call keep_pointer_in_view,
which would notice that we were at the end of the page and advance the
pointer again!
I split out that last part into its own function which is only called
on mousewheel events.
(imported from commit bc85443e762356e3055f8f88585940a1f11f9124)
2012-10-10 14:29:15 -04:00
Tim Abbott
26b5c11d64
Rename get_zephyr_row to get_message_row.
...
(imported from commit 2480b0bfe0be58cdb6bdf687760967b26ca38558)
2012-10-10 10:19:46 -04:00
Tim Abbott
06ffd206ae
Rename respond_to_zephyr to respond_to_message.
...
(imported from commit 34e7793601ad6f41d71be2e2060c58138b9d3b53)
2012-10-10 10:18:51 -04:00
Tim Abbott
9a359c8d05
Rename selected_zephyr_* to selected_message_*
...
(imported from commit 04025c4472b893ce12764775e10c1dc89850b639)
2012-10-10 10:17:58 -04:00
Tim Abbott
ae97a88e72
Rename selected_zephyr_id to selected_message_id.
...
(imported from commit bbb368efdd5010b6dfdaaf60f3f48904b40671af)
2012-10-09 22:42:19 -04:00
Tim Abbott
f66124cbe2
Rename select_zephyr(_by_id) to select_message_*.
...
(imported from commit 91619adf0e610017fbef52d2796020cb16537653)
2012-10-09 22:40:13 -04:00
Tim Abbott
f1e90cde8c
Rename zephyr_dict and zephyr_array.
...
(imported from commit 5d93fddc1758c0ee47390cfe599732a60a8d817a)
2012-10-09 22:40:12 -04:00
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