Commit Graph

1866 Commits

Author SHA1 Message Date
Zev Benjamin 337836ef54 Fix initial focus on new messages
(imported from commit 4553f6209362f684110b34e92fdba2046cfbb08e)
2012-10-19 16:17:29 -04:00
Zev Benjamin 9de73b5a91 Be intelligent about which input box is highlighted in compose.start()
(imported from commit 37268601d569fdb510415ebfae594804817c0e3a)
2012-10-19 16:09:13 -04:00
Zev Benjamin 2a98045406 Fix responding to messages (broken by rebase error)
(imported from commit 1fac8d8757ee7f9b79c35e884edaa37e5cca0120)
2012-10-19 15:59:03 -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
Zev Benjamin ae08f512dd Enhance the jquery.idle plugin with functionality we need
The following things were changed
* The list of events it listens to by default was expanded
* It now supports canceling timers
* Calling .idle() on an element now returns a control object that can be used
  to manipulate the timer
* Small tweaks to variable names, arguments, jQuery usage, etc.

The code probably still needs some cleanup, but I'm sick of looking at it
right now.

(imported from commit 6868cb6fd97ab994a871f5ed6951995b254e340e)
2012-10-19 15:53:05 -04:00
Zev Benjamin 9752ec8963 Add a jquery module for tracking idle time
(imported from commit 553a7600ab817330ea862dee9887ba08595e0c4d)
2012-10-19 15:53:05 -04:00
Zev Benjamin 1b47cd58f1 Rename compose.message -> compose.message_content to avoid confusion with new API
(imported from commit cce8baba49a4176bdb900a83006db3bf23bcd82b)
2012-10-19 15:53:05 -04:00
Zev Benjamin 08b4bd0d9c Determine whether the user is composing based on a flag instead of element visibility
The flag is set to the kind of message being composed in
start_composing() and set to false in finish_composing().

This avoids the problem where composing_message() will return true
when the animation is still running.

(imported from commit 4c2e7e1fad2e6b2123825bd51d5b24ae41bccd45)
2012-10-19 15:53:05 -04:00
Zev Benjamin 621909df6b Add custom jQuery events to the compose abstraction
(imported from commit 3ff10baafd0825ed8b7ed50a8b668080d1e9f303)
2012-10-19 15:53:05 -04:00
Zev Benjamin 7a44a3b05a Use the new compose API
(imported from commit fb91febbd5c257aea15292d8071da69a3e6b9a99)
2012-10-19 15:53:05 -04:00
Zev Benjamin 746897b36a Add a compose API for starting, canceling, and finishing messages
(imported from commit 372e1c2ae19a72bcbb989fa2be5c510a1278fc69)
2012-10-19 15:53:05 -04:00
Zev Benjamin ab382040c1 Make get_updates reload_pending request parameter an integer
This fixes a bug where the server wasn't returning from get_updates
immediately when the client needed a reload.

(imported from commit 1d854eb1c7061f468d091e103f10074f4c7231d8)
2012-10-19 15:53:05 -04:00
Keegan McAllister bbb67f61cc populate_db: Indicate progress on --replay-old-messages
(imported from commit 1f1043bca0952650c744d6012b11d607f2eb3cde)
2012-10-19 15:17:34 -04:00
Keegan McAllister ec0bbdc1df Hide horizontal scrollbar on .message_list
(imported from commit 09600ce19074546285173f8ab8317322d4d0e417)
2012-10-19 15:17:33 -04:00
Waseem Daher 17d44be14a Display huddles as 'You and...'.
(imported from commit 35fe0e56751b1a2993bd99181e8bbd57e8c3ce81)
2012-10-19 15:11:13 -04:00
Waseem Daher 647f3c1220 Hack to make narrowbar line up a liiiiitle bit with real bar.
(imported from commit 83f0066def43b2a35e2d8aa089f5962617cf5546)
2012-10-19 15:07:08 -04:00
Waseem Daher 7fdac68787 Tone down some of those icons.
(imported from commit efd22df34b87ccb0603b73fed85b10f08bbd47b0)
2012-10-19 14:53:31 -04:00
Waseem Daher 92045f2c9e Experiment: Use icons in more places (instead of the word Huddle).
(imported from commit 6e27da4e54634c1f2fe05e2bffac24dc00576d2c)
2012-10-19 14:42:43 -04:00
Tim Abbott 5a51f7385a check-mirroring: Enable authentic sending.
(imported from commit dc71ac6d8c7b7b3a6a380eb3ea4c9e177ecfb691)
2012-10-19 13:53:14 -04:00
Keegan McAllister 4c269c4f7f Don't line-break <code> tags
(imported from commit 35be9fe8c70d3e233708bb7ffdb5ce91eca75c77)
2012-10-19 13:37:42 -04:00
Tim Abbott b62bb021e7 zephyr_mirror: Support empty zsigs.
(imported from commit 6a9fd78d928ebbc9442b3f99d2730f09309556bb)
2012-10-19 13:17:10 -04:00
Tim Abbott 8a2e1d6480 check-mirroring: pretty-print humbugs.
(imported from commit 603da610993a915f1bef7f6c03ccf62414545931)
2012-10-19 13:17:09 -04:00
Waseem Daher 61daa31741 Use glyphs in composebox stream/huddle selector.
It's not great but it's an incremental improvement
over the totally opaque 'S'/'H'.

