Commit Graph

2591 Commits

Author SHA1 Message Date
Harshit Bansal
0605a9fb0f templates: Rename admin-alias-list.handlebars.
Rename `admin-alias-list.handlebars` to
`admin-realm-domains-list.handlebars`.

Fixes: #3145.
2017-04-04 15:48:03 -07:00
Harshit Bansal
885ec07192 frontend: realm_alias to realm_domain migration.
* Change the classes and ids of different widgets and modals
and make suitable changes in `admin.js`.

* Remove any other occurrences of `alias` or `realm_alias`
from admin.js.
2017-04-04 15:48:03 -07:00
Harshit Bansal
711a3f8037 actions.py: Rename remaining occurrences of alias' to realm_domain`. 2017-04-04 15:48:03 -07:00
Maxim Averin
08690132fe Decrease maximum number of search suggestions.
This fixes an issue with the menu going below the bottom of screen
with non-tiny windows, and it was rare that anyone benefitted from the
extra suggestions.

Fixes: #4133.
2017-04-04 13:02:10 -07:00
Yago González
8f8efb4664 frontend: Show KaTeX errors not related to syntax. 2017-04-03 17:01:50 -07:00
Steve Howell
4da74b3cde Remove duplicate copy of get_full_name(). 2017-04-03 16:34:16 -07:00
Brock Whittaker
34f9ccb87c alerts: Change sidebar alerts to be at top of the screen.
This changes the alerts to be individual boxes that slide down from
the top of the screen for a better UI experience.
2017-04-03 16:22:05 -07:00
Steve Howell
2d52463b61 Extract ui_report.js.
This moves the implementations of error/report/message from
ui.js to ui_report.js.  They had been shimmed before, so calling
modules still use the same names to call the functions, but we
no longer need the shims.
2017-04-03 07:13:25 -07:00
Sampriti Panda
32e76c2c60 drafts: Move snapshot_message from compose to drafts
Previously drafts called compose.snapshot_message which would then
get the message object from compose.create_message_object. This method often
checked for the validity of stream/user recipients which would often cause tracebacks.

The new method in drafts.snapshot message just gets the data from the fields and
stores them in the draft model without any additional checking.
2017-03-30 10:20:37 -07:00
Amy Liu
6f061beb46 hotspots: Add backend support for tutorial hotspots.
This commit adds the backend support for a new style of tutorial which
allows for highlighting of multiple areas of the page with hotspots that
disappear when clicked by the user.
2017-03-29 11:34:32 -07:00
JPJPJPOPOP
f7d2889c1d drafts.js: Prevent delete from triggering in the back of draft overlay.
Fixes #4340.
2017-03-27 18:13:57 -07:00
Yago González
2f5addc174 i18n: Add missed strings. 2017-03-27 14:30:28 -07:00
Jonathan Pan
5556d2341c hotkey.js: Add hotkey for drafts.
* 'd' in message view opens drafts.

This also adds hotkeys within the drafts UI:
* Up/down arrow keys navigate the drafts.
* Pressing enter edits the selected draft.
* Pressing backspace deletes the selected draft.

Some variable names tweaked by tabbott.
2017-03-27 14:05:00 -07:00
Harshit Bansal
d17b759fa2 admin: Display last active time of users in admin users table.
Fixes: #2097.
2017-03-27 13:39:47 -07:00
Tim Abbott
d565990c68 reload: catch exceptions trying to preserve state. 2017-03-27 13:36:31 -07:00
Tim Abbott
2eacc7317d reload: Remove cleanup_before_reload logic.
Zulip's logic for garbage-collecting data structures before reloading
was a fix for a Chrome memory leak that lasted across reloads a few
years ago.  That memory leak is probably now fixed, and thus logic is
causing lots of JavaScript tracebacks that are probably not useful.

So, let's try removing this cleanup logic (everything but the
still-useful deletion of the event queue).
2017-03-27 13:23:10 -07:00
Steve Howell
24ee369d43 Improve error message in message_list.select_id(). 2017-03-27 10:26:30 -07:00
Steve Howell
6314f60edc Keep compose open if left arrow does not cause message edit.
If somebody hits the left arrow to edit a message, but there are
no messages available to edit, then leave them in the compose box.
2017-03-27 10:15:05 -07:00
Steve Howell
293c89ba94 message edit: Only enable left-arrow-editing for content.
We no longer let the left arrow put you into the message edit
UI for a message where you can only edit topics, since that is
just confusing to most users.

This change also improves error handling a bit, and it removes
an unnecessary call to rows.id().

Finally, it moves some logic out of message_list.js, so that we
don't have a circular dependency for this codepath.

Fixes #4259
2017-03-27 10:02:19 -07:00
Steve Howell
cf6545a71f reactions: Only warn for unknown user ids.
If we get reactions for deactivated users, or otherwise missing
users, we only issue a blueslip warning now.  The function
get_message_reactions() was indirectly causing blueslip errors
before this fix, but we can downgrade to warnings now that this
function has better unit tests around it.

We eventually want to track deactivated users on the client.

