Commit Graph

92 Commits

Author SHA1 Message Date
Kartik Maji 3d77aa49db Add subscribe button in narrowed view when stream has no messages.
A temporary message appears on successful subscription, with a button
offering to unsubscribe in case the user subscribed by accident.
2016-05-18 20:06:30 -07:00
Kartik Maji 206452c867 Add stream subscription button added narrowed views.
Fixes: #273
2016-05-18 20:06:23 -07:00
Ashish Kumar b5ab4d45f9 Replace /json/get_public_streams with REST style route. 2016-04-29 12:57:57 -07:00
Vishnu Ks ae49ad383d Rename all function on MessageList to all_messages. 2016-04-25 13:45:18 -07:00
Vishnu Ks 35b0af2852 Move all_msg_list to message_list.js. 2016-04-21 17:46:21 -07:00
Vishnu Ks 35f70e9dac Move 5 legacy global variables to pointer.js.
Move recenter_pointer_on_display, suppress_scroll_pointer_update,
fast_forward_pointer, furthest_read, and server_furthest_read to
a new pointer module in pointer.js.
2016-04-12 10:56:54 -07:00
Kumar 4eced69228 Make subscriptions page error bar visible even when scrolled down.
Previously, the Zulip subscriptions page's error bar would always be
at the very top of the scrollable view, and thus would likely be out
of view when an error happened.  This fixes it by having the error bar
always placed below the search box (and thus visible regardless of
where in the scrollable streams view we are).

Fixes: #515.

[commit message and comments expanded by tabbott]
2016-04-08 21:04:43 -07:00
Allie Jones 29a4b51e52 Replace /json/subscriptions/add usage with /json/users/me/subscription. 2015-12-12 18:14:08 -08:00
Zev Benjamin d3822c5d7b Fix initial stream subscription notification settings
(imported from commit 899577caaf5f5ea9bcff43e1bd97f8c6be453ac1)
2015-02-12 15:02:26 -08:00
Waseem Daher 47873c181b Unbreak 'email hint' tooltip.
Streams no longer have ids, they have stream_ids.

(imported from commit 5080b8452711a1975d4a5bc7e647d8ef2528395b)
2014-07-29 21:46:33 -07:00
Waseem Daher c90b76444d More whitelabeling stragglers.
Most notably:
* Tutorial
* Some Handlebars templates
* Some modals

(imported from commit b9fb92fa2f0f78d1efbd8f7fcd280fa5652059a8)
2014-07-29 21:46:33 -07:00
Steve Howell 50bc5401a4 Moved loading_indicator functions to loading.js.
util.make_loading_indicator -> loading.make_indicator
util.destroy_loading_indicator -> loading.destroy_indicator

(imported from commit 8a171622a6096476dd040912d3f1460d53159f20)
2014-03-14 20:48:52 -04:00
Waseem Daher a9f01e382a Switch streams page over to use consistent buttons.
(imported from commit c4d7f658f361a759a38951349e027ac3e279fe9b)
2014-03-05 17:23:23 -05:00
Jessica McKellar fae92685ae Convert /json/subscriptions/property to supporting bulk property updates.
This includes removing GET support for the endpoint, which is unused
and doesn't map well to this being a bulk endpoint.

(imported from commit 348ff9dfa84be1661368c6d7d35aebf2ae2a9ae0)
2014-03-03 16:08:33 -05:00
Jessica McKellar 07bb7b2fee Give users the option to propagate global stream changes.
This helps the common case of not liking our default of having audible
and desktop notifications enabled, and not making users adjust the
settings on every existing stream to fix it.

(imported from commit be75edb2c1385d1bd9a289416e2dffd8007f5e0a)
2014-03-03 16:08:32 -05:00
Jessica McKellar dfc462c24d Grey out per-stream notifications when you mute the stream.
This helps clarify that muting trumps notifications in most cases.

(imported from commit 1a6df169219d9501b1232cc7d2c64abec6fd03ea)
2014-03-03 16:08:31 -05:00
Jessica McKellar 53021bf7d3 Pass per-stream notification settings between frontend and backend.
(imported from commit 42e9b80a4c55e0911d457991d53ce71ca31625bb)
2014-03-03 16:08:31 -05:00
Steve Howell 194464f596 Extract subs.mark_sub_unsubscribed().
Splitting out subs.mark_sub_unsubscribed gives the calling
code flexibility to track down the "sub" as it sees fit.