(imported from commit 43ae4481edf894abd83c41fe7394ee87ea041202)
2012-10-19 13:09:42 -04:00
Keegan McAllister 299a298bfb Fix variable name typo in narrow.by_recipient
(imported from commit 87954f2d9007ebdd9d6da8a71584d2677c19ad4d)
2012-10-19 13:02:25 -04:00
Keegan McAllister 5d0fdd1958 Clean up narrow.by_recipient
(imported from commit ca6665f29847077d6038d3f48821c4be02e95ff1)
2012-10-19 13:02:25 -04:00
Keegan McAllister 390c9a26c1 Explain why target_id exists
(imported from commit af2235d80ada47e95806a8a2f807261da583e39e)
2012-10-19 12:57:34 -04:00
Keegan McAllister e6d42f60f1 Use narrow.by_recipient in message template
(imported from commit 147eb8b652d7b4dee3ad6415b6c8e23e04067d15)
2012-10-19 12:57:34 -04:00
Keegan McAllister 3c00b828b0 Use target_id in narrow.by_recipient
Following 958ce29.

(imported from commit e52e9628f85d83ef02bef393f6b10697a7d4eec4)
2012-10-19 12:57:34 -04:00
Keegan McAllister 2439d69209 Get rid of helpers by_personal, by_huddle, by_stream
These make assumptions about the current message type.  We should just use
by_recipient externally.

This reverts commit ad2123f99ce91361ab907c308bfecec4efd722a4.

(imported from commit b7945896568c4c5c31a9d5bddb0e9ade8eef859b)
2012-10-19 12:57:34 -04:00
Tim Abbott 9543975172 Add a tool to check whether zephyr mirroring is working correctly.
(imported from commit aba418bd50fc8e86afb80aa97a3a8e8af007f223)
2012-10-19 12:25:54 -04:00
Tim Abbott 43ac770fb1 Add print-next-message API example.
(imported from commit 73880275d2665e75d11def7447051c2b0c3b798b)
2012-10-19 11:37:51 -04:00
Tim Abbott 79fbb23356 Return a max_message_id when returning no messages.
This is needed for an API client to setup a nonblocking subscription.

(imported from commit d978c28994c5e3af4312ffba32c4040e8314c247)
2012-10-19 11:37:20 -04:00
Tim Abbott f1a7bd87d2 zephyr_mirror: Add option to specify user used for mirroring.
(imported from commit c9dfe4f8d12f2e234c85d96ba7ca59e0a59c1bd4)
2012-10-19 11:37:06 -04:00
Tim Abbott da9babd347 Fix typo in API tool usage.
(imported from commit 235eca10897b8f62bf2a7d8a7299b8b1f6906ec6)
2012-10-19 11:36:00 -04:00
Waseem Daher 9dbcea2a16 Unbreak narrowing.
(imported from commit ad2123f99ce91361ab907c308bfecec4efd722a4)
2012-10-19 10:38:54 -04:00
Waseem Daher ba1a2a2732 Restore 'narrow to stream' functionality when you click on the stream name.
(imported from commit efb82e44205e41979062ec6a1b1a989ea52d2c97)
2012-10-19 10:24:24 -04:00
Waseem Daher 34fc2266ce Pop up a little box of info/actions when you click a name or gravatar.
Known issues:
* Not all of the options in the menu are functional yet
* The wording isn't totally perfect on some of these options;
   I kind of want to use a 'first name' in some of them.

(imported from commit 5a333fb939fcca7e0d0ecb2c43e79501139ac0db)
2012-10-18 21:19:49 -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 2fe034d161 Rename subs.add -> subs.add_for_send
This has some logic specific to the "Create and send" / "Subscribe and send"
buttons.

(imported from commit 5f9e314ebde31ec1e6a183513816d1ade361e4cc)
2012-10-18 16:25:58 -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
Tim Abbott 461da3f742 Only check if a stream exists if we're not subscribed to it.
This should make sending twice as fast.

(imported from commit a30c6fe7f20aae65d0bfe65e76774017b2627c04)
2012-10-18 13:43:54 -04:00
Tim Abbott 247cfc5344 Fix create-and-send functionality.
(imported from commit 24452eb90e9aaeb0ad406f6c56ce412e2f410865)
2012-10-18 13:43:50 -04:00
Tim Abbott 3051b34bb0 Fix issues with trailing slashes in API examples URLs.
(imported from commit f557a65e36aefcdcd9e072e9144f3ec69f518192)
2012-10-18 11:32:58 -04:00
Tim Abbott d49d675128 Fix mit_sync_bots for personals only.
(imported from commit 9fd7ac87d2cdc32413edefbde8870bbe59b67380)
2012-10-18 11:14:03 -04:00