Fixes #4289
2017-03-26 11:51:36 -07:00
Steve Howell
3da047e10e Add people.is_known_user_id(). 2017-03-26 11:39:06 -07:00
Steve Howell
80addd902c Extract local vars in get_message_reactions(). 2017-03-26 11:39:05 -07:00
Cynthia Lin
f41883ce8d subs.js: Refactor row data functions to return objects. 2017-03-25 18:35:21 -07:00
Cynthia Lin
6e2d180a34 hotkeys: Add hotkey n for opening New streams modal in Streams menu. 2017-03-25 18:35:21 -07:00
Cynthia Lin
ca460fad1f hotkeys: Add hotkey V for viewing selected stream in Streams menu. 2017-03-25 18:35:21 -07:00
Cynthia Lin
a027e9318d hotkeys: Move cursor to Filter streams input if at top of Streams menu.
Fixes #4227
2017-03-25 18:35:21 -07:00
Cynthia Lin
b800cb05c0 hotkeys: Add left/right arrow keys to toggle views in Streams menu.
Fixes #4228
2017-03-25 18:35:21 -07:00
Cynthia Lin
fb89d8a2bf subs.js: Refactor modal row functions. 2017-03-25 18:35:21 -07:00
Cynthia Lin
69c32daffa hotkeys: Add U hotkey for unsubscribing/subscribing in Streams menu.
Fixes #4229
2017-03-25 18:35:21 -07:00
Cynthia Lin
d17131dcb4 hotkeys: Rename subs.arrow_keys() to subs.switch_rows(). 2017-03-25 18:35:21 -07:00
K.Kanakhin
234a1f8e61 retention-period: Add retention period to front-end admin organization settings.
- Add message retention period field to organization settings form.
- Add css for retention period field.
- Add convertor to not negative int or to None.
- Add retention period setting processing to back-end.
- Fix tests.

Modified by tabbott to hide the setting, since it doesn't work yet.
The goal of merging this setting code now is to avoid unnecessary
merge conflicts in the future.

Part of #106.
2017-03-25 17:57:18 -07:00
Joshua Pan
16b2313165 muting_ui.js: Remove any popups when unmuting. 2017-03-25 12:49:14 -07:00
Joshua Pan
76e84288d9 Add M hotkey to toggle mute/unmute topics.
Get rid of current_msg_list.selected_message() redundancy.
2017-03-25 09:42:49 -07:00
Joshua Pan
dc9f83005f Add toggle_mute to muting_ui.js. 2017-03-25 09:42:49 -07:00
Joshua Pan
32837804d8 Extract stream_popover.topic_ops to muting_ui.js. 2017-03-25 09:42:49 -07:00
Brock Whittaker
efd72d3338 Modify lightbox to only display valid images and YT Videos.
This modifies the lightbox to only display images inside the
".message_inline_image" class, rather than all images inside the
message body, which currently includes things like the bot icon.
2017-03-25 09:19:26 -07:00
Steve Howell
b3e4aa4c44 reactions: Downgrade blueslip error to a warning.
When we get a server error for adding/removing a reaction, we
no longer make a blueslip error, since it is somewhat common for
users to retry actions before the server sends an event.  The
code comment that is part of this commit explains this further.

Fixes #4290.
2017-03-24 18:24:15 -07:00
Moritz Neeb
9866805937 docs: fix a typo in hashchange.js 2017-03-23 15:16:02 -07:00
Joshua Pan
f40b43a491 hotkeys: Add hotkey G an alias for End.
Fixes #4195.
2017-03-23 11:38:36 -07:00
Tim Abbott
5d030e9173 casper: Add test for the reload hashchange logic. 2017-03-22 23:06:08 -07:00
Tim Abbott
04db0b5df0 reload: Fix passing data to next browser session.
Apparently, Django's CSRF protection mechanism changed at some point,
and now we get a different CSRF token every time the webapp is loaded.
This, in turn, caused our reload logic to avoid losing state to be
completely ineffective, since the CSRF check in reload.initialize
always failed.

We fix this in a secure fashion by passing the reload instructions
from the browser to its reloaded self via localstorage, keyed by a
randomly generated token.  The token randomization is primarily
relevant for handling several Zulip tabs in the same browser, but also
servers to make it very difficult for an attacker to ever trigger this
code path by redirecting a browser to `/#reload` URLs.

Fixes #3411.
Fixes #3687.
2017-03-22 22:46:54 -07:00
Tim Abbott
64acf84ab1 reload: Save narrow when event queues expire.
Along with the issues with our reload data passing system that are
fixed in the next commit, this is responsible for #3411.
2017-03-22 22:28:35 -07:00
Tim Abbott
ee4b948873 bankruptcy: Fix narrow being lost on declaring bankruptcy.
This was actually being done in 2 ways: via not saving the narrow in
the reload and second through calling `change_tab_to('#home')`.  The
code is so ancient that it seems unlikely that this behavior was still
intentional.

Fixes part of #3687 (the remainder is fixed in a few commits).
2017-03-22 22:28:18 -07:00
Tim Abbott
37ac0e6e6d server_events: Remove obsolete 'tool old' handler.
This error predates the transition to an event queue system and hasn't
been possible for years.
2017-03-22 21:16:39 -07:00
Tim Abbott
61e6ed8c31 bankruptcy: Fix clicking outside bankruptcy modal.
Previously, this would leave the unread UI disabled forever, showing 0
unread counts for anything, which was a super confusing failure mode.
2017-03-22 20:50:44 -07:00
Tim Abbott
977e7b0fdc unread: Move bankruptcy code out of click_handlers.js. 2017-03-22 20:49:05 -07:00
Tim Abbott
ccb38a1e9c compose: Fix missing opts argument to show_box.
This fixes a regression in the recent compose.get_focus_area
refactoring that I did.
2017-03-22 16:32:53 -07:00
hackerkid
97bd9d5186 Fix positioning of message-info-popover. 2017-03-22 16:04:38 -07:00
hackerkid
ed72ee476f Make user_popover use user_info_popover template. 2017-03-22 16:04:38 -07:00
hackerkid
b2fc8d6fa2 Rename message_info_popover* templates to user_info_popover*. 2017-03-22 16:04:38 -07:00