Keegan McAllister
12e458df80
Get initial messages from get_updates_longpoll
...
(imported from commit 2bb9c51409735abe23bad758338b13121aea4c99)
2012-09-26 17:10:59 -04:00
Keegan McAllister
ee75f7ae8d
get_{next,prev}_visible: Handle undefined argument
...
(imported from commit 07956fb7595e8c39fd052aaf0a16df4c3e574f8d)
2012-09-26 17:10:59 -04:00
Tim Abbott
df01b016cb
Display short_names rather than email addresses for huddles.
...
(imported from commit 6509305f1b0ee90cfe5c93c74e03350a557a0cc5)
2012-09-26 15:32:35 -04:00
Keegan McAllister
bec1b55930
Use switch/case in respond_to_zephyr
...
(imported from commit 4afef9103075a00772f3c0e29d634a28cb5d5b5a)
2012-09-26 15:25:46 -04:00
Keegan McAllister
d8714ae3ff
Use switch/case in add_zephyr_metadata
...
(imported from commit f5a2357a4359d3e16d22a0c561561c5f54b16538)
2012-09-26 15:25:45 -04:00
Tim Abbott
d374312509
Use email address for huddle display recipients.
...
This fixes replying to huddle messages.
(imported from commit 8e6f9ce7d690c926b19c50016ec972d767428994)
2012-09-26 13:24:08 -04:00
Jessica McKellar
f60e9de1f2
Linkify URLs in zephyrs.
...
(imported from commit df7e355648d2c4d6319de049933547ed96402fd8)
2012-09-26 10:33:33 -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
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
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
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
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
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
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
Jessica McKellar
703a1cd6d9
Add error handling for subscription AJAX requests.
...
(imported from commit 9ed019da01aaa85302000ad62441b85786c2c528)
2012-09-24 10:16:22 -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
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
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
Tim Abbott
12013cd7b7
Fix collapsing of huddle messages.
...
(imported from commit 31391a278f5fe70ab56379bf7cc3fad2d0663007)
2012-09-21 16:44:30 -04:00
Waseem Daher
5a164f19c2
Clean up subscription functions.
...
Now that 'manage_subscriptions' only removes subscriptions,
let's name it that. Also, since both functions now only
act on one subscription at a time, use them in the singular.
(imported from commit 52cfc7b36eb1533da7aec1bc3a6e460151a56da8)
2012-09-21 16:30:29 -04:00
Waseem Daher
a27edbce7d
Restyle subscriptions page.
...
(imported from commit 41339c5af38ae5ea4801fc1e23b7184c277145f3)
2012-09-21 16:04:44 -04:00
Tim Abbott
ed46a453ba
Add (mostly unstyled) settings page.
...
(imported from commit 492c5f498c2fec452e6c724555bc4a5a2c4c151a)
2012-09-21 14:47:26 -04:00
Tim Abbott
fc12e6ffbb
Fix collapsing with new email addresses instead of usernames.
...
(imported from commit 26a2391ac1f965f78feaff5092b42cf49f57215f)
2012-09-21 11:15:08 -04:00
Tim Abbott
ee8f28a084
Use email addresses as unique identifiers rather than usernames.
...
Note that this code still assumes one's email address (stripped of
domain) is unique.
(imported from commit e98f96601ad109811978fc00b1165e97d8f7b185)
2012-09-21 09:43:22 -04:00
Luke Faraone
1050300ded
Render Huddle titles the way Waseem detailed in his original mockup.
...
This actually involved refactoring a good bit of existing code; we
in this commit introduce a new property of zephyr called .reply_to, which
is the fully rendered-to-string and pretty-printable version of the person
to which any reply should be addressed.
This is useful for grouping personals, where if you simply went by the
.display_recipient or .sender you would have to check them against
eachother.
We also introduce a new narrow_classish command, which is triggered on
clicking on the "Huddle with…" text. This method intelligently determines
which sort of narrowing to do; we essentially moved out code from the 'r'
key handling section and put it in its own function.
(imported from commit 2406ee0f6f83b990eec83190d2e8858865c06238)
2012-09-20 16:36:49 -04:00
Keegan McAllister
fbec2b8d76
Use DOM ids in get_zephyr
...
This greatly reduces lag on mouseover selection.
(imported from commit 7d9bc0ebce2aa9781c316033d3e9d21e9da6ee3f)
2012-09-20 15:23:41 -04:00
Keegan McAllister
1dabe1cf81
Give each zephyr row a unique DOM id
...
(imported from commit 4530d0bbbfc94fb86ebba9c6d73074de38e4a78a)
2012-09-20 15:23:41 -04:00
Keegan McAllister
48fea66e34
More consistent naming for #table and #filtered_table
...
(imported from commit 966ab97522a79fb5cf6dc1e215487ceba01f6d11)
2012-09-20 15:23:41 -04:00
Keegan McAllister
d4985ef5f4
Optimize select_zephyr_by_id for the already-selected case
...
Saves a call to get_zephyr.
(imported from commit 9ce9f2af7e4d8eb5e3a76a3c0ddbfb7f5896a583)
2012-09-20 15:23:41 -04:00
Keegan McAllister
a00227c864
Implicitly choose the selected zephyr for showing email address
...
I erroneously switched halfway in ce4f6289491722d4c1aa84fe8b88b3a5932a3f2a, so
let's just do it for real.
(imported from commit 4c09a7805f6e2322cbbab2f8534e9d362acdc826)
2012-09-20 15:23:39 -04:00
Keegan McAllister
8d994bdb21
Make sure only one email address is displayed at a time
...
(imported from commit 51b5b2268a154d1136b03185d6658fad7f2922aa)
2012-09-20 15:22:08 -04:00
Keegan McAllister
81ff352ac3
Simplify bookend creation
...
(imported from commit 8faf260037b7e0508d9e4acea24687ebc06ea0ef)
2012-09-20 00:08:46 -04:00