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
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
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
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
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
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