Commit Graph

8834 Commits

Author SHA1 Message Date
Steve Howell ebce82b136 Eliminate json_to_dict and use check_dict instead.
All usages of json_to_dict were replaced with the check_dict
validator.  The check_dict validations can eventually be
extended to validate the keys and values of incoming data,
but now we just use check_dict([]) in all the places where
we had json_to_dict, which means we aren't checking for any
specific keys; we are just making sure it's a dictionary.

(imported from commit fc5add9a7ef149dfac2a9a6d9a153799c4c0c24d)
2014-02-18 13:02:08 -05:00
Steve Howell 3d04f5f738 Use check_list instead of json_to_list.
(imported from commit 9ead12bc2a4744b94a747ca27054124aacde7ae4)
2014-02-18 13:02:08 -05:00
Steve Howell 8b58d8574b Use check_bool instead of json_to_bool.
(imported from commit 52eb892a92e293d6ecb854c51bd7bd32355206c9)
2014-02-18 13:02:08 -05:00
Jessica McKellar 6c4295ed5b Fix broken Django templates on confirmation error page.
(imported from commit 7720fae5e31c8e4e3b5d71e42233eaf0be26115e)
2014-02-18 11:32:23 -05:00
Jason Michalski fa285fd1a9 Use case insensitive matching when linkifying tweets
(imported from commit c8a897f05a79a2b23998ffe186c77a9f7af4ae7f)
2014-02-15 15:33:22 -05:00
Leo Franchi 54e24a5765 Disable push notifications regardless of idle status for zulip.com
(imported from commit a1a1d551b7bf1423ecb31cf6a230f59c888a8a82)
2014-02-14 13:35:27 -05:00
Steve Howell 0b0b9b9379 Remove custom code for customer14.invalid
(imported from commit efdc02e02c0dbdd29a09002897a294b5e820530f)
2014-02-14 11:15:50 -05:00
Luke Faraone c33eeeee23 Open a PM from the peoplesearch list on <enter>
Closes trac #2274

(imported from commit 3238abe37b82a994769eebacbd5fced37fca9609)
2014-02-14 09:55:10 -05:00
Luke Faraone 89eef10d44 Match alert words inside markup.
We now will match an alert word even if it is used at the boundry of
bolding, backtick escaping, or caret quoting.

Closes trac #2186.

(imported from commit 984bc63eb621772c95a01ca5c5bfeb190767f71f)
2014-02-13 17:14:54 -05:00
Luke Faraone 4ebc4a4ef1 Expand characters allowed after an alertword.
We now support .';[ before a word and ';]! after.

Closes trac #2283.

(imported from commit b3e3cb3d8d49a8e74d0b6a108c5ec73e9d9b5f32)
2014-02-13 17:14:53 -05:00
Tim Abbott d7e4429bb7 Revert "Add adjustments for browsers with fixed scrollbar"
This reverts commit 462a3eb5e6b83f9d8091b83e3f8dc458236938ed.

We're reverting this to see if it is the cause of our recent CSS
performance issues.

(imported from commit 6a0b041cfcb6770bbfda0d354444bad2d64459ab)
2014-02-13 16:41:03 -05:00
Tim Abbott 36e2929ee2 Revert "Add radix arguments to parseInt calls"
This reverts commit fd77a988f1aa5bbdf430fbbb710dc9774fa85aaa.

(imported from commit 3865250797dd2ae8ebc9d26f491b0decf1786e21)
2014-02-13 16:41:02 -05:00
Leo Franchi acec697fe7 Report unnarrow times as well as narrow times
(imported from commit b3a889aa11dc112508c5a1d213f68e5223a879fc)
2014-02-13 14:45:22 -05:00
Steve Howell 91445035bc Add NarrowBuilder support for negated search conditions.
(imported from commit cdc426e342a6d735d321d78b6753ca5ad7c79c6f)
2014-02-13 14:14:25 -05:00
Steve Howell fb27cbcd01 Handle negated streams in ok_to_include_history.
(imported from commit 0a049364e1d14f45db9f8e9aa5392039a01231eb)
2014-02-13 14:14:25 -05:00
Steve Howell 11ba6a17ab Extract ok_to_include_history() method in messages.py.
(imported from commit a88f5455bf658a8c52c92e7f0bedc301a605020b)
2014-02-13 14:14:25 -05:00
Steve Howell aa90e265c2 Handle negated terms in operands/has_operand/has_operator.
For the Filter helper functions above, we generally want to
ignore negated search terms, since their existence should
really only impact filter predicates and nothing else on the
JS side.  The exception is search, where even the existence
of a negated search needs to be noted to know that we can't
apply a filter locally.

