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
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
Tim Abbott
d2343813df
Add 'C' hotkey to start composing a huddle.
...
(imported from commit 693aeba202a06465dd41e46d78491ecfe23e97f6)
2012-10-17 11:55:21 -04:00
Waseem Daher
bf73a54576
Have Spacebar exhibit the same scrolling behavior as PgDn.
...
(imported from commit 46a1204a9a8b973e7fa6bae9c65a9dc9f341077c)
2012-10-17 11:25:38 -04:00
Waseem Daher
2d4857d6c1
Remove extraneous calls to keep_pointer_in_view.
...
PgUp, PgDn will already call the scroll handler, which will
of its own accord call keep_pointer_in_view.
(imported from commit 8b6e53eaeda91d0f35775de72e16d63dc6c8340b)
2012-10-17 11:25:38 -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
Zev Benjamin
b42cf1d4c8
Fix persistent message selection across narrows
...
(imported from commit 958ce299108f8bbc8579e7446053d7fc9f018b81)
2012-10-15 13:25:39 -04:00
Tim Abbott
4062550ef7
Fix tab not toggling the compose window in Firefox.
...
(imported from commit 4dfd3d6eb3e81c519d0aefbfe0b3b1390adb241b)
2012-10-15 10:45:31 -04:00
Zev Benjamin
adf75d48e1
Make pressing escape also un-narrow
...
(imported from commit 17d2cc3e8074af332f98588ad201ec342476d51f)
2012-10-11 14:30:51 -04:00
Tim Abbott
ac3f4393ff
Rename instance to subject.
...
(imported from commit 6b4693da03f106448c137cf81cf9801cac44f2b8)
2012-10-10 18:01:39 -04:00
Tim Abbott
8dca315a18
Rename s/class/stream/ in code local to various js files.
...
(imported from commit c441f9d7d4155ff3c4b171a2a4a3db4ffbb60ac4)
2012-10-10 17:48:18 -04:00
Tim Abbott
dde773c7b5
Update comments in hotkey.js zephyr=>message.
...
(imported from commit 648fc45a8c6324d57c2c9e57f12bf162b438758f)
2012-10-10 10:22:10 -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
f66124cbe2
Rename select_zephyr(_by_id) to select_message_*.
...
(imported from commit 91619adf0e610017fbef52d2796020cb16537653)
2012-10-09 22:40:13 -04:00
Tim Abbott
dfc0b1a4d9
Rename next_zephyr local variables to next_message.
...
(imported from commit 88f3b5dc3fdde3340dcc4f040cf8ecc8554955bb)
2012-10-09 22:40:12 -04:00
Tim Abbott
d5c89ffe9d
Fix needing to hit escape twice immediately after hitting "c".
...
(imported from commit 8132d61c14bcd012239c4364a249c3e52dd488c3)
2012-10-09 14:13:58 -04:00
Tim Abbott
1defb363e5
Disable hotkey processing on non-home pages.
...
(imported from commit 0865d2962e94d80cd1451e696e98ca6f9630ba1b)
2012-10-09 14:11:22 -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
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
Waseem Daher
56bb7ae614
Make extra room when you press down on the last message.
...
This essentially reverts commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a,
though also adds support for this behavior with the 'j' key.
(imported from commit 36c51e0f6bd03c53b84abddc75097cb06fc04e16)
2012-10-05 16:32:47 -04:00
Jessica McKellar
a282f7b32b
Have PageDown at the bottom/PageUp at the top select the last/first zephyr.
...
As opposed to inching towards it message by message.
(imported from commit 31e833dd06bf27336d9b1f293ab992e99537bc21)
2012-10-05 16:06:10 -04:00
Luke Faraone
6e4daba2aa
Implement respond-to-author bound to the 'R' keypress.
...
(imported from commit d38b57d175a10423c566549371ae70032b02c29d)
2012-10-05 15:53:40 -04:00
Luke Faraone
b16c3f1982
Make hotkeys case sensitive.
...
Previously we triggered all hotkeys on keydown. Now, if the keydown event
is in the range of a character we bail and wait for it to be handled by the
keypress function instead.
We also redefine all of the keycodes for characters to be their lowercase
versions.
(imported from commit 534199de92174c2858220abb21ce774e1ee0e1d3)
2012-10-05 15:53:40 -04:00
Luke Faraone
6094f46b3a
Rename simulate_keypress; we're really faking a keydown event.
...
(imported from commit 2574afb738787311bc32885d36eaed862925d39c)
2012-10-05 15:53:39 -04:00
Waseem Daher
c7175f5f43
Delete code that repositioned window on last message.
...
I believe we'll get this for free with the new version of
select_zephyr and our bottom_whitespace div.
(imported from commit 0d6c3e4d0a70e06b9b2f6e5830b3a9650e44441a)
2012-10-04 15:47:20 -04:00
Waseem Daher
1f669e1c85
Do a little handling of Home, End, PgUp, PgDn ourselves.
...
It turns out it's marginally easier for us to completely handle Home
and End ourselves rather than let the browser do it, because home
scrolls to the top of the page, but it does not select the topmost
message.
With PgUp and PgDn, the default browser behavior is fine,
but it seems like PgUp on a screen where you're already
"scrolled to the top" should not be a no-op.
(imported from commit 609d639f3a4313e75e1fd6138966f15447b70f2e)
2012-10-04 15:47:06 -04:00
Keegan McAllister
fcfcf834a1
Replace 'in' with .hasOwnProperty
...
(imported from commit 209aef184f0a6117d1c14e755e7b916a866b8702)
2012-10-04 11:04:26 -04:00
Keegan McAllister
bdf1e7e25c
Introduce a function for controlling whether keydown is interpreted as message input
...
(imported from commit 88194bf560257ec0c4033076703d24c670a2c4ba)
2012-10-04 11:04:26 -04:00
Keegan McAllister
c944c08e79
Drop JSLint directives
...
(imported from commit 5a091b4cb23bae5c307ad19cb772b878d605fbfe)
2012-10-04 11:04:25 -04:00
Keegan McAllister
2f749afc8d
Tweak JSLint options
...
(imported from commit 7e7582a48228b879ea29c2a27eb22e46e093f9dc)
2012-10-03 18:26:00 -04:00
Keegan McAllister
1cbceeec87
Fix more problems uncovered by lint
...
(imported from commit 7fb8432f362f22770334e6bd1161a61b0bc0e528)
2012-10-03 18:26:00 -04:00
Keegan McAllister
9c6bf90fad
Misc. style fixes
...
(imported from commit b1f32a19a280e3efacf207bfe22bd10eb3aec537)
2012-10-03 18:26:00 -04:00
Keegan McAllister
d4217b4383
Add jslint options to each file
...
(imported from commit f49cdbfd655d8d8fdff792f525c7abc58951dacb)
2012-10-03 18:26:00 -04:00
Jessica McKellar
1adb10d1ae
Allow copying and pasting from zephyrs without triggering a compose.
...
(imported from commit f98a14155904dda11d85ed81acee783494377e4d)
2012-09-28 15:27:39 -04:00
Jessica McKellar
9cbdbc4893
Don't update the selected zephyr on mouseover.
...
But do keep the pointer on the screen as you scroll, and smoothly
scroll all the way up to the top or all the way down to the bottom.
(imported from commit 6acad2a16339ee5eeeebd62a853000c21e4b7152)
2012-09-28 10:59:38 -04:00
Luke Faraone
b58e2ee575
Enable j/k keyboard shortcuts
...
(imported from commit 1a172fc6d49506060534ffc52a27160ca0bbca72)
2012-09-27 12:32:46 -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
6685bfdd10
Add page up and down arrows to the zephyr list.
...
(imported from commit e66dfc4eef150e5b84d98ab7346d4d66852699b3)
2012-09-25 10:04:34 -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
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
a53cbc9f36
Move hotkeys into a new file
...
(imported from commit a589cd4623c4707122d5d5936aa0bc555c38557a)
2012-09-21 17:52:02 -04:00