Commit Graph

1705 Commits

Author SHA1 Message Date
Rafid Aslam d0502537ab API: Migrate POST `/ui_settings/change` to PATCH `/settings/ui` 2016-12-24 11:02:02 -08:00
KingxBanana 5f77ce1ce8 notifications.js: Make in-browser notifications clickable
You can now click the notifications you get in your browser and go
to that stream/topic/private message using jQuery's .on() method.

Fixes: #1996.
2016-12-24 10:17:24 -08:00
Juanvulcano 2fd1316d70 Removed json/update_message
Update test_alert_words.py

Update test_messages.py

Update messages.py
2016-12-24 10:08:22 -08:00
JefftheBest1 b8ee0e91d2 Migrated json/subscribtions/remove to REST endpoint 2016-12-24 09:27:25 -08:00
Jackson 3a109a56df Migrate notify_settings to settings/notifications
Remove notify_settings from legacy_url.py
2016-12-24 09:24:23 -08:00
anirudhjain75 8acdbef8aa Eliminate legacy json/make_stream_public and json/make_stream_private URL
Migrate from POST to PATCH
2016-12-24 08:54:49 -08:00
Sampriti Panda 87e7dc6799 urls: Remove legacy URL for left_side_userlist and move over to REST PATCH endpoint 2016-12-24 08:38:33 -08:00
Jackson 333cf0f015 Migrate legacy /json/time_setting to new REST style endpoint. 2016-12-23 08:08:27 -08:00
Tommy Ip 1e0de94293 API: convert get_subscribers from legacy URL to REST endpoint. 2016-12-22 09:25:12 -08:00
anirudhjain75 c9db6b6658 Clean up legacy language_settings endpoint. 2016-12-22 06:54:04 -08:00
Tim Abbott a90532e074 admin: Clean up Zulip labs changing reloading browser. 2016-12-21 14:21:06 -08:00
Sampriti Panda 425a55e568 settings: Implement delete avatar functionality 2016-12-21 13:35:22 -08:00
Sampriti Panda e72cd0b1cc urls: convert set_avatar from legacy URL to REST endpoint 2016-12-21 13:35:22 -08:00
Tim Abbott e538d7ef03 admin: Fix waiting period status UI not hiding. 2016-12-21 13:19:40 -08:00
Rafid Aslam bfe84a10f0 API: Migrate POST `json/fetch_raw_message` to GET `json/messages/<id>` 2016-12-21 13:08:40 -08:00
Tommy Ip 400c8c1f65 Prioritize stream subscribers in typeahead list.
When autocompleting names using @mention, subscribers of the stream
would appear at the top of the list. Added new test module to reflect
this change.
2016-12-21 12:59:43 -08:00
Sanskar Modi e6beaa2711 Improve @all warnings user interface significantly.
* Doesn't pop up the warning until you actually try to send the message
* Eliminates the red warning.
* Changes confirm text to "Yes, send".
* Adds a stream size threshhold of 15 people; smaller streams don't
  prompt about this.

