Zev Benjamin
d05ac105fe
Move clear_table into MessageList
...
(imported from commit 138c3103920413580f86fede115843ecfddc0691)
2013-03-05 12:48:32 -05:00
Leo Franchi
1300b684e5
Don't let clicking 'Show in home' change the scroll position
...
(imported from commit b760abdaa23f9549f15670b14fdaf57c45dc0aeb)
2013-02-26 14:13:35 -05:00
Leo Franchi
19d107e42b
Add a home_msg_list that contains all messages shown in the home view
...
By splitting up all_msg_list and home_msg_list, we can properly add/remove
streams from the home view without having to jump through hoops.
(imported from commit 92767197759f7519197dfc58be951b60fa823fbb)
2013-02-26 14:13:35 -05:00
Leo Franchi
64bb48421b
Fix jQuery usage and properly show/hide messages table
...
(imported from commit b6d82a6e717b23ce88407499dc8edb4d4c609270)
2013-02-25 10:04:10 -05:00
Luke O'Malley
eec2487b9e
Remove sub-and-send javascript and add 'X' to all error messages
...
(imported from commit 66fd42914e4fc33719c4f21ad401748989f20b49)
2013-02-21 22:31:23 -05:00
Zev Benjamin
9e9b4c8541
Make MessageList.selected_id an accessor method
...
(imported from commit 144d12ba8be2de02900ef06c3413f660144de8bf)
2013-02-21 13:29:17 -05:00
Zev Benjamin
e9b915c2b9
Remove global selected_message_id and persistent_message_id variables
...
Each message list now has a selected message id.
(imported from commit 041abc54ea42c636c30e39df4a2e838bb830e1aa)
2013-02-21 13:29:17 -05:00
Zev Benjamin
97160d79d4
Use the new MessageList for storing messages
...
(imported from commit 38a04d2ff504aa49189997b972318af7c944d528)
2013-02-21 13:28:23 -05:00
Leo Franchi
af58956f9e
Only show All messages link in sidebar if there are non-homeview streams
...
(imported from commit b247b651e531debbac2ad34a15b9a758de936348)
2013-02-20 14:24:49 -05:00
Leo Franchi
0e6ba5ebf4
Hide message table when adding/removing large number of entries
...
This fixes the issue where toggling show/hide on a stream in the home
view scrolls the page, because the removing and adding of rows in the
still-visible message table causes the cursor and scroll position to jump
(imported from commit 7454284a44af26379a0d2e7fce3683d98e3e4c48)
2013-02-20 13:49:24 -05:00
Leo Franchi
5d79bb6a20
Add a 'show in home view' toggle to the stream settings
...
(imported from commit af8bcc4df6fcd9f6ffed4ccb1b9be5261ffe619d)
2013-02-19 15:43:27 -05:00
Keegan McAllister
ebbbc4d8c2
Apply stream bar color class to the compose window as well
...
(imported from commit 3c3f3d1073a95ceff74a571f1b2c985a7b820c8e)
2013-02-19 15:33:35 -05:00
Keegan McAllister
bb5f59d310
Use white text for recipient labels on streams set to dark colors
...
Fixes #577 .
(imported from commit 0518e33b96bc0028fc80d533f6b8ec35fd5cdc04)
2013-02-19 15:33:35 -05:00
Luke Faraone
fd1d790b72
Don't show the stream list on Humbug for MIT.
...
(imported from commit d9f952aaeb910a7c57ce1174141686331224c8c0)
2013-02-08 12:02:05 -05:00
Luke Faraone
9c86db20fc
Add support for "labels" in the left sidebar.
...
(imported from commit 5e942a8d0c7f459148a4961736f4c5305e0c51b4)
2013-02-07 15:35:46 -05:00
Waseem Daher
5dfd4485b5
Properly sort member list on streams page.
...
(imported from commit 702e78810278584fc8b2e217523ee38ff7907471)
2013-02-07 14:17:58 -05:00
Waseem Daher
87b1c91406
Don't show success notifications on subscribe.
...
A visual change in the form will already have made it clear
that the action succeeded.
(imported from commit 114bc3a9c9ee759993b8e2c80f7d9a479d365e21)
2013-02-07 14:17:58 -05:00
Waseem Daher
bd6be38010
Slightly cleaner subscriptions page error handling.
...
Prior to this commit, successfully creating a stream (or unsubscribing
from a stream) didn't clear earlier error messages.
Here's how you could reproduce it:
* Try to subscribe to ""
(You get an error)
* Now unsubscribe from something, or subscribe
to a new stream
(The error message does not go away)
(imported from commit c3c6fa6081df00378182ff0c3499e9d907577c04)
2013-02-07 14:17:58 -05:00
Waseem Daher
bff57ad983
Only draw the subscriptions-page lock icon at render time.
...
Because a stream can never stop being invite-only, we don't
actually need any Javascript to manipulate this besides what's
in the Handlebars template.
(imported from commit 30dc3b0baf623d88d03a643f18cd411dbe3eacfb)
2013-02-05 17:24:29 -05:00
Waseem Daher
4da5c83f64
Optionally draw a lock icon by the stream name in the main view.
...
If it's an invite-only stream.
(imported from commit 02bb80fee6df2cd32ded0c6f2c2b918b8aa8ac05)
2013-02-05 17:24:29 -05:00
Waseem Daher
f20bd27cf9
Expose our invite-only bit to subs.js's stream object.
...
(imported from commit bd4d6f62331262cef5c9763d7e0e9acfd4890396)
2013-02-05 17:24:29 -05:00
Luke Faraone
77d0a07e4f
Don't add messages to zhome if the message's Stream has in_home_view=false.
...
We also introduce support narrowing to "home" and "all".
(imported from commit 53b8dea9c6045a0cde368b3163f6fd6ecde1c649)
2013-02-05 15:34:37 -05:00
Luke Faraone
3de93f2b2b
Pass stream information in initial template.
...
This allows us to remove fetch_colors() entirely, and should speed up page
load a bit.
We also JSONEncoderForHTML instead of dumps so that the result is safe
to embed.
(imported from commit 013630911960e2ac1d0bae6f5df31ad342750594)
2013-02-05 15:34:37 -05:00
Luke Faraone
e8afaa8b8e
Return a dictionary in subscriptions/list instead of a tuple.
...
This will give us flexibility in the future to add new properties to the
list.
In order to support that, we now do a list comprehension rather than just
returning the gather_subscriptions list in get_stream_colors.
(imported from commit a3c0f749a3320f647440f800105942434da08111)
2013-02-05 15:34:37 -05:00
Jessica McKellar
a9f5513181
subs: compare names using localCompare.
...
(imported from commit e4dcfe5147601221e720ea6622266402ed09f18a)
2013-02-05 10:12:00 -05:00
Jessica McKellar
4d170530cc
subscriptions: stylize invite_only streams with a lock icon.
...
(imported from commit afa99dbc61ba66a6e9662780ef8daaa3d4f9e543)
2013-02-05 10:01:45 -05:00
Jessica McKellar
6d880c2147
subscriptions: make invite-only checkbox have an effect.
...
(imported from commit 7ee5c5c88efa4ab21395c03012c2921fd3c5192e)
2013-02-05 10:01:45 -05:00
Jessica McKellar
2e3b793ff2
subs: pop up a modal to specify subscribers on new stream creation.
...
(imported from commit 0c7614f3adf4022248dced4edaddb9fac11c0792)
2013-02-05 10:01:45 -05:00
Jacob Hurwitz
6e8a972dad
MIT should not say create stream
...
(imported from commit b08de8fb5e73150032fa05bbab464a47e5a4220e)
2013-01-31 11:31:23 -05:00
Zev Benjamin
809ba94147
Hide subscriber list warnings when its associated subscription settings get shown
...
We were already hiding errors, but warnings would persist.
(imported from commit 1fcf69d2214bbfa4aaec0ef7e69632d60306176c)
2013-01-30 11:49:46 -05:00
Zev Benjamin
0c8580d991
Make adding yourself to a stream's member list the same as hitting the subscribe button
...
Fixes #733
(imported from commit 90d4dd0fec66dec552a7588702c16bac7d120495)
2013-01-30 11:49:46 -05:00
Zev Benjamin
56e29ba11c
Add animation effects when hiding/unhiding the subscription swatch and regular settings
...
Fixes #727
(imported from commit 0d794e3e06c1b5238444712f032961b841e9eedb)
2013-01-29 15:58:51 -05:00
Zev Benjamin
842edf31e8
Make the stream list have subscribed streams at the top
...
(imported from commit daa2037f97041e39cc6a54628c98d39a3c66c5bc)
2013-01-25 12:35:25 -05:00
Zev Benjamin
7fe78592fc
Hide the color swatch and regular stream settings when not subscribed
...
(imported from commit 15fb70e1e18bcb9acc5f556a33b9a574cfbb874d)
2013-01-24 17:59:03 -05:00
Zev Benjamin
69a1903f86
Add the user to the member list of a stream when they're viewing the member list
...
(imported from commit a07c9c507f45c77ff82040f4b226c1a1a0177bd3)
2013-01-24 17:59:03 -05:00
Zev Benjamin
616bd3a1e1
subs.js: Factor out code for formatting and adding users to member lists
...
(imported from commit 5f929df5c0a105a3774e9e43255d17093ea1496f)
2013-01-24 17:59:03 -05:00
Zev Benjamin
4dbd51033a
Hide subscription settings on unsubscribe
...
(imported from commit 28f08ffdf5ffc4af697563df19b4facb28e9c681)
2013-01-24 17:59:03 -05:00
Zev Benjamin
e03fe9e3f1
Expand subscription settings of newly created streams
...
(imported from commit 6171014fd712b60d83b2a0ac2953d8065c00a585)
2013-01-24 17:59:03 -05:00
Zev Benjamin
2e7d411ef8
Remove redundant success messages from subscriptions page
...
The fact that the user sees a change (the button changes or a row
appears) makes it obvious that the operation was a success. The
success messages were only serving to make the page scroll
confusingly when you couldn't see the top.
(imported from commit 471b9304f71bb8533c98d208b855d4d75c04a886)
2013-01-24 17:59:03 -05:00
Zev Benjamin
df712b7794
Move the "create new stream" form into the subscriptions table
...
(imported from commit 6cfccf01b4253423e271a08c74f6077cbc10fce3)
2013-01-24 17:59:03 -05:00
Zev Benjamin
6082222a68
Don't try to show all streams on the subscriptions page for the MIT realm
...
The query fails anyway, so this is not a safety check. This commit
makes it so that MIT users actually see their subscriptions instead
of an error.
(imported from commit ee635943728d7d9823e118d9fa51c402b1cd9bf2)
2013-01-24 17:59:03 -05:00
Zev Benjamin
3250e83e66
subs.js: rename render_subscribers() -> should_render_subscribers()
...
(imported from commit a7273c330ad94001cc008bcd06a60a0e11fb937c)
2013-01-24 17:59:03 -05:00
Zev Benjamin
0d9c2fd7f4
Show all public streams on the subscriptions page
...
(imported from commit 1f00e864a7ae653aad02328dff1b8683c5d585d9)
2013-01-24 17:59:03 -05:00
Zev Benjamin
72ebecf801
Do initial stream color fetch in subs.js instead of zephyr.js
...
(imported from commit e819e04951be037241b43c8c7061c7979038b7b8)
2013-01-24 17:59:03 -05:00
Zev Benjamin
6e05a72898
subs.js: Simplify subscriptions management
...
We now keep around the subscription information for streams that the
user unsubscribed from in stream_info and have a field that
indicates whether the user is currently subscribed.
(imported from commit 973e2f4bd4139157b03d7c1a372db93a1a5130f7)
2013-01-24 17:59:02 -05:00
Zev Benjamin
7f2252cfa8
subs.js: Factor out code to set stream color
...
(imported from commit 40c907976aef0d860d4963285be96430f719d0a7)
2013-01-24 17:59:02 -05:00
Zev Benjamin
8e7ac23d2b
Make subs.js the keeper of the streams list
...
(imported from commit 566f529757bb83ad8dd4e52d3fc8c1b90c497ca2)
2013-01-24 17:59:02 -05:00
Waseem Daher
34bc6c8034
More reasonably scroll when you switch to the subscriptions page.
...
(imported from commit 549521cb3f8125b90728d62ce0e334f5a6c1a9e5)
2013-01-22 17:18:51 -05:00
Zev Benjamin
747df69de1
Show a loading indicator while the subscriber list is loading
...
(imported from commit 83c6d64f665e82d1cff6e9654342d2a6c4bf6f36)
2013-01-17 14:19:37 -05:00
Zev Benjamin
661632673b
Show a loading indicator on the subscriptions page
...
(imported from commit f5c4847e016921827354df09a544d98ceef16bee)
2013-01-17 14:19:37 -05:00