Commit Graph

785 Commits

Author SHA1 Message Date
Keegan McAllister ee17165ad5 ui.js: Simplify event setup
(imported from commit 96444a0776e6408eb7e885a630855a0f33e0b6ff)
2012-11-30 13:01:02 -05:00
Keegan McAllister 45e515cc20 Handle mousewheel events properly in modals, different tabs, and compose box
Fixes #109.

(imported from commit ebcc90deeba712296998bfaa2df46ec6be305219)
2012-11-30 13:01:01 -05:00
Keegan McAllister 11487a0fd8 Ignore hotkeys when a modal pop-up is visible
Fixes #382.

(imported from commit 50162fde211a88de5e7f410fd7b1ed0df12d6082)
2012-11-29 19:28:59 -05:00
Keegan McAllister c25d1ea8e7 Guard against incorrect use of compose.set_mode
(imported from commit 294441f2b9107ce2488866764c3d30c35133a14a)
2012-11-29 16:51:32 -05:00
Keegan McAllister 1047bf49b4 Replace compose.toggle_mode with compose.set_mode
This fixes a bug where you could click on the already-selected mode button, and
it would switch modes without changing which button is selected.

(imported from commit 263ee0b52ba844c52a3a60968bb1bbff73482412)
2012-11-29 16:51:32 -05:00
Keegan McAllister d55ccd32af Remove state machine code from hotkey.js
With the removal of process_compose_hotkey, the state machine now has only one
state.  Everything else is based on things like "is a text box focused right
now", which is probably a better approach.

(imported from commit 0e39c03956d28e30d2bdbf3b285410ad0cacca3e)
2012-11-29 16:51:32 -05:00
Keegan McAllister 093c65fed2 Remove Tab hotkey to switch compose mode
Resolves #461.

(imported from commit 1ee64f0d6ca05064041e6619e8dbf1dc516c2c13)
2012-11-29 16:51:32 -05:00
Jeff Arnold 4c4e153ace When load_old_messages restarts itself, we need to repass all arguments
Fixes a bug introduced by e30e02c2

(imported from commit ca07eab76295ab1557f6866cff19debaec26e8c2)
2012-11-29 16:08:57 -05:00
Jeff Arnold 6670cf7b55 The load old messages "button" is now gone.
load_old_messages cares whether it is acting on behalf of a narrow
(for_narrow) not whether it is acting on behalf of a button push.

(imported from commit 16c00e015478f94f0631e211a92a7066a38135a8)
2012-11-29 14:18:38 -05:00
Jeff Arnold 50de4db2de Show the loading spinner when automatically loading more messages
(imported from commit 8025dde8696378bbb40b23a14204bfb489eb6798)
2012-11-29 14:18:38 -05:00
Waseem Daher fcc2fd5cdc Add ability to show/hide a "load more messages" spinner.
(imported from commit 611e53b2574ef50c9ab0a47fc2ebedd931a49dfd)
2012-11-29 14:18:38 -05:00
Jeff Arnold b52dbe1ca9 Auto-invoke "Load older messages" when at the top of the page
Resolves Trac #445

(imported from commit d7d96fe82e9e1cbef32e0dde284ce217e83aff55)
2012-11-29 14:18:38 -05:00
Tim Abbott aba2192ec2 Restore the time-travel functionality with Waseem's UI.
This restores the time-travel functionality and fixes Waseem's laundry
list of problems with its original UI.

(imported from commit e30e02c25af994435adb815d26284b3669c945a4)
2012-11-28 22:26:31 -05:00
Tim Abbott 44235e8e7e Fix last_message_id computation catching the dummy row hack.
This was causing glitching where if you narrow so that zfilt has only
one message, and add messages on top (e.g. via get_old_messages), and
then add messages on bottom (e.g. by receiving one), we end up with
the bookend row missing.  One can make this happen with narrowing,
but, this situation happens every time with time travelling.

