Commit Graph

4068 Commits

Author SHA1 Message Date
Harshit Bansal 9e40f063d6 markdown: Use `active_realm_emojis` instead of `realm_emojis`.
We should use `active_realm_emojis` instead of manually checking for
deactivated emojis in `realm_emoji` dict.
2017-07-05 12:05:10 -07:00
Harshit Bansal 90f04062e7 emoji.js: Add `active_realm_emojis` dict.
This dict will hold all the realm emojis which have not been deactivated.
2017-07-05 12:05:10 -07:00
Vaida Plankyte 9b279072df notifications.js: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 5a3d3ae291 narrow.js: Use the singular 'they' pronoun. 2017-07-05 09:27:43 -07:00
David Coleman 77dc5df56a uploads: Display year in attachments UI upload timestamp.
Modified timerender.js absolute_time() to include the
year in the returned time stamp string.

Fixes #5600.
2017-07-04 16:13:20 -07:00
Franziska von der Goltz 98847937f4 realm: add mandatory topic setting on org level.
Lets organizations require users to specify a topic the discussion.

Fixes: #5164.
2017-07-04 14:09:21 -07:00
Cory Lynch b13265d135 util: Remove execute_early.
This function was removed in favor of loading everything in
ui_init.js. The asynchronous nature of jQuery 3 document-ready
events may cause an undesirable order in which these are executed.
2017-07-04 13:54:33 -07:00
Cory Lynch effd7ef41f server_events: Move initialization to ui_init.js. 2017-07-04 13:54:33 -07:00
Cory Lynch e33b178054 message_store: Move initialization to ui_init.js. 2017-07-04 13:54:33 -07:00
Cory Lynch 25be3a402d message_fetch: Move initialization to ui_init.js.
This involves modifying a casper test, because now
upon registration, there is one unread message.
2017-07-04 13:54:33 -07:00
Brock Whittaker 7d005919ca portico: Improve detection of URL in product page JS.
The product page JS detects the page to run small bundle functions
but does not work correctly with language prefixes in the pathname,
such as /es/apps, so this properly detects that.

Fixes #5635.
2017-07-03 10:22:38 -07:00
Harshit Bansal d3d6712fa3 left-sidebar: Update the size of the scrollbar after narrowing to a stream. 2017-07-03 09:53:41 -07:00
Cory Lynch 30c7629212 Change code block typeahead to only sometimes close fence.
Fixes #5556.
Some tests needed to be moved around to make sure the
stubbing wouldn't break future tests.
2017-07-03 11:05:18 -04:00
Cory Lynch 802ea9abf5 Refactor to delete mousewheel.js.
This old third party library added support
for a "mousewheel" event to detect scrolling.
However, it is not compatible with jQuery 3
and is obsolete now that there is a standard
"wheel" event that accomplishes the same thing.
2017-07-03 11:04:20 -04:00
Umair Khan 90ec20b4e4 Remove English translations.json from source control.
This commit deletes the file from git repo and adds the
file to gitignore.

Fixes #5640
2017-07-03 10:10:43 -04:00
Cory Lynch f848ffc03b Patch spectrum.js for jQuery 3 compatibility.
This includes removing deprecated functions
(namely bind/unbind/delegate) and fix an aspect
of event handling that breaks in the new jQuery.
2017-07-02 07:59:24 -04:00
Cory Lynch 10fa6b75f9 Patch filedrop for jQuery 3 compatibility.
This entails removing the use of jQuery.event.props,
which has been removed from jQuery 3.
2017-07-02 07:59:24 -04:00
Harshit Bansal 4cb8ac100a emoji: Fix the title and alt text for unicode emojis.
Unicode emojis when rendered should display canonical short name.
Similarly, the alt text should be of the format `:<short_name>:`.
For both of these we currently display the actual unicode symbol.
As some systems don't have the fonts necessary for displaying them
properly, they are rendered as empty square blocks. This commit also
ensures that the markup generated for emoji generated by canonical
name and by an unicode emoji is same.

