Commit Graph

1540 Commits

Author SHA1 Message Date
Keegan McAllister 30933a9639 Explain a bit more how longpolling works
(imported from commit 26c4792f097d748edc725b4528c4d5904efd03c7)
2012-11-28 15:28:14 -05:00
Keegan McAllister ca1b1b2974 Remove some unused @asynchronous-related code
(imported from commit aa332263777f26a29539ba55bec8853df59bbc07)
2012-11-28 15:28:14 -05:00
Keegan McAllister 1081a96062 Assert that internal notify views are invoked via Tornado
An extra check against issue #239.

(imported from commit b6f19892e4d3b45df1c13352d6561fb9e30d86fd)
2012-11-28 15:28:14 -05:00
Keegan McAllister cb7e726d77 Create and use @internal_notify_view
Resolves #288.

(imported from commit 982bf5651a34fa66cd81c882ed0351829eaadf86)
2012-11-28 15:28:14 -05:00
Luke Faraone 1dbd806b6a Implement a favicon as a link rel.
This has the benefit of not getting cached forever by browsers.

(imported from commit c7c7877dfbb9d479e997d122827017036c5337f5)
2012-11-28 15:12:37 -05:00
Zev Benjamin 81fe519b24 github hooks: Display different actions for pull requests sanely
(imported from commit c6d43ccff2d72f61a1cc4d8d320db56edd074832)
2012-11-28 14:49:21 -05:00
Jessica McKellar 4832a6a1fe [schema] Add a management script to create default streams for a domain.
Run this script on an existing realm to create or change default
streams, which new users will get upon account creation.

(imported from commit 8938dcbd3520d97d25b4c6ca783d35c9aef52df0)
2012-11-28 14:07:16 -05:00
Zev Benjamin fb0b4b23c3 Preliminary GitHub integration for pull requests and pushes
(imported from commit 5f91cfd39552294e2c1f1412044d5c8e738d68e3)
2012-11-27 13:55:57 -05:00
Zev Benjamin 0a2b8c3f55 @has_request_variables: allow caller to override the POST variable with a kwarg
(imported from commit 643bce62712b144da369aeabe37c12584b1a5761)
2012-11-27 13:55:57 -05:00
Zev Benjamin a117bd4cdc Use @has_request_variables a little more
(imported from commit ea6422ea3cdbce134bb40181b7889bf5c6442eb7)
2012-11-27 13:55:57 -05:00
Keegan McAllister d1aa92c983 Style inline code inside a link to look more like a normal link
Fixes #448.

(imported from commit 02f538a9d3fb43539640e77b2e194ac2de611c18)
2012-11-27 13:41:00 -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
Tim Abbott efc5530909 update_user_activity: Fix get_or_create race.
(imported from commit 38bf62a85154db5df18f1416fa3e29be868fc735)
2012-11-27 12:09:57 -05:00
Luke Faraone d270ff348f Save newly created users in the log so they aren't forgotten by populatedb.
(imported from commit a43aaf73576dcacf85c4ad662cbcf04b3fe2bbd7)
2012-11-27 11:16:38 -05:00
Tim Abbott 688525668e Correctly display the user count in registration process.
(imported from commit 24c8479c0730d1756c4e1bd0b818772914c20bd5)
2012-11-27 10:55:00 -05:00
Jessica McKellar cca39ca5e8 Add default subscriptions upon non-MIT user creation.
We'll probably eventually get fancier with this, suggesting various
default sets depending on the company or making it easy for one person
to create default subs for several people at once.

Until we know what we want, keep it simple.

(imported from commit 14319dd50c67fe33ac6f15288dba4916ce0a89ac)
2012-11-26 21:02:29 -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
Jeff Arnold a6ec875268 [schema] Add enable_desktop_notifications to user profile
(imported from commit f5b543e8446263ce8855561441a6d4c1a8d41f4d)
2012-11-26 14:43:55 -05:00
Keegan McAllister ec6ebd034b Add Nagios bot user
(imported from commit e36ea06908b488e4003463e1afa34181fd299316)
2012-11-26 14:42: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
Zev Benjamin da2c079503 Use Django's built-in @require_POST decorator
Theirs returns an actual 405

(imported from commit 31be790b0f53d7b63d7d3cd85972b16add3d8c74)
2012-11-26 11:52:50 -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
Keegan McAllister b21bdc91cb Fix email addresses generated by populate_db --extra-users
(imported from commit bdb93e51966ca8c0e20d67cccbe50e80e2592127)
2012-11-23 19:19:46 -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
Luke Faraone dad00fa29f Add script to create new realms.
(imported from commit 764d41f28b1af10860ea4d03a6aa983f40d3ffd7)
2012-11-21 16:42:15 -05:00
Luke Faraone 724dce78e4 Always allow registration if attempting to register for a non-MIT realm.
(imported from commit 00489ab74c376a4ffb23ad661699ef31c6c06818)
2012-11-21 16:42:15 -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 807113fa70 Temporarily remove user-visible "time travel" UI.
I'd like to think about how to polish aspects of this a bit more,
but would like us to be able to deploy master at some point today.

This is basically the philosophical equivalent of reverting the
user-visible UI changes introduced in
b7b6794ad635ec63269a2043cd48b02749fbffda

(imported from commit edfaadf26741c47120c3acf6c410d33025c0a260)
2012-11-21 11:30:56 -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