(imported from commit 71d85980d8aa9431a17b33e9e5111fd3f76cecf3)
2012-11-28 22:26:31 -05:00
Tim Abbott a44c3ff247 get_updates: Eliminate the reload_pending parameter.
(imported from commit c7b57c4ef7fc4d6f0028f174f33ff7ff063d4b9d)
2012-11-28 17:41:38 -05:00
Tim Abbott 55181621bc Send a nonblocking get_updates request on wake-from-sleep.
(imported from commit 91c53f4294a609b1942c6753e9fba4fc4cb2f20f)
2012-11-28 17:41:38 -05:00
Tim Abbott d23a83ee81 get_updates: Replace "failures" with the new dont_block option.
(imported from commit 2b4ecb35c4f14b6c408323662ef6f39c6485c62d)
2012-11-28 17:41:38 -05:00
Keegan McAllister 0f1be6a9f6 rows: Consistently return an empty jQuery object in some corner cases
(imported from commit 4a83c8a3671fe13c8ff7c55fa2e22221bd68b21e)
2012-11-28 17:15:25 -05:00
Keegan McAllister 83216a5965 Ensure initial state satisfies selected_message == rows.get(selected_message_id)
If the message doesn't exist, rows.get returns an empty jQuery object, not
'undefined'.

(imported from commit 40620f3e4853a662cb93939bf7f0695f81298777)
2012-11-28 17:15:25 -05:00
Zev Benjamin faf426baa7 Only send pointer updates when user has been idle for a short period
This is so we only send a single pointer update when the user scrolls
through a bunch of messages at once.

(imported from commit 20d239d7179e5f57ada99968361a0f9b7b18c591)
2012-11-28 16:36:43 -05:00
Zev Benjamin 48790187ca select_message_id: Remove no longer applicable update_server option
(imported from commit 03076f1d514017b70ec5bd2b34b1a575d0c56f6e)
2012-11-28 16:36:43 -05:00
Zev Benjamin 249b7a527f Switch to high-watermark pointer model
(imported from commit c05d074a404e823eaa0808b6938a3c80e457175b)
2012-11-28 16:36:41 -05:00
Zev Benjamin fbe41c95d5 Re-enable pointer sync
(imported from commit 9f765bbc32e6a3fd91e83aa4016c8e8f8c47bfc1)
2012-11-28 16:36:24 -05:00
Jeff Arnold ed1eff9bfa Dismiss all notifications when the tab regains focus
(imported from commit 53c807d7a02aabe62a832a129505d690e98e39cc)
2012-11-27 13:39:46 -05:00
Jeff Arnold 2f882b505a Show "how many messages have arrived while away" in the document title
(imported from commit 6e2a18be9953694048d107a56a03a67f8bc2bd5a)
2012-11-27 13:39:46 -05:00
Waseem Daher 60789abd7f Consistently use 'exports' rather than 'typeahead_helper'.
(imported from commit 6106f0ed2708f710a9e3f589560fda58999caa71)
2012-11-27 13:29:26 -05:00
Waseem Daher 2321059240 Don't highlight, e.g. 'Narrow to', in the searchbox typeahead.
(imported from commit f16f1417da708ad2060ba603fe14ea113559d100)
2012-11-27 13:28:21 -05:00
Waseem Daher e0f3c43432 Deduplicate code a little.
(imported from commit 52c32776641256fc145ce1ff7a60ca8fb92ea784)
2012-11-27 13:28:21 -05:00
Waseem Daher 8c0445bff5 Sort searchbox typeahead in a more intelligent way.
Ensure that every result has one of:
* find what you typed in
* search for what you typed in
* Narrow to a stream related to what you typed
* Narrow to a person related to what you type

(imported from commit 2178f17932f951a48f53d982ef660942562b55dc)
2012-11-27 13:28:21 -05:00
Waseem Daher ab8496b9ba Sort streams and subjects in a better way.
Modify the Bootstrap default sorter to sort by:
1. Starts-with, in a case-sensitive way
2. Starts-with, in a case-insensitive way
3. Matches anywhere, case-sensitive
4. Matches anywhere, case-insensitive

