Steve Howell
3b7430ba82
topic lists: Refactor zoom-out logic for un-narrows.
...
For cases where we are zoomed in to a stream and then go
to a different narrow (Home, PMs, etc.), we now let
topic_list.zoom_out orchestrate the removal of the topic list
instead of stream_list.zoom_out.
This will help us when we move to a world where topic_list
redraws topic lists on zoom-in/zoom-out, because we won't
waste effort rebuilding lists that are about to be removed.
2016-11-10 15:55:31 -08:00
Steve Howell
bfc6f57195
topic lists: Move some zooming logic into topic_list.js.
...
The flow for topic list zooming is kind of complicated now, but
it's mostly a consequence of the way the UI works.
* stream_list tells topic_list to set up the topic list
click handlers to have callbacks to stream_list
* topic_list click handlers call to stream_list zoom methods
to hide/show all the other streams
* stream_list zoom methods call back to topic_list methods to
redraw topics as needed (this isn't happening yet, but allowing
topic_list.js to know that it's zoomed will set the stage for
this to happen in a more controlled manner)
2016-11-10 15:55:31 -08:00
Steve Howell
53eea250d0
topic lists: Formalize that we only ever have one widget.
...
We now only keep zero or one widgets around in memory, and
we don't need jQuery magic any more to find the DOM elements
to remove.
2016-11-10 15:55:31 -08:00
Steve Howell
06816d19e6
topic lists: Call narrow.topic() in topic_list.js.
...
We no longer need stream_list.js to pass in the currently
active topic to us; we just call narrow.topic() for it.
2016-11-10 15:55:31 -08:00
Steve Howell
853126344e
Add narrow.topic() helper method.
...
This has similar semantics to narrow.stream().
2016-11-10 15:55:31 -08:00
Steve Howell
e76422b946
Use narrow.stream() instead of stream_list.active_stream_name().
...
We no longer use active_stream_name(), which was mostly a
duplicate of narrow.stream(). For nonsensical queries like
"stream:foo stream:bar" the behavior may change slightly here.
We know that we don't handle non-sensical queries particularly
well, but at least if we always go through narrow.stream(),
the behavior will be consistent.
I did test this with some sensible compound narrows, like searching
for a keyword within a stream.
2016-11-10 15:55:31 -08:00
Umair Khan
86b75aade2
Django 1.10: Fix i18n tests.
...
SimpleCookie does not accept unicode strings and the name of
Simplified Chinese is changed to zh-HANS.
2016-11-10 16:20:03 +05:00
Tim Abbott
46a601c4c4
Import the user documentation guide into new user docs system.
...
This is an import of
https://github.com/brannerchinese/zulip_user_documentation
into the main Zulip repository. Important changes include:
* Removed trailing whitespace.
* Changed URLs for images to work properly.
2016-11-09 21:39:55 -08:00
Brock Whittaker
129d88825c
messages: Wrap inline code blocks on long lines.
...
In 25b28bf82c
and then
cb1bc70ab0
, we attempted to make long
code blocks scroll in a reasonable fashion, without much success.
This change causes code blocks to be line-wrapped, without needing to
set `overflow-y: hidden` for paragraphs (which cause problems with
taller elements like emoji that overlfowed wrong). Our octopi finally
have legs again.
It's not clear that this is the final answer, but it's the best
version we've found so far.
2016-11-09 19:26:45 -08:00
Steve Howell
16e37f8874
Limit compose at-mention typeaheads to realm users.
...
Fixes #2240
2016-11-09 19:20:58 -08:00
Steve Howell
5e51a93688
Change stream_data.remove_subscriber() to accept user ids.
2016-11-09 15:03:08 -08:00
Steve Howell
00068f3164
Extract stream_data.unsubscribe_myself().
2016-11-09 15:03:08 -08:00
Steve Howell
537a3b8ca8
Change stream_data.add_subscriber() to accept user_ids.
...
We no longer require passing in an email to
stream_data.add_subscriber(), since we only track user ids
in stream_data.js.
2016-11-08 15:49:23 -08:00
Steve Howell
a03a7d4c95
peer_remove: Send user_id, not email, for unsubscribe events.
2016-11-08 15:36:29 -08:00
Mohsen Ibrahim
44c8e4c58c
streamLinkHandler: render stream links correctly.
...
After adding the ability to add stream links to messages using
the following pattern '#**stream_name**' there was a problem
with rendering this using our markdown engine because '**' means
bold text so that would render just to bold text.
To solve this I had to add regular expression in marked.js to match
that pattern and when it matches I call handleStreamLinks in echo.js
which will correctly render it to HTML.
Fixes #2218 .
[tweaked by tabbott to url-encode the stream name in the URL and
adding the missing "#" in the display].
2016-11-08 13:52:31 -08:00
Meena Rajan
30acb23314
bugdown: Add support for strikethrough in markdown processor.
...
[Tweaked to move tests to bugdown_data.json, add additional tests, and
add frontend processor support by tabbott]
2016-11-07 22:26:38 -08:00
Igor Tokarev
07d05390bf
markdown: Fix client usermention regular expression.
...
Fixes #993 .
2016-11-06 18:37:09 -08:00
umkay
f4c621ffe3
admin: Enable admins to toggle supported auth methods via UI.
...
Add a table to the administration page that will allow realm admins to
activate and deactivate the supported authentication methods for that
realm.
2016-11-06 16:29:35 -08:00
Steve Howell
debc06b449
Rename subject-name to topic-name and move CSS to left-sidebar.css.
2016-11-05 15:03:29 -07:00
Steve Howell
06fe4bc943
Rename subject_box to pm-box/topic-box.
...
I'm not crazy about the names pm-box and topic-box, but they
are less confusing now.
2016-11-05 15:03:29 -07:00
Steve Howell
43c372bfb6
css: Clean up styles for subject_box.
...
These styles are uniform for now, so we don't need a complicated
selector.
2016-11-05 15:03:29 -07:00
Steve Howell
e38b684eea
Simplify CSS for topic-sidebar-arrow.
2016-11-05 15:03:29 -07:00
Steve Howell
b1f288dddb
topic lists: Rename expanded_subject to topic-list-item.
2016-11-05 15:03:29 -07:00
Steve Howell
8b7e9101ca
topic lists: Rename expanded_subjects -> topic-list.
2016-11-05 15:03:29 -07:00
Tim Abbott
ee361cbe30
js: Eliminate process_loaded_for_unread global.
2016-11-05 11:33:04 -07:00
Tim Abbott
d60ec24c1f
js: Move set_user_statuses to activity.js initialization.
2016-11-05 11:33:04 -07:00
Tim Abbott
6daf2b1e46
js: Move pointer initialization code out of zulip.js.
2016-11-05 11:33:04 -07:00
Tim Abbott
d76f9b09a3
unread: Move consider_bankruptcy into unread module.
2016-11-05 11:33:04 -07:00
hackerkid
70223ef2da
[third] Update marked base to newer version 0.3.6.
...
This basically re-applies the Zulip changes to marked 0.3.6.
Fixes #2190 .
2016-11-04 21:56:53 -07:00
Brock Whittaker
ee8d54db0f
Change content to rely on data-* attribute.
...
Content now relies on the data-no-description attribute which then
allows for it to be embedded in HTML and therefore translatable.
2016-11-04 17:26:53 -07:00
Brock Whittaker
4400665a6d
subs: Move stream settings into an independent overlay.
...
This replaces the scrolling stream settings feature with a stream
settings overlay.
2016-11-04 17:13:26 -07:00
Tim Abbott
78ec0341c4
subs: Fix color picker issue with subscribing.
2016-11-04 17:13:26 -07:00
Tim Abbott
73f020645f
subs: Remove unnecessary update_stream_color call.
...
The color was already being updated in the response from the server.
2016-11-04 16:37:29 -07:00
Tim Abbott
a70c5eb923
colorpicker: Migrate to use stream IDs to access things.
2016-11-04 16:37:29 -07:00
Tim Abbott
ab6fd87161
subs: Fix rename stream handling of email addresses.
2016-11-04 16:37:29 -07:00
Tim Abbott
e6734bfada
subs: Cleanup stream rename logic.
2016-11-04 16:37:29 -07:00
Tim Abbott
ee976a9bdc
subs: Use subscription_settings when changing descriptions.
2016-11-04 16:37:29 -07:00
Tim Abbott
45c7945818
subs: Use sub_settings in subscriber add/remove flow.
2016-11-04 16:37:29 -07:00
Tim Abbott
8e522cd933
subs: Convert stream_home_view_clicked to use sub_settings.
2016-11-04 16:37:29 -07:00
Tim Abbott
2467f765ad
subs: Stop using sub_row when rendering settings.
2016-11-04 16:37:29 -07:00
Tim Abbott
16408da823
subs: Cleanup change_stream_privacy.
...
We now:
(1) Only look up streams by ID
(2) Correctly look up both the stream-row and subscriptions_row after
the success handler returns.
2016-11-04 16:37:29 -07:00
Tim Abbott
32a571445a
subs: Use settings_for_sub when redrawing privacy stuff.
2016-11-04 16:37:29 -07:00
Tim Abbott
b67c0a4ad5
subs: Move settings_for_sub and button_for_sub earlier.
2016-11-04 16:37:28 -07:00
Tim Abbott
b1a5d57405
subs: Update get_subscriber_list to use subscription_setings.
2016-11-04 16:37:28 -07:00
Tim Abbott
109287dceb
subs: Update descriptions in settings separately from stream rows.
2016-11-04 16:37:11 -07:00
Tim Abbott
7a59ae591a
subs: Fix get_stream_name to use IDs from the DOM.
...
We haven't added a data-stream-name to the subscription_settings
object yet, and ideally we'd be moving away from using
data-stream-name anywhere.
2016-11-04 16:16:07 -07:00
Brock Whittaker
cc03d2014d
subs: Add missing li open/close tags.
...
Two elements were sharing the same li element, when they should be
in different elements.
2016-11-04 13:58:36 -07:00
Brock Whittaker
9b90a47fd6
Change .sub_settings_title to div.
...
All the properties they had weren’t being activated because they were
inline elements. Change to div to activate properties.
2016-11-04 13:55:11 -07:00
Brock Whittaker
7d51b6a454
subs: Create get_stream_name to get stream name from UI.
...
This accepts an arbitrary click target in the DOM inside a stream row
or stream settings element and returns the stream name.
2016-11-04 13:53:12 -07:00
Steve Howell
2088e8420f
User user_id, not email, in peer_add events.
2016-11-04 11:37:14 -07:00
Steve Howell
17e39a88ef
Remove people.test_set_people_name_dict().
...
We use a cleaner approach to setting up test data in echo.js to
allow us to remove the one call to test_set_people_name_dict().
2016-11-04 11:37:14 -07:00
Steve Howell
8c47f7f7db
Remove people.test_set_people_dict().
2016-11-04 11:37:14 -07:00
Steve Howell
472f049cae
Alphabetize subscription event cases in server_events.js.
...
I also split up peer_add and peer_remove into their own cases,
since they do opposite things and didn't share that much code
in common.
2016-11-04 11:37:14 -07:00
Steve Howell
38f2789152
Remove page_params.email_dict.
2016-11-04 11:37:14 -07:00
Steve Howell
3941334d00
Use user_ids for subscribers in stream_data.js.
...
We still shim a lot of methods to keep using emails, but the
internal data structure now has user_ids.
2016-11-04 11:37:12 -07:00
Steve Howell
7509f73f02
Clean up stream renaming in the JS code.
...
We now use stream_id as our key to rename streams, which
should prevent a few race conditions long term. (We are
still possibly contending with other events that use
stream_name as a key, so this is not perfect.)
2016-11-04 11:30:18 -07:00
Steve Howell
e1372ddf5d
Add people.get_user_id().
2016-11-04 11:30:18 -07:00
Steve Howell
4ace9bbd77
Remove dead code related to subs.create_sub().
...
Since we started handling the stream/create event properly,
create_sub() became dead code.
2016-11-04 11:30:18 -07:00
Steve Howell
4cd39010d1
Add people.get_person_from_user_id().
...
This requires the introduction of people_by_user_id_dict
and changes to people.add() and people.remove().
2016-11-04 11:30:18 -07:00
Brock Whittaker
4c4733bcec
Change logo/type on left sidebar column.
...
This changes to a new logo/type on the left sidebar column.
2016-11-03 18:12:00 -07:00
Tim Abbott
cb1bc70ab0
css: Set only message overflow-x to auto.
...
This fixes a nasty problem where if you zoomed in Chrome, you'd get
little scrollbars on every message body.
2016-11-03 18:09:36 -07:00
Tim Abbott
368b585980
subs: Redesign the rows of the #subscriptions table.
2016-11-03 17:33:33 -07:00
Steve Howell
e4930d73c4
Add user_id for new users who we discover in new messages.
...
This change also creates a copy of the objects so that we
don't couple ourselves to the message store.
2016-11-03 16:20:45 -07:00
Steve Howell
30e01306d9
Eliminate people.reify() and mostly ignore unknown users.
...
If I try to send a message to an unknown user (which is possible
for some types of realms), then I simply ignore them during the
send codepath, so that I don't later need to patch up their attributes.
2016-11-03 16:20:45 -07:00
Steve Howell
15d44f8d71
Encapsulate pm_recipient_count.
...
We no longer store pm_recipient_count on person objects, but we
instead use a Dict to store them. Then the new API is this:
people.get_recipient_count()
people.incr_recipient_count()
2016-11-03 16:20:45 -07:00
Steve Howell
9b04ec7472
Send dicts for cross realm users to JS.
...
We now send dictionaries for cross-realm bots. This led to the
following changes:
* Create get_cross_realm_dicts() in actions.py.
* Rename the page_params field to cross_realm_bots.
* Fix some back end tests.
* Add cross_realm_dict to people.js.
* Call people.add for cross-realm bots (if they are not already part of the realm).
* Remove hack to add in feedback@zulip.com on the client side.
* Add people.is_cross_realm_email() and use it in compose.js.
* Remove util.string_in_list_case_insensitive().
2016-11-03 09:51:23 -07:00
Tim Abbott
ebe959f2b0
tutorial: Remove low-quality alert bar onboarding flow.
...
This alert bar thing was buggy and didn't look that good, so let's
just remove it. We can always write a nicer thing advertising the
desktop app later.
2016-11-02 23:41:16 -07:00
Tim Abbott
2506c691b8
css: Fix alert-bar-container CSS blocking "Home" button.
...
Because the alert-bar-container had the full width of the page, it's
higher z-index caused it to break clicking on things.
2016-11-02 23:41:16 -07:00
Tim Abbott
8f779056e1
register: Improve password strength meter display.
...
This previously didn't handle the new grid layout particularly well.
2016-11-02 23:34:55 -07:00
Rishi Gupta
a2b6793174
message_edit.js: Put cursor at end of input on initial focus.
2016-11-02 20:54:54 -07:00
Rishi Gupta
5251460eda
message_edit.js: Remove edit_row from edit_message.
...
I believe row.find(..) and edit_row.find(..) are the same in all these
cases.
2016-11-02 20:54:54 -07:00
Rishi Gupta
8104485c41
message_edit.js: Refactor how edit_message accesses elements.
...
Currently, message_edit.edit_message accesses elements of
message_edit_form.handlebars by a number of different means, and in a number
of different places. This commit is the first of two that standardizes it.
2016-11-02 20:54:54 -07:00
Rishi Gupta
9ed45eb4a1
message_edit.js: Change disabled fields to readonly to allow copying text.
...
Previously we disabled fields in message_edit_form.handlebars that you
couldn't edit. This meant you could see the content of the field, but not
copy it. This commit marks those fields as readonly instead.
2016-11-02 17:49:04 -07:00
deekshaarul
05d252da71
compose.js: Add translation tag to empty_topic_placeholder.
...
Moves the variable definition from the top of the file to inside the export
since i18n seems not be loaded at the time the file is parsed.
2016-11-02 17:46:32 -07:00
deekshaarul
6624d4e56e
message_edit.js: Fix message editing behavior around empty topics.
...
Previously,
* We displayed "(no topic)" in .message_edit_topic when there was no
topic;this commit changes that to a placeholder.
* We showed the .message_edit_topic_propagate dropdown when the user
cleared .message_edit_topic, despite the fact that one cannot save
or propagate an empty topic. This commit fixes the behavior.
Fixes #1273 .
2016-11-02 17:45:23 -07:00
Tim Abbott
9aa346db71
css: Remove unnecessary share-the-love-title class.
2016-11-01 21:32:57 -07:00
trueskawka
977339954c
css: Create a separate file for left-sidebar CSS.
...
Create a new file left-sidebar.css.
Move all left-sidebar CSS from zulip.css to left-sidebar.css.
2016-11-01 21:32:57 -07:00
paxapy
2f711a070d
bugdown: Add autocomplete for #StreamName links.
...
Fixes #1858 .
2016-11-01 20:19:44 -07:00
Tim Abbott
acf43f91fa
composebox_typeahead: Improve whitespace.
2016-11-01 20:15:57 -07:00
Tim Abbott
6c96f3f2c7
composebox_typeahead: Refactor @mentions logic to not block #streams.
2016-11-01 20:15:57 -07:00
Tim Abbott
fe2aab7571
composebox_typeahead: Remove last_at variable.
2016-11-01 20:06:34 -07:00
Tim Abbott
ae336ce8b5
composebox_typeahead: Extract autocomplete_checks.
2016-11-01 20:06:03 -07:00
Steve Howell
a0dadfd40a
Widgetize topic_list.set_count().
...
This change makes most of the logic on set_count() live
on our per-stream topic list widget. We can find the
jQuery object directly now rather than using the
complicated iterate_to_find() method.
2016-11-01 19:30:41 -07:00
Steve Howell
b7b6fedf12
Widgetize activate_topic() in topic_list.js.
...
The activate_topic() function now lives on the object created
by build_widget().
2016-11-01 19:30:41 -07:00
Steve Howell
8c9488a904
Add topic_list.build_widget().
...
This gets us closer to a component model for topic lists.
2016-11-01 19:30:41 -07:00
Steve Howell
eacaa37754
Make update_count_in_dom() be private in topic_list.js.
...
I also moved the function in the file to be nearer to other
non-stream specific functions.
2016-11-01 19:30:41 -07:00
Steve Howell
aca6ba182e
Render topic list items individually.
...
This is a precursor to being able to find topic list
items without the complexity of iterate_to_find().
2016-11-01 19:30:41 -07:00
Steve Howell
148e1e6add
subs: Avoid duplicate prepend_subscriber() call.
...
We don't want to prepend new subscribers to our list of
subscribers in the settings page when they hit enter; we
want to wait till we get the event from the server.
This is a fairly new regression that was added when we
live-updated peer subscriber changes.
2016-11-01 14:01:29 -07:00
Steve Howell
a126be3db6
Call add_in_realm() when loading people from page_params.
2016-11-01 13:55:48 -07:00
Steve Howell
d70ac2fc0d
Remove obsolete code for page_params.people_list.
...
The only module that uses people_list now is people.js, and that's
only during the page load process.
2016-11-01 13:55:48 -07:00
Steve Howell
758c040558
Make stream-invite typeahead more dynamic and accurate.
...
The typeahead for inviting users to an existing stream now
uses a function, not a static list, and it now only shows
users from your realm.
2016-11-01 13:55:48 -07:00
Steve Howell
aadc198510
Make PM typeaheads more dynamic.
...
We now set source as a function, not a static list, and we grab
persons from people.get_all_persons() instead of page_params.
2016-11-01 13:55:48 -07:00
Steve Howell
40ec0189e4
Use people.get_all_persons() in at-mention typeaheads.
...
This is more robust than using page_params.people_list.
2016-11-01 13:55:48 -07:00
Steve Howell
06d7012113
Use people.get_all_persons() for search_suggestion.js.
...
This is better than using page_params.people_list, which may
go out of sync when live updates happen.
2016-11-01 13:55:48 -07:00
Steve Howell
2d945d7296
Add people.get_realm_persons().
2016-11-01 13:55:48 -07:00
Steve Howell
aa07b32d58
Add people.get_all_persons().
2016-11-01 13:55:48 -07:00
Brock Whittaker
25b28bf82c
Fix inline code lines that are too long in .message_content.
...
The issue is that if you post a very long line of code it will overflow
the .message_content div and force the width of the main message page
to be as long as the line of code.
Fixes : #2156
2016-10-31 17:17:17 -07:00
Brock Whittaker
d49076d0d4
Add @media query for mobile muting UI.
...
This adds a media query so that the muting UI on mobile displays
correctly.
Fixes : #2149 .
2016-10-31 17:17:17 -07:00
Tim Abbott
1bc9be7aed
subs: Fix stream privacy changes not working after renaming.
...
This fixes and issue where the change_stream_privacy template had its
own duplicate copy of the data-stream-name attribute, which wasn't
updated when streams were renamed.
Fixes #2016 .
2016-10-28 16:42:32 -07:00
Tim Abbott
6927a9bdc4
subs: Update subscription settings data when renaming streams.
2016-10-28 16:41:54 -07:00
Tim Abbott
0185764be7
subs: Fetch stream name from data-stream-name.
2016-10-28 16:12:50 -07:00
Tim Abbott
9507ed8a05
subs: Move show_settings_for earlier in file.
2016-10-28 16:10:59 -07:00
Tim Abbott
c10fd243f1
subs: Rename subscriber_count class to subscriber-count.
...
Also remove the unused subscriber-count-row class.
2016-10-28 16:07:28 -07:00
Tim Abbott
c0a774ef8c
subs: Remove use of $-based variable names.
2016-10-28 16:07:02 -07:00
Tim Abbott
56c9be75ee
subs: Add data-stream-name for stream settings.
2016-10-28 16:07:02 -07:00
Tim Abbott
76cd40eb9d
subs: Remove now-unused subscription_{{stream_id}}.
2016-10-28 16:07:02 -07:00
Tim Abbott
b8304c3359
subs: Find elements using the new data-stream-id value.
...
This is preparation for no longer having the subscription inside the
subscription_row object.
2016-10-28 16:06:40 -07:00
Tim Abbott
3727ea6fb0
subs: rename .subscription_description to .description.
2016-10-28 14:47:23 -07:00
Tim Abbott
dd2fab9374
subs: Rename data-subscription-id to data-stream-id.
2016-10-28 14:47:23 -07:00
Tim Abbott
66e2632809
subs: Rename .subscription_name to .stream-name.
2016-10-28 14:47:22 -07:00
Tim Abbott
f18d53d46a
subs: Rename .subscription_row to .stream_row.
...
The new name is clearer, since we show these rows for streams whether
or not you're subscribed.
2016-10-28 14:25:00 -07:00
Brock Whittaker
2bf2468ffe
css: Namespace buttons in components.css.
...
This namespaces components.css to not conflict with the existing CSS of
the rest of the site.
2016-10-28 14:14:52 -07:00
Brock Whittaker
38f7349771
components: Add .tab-switcher component.
...
This adds the .tab-switcher component to components.css.
2016-10-28 14:04:38 -07:00
Brock Whittaker
1562f9fe76
lightbox: Fix Z-Index for Proper Ordering.
...
This fixes the z-index of the lightbox overlay, which previously
appeared behind the header, and the muting notification to be above
everything else on the page.
2016-10-28 13:57:37 -07:00
Steve Howell
eb64b32bc8
Fix "subjects" in JS comments. Say "topics" instead.
2016-10-28 13:52:25 -07:00
Steve Howell
5fd71a6381
Rename var in sidebar_subject_list.handlebars.
...
s/subjects/topics/
2016-10-28 13:52:25 -07:00
Steve Howell
dba3ed3d90
Rename variables in topic_list.build_list().
...
(s/subjects/topics/ in a couple places)
2016-10-28 13:52:25 -07:00
Steve Howell
78861d4e01
Rename recent_subjects to recent_topics.
2016-10-28 13:52:25 -07:00
Steve Howell
0a4579711d
Add stream_data.get_recent_topics().
...
This removes the last remaining references to
stream_data.recent_subjects() outside of stream_data.js.
2016-10-28 13:52:25 -07:00
Steve Howell
6a54dfc127
Remove recent_subjects from node tests.
...
We now use stream_data.populate_stream_topics_for_tests(),
which hides some of the implementation details of initializing
the data structure.
2016-10-28 13:52:25 -07:00
Steve Howell
8acdf718bc
Move process_message_for_recent_topics() to stream_data.js.
2016-10-28 13:52:25 -07:00
Steve Howell
c799ac3126
Extract stream_data.is_active().
2016-10-28 13:51:21 -07:00
Steve Howell
ecbd77d8a5
Flip conditional in stream_list.add_sidebar_li().
2016-10-28 13:51:21 -07:00
Steve Howell
15602ee6bb
Stop using /json/streams on the client.
...
We no longer need to fetch streams from the server when
we render the settings page.
The name populate_and_fill() may not be a great name any
more.
2016-10-28 13:44:46 -07:00
Steve Howell
10bc093375
Stop using server data to draw "Manage Streams".
...
We have all the data we need on the client side.
2016-10-28 13:44:46 -07:00
Steve Howell
9d4debd1eb
Live-update added/removed subscribers.
2016-10-28 13:43:09 -07:00
Tim Abbott
c6f7b786a6
css: Fix problems selecting the first item in gear menu.
...
Fixes a regression introduced in
08b61c1b3d
, where .alert-bar-container
would be above the menu, and thus block highlighting of the top item
("Manage streams") in that menu.
2016-10-27 23:10:27 -07:00
Tim Abbott
01f0be27a7
subs: Combine another set of settings show handlers.
2016-10-27 22:24:40 -07:00
Tim Abbott
426f2b0405
subs: combine some settings show handlers.
2016-10-27 22:22:28 -07:00
Tim Abbott
3fd94cc58a
subs: s/subrow/sub_row/ in variable names.
2016-10-27 22:19:30 -07:00
Tim Abbott
2834a2bbbb
subs: Extract subscription_settings.handlebars.
...
This is an early step towards being able to decouple the subscription
settings section from the slideout behavior.
2016-10-27 22:07:42 -07:00
Tim Abbott
12331e2596
subs: Extract show_subscription_settings.
2016-10-27 22:06:56 -07:00
Brock Whittaker
000e41a397
Add new checkbox image.
...
This adds the checkbox image that is required for the streams row
subscribe indicator/button.
2016-10-27 22:06:56 -07:00
Tim Abbott
30c654f83f
templates: Fix stack traces throwing handlebars errors.
...
This fixes the fact that we weren't using `throw` correctly, and also
the "handlerbars" typo.
Fixes #2143 .
2016-10-27 22:06:56 -07:00
trueskawka
df7e430849
css: Create a separate file for compose CSS.
...
Create a new file compose.css.
Move all compose CSS from zulip.css to compose.css.
2016-10-27 16:45:32 -07:00
Steve Howell
f98e605840
Extract topic_list.set_click_handlers().
2016-10-27 15:49:25 -07:00
Steve Howell
8ebf48793c
minor: Remove copy/pasted comment.
2016-10-27 15:49:25 -07:00
Steve Howell
9de7551f4f
Extract topic_list.rebuild().
...
This was pulled from rebuild_recent_topics(), which still
exists to wrap passing in the stream_li parameter.
2016-10-27 15:49:25 -07:00
Steve Howell
f7e6cfc892
Extract topic_list.build_list().
...
This used to be stream_list._build_subject_list(). The code
didn't change except for one s/subject/topic fix.
2016-10-27 15:49:25 -07:00
Steve Howell
8783a0e51d
Move remove_expanded_topics() to topic_list.js.
2016-10-27 15:49:25 -07:00
Steve Howell
9b6b743a1a
Move get_topic_filter_li to topic_list.js.
...
This also brought along:
iterate_to_find (copied, see large comment explaining why)
activate_topic (extracted from a one-liner)
set_count (formerly stream_list.set_subject_count)
For get_topic_filter_li, we now pass in stream_li instead of
stream to decouple parent/child responsibilities between the
components.
Also, I made some s/subject/topic/ fixes.
2016-10-27 15:49:25 -07:00
Steve Howell
4f38cfdc7f
Extract topic_list.update_count_in_dom().
...
This creates the new topic_list.js module, and the first
function that we extract is topic_list.update_count_in_dom().
This function needed to be decoupled from some non-topic-list
stuff which was overly complicated.
2016-10-27 15:49:25 -07:00
Steve Howell
65a2f012d4
Simplify pin/unpin code path.
...
I make server_events slimmer by not handling a specific
property when subs.update_subscription_properties() should
do all the dispatching (and mostly did).
And then since update_subscription_properties() has
a "sub" already, I can call directly to stream_list code
and remove a function from subs.js. Since I lose the
wrapper function in subs.js, I rename the stream_list
function as part of this commit.
The only code that gets slightly heavier here is that
we have two lines in the 'pin_to_top' case instead of one.
2016-10-25 23:29:15 -07:00
trueskawka
0b8a2a6449
css: Create a separate file for subscriptions CSS.
...
Moves all subscriptions page CSS from zulip.css to a new file,
subscriptions.css.
2016-10-25 22:57:50 -07:00
Steve Howell
1a927a424f
Avoid passing around full_name parameter in subs.js.
...
All of the eventual callers to prepend_subscribers()
and format_member_list_elem() call people.get_by_email()
anyway, so now we do it one place. The one exception
was using page_params.fullname, which is awkwardly
different than what we call that variable elsewhere
(fullname vs. full_name).
2016-10-25 18:15:24 -07:00
Steve Howell
51f0f7c7c4
Simplify creating subscriber list.
...
We were awkwardly reversing a list to use a one-line
helper method that did exactly the opposite of what
we wanted. :) Now we just append simply.
2016-10-25 18:15:24 -07:00
Steve Howell
89b17ec2a4
Extract prepend_subscriber().
...
This is a minor change to avoid some 2-line calls in our
code. (We're about to introduce a third usage of this.)
2016-10-25 18:15:24 -07:00
Tim Abbott
14dc98d8b9
server_events: Switch to using REST-style URLs.
...
This eliminates our use of /json/get_events; we'll remove that
endpoint in a future commit.
2016-10-25 18:02:16 -07:00
Brock Whittaker
fd9a3f4609
admin: Remove values from emoji form input on success.
...
This removes the values after successfully creating a new realm emoji.
2016-10-25 17:01:03 -07:00
Brock Whittaker
bdd20f6b8b
settings: Fix Zulip Labs Spacing Issue.
...
This fixes a spacing issue with Zulip Labs not having a space before
the icon.
2016-10-25 16:59:08 -07:00