(imported from commit 8bbb410a85fefed549d359e4c779a134ad830c11)
2014-02-13 14:14:25 -05:00
Steve Howell 76ff3a526c Set negated flag explicity to false in JS code.
For negated search terms, we weren't explicitly setting
"negated" to false when callers left it undefined, which was
mostly fine, since undefined is falsey, but it is better to
define it explicitly for debugging/testing purposes.

(imported from commit 68a2790b510d17caed8ca11c38188545d1dcc347)
2014-02-13 14:14:24 -05:00
Steve Howell 2fb7c0059d Support negated searches on staging.
Behind a feature flag you can now do searches like this:

    -pm-with:othello@example.com is:private

The "-" in front of "pm-with" tells us to exclude messages
with Othello from our search.  We support "-" in front of
all operators, although the behavior for "-search:" and
and "-near:" doesn't really change in this commit.

Note that the filtering out of "negated" predicates only
happens on the client side in this commit.  On the server
side we ignore negated predicates and send back a superset
of the results.

(imported from commit 6cdeaf32f2d493fbbb838630f0da3da880b1ca18)
2014-02-13 14:14:24 -05:00
Zev Benjamin 41e3a89398 [manual] puppet: Puppetize Munin
To deploy this, the zulip_internal::base and zulip_internal::munin classes must
be added to nagios.zulip.net.

(imported from commit 50d6a4ed19fcc9c62c7104977d69043bf5b9bbf9)
2014-02-13 13:26:40 -05:00
Waseem Daher 98737a012e Properly prepopulate realm name on admin page.
Also, don't call it that.

(imported from commit baacd95be5b01373aa9423071ca72d917480e341)
2014-02-13 13:18:18 -05:00
Jason Michalski 044e3ced4f Fix how the hash URL is build for IE support
IE sometimes returns the pathname without a leading slash. Also
location.origin is not supported and must be build manually.

(imported from commit fb64478aeaac0f17d31021b7c370ff56781b48d1)
2014-02-13 12:39:24 -05:00
Leo Franchi e0efae4d59 Alias ZulipDesktop client to website
(imported from commit 91e549bbc67b9d9f5edf35522b608aa397547edd)
2014-02-13 08:28:08 -05:00
Waseem Daher cf13874c9d Change audible notification to a "knock" sound.
Sound is public-domain, from:
http://www.freesound.org/people/Vidsyn/sounds/113619/

(imported from commit e2f6f891f30bbb11496ef725f09587967022dd97)
2014-02-12 17:09:39 -05:00
Steve Howell f4db89c7e9 Supported negated terms in filter predicates (JS).
(imported from commit b50527620b5b451b4d6e0dc073de4036fe2b7e1f)
2014-02-12 16:58:08 -05:00
Steve Howell 90bb689e13 Extract "cond" local var in NarrowBuilder methods.
This commit doesn't change any functionality, and it is
designed to make diffs for upcoming changes related to
negated conditions a bit easier to read.  This diff
looks a bit noiser than it really is due to some
reindentation of continuation lines.

(imported from commit 64c1cba98faa4bad4eaad122dd3de119caa880c0)
2014-02-12 16:58:07 -05:00
Jason Michalski dd345bdece Make sure the hash we change to always starts with a #
(imported from commit b27d4a3b9b89b2576d4b1339d55d54ba338a576d)
2014-02-12 16:30:07 -05:00
Jessica McKellar 3a6df13360 Don't fade messages on different topics but the same stream.
(imported from commit 1bc2d49b346619609e73794d237faf2352b974b3)
2014-02-12 16:26:57 -05:00
Zev Benjamin 25d461c8f5 Exclude messages on muted topics when finding the first unread message in a narrow
(imported from commit 3151c401f689cc77e53cf34ffc49c7fd7d0a771a)
2014-02-12 16:23:34 -05:00
Leo Franchi 2efaf75b25 Release desktop app v0.4.3
(imported from commit 13f5b79ce483db22cfa136a1318eadc4d04eb746)
2014-02-12 16:18:34 -05:00
Tim Abbott 19dcc3f385 Disable centering narrows around first unread message on server.
(imported from commit 11b17c2874370d63528e2c9e978eb605da8005e4)
2014-02-12 15:34:33 -05:00
Jason Michalski bd9cccffce Use pushState where supported to change the URL hash
This this removed one forced relayout of the page on unnarrow. This
saves about 100ms for me.

(imported from commit 0755f425abbe3d99b8a99765549a5bbf3c620b9a)
2014-02-12 15:19:10 -05:00
Tim Abbott fcb8c106b1 Fix saving of pointer on server-initiated reload when narrowed.
Previously, we saved the current_msg_list selected id and then
restored it as the home_msg_list selected id, which could result in
the home view loading to the wrong place.

This takes some already bad code and makes it even more in need of
refactoring, but it does fix a pressing bug.  We should definitely
refactor both:

* the top of narrow.js
* the save/restore code in reload.js

after this, though.