(This fixes the Keegan-reported issue of "Testing!" taking precedence
over "test" when he types in "tes")

(imported from commit b2a0127956fe7a8bf1cbf30752a6ddc2c49b7198)
2012-11-27 13:28:21 -05:00
Waseem Daher 830f9df3f2 Keep typeahead initialization together.
(imported from commit d4035e97a223dc05d5f2d85f0577724fc5067577)
2012-11-27 13:28:21 -05:00
Waseem Daher 660c7437ba Move code from composebox_typeahead to typeahead_helper.
(But don't actually make it work yet -- that's for the next commit.
This makes the diff a bit easier to review, since it's really just
code moving from composebox_typeahead to typeahead_helper, and the
appropriate changes in zephyr.js, rather than code moving AND
changing)

(imported from commit 5cb2e836eeb8807f4eb98424558702d44a0e2b70)
2012-11-27 13:28:21 -05:00
Zev Benjamin 9de11f4df1 Use jQuery.one() instead of binding and unbinding a handler
(imported from commit 23b87ee500c0739b04e6fa3c89065d4af13ab9b5)
2012-11-26 16:49:11 -05:00
Jeff Arnold 4cb0c6225e Add webkit desktop notifications
Partially addresses Trac #31

(imported from commit f1f04b5c50bf9f33b69c90926fd67015cd2dc219)
2012-11-26 14:43:55 -05:00
Zev Benjamin d8783cd0c0 Move reload in progress check from compose.show to compose.start
(imported from commit 8b84b24ca50a3bd149d67b868dd94908c0354022)
2012-11-26 14:42:27 -05:00
Zev Benjamin 85e2bf9030 Remove dead code. We keep the message type and client name in JS instead of the DOM now
(imported from commit 79834160c53a5f7d99918d629fde311aa99fe280)
2012-11-26 14:42:27 -05:00
Zev Benjamin 507a730f77 Make compose.show a private function
(imported from commit 32457fd7f045e9eb3febaed3de2dd1a4aebc9422)
2012-11-26 14:42:27 -05:00
Zev Benjamin 40b31f6f57 Remove dead code
(imported from commit 3893b95cc3c26596d580ea07286955c2ab19cddd)
2012-11-26 14:42:27 -05:00
Zev Benjamin e35ec6e022 Stop using Bootstrap tabs for compose
(imported from commit 39dfbf9c427aaf3a85507e26ffeb1257da3dc435)
2012-11-26 14:42:27 -05:00
Zev Benjamin 886bda2a45 Use accessors in compose.start
(imported from commit 82cc5dd5892b06a8490fcd40033212f28dca32b3)
2012-11-26 14:42:27 -05:00
Zev Benjamin 8367cec454 Fix indentation
(imported from commit 4735fd730eb74cff8d494fc3d440111733af505f)
2012-11-26 14:42:27 -05:00
Waseem Daher 6d2b2f897a Implement safari composebox workaround in a less fragile way.
If Javascript breaks or stops working, the previous hack means that
Tab-Enter stops working on Firefox and Chrome (since the tab key now
needs to select two divs before it gets to the Send button.)

By putting the one div *after* the Send button, we ensure that this
keeps working gracefully on Firefox and Chrome (and presumably IE), at
the expense of Safari in this specific case.

(imported from commit 9c9a613b1b1718ff8f0b9ef7497ebb13db0ddc64)
2012-11-26 12:15:14 -05:00
Tim Abbott fac24df233 Show a user-visible error message when mirroring is not working.
The main problem with this code is that the error message doesn't go
away until you reload.  To fix this, we need to add a noblock option
on get_updates.

(imported from commit dc45af397bcf06a218bda5dd224ebd5fdf3462db)
2012-11-26 11:49:29 -05:00
Tim Abbott eefa5b2d7b API: Add support for nonblocking get_updates requests.
(imported from commit bf2ab19a83765c177fbb93abc1a61dccf5b4b2b7)
2012-11-26 11:49:29 -05:00
Keegan McAllister 384a50822d Avoid unnecessary rows.get in pointer management
(imported from commit ef1d8a885b264be797616a2bab3f23e2702949c5)
2012-11-25 15:21:55 -05:00
Keegan McAllister a70fb98038 Reduce code duplication in keep_pointer_in_view
Fixes #269.

