Commit Graph

43728 Commits

Author SHA1 Message Date
Keegan McAllister 9efb63f6b8 Display SQL queries when DEBUG = True and URL like /?show_debug=y
(imported from commit dc3efd7aee2975f7d007296ba1ee1f72b262c493)
2012-09-25 18:40:59 -04:00
Jessica McKellar fde0eda122 Indicate that zephyrs are clickable by changing the pointer on mouseover.
(imported from commit 0eb2bb3de3a0fe2664a7256bc06ea4c2fc3c4d31)
2012-09-25 16:18:25 -04:00
Jessica McKellar 455b9863d5 Always clear compose inputs on New Message.
(imported from commit 7c32f8bdc2366695c488563698c282d2f25b65a1)
2012-09-25 13:39:23 -04:00
Jessica McKellar 14ceb7e888 Add hotkeys for composing a new message and toggling betweeen message types.
(imported from commit 5778b12d204f803a4c46b0f32ec19d9410108b36)
2012-09-25 13:00:43 -04:00
Jessica McKellar 810229288b Track and be able to return to your high water mark.
(imported from commit 52a1ce8c84ad3f4eea16b7abaf075ebffc794c9a)
2012-09-25 10:04:34 -04:00
Jessica McKellar 6685bfdd10 Add page up and down arrows to the zephyr list.
(imported from commit e66dfc4eef150e5b84d98ab7346d4d66852699b3)
2012-09-25 10:04:34 -04:00
Keegan McAllister 613e042b7c Get rid of current_view_predicate
Use 'narrowed' for the same role.  (Functions are always true-ish in
Javascript.)

Also, don't add messages to the narrowed table if not narrowed (my bad).

(imported from commit 31707d39abb97472a36d3816c62482e39e732fdc)
2012-09-24 18:42:04 -04:00
Keegan McAllister 877954aa55 Render all new zephyrs with a single template invocation
(imported from commit 13803e0e96901d129d4aefcd5fde63548deb4dc0)
2012-09-24 17:45:52 -04:00
Keegan McAllister 934e3461df Split add_to_table into preprocessing, templating, and postprocessing
(imported from commit ef17ff33f4496fcf619170bda1a46f14734d3e43)
2012-09-24 17:45:52 -04:00
Keegan McAllister 4eae1981f2 Clean up CSS
(imported from commit 406a0de68e43ae5538289ddd1358b03ee91813c2)
2012-09-24 17:45:52 -04:00
Keegan McAllister 6fb5fc57ce Change bad CSS class names
(imported from commit 962f91a593b4ca65bd7aae7d71117fc159c2627a)
2012-09-24 17:45:52 -04:00
Keegan McAllister 6ccf3818d6 Rename add_to_tables -> add_to_table
It only adds to one table.

(imported from commit 7c106331527ceaa056b23214be3c981029c9c005)
2012-09-24 17:45:52 -04:00
Keegan McAllister ad0bed506a Add messages in batches
Not immediately useful, but it will help us speed up templating later.

(imported from commit 48cd554b322eede506b0cbcd4b26ef427cb2c804)
2012-09-24 17:45:52 -04:00
Keegan McAllister 40ac817f4e More JSLint options
(imported from commit a5b7aea68de5403c3f9deb7220f05102de971747)
2012-09-24 17:45:51 -04:00
Keegan McAllister 7724e19a49 Remove ICanHaz.js
(imported from commit 799414525e1566d1bc4641b9663cd7bc306d29f2)
2012-09-24 17:45:51 -04:00
Keegan McAllister 4793cee888 Switch to Handlebars templating
Benchmarks [1] show it's much faster than ICanHaz, though we will have to work
to realize those gains.

[1] http://jsperf.com/jquery-template-table-performance/77

(imported from commit b037a6f15e27fd49af88f814ff949811dbcd48f2)
2012-09-24 17:45:51 -04:00
Keegan McAllister efe4410f9f Import Handlebars.js
(imported from commit efe15705adc034388bd240a37443efbbfb29d430)
2012-09-24 17:45:51 -04:00
Keegan McAllister cd7ee170b8 Move Javascript templates into index.html
...which includes subscriptions.html.