(imported from commit 4052f5a2a0f6fd58a2177f2b5961ce72f052cf94)
2014-02-10 13:23:27 -05:00
Steve Howell bb0608b55a Use real stream ids in our stream-related UI widgets.
Before this change, we were using sequentially generated ids
on the client side to identify streams.  Now we just use
the ids from the server.  The goal here is to reduce the
confusion of having two different ids attached to a stream.
Also, not that it matters a ton, but this also means that
the browser basically has an immutable id for each stream
that is future-proof to reloads, multiple create_sub calls, etc.
It also a bit easier to grep for ".stream_id" than ".id".

(imported from commit 057f9e50dfee127edfe3facd52da93108241666a)
2014-02-10 13:23:27 -05:00
Steve Howell 3a96686cbc Add stream_id to page_params.{subscriptions,unsubscribed}
This isn't used by the client yet, but it should be harmless.

(imported from commit e09ac65ca802f5cf16375b8a93d34e0dfbcb76b4)
2014-02-06 12:09:52 -05:00
Steve Howell 07e337ff8a Simplify calling mark_(un)subscribed in server_events.js
(imported from commit a5faae42642c5d2c2410021bb33917827577d9a2)
2014-02-06 12:09:52 -05:00
Steve Howell dbcc406272 Fix blueslip warning for stream email_address updates.
(imported from commit 6cc105113072eadff3781bdbf9e08e43974ade4c)
2014-02-06 12:09:51 -05:00
Tim Abbott 4b30afbb27 Fix display of unread counts.
I apparently screwed up when backing up the process_loaded_for_unread
move in a way that just lost the function.

(imported from commit 91dfcf1abc85d439274cb8b0be380e9230942ebb)
2014-01-31 17:53:11 -05:00
Tim Abbott 88fbd5d16a Split out new module message_store.js.
(imported from commit 57cf3f2b8e74d7c56e3baf75859d5b3646282225)
2014-01-31 15:57:28 -05:00
Tim Abbott 004fd0eab8 Move unread-related functions from zulip.js to unread.js.
(imported from commit efc0dd84c2cd30b0203b906af6991475d8a63985)
2014-01-31 14:59:03 -05:00
Jessica McKellar ec88b3abaf Give admins the ability to unsubscribe people from streams.
(imported from commit 7ec130a233a2976ad0be6f8a7b59c33ce0e0cf3f)
2014-01-31 11:23:14 -05:00
Jessica McKellar c4c5ac210e Convert stream member list to a handlebars template.
We had been concatenating strings.

(imported from commit 2d50d3f750a450029d39553ea9cd99ef824a149b)
2014-01-31 11:23:13 -05:00
Tim Abbott e505583f52 Split out new module people.js for tracking people.
(imported from commit fb9b769819ade25d1d3d6e452e68c7ee8651cfdd)
2014-01-30 17:32:58 -05:00
Jason Michalski 90995889fc Fix scroll when muting and unmuting streams
(imported from commit 9bd22cd12dfa50cf8fd9d87eb659a4543c5c78c4)
2014-01-30 01:48:15 -05:00
Jason Michalski b0c5e2dbd0 Fix scroll on opening subscriptions details
Move the animated scroll from body to the app div.

(imported from commit 2d2062d7a917616a60f414a633dd2f827ae840a0)
2014-01-30 01:48:15 -05:00
Jason Michalski c573efd437 Ignore stream description update events for unknown streams
Clients can receive description updates for streams which are not in
stream_data. We should ignore the updates and warn that this has
occurred.

(imported from commit 3cd5a98a133012ae27ea0f43b03cc9d8e459e49c)
2014-01-28 17:12:15 -05:00
Jason Michalski 62435e167f Add frontend stream description event handling
Update the stream page when receiving stream description change events.

(imported from commit 84f6f3846a3197f14a24611cdc06350fae90f9dd)
2014-01-24 14:47:44 -05:00
Jason Michalski 1f98c4f4ce Add support for updating the stream description
The stream description can now be updated, but the UI is not yet updated
on success.

(imported from commit f45e0a9d5138d828ae98d6d49645ab3ddc966704)
2014-01-24 14:47:44 -05:00
Jason Michalski 4104f00229 [schema] Add description to streams and display it
A description was added to the streams and it is now displayed on the
subscriptions page. It can not be set in the UI yet.