(imported from commit 5d382c0e1493a0798fc9bd1f5a8f37e15f2ea5ef)
2012-11-24 02:03:17 -05:00
Zev Benjamin f1e644ece8 Fix "multiple popovers can appear" issue.
The reproducer for the issue here is:
- Scroll to the top of your feed
- Click on a stream name
- Open a popover
- Click on a subject name
- Note that your old popover doesn't go away, and that you can open
  a new one.

The problem was that when we narrow, we call jQuery.empty() on the
zfilt table. That not only removes nodes but also clears event
handlers and jquery data. Thus, even though we have a reference to
the old popover element in the ui module, the element has forgotten
it had a popover. When we call .popover("destroy") it actually
creates a new popover, but never shows it.

(imported from commit 9721d60c78549bd2362833590b304952f2bdef2d)
2012-11-21 18:02:33 -05:00
Jessica McKellar 3b4df3bbad Refactor replace_floating_recipient_bar to reduce code duplication.
(imported from commit 9f044a370e4b57c12eaca667e7d0ccdf9f546628)
2012-11-21 16:44:04 -05:00
Jessica McKellar 89582bff8a Fix floating recipient bar being unnarrowable.
When we switched to delegated event handling, the bound handler for
all of our events was #main_div, but the floating recipient bar lives
outside of #main_div. Additionally, the bar needs to inherit the zid
from the target recipient bar since it is used for the narrow.

(imported from commit 7c18e16f2e98436888a8edb81fbbdd4d17abfe2a)
2012-11-21 16:44:03 -05:00
Zev Benjamin f77b138bc4 Fix left border appearing on messages in Firefox
The problem seems to be caused by a bug in Firefox.  We work around
the issue by adding empty table rows to the top of the table and
removing them when the user is idle.

This resolves trac #413

(imported from commit 2b15a4a2241bd7e813800a42608d650e0d4fa4f0)
2012-11-21 12:18:04 -05:00
Waseem Daher 776a947f75 Properly handle a "top" update in an empty narrow.
Previously, it was impossible to narrow to a completely empty narrow.
Now it is possible, and the code needs to be tweaked in a few ways
not to break in this case.

(imported from commit e4dd4159ad52d003fc11d0b8b6531322c12a3de8)
2012-11-21 10:38:31 -05:00
Keegan McAllister ced6921491 Redirect to /accounts/login if an Ajax call fails because we aren't logged in
Fixes #396.

We could display an error message, but jumping right to the login page seems
smoother and conveys the same information.