(imported from commit d6297b8b0828fdc1b71393a8549bf2796633a2d0)
2012-09-24 17:45:51 -04:00
Tim Abbott 3b817ecc1c Actually fix deduplication of synced huddle messages.
(imported from commit 63e7fbdc89e1271751f73d20f2185a048b56dd60)
2012-09-24 17:38:21 -04:00
Tim Abbott a3a027f8c7 Another attempt at fixing huddle message deduplication.
(imported from commit 3b0a06d7bee7eacbe4eeb8ff6095bdcd5ce17e95)
2012-09-24 16:34:29 -04:00
Tim Abbott 0be4ce05a6 Another attempt at fixing huddle message deduplication.
(imported from commit 6d48a3488b5ca0b3fc923386d5edfdd8c002112d)
2012-09-24 16:33:50 -04:00
Tim Abbott 1f6e09834b Another attempt at fixing huddle message deduplication.
(imported from commit 9b271d8bcb4ad902aaf2f21b73fc8536840262df)
2012-09-24 16:33:24 -04:00
Tim Abbott 2a1503fd35 Hopefully fix huddle message deduplication with MIT sync.
(imported from commit bccaa67d02e72b1c444d39b019d5bd87800b1441)
2012-09-24 16:30:24 -04:00
Keegan McAllister b21d197418 Factor out same_sender too
(imported from commit 831a24817cd4669507bac9797abf30d644c6a3d9)
2012-09-24 15:43:28 -04:00
Keegan McAllister 67349eca33 Factor out the test for whether two messages have the same recipient
(imported from commit a8cc4858d1eb7933c437adb0dd4c9a612c40e389)
2012-09-24 15:43:28 -04:00
Tim Abbott 11e5e8785d Preparation for syncing messages back to MIT.
(imported from commit 551b697366702de93579de259a9bc644be8d66ec)
2012-09-24 14:31:40 -04:00
Jessica McKellar d6a6516687 Have the pointer stay in view as you page up/down.
(imported from commit 72b58f30d82b103542f53ebeff2363407c4997b6)
2012-09-24 14:14:37 -04:00
Jessica McKellar b276596855 Add page up/down support for all tabs.
This does not yet try to keep the pointer in view.

(imported from commit 865413ba70e271ed12d5cc45d13e56ff9a3275f9)
2012-09-24 14:03:18 -04:00
Keegan McAllister 2a96542e9a Clean up do_narrow calls
(imported from commit 51a694e3dbe7310127580e50fbac0a796f1b09c2)
2012-09-24 13:55:30 -04:00
Keegan McAllister 32f806c032 Save the current view "original message" implicitly in closures
There's no need to pass this around separately and store it in a global
variable.

(imported from commit bb464b1c87fcc9e97aa85a7d139186d4a7169674)
2012-09-24 13:41:22 -04:00
Keegan McAllister 0379d828e1 Don't store into zephyr_dict in get_updates_longpoll
add_message already does this.

(imported from commit 77e6ebf7c02794f6d4e0e9f8a42ecedc44d0402a)
2012-09-24 11:58:37 -04:00
Keegan McAllister 07e1314462 Rename initial_zephyr_array -> zephyr_array
We keep adding stuff to it in get_updates_longpoll.

(imported from commit be33421c9df16191112e5bcc7c4a476080d52859)
2012-09-24 11:58:37 -04:00
Keegan McAllister 2605f29988 Rename get_zephyr -> get_zephyr_row
Now that the primary data store is not these DOM elements.

(imported from commit c8f5b24ea1baf2ed69278fb0e8658a3bf0a85cd0)
2012-09-24 11:41:26 -04:00
Luke Faraone 5bbe023c23 Refactor index.html, move things to base.html.
In this commit we also remove the navbar from base.html for implementing
further changes as requested by Waseem.

