Apply stream bar color class to the compose window as well

(imported from commit 3c3f3d1073a95ceff74a571f1b2c985a7b820c8e)
This commit is contained in:
Keegan McAllister 2013-02-19 14:13:50 -05:00
parent bb5f59d310
commit ebbbc4d8c2
2 changed files with 6 additions and 3 deletions

View File

@ -59,7 +59,10 @@ function show(tabname, focus_area) {
// have that color be reflected here too.)
exports.decorate_stream_bar = function (stream_name) {
var color = subs.get_color(stream_name);
$("#stream-message .message_header_stream").css("background-color", color);
$("#stream-message .message_header_stream")
.css('background-color', color)
.removeClass(subs.color_classes)
.addClass(subs.get_color_class(color));
};
exports.start = function (msg_type, opts) {

View File

@ -12,7 +12,7 @@ var default_color = "#c2c2c2";
var next_sub_id = 0;
// Classes which could be returned by get_color_class.
var color_classes = 'dark_background';
exports.color_classes = 'dark_background';
exports.subscribed_streams = function () {
// TODO: Object.keys() compatibility
@ -39,7 +39,7 @@ function update_table_stream_color(table, stream_name, color) {
var color_class = exports.get_color_class(color);
function fixup(elem) {
elem.css("background-color", color)
.removeClass(color_classes)
.removeClass(exports.color_classes)
.addClass(color_class);
}