This will discard any message being composed, but preserving it would have
security consequences that we should consider further before implementing that.
Hopefully, users only get logged out by an explicit action, so they can't
complain too much (but see #217).

(imported from commit aaa23ecf46c73e514117ae1010fc44e133f2ba07)
2012-11-20 21:49:11 -05:00
Tim Abbott 15c778dacf style: Use space before "(" when defining an anonymous function.
(imported from commit 369e13d918f0da2566587b83f3881c908a152519)
2012-11-20 17:17:39 -05:00
Tim Abbott 14494d6a1f Add "time travel" feature.
(imported from commit b7b6794ad635ec63269a2043cd48b02749fbffda)
2012-11-20 17:17:39 -05:00
Tim Abbott bbf482b6f8 Fix using "load old messages" on the narrowed view after unnarrowing.
Previously, we were adding those narrowed messages to message_dict the
first time, and thus totally skipping those messages each additional
time you tried to "load old messages" on that narrow.

(imported from commit 77eef376e1165b86e3c599608a1b5089a09d51e0)
2012-11-20 17:17:39 -05:00
Tim Abbott 2b7ecfd325 get_old_messages: support adding messages on both top and bottom.
(imported from commit f01ca9f9770d07fb736f07b4c2397efe71ee8d1e)
2012-11-20 17:17:39 -05:00
Tim Abbott da43f250a4 narrow: Fix incorrectly adding messages to message_array.
(imported from commit babc7f40e0817c29e7d55f3ba534cbf3de8e3920)
2012-11-20 17:17:39 -05:00
Jessica McKellar cb50d4e7ef Have smarter PM autocomplete: sort based on who you Humbug the most.
(imported from commit 8b0223c97bc2cb8a1470ca482831ca615aaf10ec)
2012-11-20 15:08:49 -05:00
Zev Benjamin dbb0241568 add_to_table: bail early if there are no messages to render
This bug affected receiving messages while narrowed.  When none of
the messages recieved matched the narrow predicate, we'd try to
render messages and then create a jQuery object out of a bunch of
newlines (the only thing that results from a render of 0 messages).

(imported from commit 81f5aa46fac06fe0e5a14a8757f245f90b5845cc)
2012-11-20 14:06:36 -05:00
Jeff Arnold 57fbf21a7a Make searches with no initial results still work
(imported from commit 3dde5d661521001373430c1413ac1f80a16a1c2d)
2012-11-20 10:31:28 -05:00
Zev Benjamin 359fb41b64 Manipulate messages before adding them to the DOM
This greatly reduces the number of events generated and prevents the
blue flashing on message arrival.

This also necessitated a change in how we looked up message rows to
add the 'next_is_same_sender' class, which led to a further
optimization where we don't have to do as many jQuery selections by
id.

(imported from commit 0bcd5688b483c560b6f3a29c6d36433da600e8ef)
2012-11-19 23:31:23 -05:00
Zev Benjamin 39aab741c8 When hiding the sender email address, only hide the element that was previously shown
(imported from commit 527f58aff4f2ec65d7ffe693bc20298b4563ff4e)
2012-11-19 23:31:22 -05:00
Zev Benjamin 90e0fc6259 Module pattern for ui.js
(imported from commit 951984ec1006e93a0ffc7e299b52fa02c10eb976)
2012-11-19 23:31:22 -05:00
Zev Benjamin da6cc30134 Add abstraction for manipulating userinfo popovers
(imported from commit 155302f103cfef8475482339596eafc594467532)
2012-11-19 23:22:50 -05:00
Zev Benjamin a5ea766ff6 Use delegated event handlers instead of inline, direct handlers on messages
(imported from commit dd7dc77e8282371a5f3b82e0cfa93f09d53a7a80)
2012-11-19 23:22:50 -05:00
Jeff Arnold 9ce4c103c0 Implement full history search by creating a narrow for a search term
(imported from commit 3f2df6a6e590458ff774bbd658bbd1d95076a4db)
2012-11-19 17:12:59 -05:00
Waseem Daher 53f5480fc4 Don't recompute search typeahead source every time.
(imported from commit 8e7ffa76ec701519704280caa282eb4639998a42)
2012-11-18 19:41:04 -05:00
Waseem Daher 57d35649f3 Move update_autocomplete into typeahead_helper.
(imported from commit e15446e09869da482dbe554b824ea8bb6f060cf1)
2012-11-18 19:41:04 -05:00
Waseem Daher f9130369f2 Rewrite private_message_typeahead so it has access to the people_list objects.
(imported from commit 3772fb2db9db96947555d30ad923edbde3127b3f)
2012-11-18 19:41:04 -05:00
Waseem Daher 31c4cf96d2 typeahead_helper: Add escaping highlighter.
(imported from commit 71c08479763da792b581ff191c04889f0383ccc9)
2012-11-18 19:41:04 -05:00
Waseem Daher f214c2df75 Lay the groundwork for a "typeahead helper" module.
(imported from commit 0b73238e935fac7c13d7152b262d3e71a714f3ea)
2012-11-18 19:41:03 -05:00
Waseem Daher 2287c553ec If we just narrowed from a search, blur the searchbox so that Esc still works.
(imported from commit e8bfe58b81a12bb6dba34ab5210c249a33b5c700)
2012-11-18 19:39:49 -05:00
Waseem Daher afa7e83414 Make the searchbox typeahead optionally narrow to stream or PMs.
(imported from commit dcef6f4d426a37c010363cc943441bd0361f8f05)
2012-11-18 19:39:44 -05:00
Waseem Daher 95706ce9a2 Create a searchbox typeahead where enter does not submit the form.
(imported from commit 38105e2f31611dda8c9767212f18c1a73640df45)
2012-11-17 23:58:16 -05:00
Waseem Daher ab78076c43 composebox_typeahead.js: Export code that splits name-and-email.
(imported from commit b118a9b0475b71cb4ffd880bcde5868d4e81e73e)
2012-11-17 23:29:35 -05:00
Tim Abbott d1239278c7 Rewrite remove_subscriptions to work like add_subscriptions.
In particular:
* Taking a list of streams as arguments.
* Using the _backend model so that we can have an API version.
* Considering "not subscribed" to be a non-fatal error.

And of course the corresponding changes to subs.js.

(imported from commit fdb300c6aa6921c2c6b09c22bd1e64405c368809)
2012-11-16 17:06:01 -05:00
Tim Abbott f5ccde78e3 [manual] Use "subscriptions" for {add,list}_subscriptions consistently.
This change requires a zephyr_mirror deployment when it is pushed to prod.

(imported from commit a31d6efd2db4d4617c7c6b00326be3f07c7263da)
2012-11-16 17:06:01 -05:00
Waseem Daher b251d064f9 narrow.js: Add ability to narrow to private messages by name/email.
(imported from commit b3afda6444afa9b44b140882f3d71fb41b3ef10d)
2012-11-16 15:58:49 -05:00
Waseem Daher 77a45cbc0e narrow.js: Add the ability to narrow by stream name.
(imported from commit 033dea1f63cceb30f37eae50ea3a7425a8e94685)
2012-11-16 15:58:37 -05:00
Waseem Daher 79abd7cb5c Make searchbox shrinking idempotent.
The existing code shortens the searchbox each time it receives focus.
Unfortunately, this means that if it receives focus twice in a row, it
shrinks twice in a row. (For some reason, the '/' hotkey does this).

So, instead, make it idempotent -- if we're already shrunk, don't
shrink us again.

(imported from commit 8179963bbd00822d15d92609d89f572d2de7800c)
2012-11-15 22:13:52 -05:00
Waseem Daher 5fa0b8d9d0 Allow searchbox to grow and shrink more flexibly.
This is nearly perfect, modulo two things:

1. If you have a search active and you resize the window, the search
   box resize doesn't take effect until you exit the search.

2. In super-narrow windows (<380px), the searchbox overshoots
   the message area slightly.

I don't regard either as huge issues -- I'll probably fix #1
eventually.

(imported from commit 4900fb9783cc9f447315b0892bd3505f5c31ce15)
2012-11-15 17:23:00 -05:00
Tim Abbott 50995dc6b7 Fix showing the subscribe-and-send dialogue when you're subscribed.
This doesn't fully fix the problems related to not syncing
subscriptions to browser clients, but it does fix the instance that
everyone experiences.

(imported from commit be2bc31a7c4443c1678321f1a938496e2632c0d3)
2012-11-15 17:15:59 -05:00
Jeff Arnold a68efd9ce2 Handle loading of older messages in narrowed view
(imported from commit 2fe1377736322a44e8682c69dd5e4312d5f46ca4)
2012-11-15 16:32:00 -05:00
Tim Abbott 411a7f6b4f [manual] send_message: Rename recipient/stream fields to 'to'.
This commit changes APIs and requires and update of all zephyr
mirroring bots to deploy properly.

(imported from commit 2672d2d07269379f7a865644aaeb6796d54183e1)
2012-11-15 15:30:06 -05:00
Waseem Daher 834c812a14 Rename "send_message" to "send_message_form" for clarity.
(imported from commit 25d9bde3390e47390724a8d4b3fd1fe95b44bd71)
2012-11-14 16:19:56 -05:00
Waseem Daher 3cf29025ec Prevent composebox form-handling code from running on all forms.
(imported from commit aee10dac671b1da83295d9e197eec4d3a0a7ceeb)
2012-11-14 16:14:48 -05:00
Waseem Daher b7a9e17b67 Rename 'search' input element to 'search_query'.
If we don't do this, we get all kinds of nasty shadowing where
references to 'search.whatever' seem to be references to the
HTML input element, rather than our search.js module.

(imported from commit 4e4b562ddf895baea9619316d9fab27ae5e9fc4e)
2012-11-14 15:29:18 -05:00
Waseem Daher a1c4aa6865 Modularize search.js.
(imported from commit 72f00f832846124d833071fdd46b026c99189512)
2012-11-14 15:29:18 -05:00
Keegan McAllister ce49595a00 reload: Remove dead variable
(imported from commit d3ec0d7c422990606817efcc47e7eb18c221ca25)
2012-11-14 14:18:05 -05:00
Keegan McAllister 6f2bbe5917 Set and check csrf_token for #reload
Fixes a message forgery bug (#335).

This works because Django will not generate a new CSRF token if a valid token
cookie is already present (see django/middleware/csrf.py).

(imported from commit 23222cb0bb62ae8a2f8ac7fb3f24bbc866103454)
2012-11-14 13:35:24 -05:00
Keegan McAllister 122281553a Make csrf_token global
(imported from commit 734d9c886c3a77d2ba40bd449cb089a00807a656)
2012-11-14 13:35:24 -05:00
Zev Benjamin 585210feaa Fix the "load more" button disappearing after the first time it's clicked
I think this broke during a rebase.

(imported from commit 1b8d28b72127b47fbca7d4c44bab77bec1e3d053)
2012-11-14 13:01:28 -05:00
Jeff Arnold d473292f5c Make enter not submit the form in private message compose box
Fixes regression introduced by 97a438

(imported from commit 2da31fb7a742a317c9d6839ef7a1a5f887746dd3)
2012-11-14 10:27:52 -05:00
Jeff Arnold db34090f1f Now that we have proper escape support, tab can autocomplete
(imported from commit 28faff5416301dbc168e6ffcd0045df582961c9d)
2012-11-13 16:15:43 -05:00
Jeff Arnold 1d818db995 Make escape close just the open typeahead on Firefox, not the compose
(imported from commit 59dc10dbf9deb1b42240ae534da4ccc1ec2ef7df)
2012-11-13 16:15:43 -05:00
Zev Benjamin bb534f7a5f Missed a usage of the old get_old_messages API
(imported from commit 15d3e4bb40f9aa64e976de636a5bef6e694e00c9)
2012-11-13 16:06:46 -05:00
Zev Benjamin 195bdb07c9 Unify huddles and personals into private messages on the send path
Personals are now just private messages between two people (which
sometimes manifests as a private message with one recipient).  The
new message type on the send path is 'private'.  Note that the receive
path still has 'personal' and 'huddle' message types.

(imported from commit 97a438ef5c0b3db4eb3e6db674ea38a081265dd3)
2012-11-13 15:40:53 -05:00
Zev Benjamin 0c1cccc880 Use plain $.ajax instead of jquery.form for sending messages
(imported from commit 46651224dfb0b1b3b4903b30cba5385025da173c)
2012-11-13 15:40:53 -05:00
Zev Benjamin 33c23c0113 Use a JSON array for recipients in send_message
(imported from commit e2184f92b708cc2e8ef3e9ae79ee4241c0aa12a1)
2012-11-13 15:40:53 -05:00
Zev Benjamin b948473a45 Simplify get_old_messages API
It now takes an anchor message id, a number of messages before, and a
number of messages after.  The result always contains the anchor
message.

(imported from commit 84d070dc8091161c86d4bbeafbdc299493890a2a)
2012-11-13 15:40:53 -05:00