Zev Benjamin
696a04743a
Factor reload-related functionality into reload.js module
...
(imported from commit ef533f3416e8b406a03d28f67b45ca59523cef8e)
2012-10-29 17:38:44 -04:00
Waseem Daher
3c3877f1b5
Have Esc dismiss userinfo popover.
...
It's possible that the three places we can kill a popover
(body click, Esc, clicking on a new one) should be
refactored to use the same code.
(imported from commit ba7eab480fd2258abfb469c8f1155f29bc63f7f6)
2012-10-29 15:49:40 -04:00
Zev Benjamin
cee3f87585
Use compose.finish() instead of manually calling ajaxSubmit() in multiple places
...
(imported from commit 3bbe4a03171d9eace413b576ae2c7ccf99141bf1)
2012-10-29 13:58:40 -04:00
Keegan McAllister
4c0d6eef00
print-all: Provide empty stdin to latex
...
_out takes a filename but _in takes the input itself.
(imported from commit dee2a1cc920ea3526045146c4e738ca44c38fb47)
2012-10-28 15:20:05 -04:00
Keegan McAllister
6ab646cd53
post-receive: Deploy to the new server
...
Eventually this should go to the staging server, and we'll have a separate
process to migrate changes from there to production.
(imported from commit 2a712758844524fdf2f23f798baf6b607d056b9a)
2012-10-27 11:39:03 -04:00
Keegan McAllister
582cb799dd
Get rid of the selected_message_class global
...
Instead we infer this from narrow.active(), with the ability to override during
the narrowing procedure.
(imported from commit fab9c6861f19aedf0ee8af094c1ef4e8a0a73d80)
2012-10-26 21:05:04 -04:00
Keegan McAllister
465bbf5614
print-all: Fix incorrect progress output
...
(imported from commit 266b9da0a4aee094c2df6502766ff06c2a967a2d)
2012-10-26 17:52:47 -04:00
Keegan McAllister
b0d669aa03
print-all: Use psnup rather than pdfnup
...
Our printer strongly dislikes the pdfnup output.
(imported from commit 0539def995191143365ed1e62f1fbf6ec572627e)
2012-10-26 17:49:38 -04:00
Jessica McKellar
92593b7cc8
Add basic up/down search functionality, including across narrows.
...
(imported from commit c82acad95e97733b87d65287c685caf7533a774e)
2012-10-26 14:31:05 -04:00
Keegan McAllister
3f9cf64eba
Add a tool to print out the entire codebase (!) as a PDF
...
(imported from commit 51199eb81735137a66a2e441d0392b142ce197d0)
2012-10-26 13:59:34 -04:00
Zev Benjamin
967acc763c
Make output of check-all red
...
(imported from commit d0a9c4ee6aeea116ecccdabd7dc5f08d1fd50d2f)
2012-10-25 15:55:58 -04:00
Tim Abbott
6f1f2a15a1
tools/check-all: Optimize computing the list of Python files.
...
For reasons I don't totally understand, the previous code took like 2
seconds to compute the list of Python files.
(imported from commit 23668e7d79f1d69e1225389be7d8c8a3fbb6fad1)
2012-10-25 15:06:47 -04:00
Keegan McAllister
a01d641b2a
check-all: Look for any shebang containing 'python'
...
Such as #!/usr/bin/env python
(imported from commit bc3ebdb3bafc9a6256a32c435a52717559bce82b)
2012-10-25 14:53:15 -04:00
Tim Abbott
7976262ed8
check-all: Detect non-.py Python files by #! line, not a whitelist.
...
(imported from commit e36ad2fd66688092ed0c81b479b9ff81952751fa)
2012-10-25 13:53:34 -04:00
Zev Benjamin
bb64eb717f
Make select_message and friends take an options argument
...
The select_and_show_by_id function is now subsumed by select_message_by_id.
(imported from commit 3dbe9cf9d253b64733f269b6dc78c144100927ca)
2012-10-22 16:06:38 -04:00
Keegan McAllister
ae7c4b302b
Add a bot to send yourself reminders of Google Calendar events
...
Run ./api/gcal-bot with no arguments for usage information.
(imported from commit cdc160aeffc16f54072b64370868aca3acc6ad67)
2012-10-21 18:21:12 -04:00
Keegan McAllister
f619c765e7
check-all: Check some Python files whose names don't end in .py
...
(imported from commit ddcc80f02fd0436e08181d3c08f4de6974d3a59a)
2012-10-19 21:00:05 -04:00
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
Tim Abbott
2f910a1629
Show success messages on the subscriptions page.
...
(imported from commit 771fa4459e6a09ffc4132ccff12372b204334de2)
2012-10-09 15:44:55 -04:00
Tim Abbott
5568e1a79c
Move hotkey.js jslint globals into check-all.js.
...
(imported from commit ec737e658e9f2251025e493abb92e4cf2a7aab72)
2012-10-09 14:11:22 -04:00
Tim Abbott
a5c8b5dc7e
Detect whether the user is currently in an input area correctly.
...
Rather than trying to keep track of whether the last thing that
happened was an input area being focused (which had all kinds of
bugs), just detect whether we're in an input area using the
appropriate jquery selector. Hopefully this has OK performance.
(imported from commit 6150692ffcb0ab9b04244c3d053b5527847ded2d)
2012-10-09 14:11:22 -04:00
Jessica McKellar
e351439d0b
Don't have clicking on a sender prepare a personal.
...
It is confusing, and clicking on it should behave like clicking
elsewhere in the message.
(imported from commit e56434e8e143f6fa58b095e1c7d311b4aa24313f)
2012-10-09 11:01:28 -04:00
Tim Abbott
ad9f58d90a
Rewrite respond_to_zephyr.
...
The new version is now the only codepath that we use in order to start
a reply to a message.
(imported from commit dd28316d2640fd5fd712f326690d480b7db59c4c)
2012-10-09 10:40:27 -04:00
Jessica McKellar
367feda747
check-all: add new viewport globals.
...
(imported from commit e163dc07ad196ffd2731f7ccc67bfaada8e8580a)
2012-10-05 16:29:59 -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
12cd44bd0f
check-all: Only check python files in git.
...
(imported from commit 1c633e048cad0cc4f629977363df6a8300dac65c)
2012-10-05 14:58:42 -04:00
Keegan McAllister
c9623ee370
post-receive: Include author names
...
(imported from commit 7914f47364d014bd17115db7defd0cc634f4ac60)
2012-10-04 17:37:18 -04:00
Keegan McAllister
bfa24d75b6
post-receive: Send test-post-receive pushes to class test
...
(imported from commit 8f187464a4d82da071ffed79abf33ea05b999b95)
2012-10-04 17:37:18 -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
Keegan McAllister
3e57097ccc
Exclude test-settings.py from check-all
...
(imported from commit d12d38b85846fa5ea42f123dd81674ae85e92667)
2012-10-04 16:50:27 -04:00
Keegan McAllister
b6b647143a
check-all: Don't canonicalize directory name
...
Instead just cd to the repository root for pyflakes. This is a marginally
worse user experience, but should work on Mac OS where we don't have readlink
-f.
(imported from commit f3d1bfb086ff05642e438c16094415d98a6dab92)
2012-10-04 15:29:03 -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
Keegan McAllister
48f0386d26
Add an all-in-one lint checking script
...
(imported from commit 1fbbfd2c775729295a7a061ead67812a963dc924)
2012-10-04 14:31:55 -04:00
Keegan McAllister
ffcbd1ea7e
check-all: use strict
...
(imported from commit 6a4c721be90631d250ca35ba9e26925803f2dd34)
2012-10-04 13:48:24 -04:00
Keegan McAllister
277eb66cf6
check-all: Display actual relative paths
...
(imported from commit 2c7ed1deb7aadd7b9286d363494437162e8975f6)
2012-10-04 13:41:07 -04:00
Keegan McAllister
3816ca6dfb
check-all: Use more fs / path functions
...
(imported from commit f2b2970efa9b93068f835cd70ca3e3cc7ec22c38)
2012-10-04 13:41:07 -04:00
Keegan McAllister
cf85c2e4c3
JSLint: Disallow console.log in general
...
(imported from commit 8cdff0a702ce2857a4596144d66ac285559226da)
2012-10-04 12:37:15 -04:00
Keegan McAllister
7edfd3458c
Add a new tool for running JSLint
...
(imported from commit 35256825be8793f7e649eb8237111afa05320b32)
2012-10-04 11:04:25 -04:00
Keegan McAllister
e7db8857ea
Import JSLint
...
(imported from commit c1380fd9a2d75d84ac33c6a7b3457abcd0f9e4f5)
2012-10-04 11:04:25 -04:00
Keegan McAllister
8d7b598939
do-schema-change: Run syncdb without input
...
(imported from commit f27142bda30df50207071291b287f837621cf76b)
2012-10-04 11:03:13 -04:00
Keegan McAllister
2c7c378fde
do-schema-change: Use COLLATE utf8_general_ci not utf8_bin
...
Amazingly the choice of collation affects whether Django returns bytestring or Unicode values.
(imported from commit f3fcff302ebdeae4ad15bd8fbe063106c6be9cb1)
2012-10-04 11:03:13 -04:00
Keegan McAllister
6784e8cbf4
post-receive: Style branch name
...
(imported from commit 33f075095c163f8954dac104cd5d39e9171a99d2)
2012-10-03 18:08:36 -04:00
Keegan McAllister
3848d79f10
post-receive: Print commits in top-down chronological order
...
(imported from commit 952c4e0d4488cd41a02d75bc890fceacbb9f6273)
2012-10-03 18:07:35 -04:00
Tim Abbott
303bc7c6b8
post-receive: Sleep a bit to give the Humbug server time to restart.
...
(imported from commit 95e9e7110dcca19347e3cb3952ac18960b500586)
2012-10-03 17:01:15 -04:00
Keegan McAllister
901b87dd77
post-receive: Loop over all pushed refs
...
(imported from commit 7f101732b3e521b9ef4a41204e0dbbba67f035f5)
2012-10-03 15:20:20 -04:00
Tim Abbott
e53dbbd756
Fix post-receive hook's API postings.
...
(imported from commit 98021d3ee5e84b533e17ec741538be60925b4e87)
2012-10-03 14:48:51 -04:00
Tim Abbott
d5d3694451
Update post-receive hook to send messages via the API.
...
(imported from commit 81f4c9e55c44f19208c42d9a8e8db33ce44b02ac)
2012-10-03 14:32:05 -04:00
Tim Abbott
78dae6a11d
Add tool to replace the production server's database schema.
...
(imported from commit 2aeab792275e43549f3644875a5c360b0f0582a1)
2012-10-02 16:17:48 -04:00
Tim Abbott
1e60511bf6
post-receive: Do deployments over ssh to app.humbughq.com.
...
(imported from commit cec99b18a7e686243e64d69d1882edc6354c5c9a)
2012-09-17 11:47:20 -04:00
Keegan McAllister
e9ae8b0e0d
Remove obsolete wiki user script
...
Replaced by server-side config.
(imported from commit 54b749e37955111439da5e27a2233ff596214971)
2012-09-04 20:50:34 -04:00
Keegan McAllister
647d6ab288
Add a user script which sets a default commit message on the wiki
...
(imported from commit ed76dae4f8d55d7859a6ddffa5fc392f98aadf28)
2012-08-31 16:24:55 -04:00