Fixes #2257.
2016-12-21 11:40:47 -08:00
Shubham Singh bade6f496b Fix autocompleting stream names inside message editing.
Fixes #2577.
2016-12-21 11:09:42 -08:00
KingxBanana 23f3271551 Clear popovers on stream narrows fix (Issue #2281) 2016-12-19 21:05:18 -08:00
Akhil 06615bee00 streams: Implement copy-subscribers feature.
In the new stream creation modal, added checkboxes for each stream
and a toggle to see or hide the checkboxes. Altered filtering to
filter streams and users. Added corresponding casper tests.

When a stream is checked/unchecked, it does not affect the state
of any user checkbox. This may be visually unclear as users can be
added even if their checkboxes are empty.

Fixes #2448
2016-12-17 11:20:47 -08:00
paxapy 28bd9d035c click_handlers.js: Handle clicks on stream links using data-stream-id.
This causes Zulip to correctly handle clicks on announcements for
renamed streams.

The stream name that the user typed will still be displayed, which
isn't ideal, but is probably the best we can do without more invasive
rerendering of old messages.

Fixes #426.
2016-12-15 22:48:19 -08:00
Tim Abbott 7cd3a5873d admin: Remove unnecessary set_up_deactivate_user_modal. 2016-12-15 18:18:26 -08:00
Brock Whittaker d20e643c59 admin: Fix Deactivate/Reactivate User Buttons.
This fixes the behavior to be consistent and remove the “Working…” bug.
2016-12-15 18:17:07 -08:00
Steve Howell 47a655a3cc Extract people.extract_people_from_message() and fix bug.
This commit extracts people.extract_people_from_message()
from message_store.add_message_metadata(), and now
add_message_metadata() extract people before it calls
process_message_for_recent_private_messages(), which
fixes a bug where we are trying to look up an email
for a deactivated user who was in the message but not
in the pre-loaded list of people.

Fixes #2701
2016-12-15 17:44:58 -08:00
Steve Howell b46d7654f8 Change people.remove() to people.deactivate() and fix bug.
This commit changes people.remove() to be people.deactivate(),
and it fixes a bug where deactivating users was causing tracebacks
in the PM list if somebody had PM'ed the deactivated user
recently.
2016-12-15 17:44:58 -08:00
Steve Howell b2bb2f8ea0 Extract people.init() function.
We need this for node tests, so that you don't have to explicitly
remove every user between tests.  (Also, people.remove() is about
to have different semantics.)
2016-12-15 17:44:58 -08:00
vaibhav 75bf501553 Add optional waiting period for users to create streams.
This adds support for only allowing normal users with account age
equal or greater than a "waiting period" threshold to create streams;
this is useful for open organizations that want new members to
understand the community before creating streams.

If create_stream_by_admins_only setting is set to True, only admin users
were able to create streams. Now normal users with account age greater
or equal than waiting period threshold can also create streams.

Account age is defined as number of days passed since the user had
created his account.

Fixes: #2308.

Tweaked by tabbott to clean up the actual can_create_streams logic and
the tests.
2016-12-15 16:54:30 -08:00
Tim Abbott f0f4be4af7 lint: Fix remaining no-unused-vars eslint rule violations. 2016-12-14 22:36:47 -08:00
Tim Abbott fe2d38392f subs: Restore debouncing of stream filtering.
This appears to have been accidentally removed in the redesign.
2016-12-14 22:36:47 -08:00
Rafid Aslam 45f39be37f lint: Fix many no-unused-vars eslint rule violations.
These have been carefully audited by tabbott to ensure they are
unlikely to cause regressions.
2016-12-14 21:34:51 -08:00
Brock Whittaker 80ad28bab5 Don't repeat date header if message date is same as previous.
This primarily works to make sure that new queued messages don’t end up
with redundant date headers on them.
2016-12-14 20:41:33 -08:00
Tommy Ip 0329b67048 admin: Limit bots in settings page.
Updated `get_editable()` so that organization admins only see their
own bots in their personal settings page; this removes a lot of
unnecessary clutter.

Fixes #2657.
2016-12-14 19:29:02 -08:00
Tommy Ip fa4050d62d Improve error handling in is_current_user().
Realm bots have a owner of `null` but that is not explicity handled
in `is_current_user()`.
2016-12-14 19:27:43 -08:00
Steve Howell 546cc27f0d minor: Add code comment re:unread counts. 2016-12-14 19:10:55 -08:00
Steve Howell 5444486acb Have unread_topic_counter.get_counts() return a result.
Before this change, we passed in a hash to get_counts() to
mutate, but now we make the caller responsible for splicing
results into a bigger data structure.

The function now involves no mutation.
2016-12-14 19:10:55 -08:00
Steve Howell b11fbf0b4b Consolidate stream/topic logic for unread messages.
This change introduces an unread_topic_counter object
that manages unread counts for streams and topics.  Consolidating
all the logic into a single class will set us up to add
logic for dealing with topic counts that includes provisional
counts of unread messages from the server.  It also makes
the current code a little easier to reason about.

Most of this change was simply extracting functions, but
I also removed a few unnecessary and inconsistent calls to
`stream_data.canonicalized_name` that preceded our use of
Dict with a fold_case argument.
2016-12-14 19:10:55 -08:00
Brock Whittaker c25694a9d9 Do not reload page on form submission in settings page.
Currently under Zulip Labs and Notifications, saving changes reloads
the page. This shouldn’t happen.

Fixes #2697.
2016-12-14 16:32:32 -08:00
Brock Whittaker 6ed7ba8935 Blur all links after clicking.
The links don’t have to stay focused and produce unintended side
effects.
2016-12-14 15:37:43 -08:00
Brock Whittaker 660144a79d Blur the active element on settings/streams modal exit.
This blurs any focused element so that you can’t accidentally enter
into anything on a hidden modal.
2016-12-14 15:37:43 -08:00
Brock Whittaker a460fcddef Add Date Headers to Floating Bar and Message Headers.
This adds the date of a block of messages to the floating recipient
bar along with message headers of blocks that are the first of a
particular day.
2016-12-13 20:36:39 -08:00
Bojidar Marinov 8b44ace3a8 frontend: Make global notifications live-update on changes.
Fixes #2527
2016-12-13 20:22:13 -08:00
Brock Whittaker 65288848b1 Fix Hiding Stream Creation Prompt on "Enter".
The stream creation prompt would be hidden if someone clicked “Enter”
and the form failed. This is presumably due to some bootstrap magic.
2016-12-13 13:16:51 -08:00
Bickio 868f343980 Do not open compose box if user sidebar search is empty.
Fixes #2357.
2016-12-13 11:04:08 -08:00
Brock Whittaker 1886f0a015 redesign: Convert subscriptions page to overlay.
This is a major change to the /#subscriptions page, converting it to
by a side-by-side list of streams and their settings in an overlay.
There are no new features added/removed, but it's a huge changeset,
because it replaces the old navigation logic and moves the stream
creation modal to appear in the right side of this overlay.
2016-12-09 11:08:08 -08:00
Igor Tokarev 0bac986f26 Fixed compose box PM recipient typeahead handling of focus.
This closes #2315.
2016-12-07 22:13:47 -08:00
Tommy Ip fe4a0e72fc Add new button to download ~/.zuliprc from settings page.
Added new option to download .zuliprc file directly from settings
page.  This should help reduce friction when setting up new
bots/integrations. This new feature is available in the bot cards and
the 'show your API key' section. One caveat is that the filename is
automatically set to 'zuliprc' instead of '.zuliprc', since as most
browsers do not allow filenames to start with a dot.

Fixes #2327.
2016-12-07 21:28:41 -08:00
Rafid Aslam 7856217a63 Migrate JS modules to CommonJS style.
Closes #1488.
2016-12-07 16:11:52 -08:00
Yago González e65c42cb5f eslint: Turn on errors for new-cap rule.
Now the eslint rule "new-cap" is set as: ["error", { "newIsCap": true, "capIsNew": false }]
2016-12-07 05:33:16 -08:00
Rafid Aslam ce94fb2eb1 deps: Change zxcvbn download method from download-zxcvbn to npm.
- Replace download-zxcvbn with downloading it from npm.
- Change zxcvbn.js path to node_modules (because npm put it to
`node_modules` directory.
- Bump `PROVISION_VERSION` in `version.py` to 2.4.

Fixes #2423.
2016-12-06 17:54:56 -08:00
Rafid Aslam 0951b838ca deps: Update zxcvbn to 4.4.1
Update zxcvbn to 4.4.1, and change `crack_time` to
`crack_times_seconds` because `crack_time` has been changed to
`crack_times_seconds` in 4.4.1.
2016-12-06 17:51:33 -08:00