mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
Don't show the stream list on Humbug for MIT.
(imported from commit d9f952aaeb910a7c57ce1174141686331224c8c0)
This commit is contained in:
@@ -120,10 +120,10 @@ var people_list = [
|
|||||||
{# Special-case this link so we don't actually go to page top. #}
|
{# Special-case this link so we don't actually go to page top. #}
|
||||||
<li id="filthome" class="active-filter"><a href="#" onclick="narrow.deactivate();return false" >Home</a></li>
|
<li id="filthome" class="active-filter"><a href="#" onclick="narrow.deactivate();return false" >Home</a></li>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr id="stream_filters_sep">
|
||||||
<div id="stream_filters">
|
<div id="stream_filters">
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr id="personal_filters_sep">
|
||||||
<div id="personal_filters">
|
<div id="personal_filters">
|
||||||
<li id="filtpers"><a href="#narrow/is/private-message">All private messages</a></li>
|
<li id="filtpers"><a href="#narrow/is/private-message">All private messages</a></li>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ function create_sub(stream_name, attrs) {
|
|||||||
subscribed: true, in_home_view: true, invite_only: false}, attrs);
|
subscribed: true, in_home_view: true, invite_only: false}, attrs);
|
||||||
stream_info[stream_name.toLowerCase()] = sub;
|
stream_info[stream_name.toLowerCase()] = sub;
|
||||||
if (sub.subscribed) {
|
if (sub.subscribed) {
|
||||||
|
// This will do nothing on MIT
|
||||||
ui.add_narrow_filter(stream_name, "stream", "#narrow/stream/" + encodeURIComponent(stream_name));
|
ui.add_narrow_filter(stream_name, "stream", "#narrow/stream/" + encodeURIComponent(stream_name));
|
||||||
}
|
}
|
||||||
return sub;
|
return sub;
|
||||||
@@ -140,6 +141,7 @@ function mark_subscribed(stream_name, attrs) {
|
|||||||
add_sub_to_table(sub);
|
add_sub_to_table(sub);
|
||||||
} else if (! sub.subscribed) {
|
} else if (! sub.subscribed) {
|
||||||
sub.subscribed = true;
|
sub.subscribed = true;
|
||||||
|
// This will do nothing on MIT
|
||||||
ui.add_narrow_filter(stream_name, "stream", "#narrow/stream/" + encodeURIComponent(stream_name));
|
ui.add_narrow_filter(stream_name, "stream", "#narrow/stream/" + encodeURIComponent(stream_name));
|
||||||
var button = button_for_sub(sub);
|
var button = button_for_sub(sub);
|
||||||
if (button.length !== 0) {
|
if (button.length !== 0) {
|
||||||
|
|||||||
@@ -259,6 +259,12 @@ function resizehandler(e) {
|
|||||||
$(function () {
|
$(function () {
|
||||||
// When the user's profile picture loads this can change the height of the sidebar
|
// When the user's profile picture loads this can change the height of the sidebar
|
||||||
$("img.gravatar-profile").bind('load', resizehandler);
|
$("img.gravatar-profile").bind('load', resizehandler);
|
||||||
|
|
||||||
|
// We don't have a stream list at MIT.
|
||||||
|
if (domain === "mit.edu") {
|
||||||
|
$("#stream_filters").remove();
|
||||||
|
$("#stream_filters_sep").remove();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var old_label;
|
var old_label;
|
||||||
@@ -873,6 +879,18 @@ function sort_narrow_list() {
|
|||||||
exports.add_narrow_filter = function(name, type, uri) {
|
exports.add_narrow_filter = function(name, type, uri) {
|
||||||
var list_item;
|
var list_item;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We don't give MIT a stream list currently since that would likely be
|
||||||
|
* overwhelming for users given the vast number of streams MIT users are
|
||||||
|
* commonly subscribed to.
|
||||||
|
*
|
||||||
|
* This will not be as much of an issue once we do prioritization of streams
|
||||||
|
* in the list.
|
||||||
|
*/
|
||||||
|
if (domain === "mit.edu" && type === "stream") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($("#" + type + "_filters li[data-name='" + encodeURIComponent(name) + "']").length) {
|
if ($("#" + type + "_filters li[data-name='" + encodeURIComponent(name) + "']").length) {
|
||||||
// already exists
|
// already exists
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user