(imported from commit bb2040219e4f545ba90bb04a696996cec2831484)
2014-02-12 14:40:38 -05:00
Tim Abbott f4c514fbf3 hashchange: Fix indentation on main switch statement.
(imported from commit 1420cc2513e1bf6b80c8e52a6c0d3d66e82a5a1d)
2014-02-12 14:40:38 -05:00
Leo Franchi eaa777b612 Use feature detection for bootstrap typeahead key handling
(imported from commit 1ce443d3e61920bf5842b31263141d4f175a6514)
2014-02-12 14:31:56 -05:00
Jason Michalski 2530009123 Use optparse for command line argument parsing
optparse was already being the interface change was conflicting with it.

(imported from commit abdb153484a98a46b21fa77cc6deb00afd615720)
2014-02-12 14:03:58 -05:00
Allen Rabinovich 15da5628a9 Add radix arguments to parseInt calls
(imported from commit fd77a988f1aa5bbdf430fbbb710dc9774fa85aaa)
2014-02-12 11:24:27 -07:00
Jason Michalski 97d4f2b009 Allow passing a bind interface to run-dev.py
This makes it simpler to test between two VMs by allowing you to bind to
non localhost interfaces.

(imported from commit f70755533b52ff8c49fd916941d2210fb8c33b47)
2014-02-12 11:59:45 -05:00
Jason Michalski f31b61ea5b Pass the client's Host header to django as X-Forwarded-Host
This allows Django to build correct redirects to hostnames other than
localhost.

(imported from commit 886b345f29fc03518cedd93ecbcea0be251f3230)
2014-02-12 11:59:45 -05:00
Leo Franchi 502852541b Enable local echo for customer15.invalid redux
(imported from commit 88f13b58cfc8b68dc439138cc62aea3ff72868f1)
2014-02-12 11:53:50 -05:00
Allen Rabinovich addfcbfc30 Add adjustments for browsers with fixed scrollbar
(imported from commit 462a3eb5e6b83f9d8091b83e3f8dc458236938ed)
2014-02-12 10:47:54 -05:00
Leo Franchi c63f881518 Fix inverted boolean check for local messages in topic propagation
(imported from commit 2daf7c0c8729a785c3a1105803cbaed31f32128e)
2014-02-12 10:08:19 -05:00
Steve Howell bf08e33648 Revert "Ensure server still gets narrow operators as tuples."
This reverts commit 64aced74012101f3bdbd3a4e6066b46ad8e1f4ea,
which was always intended as temporary code until we upgraded
the back end to support dictionary-style narrow operators.

(imported from commit b8d3a19f3aad3d9d6a26b9dcc07f502c55b18edd)
2014-02-11 13:56:23 -05:00
Steve Howell afe893b324 Remove filter_term() shim function.
The filter_term() function was supporting the transition
from using tuples for search terms to using dictionaries,
but now all of the JS code should be dictionary-compatible.
(We had already abandoned the tuples safety net on staging,
and a couple days of use have given me confidence we can
pull the shim code.)

The one side effect this change has is that search terms will be
initialized to {} instead of [].  This distinction matters
when it comes to calling JSON.stringify on the search terms.

(imported from commit 1fbe11011d8953dbea28c0657cbf88384d343e00)
2014-02-11 13:52:17 -05:00
Steve Howell ea8d9efa00 Support dictionary-style narrows in back end API.
(We continue to support tuple-style narrows as well.)

(imported from commit 0154c1cba7503471b112ce22f280b619133e0211)
2014-02-11 13:15:42 -05:00
Steve Howell 5b920a5226 Do not mask JsonableErrors from REQ converters.
(imported from commit 8a104c38be4401851953eea95ac0d71a93e5484c)
2014-02-11 11:58:35 -05:00
Steve Howell a2acce2905 Phase out search tuple data structure in messages.py.
The narrow_parameter convert now converts tuples of
(operator, operand) into dictionaries so that downstream
functions/classes deal in dictionaries.  This
affects get_old_messages_backend, messages_in_narrow_backend,
and NarrowBuilder.

(imported from commit 7e8cb887f7872ec687acd8c4857d1d5222ab0d5f)
2014-02-11 11:52:31 -05:00
Steve Howell 2ad006aac9 Make page_params.narrow be a list of dictionaries, not tuples.
This is part of deprecating the old tuple syntax.

(imported from commit f57fe08e0042792b1381c69d1a7f10f92369e838)
2014-02-11 11:45:44 -05:00
Steve Howell c87b77e52e Report errors due to legacy tuples in hashchange.operators_to_hash.
(imported from commit f639ba52f85bf103afdd26dc4f279e1f03570119)
2014-02-11 11:45:44 -05:00
Zev Benjamin 92b249a0a1 Replace curly quotes with regular quotes on the front-end before performing a search
(imported from commit 1be7384cea8808f9fceec889ecee6434e9bad6c2)
2014-02-11 11:45:44 -05:00