Fixes: #5555.
2017-07-01 11:14:24 -07:00
Cory Lynch 8abbb6d781 search: Remove in:all token from suggestions. 2017-07-01 12:19:52 -04:00
Steve Howell 0f4b7496e1 Use _.each to set page_params values for update_dict events. 2017-07-01 08:50:50 -04:00
Aditya Bansal 28ec32d757 compose.js: Use get_subscriber_count in show_all_everyone_warning(). 2017-06-30 19:57:14 +05:30
Umair Khan 4f33a650af i18n: Use double lowdash instead of handlebars.
We do not allow handlebars within {{#tr}}{{/tr}}.
2017-06-30 10:12:31 -04:00
Steve Howell ef815e9e79 Remove unused channel.abort_all(). 2017-06-30 09:48:04 -04:00
Aditya Bansal 2be5046144 compose.js: Use stream_data.get_subscriber_count in message mentions.
In this commit we basically start using the get_subscriber_count
function from stream data to get subscriber count.
2017-06-29 10:34:47 -04:00
Aditya Bansal 7531a85c4d stream_data: Add get_subscriber_count() function. 2017-06-29 10:34:47 -04:00
Aditya Bansal 7a0387e0b1 compose.js: Add return true for subscribed streams.
This is basically going to fix a regression which was introduced in
89090cd which made code early return in case of subscribed streams.
2017-06-29 18:02:25 +05:30
Umair Khan 12b124ba71 single_message.handlerbars: Use __starred_status__ in tooltip.
We do not allow handlerbars within tranlation tags. To use variables in
translatable strings, enclose variables with double lowdashes.
2017-06-29 07:39:20 -04:00
Umair Khan d44c62e894 update_starred: Make the status translatable. 2017-06-29 07:39:20 -04:00
Umair Khan 8921496ccc message_list_view: Add starred_status to message objs.
This starred_status property can be used to provide the context in
the single_message.handlebars template to show the proper tooltip.
2017-06-29 07:39:20 -04:00
Steve Howell 9b75daaa60 Extract reactions.view.remove_reaction(). 2017-06-29 07:19:52 -04:00
Steve Howell e2ae4aeb16 Extract reactions.view.update_existing_reaction(). 2017-06-29 07:19:52 -04:00
Steve Howell 8cf6ef95b1 Extract reactions.view.insert_new_reaction(). 2017-06-29 07:19:52 -04:00
Steve Howell 791e489938 Use a proper context in insert_new_reaction().
Before this change, we were piggybacking fields on to the event
object, which coupled us to any other function that relies on
the event.
2017-06-29 07:19:52 -04:00
Aditya Bansal 84b52661bb compose.js: Remove small piece of dead code.
In this commit we remove a small piece of dead code from
check_stream_for_send() function and also rename it to
check_unsubscribed_stream_for_send() which makes more sense.
2017-06-28 07:45:21 -04:00
Aditya Bansal 89090cd3af compose.js: Refactor validate_stream_message_address_info().
In this commit we just refactor validate_stream_message_address_info
function to early return in case of stream_data.is_subscribed()
returns true.
2017-06-28 07:45:21 -04:00
Aditya Bansal eec9a9babb compose.js: Export validate_stream_message_address_info(). 2017-06-28 07:45:21 -04:00
tejaskasetty 69e8e06104 stream-popover: Remove overlapping of chevron and the scrollbar.
- Move the chevron and the message count a bit towards
   left.
 - Make changes in the position of message count in
   global_filters to align it with of message count in
   stream_filters.
 This fixes the overlapping of stream popover with the
 scrollbar in the stream list.

 Fixes: #5552.
2017-06-28 06:55:31 -04:00
Harshit Bansal efa1cf6fb5 subs: Fix the traceback when an user subscribes/unsubscribes.
On receiving a `peer_add`/`peer_remove` event we were performing a
subscribers list re-rendering even when the stream settings form was
not open which was causing a traceback. This commit fixes this behavior
by first checking if the corresponding stream settings form is open and
performs a re-rendering only when it is open.
2017-06-27 16:23:00 -04:00
Joshua Pan ac64ee355d compose_actions.js: Allow compose to empty narrow.
This allows r/enter hotkeys to compose to
an empty narrow (no messages).

Fixes #4500.
2017-06-27 14:06:59 -04:00
Joshua Pan c4914eeec9 narrow.js: Create narrowed_by_stream_reply().
This function returns if you are narrowed
to a stream.
2017-06-27 14:06:59 -04:00
Yago González 1324596cdd docs: Document /streams/{stream_id} API endpoint. 2017-06-27 08:33:56 -04:00
Yago González b18a4e7371 docs: Remove unnecessary type declaration. 2017-06-27 08:33:56 -04:00
Yago González 33e4855306 lint: Ban non-unique operationIds in Swagger.
The Swagger specification indicates that all operationId values should be
unique. However, SwaggerParser doesn't complain during validation if that
doesn't happen, so this commit adds our own method to identify these
cases.

Also, the violations of this rule have been fixed.
2017-06-26 22:02:26 -04:00
Yago González 9be3ff2b3f composebox_typeahead: Remove unnecessary autocomplete_checks.
The validations that autocomplete_checks did were already managed by
tokenize_compose_str and the main "if" statements in
compose_content_begins_typeahead.
2017-06-26 19:33:25 -04:00
Yago González c348b907e7 composebox_typeahead: Optimize token identification. 2017-06-26 19:33:25 -04:00
Yago González 024362278e templates: Remove unnecessary newlines in typeahead_list_item. 2017-06-26 19:33:25 -04:00
Yago González 67433691a9 templates: Fix typo in error message. 2017-06-26 19:33:25 -04:00
Aditya Bansal 411883365a compose.js: Create initialize() function. 2017-06-26 15:55:10 -04:00
Eeshan Garg b60c95d971 integrations/svn: Use Markdown macros. 2017-06-26 12:30:04 -04:00
Yago González 05f1992503 docs: Document /get_stream_id API endpoint. 2017-06-26 09:02:49 -04:00
Yago González 5b0954c29d node tests: Remove unreachable match case.
Since util.extract_pm_recipients() won't return a recipient if it's only
composed by whitespaces, considering such recipient in the matcher is
unnecessary.
2017-06-26 08:38:21 -04:00
Sampriti Panda d570447850 drafts: Remove extra margin in draft message content. 2017-06-25 12:28:14 -04:00
Sampriti Panda b2a1754f8a drafts: Re-narrow on restoring draft.
Fixes #4587
2017-06-25 12:26:42 -04:00
Yago González 550350c27f docs: Document /dev_fetch_api_key API endpoint. 2017-06-25 12:23:10 -04:00
Yago González 1c3b0a8b03 docs: Document /fetch_api_key API endpoint. 2017-06-25 12:23:10 -04:00
Yago González 30e8a04596 docs: Amend definitions of JSON responses. 2017-06-25 12:23:10 -04:00
Yago González 29fa89273e docs: Fix formatting in the Swagger YAML file. 2017-06-25 12:23:10 -04:00
Yago González 687acf89a6 docs: Sort REST API endpoints alphabetically. 2017-06-25 12:23:10 -04:00
Vishnu Ks 9fbd990d1a tutorial.js: Narrow to PM with welcome-bot when user logins for first time. 2017-06-25 11:23:45 -04:00
Cory Lynch 090d7487cf search_suggestion: Use person matching function from people.js.
Instead of having a custom (duplicate) matching function in
search suggestion, it was refactored to use the function in
people.js. This also gets the diacritic-ignoring feature
of the function in people.js.

Fixes #5315.
2017-06-23 08:29:20 -04:00
Cory Lynch 46d224f021 people.js: Refactor to split out 'person_matches_query' function. 2017-06-23 08:29:20 -04:00
Harshit Bansal 6615f2f2e8 common.js: Migrate `common.js` module to use IIFE module style.
This module was exposing its functions as globals. This PR fixes
it use the IIFE module style that we use in our other modules.
2017-06-22 19:06:32 -04:00
digi0ps f228700ef2 webpack: Migrate translations.js to use ES2015 syntax. 2017-06-22 16:43:33 -04:00
Harshit Bansal 0994726035 composebox_typeahead: Fix the behavior on inserting an emoji on new-line.
Autocompleting an emoji on a line was adding an extra space.

Fixes: #5516.
2017-06-22 14:16:44 -04:00
Harshit Bansal 4912acf409 composebox_typeahead: Fix the autcomplete behavior while editing message.
On editing a multi-line message inserting an emoji or stream name,
the autocomplete was incorrectly sending the cursor to the the end
of the message.

Fixes: #5515.
2017-06-22 14:16:44 -04:00
Abhijeet Kaur 534aa0b105 bots: Add a widget file to directly create bot from integration pages.
Add a widget file to create and subscribe bot to the stream user wishes
the incoming webhook services to send messages.
2017-06-22 11:07:30 -04:00
Vaida Plankyte c52e964db3 frontend: Toggle aria-hidden for overlay container visibility. 2017-06-22 10:57:37 -04:00
Cory Lynch df83cee86b people.js: Ignore diacritics in search bar.
Fixes #5315
2017-06-21 19:13:44 -04:00
Yago González e7bd18ec09 timerender: Make get_full_time produce a ISO 8601 date string.
Having get_full_time produce a date string non-compliant with RFC2822 or
ISO 8601 caused problems when showing edition timestamps on a message's
edit history.

Now it returns an ISO 8601 date string (1978-10-31T13:37:42Z).
2017-06-21 16:46:39 -04:00
Cynthia Lin e832ebdc98 hotkeys: Add collapse/show message hotkey.
Fixes #4540
2017-06-21 15:54:09 -04:00
Cynthia Lin a9afe43735 hotkeys: Add `u` hotkey for opening message sender profile.
Fixes #4873
2017-06-21 10:38:05 -04:00
Cory Lynch 95d86c8aeb zulip.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch bfd92235c5 typing_notifications.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch a5328be9a1 subscriptions.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 74fd7e0865 stats.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 25d0810f76 settings.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch c7697f8286 right-sidebar.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch c33dc4a5a5 reactions.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 6e9bf1b563 portico.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 67da0ef9dd portico-signin.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch d04fbc0a53 popovers.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch fa73872828 media.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 1b2d44b016 lightbox.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 7bfb902032 left-sidebar.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 5f6ebaba45 landing-page.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 94ccbb71b0 informational-overlays.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 1b4ca9dff8 drafts.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 7e869cf5b2 compose.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch d1d1906460 components.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Cory Lynch 7dd0ae33ad activity.css: Replace RGB colors with HSL colors. 2017-06-21 07:02:57 -04:00
Abhijeet Kaur 14fdc2aea6 bots: Add 'Bot type' column to bots list in organization settings. 2017-06-20 23:04:46 -04:00
Cory Lynch c19be5e39e Change conversation links to contain user's own email.
Fixes #2360.
2017-06-20 21:22:45 -04:00
Cory Lynch 6d90d7ccbb people.js: Ignore own email address in group PMs. 2017-06-20 21:22:45 -04:00
Cory Lynch ff9498f85b bookend: Hide re-subscribe button for private streams.
Fixes #5181
2017-06-20 20:56:26 -04:00
vaibhav d9bc3932ec settings: Move "download personal API key" from "your-bots" to "your account"
Fixes: #5355.
2017-06-20 15:46:23 -04:00
Harshit Bansal aee130bf06 subs: Fix the real-time sync when adding/removing the subscribers.
We were incorrectly amending the HTML directly whenever a subscriber
was added/removed. For updating any list which is being managed by
`list_rendering.js`, instead of modifying the HTML directly we should
just update the data in list render instance and perform a re-render.

Fixes: #4812.
2017-06-20 15:44:20 -04:00
Harshit Bansal e82a53117a stream_edit.js: Add `rerender_subscribers_list()` function.
This function can be used for updating the subscribers list correctly
when a subscriber is added or removed.
2017-06-20 15:44:20 -04:00
Harshit Bansal 3f0ccd66c5 stream_edit.js: Extract `get_email_for_subscribers()` function.
This function can be used for mapping subscribers's id to their email.
2017-06-20 15:44:20 -04:00
vaibhav 9a6e326305 Add support for generating and downloading flaskbotrc.
Flaskbotrc is a file containing config of all active
outgoing webhook bots. It is used to provide configuration
of all active outgoing webhook bots to zulip-bot-server.
2017-06-20 09:43:45 -04:00
Cory Lynch 387f37c15e popovers.js: Fix keyboard shortcuts with copying link.
Fixes #5374.
2017-06-20 06:28:25 -04:00
Cory Lynch d5bcfc415d emoji_picker.js: Fix popover icon that persists after exit.
Another manifestation of #4329, as this bug
also applied to the emoji popover.
2017-06-20 06:28:25 -04:00
Cory Lynch 801e4f6f6e popovers.js: Fix chevron that persists when exiting.
Fixes #4329.
2017-06-20 06:28:25 -04:00
Cory Lynch 55917b6761 message_store.js: Remove obsolete clear() function. 2017-06-20 06:24:27 -04:00
Vishnu Ks 9b16835c99 user_popover: Handle the case when user presence is unknown.
For bots and users who have not logged in for a long time the presence information is not known. For the these users make the presence indicator hidden.
2017-06-19 17:25:06 -04:00
vaibhav 33c0c00cd6 Outgoing webhook System: first Iteration of outgoing webhook UI. 2017-06-19 16:05:54 -04:00
Cory Lynch 6255636923 Support special characters for code block languages.
Fixes #5412
2017-06-19 06:53:25 -04:00
Cory Lynch 58a2ffbe1d Add search suggestion support for is:unread. 2017-06-19 06:51:13 -04:00
Cory Lynch 86d3e00bd0 Add search support for is:unread.
Fixes #1423.
2017-06-19 06:51:13 -04:00
Steve Howell d7c0a7e1cb Clean up settings_org.render_notifications_stream_ui.
The code now handles undefined stream_ids for realms that
don't have a notifications stream.  It also removes unneeded
translation code on the stream name.
2017-06-16 08:47:42 -04:00
Steve Howell 081e0405dc Avoid error in closest_id().
If we get a potential_idx that is not in items, we now just
warn about it instead of letting a type error happen.
2017-06-15 18:33:26 -04:00
Steve Howell a9622b0e4f Fix lint error from recent commit (error_data). 2017-06-15 17:47:44 -04:00
Steve Howell 1f34077fa1 minor: Add closest_id to blueslip error data. 2017-06-15 16:33:38 -04:00
Steve Howell fe9020972a Avoid type errors for bad PM narrows.
If somebody narrows to pm-with:bad_email@example.com, we no longer
generate a type error by trying to call addClass on undefined.
2017-06-15 15:52:42 -04:00
Yago González 1d0b7e07cc css: Make avatar corners round.
Set a border radius of 4 pixels for user avatars displayed in the message
list view.
2017-06-15 12:36:59 -07:00
Akhil b6b22fbb47 message-edit: Trigger mouseleave on row when hiding message_edit div.
For the pencil icon to appear, message_unhover has to be called before
message_hover (both in ui_init.js). This happens when the mouseleave
event is triggered on a row. But, when clicking the save button and
the edit box is hidden, the mouseleave event is not triggered and
hence message_unhover not called.

Fix this with a manual mouseleave event.

Fixes: #4287.
2017-06-15 12:24:40 -07:00
Steve Howell 34f26f14aa narrow: Remove redundant from_reload option.
The narrowing option from_reload was only used in
conjunction with use_initial_narrow_pointer, but the
latter option already takes into account whether a
reload happened.
2017-06-15 12:16:27 -07:00
Steve Howell 961d54692e narrow: Rename var to use_initial_narrow_pointer. 2017-06-15 12:16:25 -07:00
Rohitt Vashishtha 1fe58eb325 webhooks/slack: Migrate docs to markdown. 2017-06-15 11:10:44 -07:00
Abhijeet Kaur af7e08acb0 bots: Add UI to view bot types of existing bots in "Your bots".
Tweaked by tabbott for more standard internationalization.
2017-06-15 10:08:31 -07:00
Steve Howell 8aad3ecb5c Add error checking to get_users_typing_for_narrow(). 2017-06-15 11:32:13 -04:00
Steve Howell fd62edde39 Add debugging code for overlays. 2017-06-15 11:03:29 -04:00
Steve Howell d2b710b307 Add maybe_show_keyboard_shortcuts().
This prevents some strange UI experiences and some blueslip
errors by not opening keyboard help when other overlays or
popovers are open.
2017-06-15 10:15:29 -04:00
Akhil 1bcc0dbd81 org-settings: Add UI for changing the notifications stream.
Added a dropdown in the organization settings page with a search-box and
required styles. Also added an element to disable it. Added a method to
populate the dropdown using list_rendering.js. Also altered response to
the event of deletion of the notifications stream on the frontend. On
selection of a new stream or on clicking 'Disable', a patch request is
made with stream-id to /json/realm.

Fixes: #3708.
2017-06-15 04:08:29 -07:00
Shubham Dhama 9c5353cc3d lightbox: Remove the unwanted scrollbar from the image list.
Fixes: #5277.
2017-06-15 03:39:40 -07:00
Harshit Bansal 7950f82f27 realm_emoji: Make sure that a deactivated realm emoji can't be used.
A deactivated realm emoji should neither be accepted further as a
reaction nor its further occurences in a message be rendered as an
emoji. However, all the old occurences should continue to render
normally.
2017-06-15 02:59:57 -07:00
Cory Lynch 11a7a476d7 search_suggestion: Add negation support for 'has' operator. 2017-06-15 02:32:00 -07:00
Cory Lynch da4e2954fe search_suggestion: Remove is:private as default suggestion. 2017-06-15 02:20:50 -07:00
Cory Lynch 89b8d07420 Make search suggestion messages more concise.
This involves updating filter.js, mostly. The
tests were updated appropriately for this change,
which also involved changing a caspar test for
narrowing.
2017-06-14 22:34:46 -07:00
Cory Lynch ab5b0e938d Add support for "has" operator in search_suggestions.
This was never a feature in the old search_suggestions
version, so a new helper function for it was added.

Relevant tests were also added, maintaining 100% coverage.
2017-06-14 22:34:46 -07:00
Cory Lynch a7ec8cd1f3 Improve topic in search_suggestion.js.
Also added some additional testing to handle
some edge cases that I'd like to make sure
don't break down.
2017-06-14 22:34:46 -07:00
Cory Lynch 7cda7c4782 Improve stream in search_suggestions.js. 2017-06-14 22:34:46 -07:00
Cory Lynch 69e8074d14 Improve person/group in search_suggestions.js.
The get_person_suggestions and get_group_suggestions functions
were updated to the new system. Support for negation is also
added in the new system.

Relevant tests were also updated. Also, note that the function
get_private_suggestions was removed, as it was rendered
obsolete by these updates.
2017-06-14 22:34:46 -07:00
Cory Lynch c8d4eff8aa Improve sent_by_me in search_suggestions.js.
Added appropriate tests.
2017-06-14 22:34:46 -07:00
Cory Lynch 79d56c94dc Improve default and special_filter in search_suggestion.js.
Special filter was updated to work even when it is not the first
token in a search query. Furthermore, the default query was
moved around to work with the changes to come for the new
suggestion system.

A test also had to be modified to work with the new system.
2017-06-14 22:34:46 -07:00
Tim Abbott 2555227cc5 errors: Update 404/5xx nginx pages.
We remove zulip-devel@ from the 404 page, and improve the comments
explaining why these pages don't use variables.
2017-06-14 21:18:45 -07:00
Cory Lynch cb4dadfdcd tools: Create /devtools page for useful dev URLs.
Fixes #5179.
2017-06-14 20:17:56 -07:00
Jack Zhang d3e69c5460 Remove style to show text in portico-page-container.
Fixes #5368, #5371.
2017-06-14 18:37:24 -07:00
Steve Howell 29416c4b39 Move pm_list.set_click_handlers() call.
Instead of calling it from stream_list.initialize(), we
call it from the new pm_list.initialize().
2017-06-14 13:58:54 -04:00
Steve Howell 499962bb6b Change arg for stream_list.redraw_stream_privacy().
We now pass in a sub, not a stream name.
2017-06-14 11:24:42 -04:00
Steve Howell fb5d10af14 Extract stream_list.get_global_filter_li().
Now we use a consistent approach to find the list items for
Home/Starred messages/Mentioned in the upper corner.

In particular, we get rid of the complicated
iterate_to_find() function.
2017-06-14 09:27:50 -04:00
Harshit Bansal 0e8f1f4e5d alert_words: Fix the UI to not allow users to create duplicate alert words. 2017-06-13 16:37:49 -07:00
Harshit Bansal 94fc7dfe20 alert_words_ui: Fix the data flow while removing an alert word.
Add `remove_alert_word()` function which uses the correct data flow
while removing an alert word.

`alert_words_ui.js` was structured differently from most of the other
settings. It was not using the triggers from the server for running
the success/failure handlers.
2017-06-13 16:36:11 -07:00
Harshit Bansal 049bc02778 alert_words_ui.js: Fix the data flow while adding alert word.
Modify the `add_alert_word()` function to follow the correct data
flow for error handling and propagation.
2017-06-13 16:36:11 -07:00
Harshit Bansal d5ab8ac1e1 alert_words: Remove the `page_params.alert_words` after initialization.
We remove the `page_params.alert_words` since `alert_words.words`
is the sole source of alert words. Use of `page_params.alert_words`
could lead to bugs when alert words are updated since it is not updated.
2017-06-13 16:36:11 -07:00
Steve Howell 7c2683d765 minor: Export stream_list.update_count_in_dom() for testing. 2017-06-13 18:37:02 -04:00
Eeshan Garg 571130e2fe webhooks/homeassistant: Migrate docs to Markdown. 2017-06-13 15:33:21 -07:00
Akhil ff9a929d7a typeahead: Remove highlighting and add common template. 2017-06-13 16:16:17 -04:00
Rishi Gupta dbac262509 hotspots: Change hotspots to have a name and a description. 2017-06-13 12:59:33 -07:00
Mehanig 1e5ce918e3 webpack: Move app_debug.js to webpack bundle. 2017-06-13 12:45:40 -07:00
Tejas Kasetty dd7e27815f hotkeys: Disable navigation in background when overlays are active.
Fixes #5326.
2017-06-13 09:17:56 -07:00
Aditya Bansal ea6a04781b streams-modal: Fix styling around stream accessibility option.
This fixes the faulty spacing around the various icons in
stream accessibility option under the create new stream modal. This
regression was introduced in 7e71bf.
2017-06-12 22:44:42 -07:00
Brock Whittaker 244c4dc7fa landing-pages: Add working "×" for mobile navigation.
This adds a working "×" icon that you can click to close the nav
on the mobile product pages.

Fixes #5260.
2017-06-12 21:32:18 -07:00
Brock Whittaker c1599a1463 streams-modal: Fix back arrow on streams modal.
This fixes the back arrow to work again properly after a regression
in which a change in the class name disrupted the click events and
styling for it.
2017-06-12 18:31:04 -04:00
Tejas Kasetty cabcdabfbc emoji-picker: Update scrollbar after each search filter.
Fixes #4825.
2017-06-11 10:15:48 -07:00
Rafid Aslam 4f482834b4 deps: Upgrade and move `perfect-scrollbar` from `static/third` to `npm`.
- Remove `perfect-scrollbar` from `static/third` and fetch it from npm.
- Upgrade `perfect-scrollbar` to 0.7.1.
- Bump up the `PROVISION_VERSION` to 5.6.

Changed `wheelSpeed` in "static/js/scroll_bar.js" to 0.5, because when it
20, the scrollbar scrolls very fast.

Changed 'wheelSpeed' in "static/js/emoji_picker.js" from 25 to 0.68
(based on tabbott's testing of scrolling through the emoji list).

Part of #1709.
2017-06-11 10:15:48 -07:00
hackerkid 648b2823bb Show user presence and last seen status in user popover. 2017-06-11 07:09:21 -05:00
hackerkid a158676fb0 Add function to get last seen status from last active date. 2017-06-11 07:09:21 -05:00
Harshit Bansal 614817e5fc alert_words_ui: Add `render_alert_words_ui()` function.
This function will be used for rendering the alert words list.
2017-06-09 15:23:53 -07:00
Harshit Bansal 643936454e alert_words_ui: Convert error message alert to status message alert.
Convert the error message alert to a status message alert which can be
used to display the status of any operation performed.
2017-06-09 15:23:53 -07:00
Harshit Bansal b0d7d05ef6 alert_words_ui.js: Move the error message to the top. 2017-06-09 15:23:53 -07:00
Tejas Kasetty 4487899099 file-attach: Reset file_input after each trigger.
The file input used for attaching files and images was not being reset
after each use. This resulted in irregular behaviour (sometimes failure)
in attaching the same file consecutively.
This fixes the bug in the reset method.

Fixes #5074.
2017-06-08 19:53:31 -07:00
Jack Zhang ec673c739c product-pages: Add integrations section to hello (landing) page. 2017-06-08 19:41:50 -07:00
Brock Whittaker 5606435a90 components: Make button component styles sensible.
This removes the old base button style which was a blue button and
kills the unnecessary .white class which was essentially just acting as
the new button base.

This then removes all references throughout the settings/subscriptions
pages to those button styles.

This also fixes the strange button styles that changed the :hover and
:active opacity to 0.05 which led to unpredictable results on various
backgrounds.
2017-06-08 17:09:31 -07:00
Aditya Bansal b5d5e6f9b5 topic_sidebar_actions.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:28 -07:00
Aditya Bansal 2d6101bf8c topic_list_item.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:28 -07:00
Aditya Bansal 293abb275c subscription_table_body.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:28 -07:00
Aditya Bansal 8d9cb3aa71 subscription_stream_privacy_modal.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal 7e71bf6f2f subscription_creation_form.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal b24e3ce0f0 attachment-item.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal a02937e3b4 new_stream_users.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal a204407983 message_reactions.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal 88c68073fa message_edit_form.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal 82e8b4a5ae invite_subscription.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal 226b41c62e actions_popover_content.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Akhil bd85963cd9 typeahead: Alter CSS to make secondary items more readable. 2017-06-08 12:01:03 -07:00
Akhil 3955821af5 typeahead: Extract out render_secondary and alter style for emails.
Added a function to add styling to secondary item of typeahead. Also,
used this function to alter the style for emails in the @-mention
typeahead to match the style used for stream description in #**stream**.
This also affects typeaheads for PM recipients and adding new users in
stream settings.
2017-06-08 12:01:03 -07:00
Akhil cc0dbef5a4 typeahead: Move highlight_with_escaping into render_person. 2017-06-08 12:01:03 -07:00
wizsid11 d309cd29f3 webhooks/zapier: Add weather update example.
Add documentation for weather update through Zapier.
Contains tests and fixtures for weather example.

With minor fixes, docs migration to Markdown, and
rebasing by Eeshan Garg.
2017-06-08 09:14:18 -07:00
Feorlen 7124098a8e Explain how to add Swagger REST API doc coverage in zulip.yaml.
Introduce Swagger UI and the Swagger/OpenAPI specification. Explain
the structure of zulip.yaml and show examples of different sections
of the file.

This is a new file in /docs not yet included in the Read the Docs
table of contents. Where it should go should be determined as we iterate
on the Swagger UI integration and expand REST API doc coverage using it.

For more on Swagger UI and how Zulip uses it, see:
https://github.com/zulip/zulip/issues/3474
https://github.com/zulip/zulip/pull/3397

With some minor tweaks to advertise this by tabbott.
2017-06-07 22:46:20 -07:00
Tejas Kasetty 1415efea55 emoji-picker: Order emoji filter list after each search.
* change emoji-container to 'flex' display inorder to support ordering
  of the contents (emojis).
* order emojis after each filter. The ordering is based on search string
  and is similar to the ordering in emoji typeahead.

Fixes #4806.
2017-06-07 21:54:07 -07:00
Tejas Kasetty 27009e9708 util.js: Fix prefix_sort logic to not mutate input.
In prefix sort, shifting of objs list to iterate through the elements
caused the 'emoji_show_list' to be emptied each time it was passed as
argument for sorting.

This modifies prefix sort to prevent it from modifying the objs list passed
as argument - changed it to normal iteration rather than popping
the elements from objs list.
2017-06-07 21:54:07 -07:00
Joshua Pan ccd880094e util.js: Refactor util.strcmp into util.make_strcmp. 2017-06-07 19:45:46 -05:00
Joshua Pan 73ea9079b9 Move preview_node() to blueslip.js. 2017-06-07 19:45:46 -05:00
Sarah 9ebb503340 settings_notifications.js: Save notification settings on change.
Refactor settings_notifications to save each setting on change.

Fixes #3264.
2017-06-07 13:39:27 -07:00
Sarah baf92b98f2 settings_notifications.js: Refactor using notification_settings variable.
Create an array of all user notification settings and loop through it
to update notification settings and display results.
2017-06-07 13:33:08 -07:00
Harshit Bansal 0aaf434176 settings/bots: Fix broken tooltip. 2017-06-07 13:24:07 -07:00
Jack Zhang 98a785bb25 message_edit: Replace highlighting replaced text with delete / insert.
Rationale: For the more off-to-the-side edit history view, changes
are easier to digest by highlighting deleted content in red followed
immediately by added and changed content in green.

TODO: Toggle for showing the edited messages without highlighting;
deleted content would not be shown in this view.
2017-06-07 11:06:15 -07:00
Jack Zhang a3557b8d2c message_edit: Style text & highlights for inserted/deleted text.
Changed to: red and line-through for deleted text, green for inserted
text. This should increase contrast.
2017-06-07 11:06:15 -07:00
Steve Howell ce1dd9f50b presence: Do not show bots in the buddy list.
(Before this fix, we were showing empty circles for bots
in small realms.)
2017-06-07 10:36:26 -06:00
Joshua Pan bbc0103183 drafts.js: Create initialize() function. 2017-06-07 00:01:55 -07:00
Tejas Kasetty ba91d7f59f zulip.css: Remove dead realm emoji CSS.
Removes .emoji.realm-emoji; it hasn't been used in months.
2017-06-06 22:54:45 -07:00
Akhil 6adf241d7e message_edit: Avoid always fetching raw content.
Altered message_edit.start to check for message.raw_content before
retrieving the same from the backend.

With tweaks by tabbott to update, rather than delete, on repeated
edits.

Fixes: #4404.
2017-06-06 22:41:27 -07:00
Aditya Bansal 1143aec53b Clean 404.html to use 4 space indentation. 2017-06-06 22:00:36 -07:00
Cory Lynch 4056ae9cc9 composebox_typeahead: Fix stream typeahead highlighting.
Changed the highlighting method used by the stream input field.
The one now in use supports spaces in the input.
Fixes #5211
2017-06-06 21:19:28 -07:00
Abhijeet Kaur 60ff82ed7c bots: Add UI for creating different types of bot.
Add 'Type of bot' option for bots by adding dropdown option in
settings->"Your bots".  For now, this allows creating incoming webhook
bots in addition to default bots.

This will enable users to add a bot as an incoming webhook
(in addition to add full-featured bots).

With various minor tweaks and cleanups by tabbott.

Fixes #2186.
2017-06-06 21:11:22 -07:00
Sarah 381ec1f5d4 settings_notifications.js: Refactor using notification_settings variable.
Create an array of all user notification settings and loop through it
to update notification settings and display results.

Formatting tweaked by tabbott.
2017-06-06 20:35:56 -07:00
David Coleman 0be5178759 refactoring: timerender maintains list of objects instead of arrays.
The function maybe_add_update_list_entry() will push objects instead
of arrays onto the list of timestamps that need updating. This
should improve readability.
2017-06-06 20:01:21 -07:00
David Coleman 13915740bb refactoring: use class attr to identify timerender date <span>.
The floating_recipient_bar is cloned from recipient_bar elements.
The cloning created elements in the DOM with duplicate id
attributes, specifically <span id="timerender{id}">, which
contains the date of the message stream. The timerender span
will now use class="timerender{id}" instead.

Fixes #4997.
Fixes #5128.
2017-06-06 20:01:21 -07:00
David Coleman 01d303da3e message view: show recipient_row_date when floating bar is hidden.
Force display of the top-most recipient_bar's recipient_row_date
when the floating_recipient_bar is just about to overlap and
becomes hidden while user is scrolling.

Fixes #4844.
2017-06-06 20:01:20 -07:00
Tim Abbott acc83a3fcc locale: Update a few last translation strings. 2017-06-06 13:57:08 -07:00