(imported from commit 81d08b65eee42dba87cd99dd5bd30106c4eb6c6a)
2014-01-24 14:47:44 -05:00
Steve Howell e63d9d32e2 Remove an unneeded call to build_stream_list().
We were calling build_stream_list() twice in succession for
no good reason.  The call to build_stream_list() inside
populate_subscriptions was pulled out to happen right after
its two callers.

(imported from commit 816ae2fd34224d8baf4e4bcccdb670143795bb42)
2014-01-24 12:23:41 -05:00
Steve Howell 4015189094 Release page_params.{un,}subbed_info during initialization.
(imported from commit 410eeb7978281ae9b9e2a28fe26dcae10a65518d)
2014-01-24 12:23:41 -05:00
Steve Howell b82ed52e7b Rename page_params.stream_list to page_params.subbed_info.
This matches page_params.unsubbed_info, plus it sets up to
add something like page_params.stream_dict without being confusing.

(imported from commit 2d40deb779e5c7a488d6952560b4119094bbc0d8)
2014-01-24 12:23:41 -05:00
Steve Howell 004d84f6e2 Redraw sidebar lock icon for stream privacy changes.
If you make a stream private/public from the Streams page
(which admins can do now), then we now correctly redraw
the swatch to have/not have the lock icon.

(imported from commit 35eb4ba12ad152e43b40f1bcf2c5db784a965dee)
2014-01-17 16:39:27 -05:00
Steve Howell ec91ece6ed Remove "Create new stream" UI for restricted users.
If a user is not allowed to create new streams, then do not
show the "Create new stream" UI at the top of the settings page.

(imported from commit b97626938d8b612317c2189f7eca0d4bd27fc274)
2014-01-16 14:43:57 -05:00
Tim Abbott 7f174213ed Add an idempotent flag to the channel module.
(imported from commit d5b867d2a8f176cae76c8b68435c4fab318d998b)
2014-01-10 21:39:00 -05:00
Jason Michalski 68335d9124 Remove hidden inputs from the tab order on the stream page
Inputs are given a tabindex of -1 in the handlebars templates, this is
added and removed in the show and hide events of the bootstrap collapse.

(imported from commit 2c54c39edc396d3d18330df4583d901690dd71fa)
2014-01-10 21:38:58 -05:00
Steve Howell 225b4c6925 Match full names in Streams autocomplete.
See #2137.  When you add a person to a stream on the Streams page,
the autocomplete will now match on the person's full name, not just
their email.

(imported from commit b250ea0dc61d54f7f2f330ef0616935d43234597)
2014-01-06 17:07:50 -05:00
Steve Howell 8606a88279 DRY up click handlers for admin stream privacy settings.
(imported from commit 1b684ae3e14647290911bd858165212adb418ca1)
2014-01-06 11:59:48 -05:00
Steve Howell badeb70be2 Allow admins to change public/private on streams.
This is the UI piece that finishes the features to let admins
make streams private or public.

(imported from commit 1a193165a6304dc358982e9850a75965fb3a03fd)
2014-01-06 11:59:48 -05:00
Steve Howell 492159c312 s/allow_rename/is_admin/ in subscription.handlebars
(imported from commit e5af8d97d0bcd63efd85e5745a8bb131b091f752)
2014-01-06 11:59:47 -05:00
Tim Abbott 795930c803 Add channel module wrapping our various JSON requests to the server.
(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
2013-12-19 16:52:47 -05:00
Tim Abbott 73643acd03 Fix muting the last stream in the home view.
(imported from commit b35e9903cdb8697a1010147854feb13060e9516d)
2013-12-18 14:30:17 -05:00
Leo Franchi baf2b5a275 Only scroll to a stream once the streams have loaded
(imported from commit 535c7900eae025a5ffc6d7167b8a56c20b1076d0)
2013-11-25 11:47:00 -05:00
Steve Howell 688cc4963c Rename sort_narrow_list() to build_stream_list().
(imported from commit 533dbe4171b859077c496f656f8c2476107b318c)
2013-11-22 14:52:04 -05:00
acrefoot dbd236b514 Autocomplete emails on streams subscriptions input
This resolves Trac #1867

(imported from commit 80ee6cc3a6b7ccacd8bd1bde71f1da8e3804ab79)
2013-11-19 16:43:37 -05:00