(imported from commit 85a8ea82ff0e271120adde83e15eb671b5584722)
2012-09-24 11:40:09 -04:00
Tim Abbott a8e83040e5 Add support for specifying per-user MIT subscription lists.
(imported from commit d6e91917c071e59b5611bfefe326ac47684299c3)
2012-09-24 10:51:49 -04:00
Jessica McKellar 703a1cd6d9 Add error handling for subscription AJAX requests.
(imported from commit 9ed019da01aaa85302000ad62441b85786c2c528)
2012-09-24 10:16:22 -04:00
Keegan McAllister f3aefde0df Simplify goto hotkey code
(imported from commit 2e424b488c82125b036d264baf66fdc3328be0f3)
2012-09-21 18:34:26 -04:00
Keegan McAllister 3f0a6b6087 Fix and clean up Home/End key processing
We had the wrong keycode for End, and much duplication of code.

(imported from commit 0aaa5ab45e45fc9d7209ec1768198abefc08dc86)
2012-09-21 17:55:17 -04:00
Keegan McAllister 4c45baa045 Refactor hotkey narowing
(imported from commit d1559cbe3505090085229271bdb7bc69060e43b2)
2012-09-21 17:55:16 -04:00
Keegan McAllister a3fcf3417d Move get_{next,prev,first,last}_visible into a sensible order
(imported from commit 80697ba55c1fb9bf52a4fffd2f15471b8892f07c)
2012-09-21 17:55:16 -04:00
Keegan McAllister f3ee3fa6eb Simplify get_{next,prev,first,last}_visible
Now that we have two tables, the adjacent zephyrs will always be visible.

(imported from commit a1ac000bfba32faea109d1b35a84fdd30ccc4891)
2012-09-21 17:54:11 -04:00
Keegan McAllister a53cbc9f36 Move hotkeys into a new file
(imported from commit a589cd4623c4707122d5d5936aa0bc555c38557a)
2012-09-21 17:52:02 -04:00
Waseem Daher d3bb97a21f Raise error when subscribing to an already-subscribed-to class.
(imported from commit bc946fb99e6982d37fe8403b9ade803c49b30687)
2012-09-21 17:47:58 -04:00
Waseem Daher f1aa17cf1d Change some URLs associated with subscriptions.
Put all the 'API'-ish URLs in the /json/ namespace so that
/subscriptions and /subscriptions/add, etc. can be real
user-facing URLs if we want them to be.

(imported from commit 1455a32d27e44547ab1874b6289243cb40c85dde)
2012-09-21 17:36:29 -04:00
Keegan McAllister f4483832b2 Force select_zephyr when narrowing even if id has not changed
Fixes a bug where the pointer would vanish.

(imported from commit 0ed950fbc3d5a8673b0bc62556f426cccb5a6459)
2012-09-21 17:33:00 -04:00
Tim Abbott 862ade7578 Use the real timestamps when syncing forged zephyrs.
(imported from commit e25e4c2656c6f442384c08934be68753f7ee7cb0)
2012-09-21 17:23:15 -04:00
Tim Abbott 1c03419cbf If other huddle recipients don't exist, make them.
(imported from commit 5b9d8faf67657dd2ecca117aef136bc2a03f4abf)
2012-09-21 17:19:58 -04:00
Tim Abbott 76c1dfc1ed Make home and end go to first and less messages, respectively.
(imported from commit f85b811f51227cd1ae113c119a430381230d141c)
2012-09-21 17:13:07 -04:00
Waseem Daher 230e725446 Allow spaces in classnames.
(imported from commit 9ef71240ee5e6e0ed9ca0b50d9461b539538b437)
2012-09-21 17:09:46 -04:00
Tim Abbott 919ddfdc31 Send recipient_id values to client and track them there.
(imported from commit 77446f7a226d8a26a287e069d08f28e4beb0b2e3)
2012-09-21 16:57:04 -04:00