mirror of https://github.com/zulip/zulip.git
Add a method for switching to full width and a feature flag to enable full width on staging.
(imported from commit bc7b3a5c8c17ca84e192a63711663cd605425b7f)
This commit is contained in:
parent
07cbbfdfda
commit
30de0b3e77
|
@ -48,6 +48,7 @@ exports.clicking_notification_causes_narrow = page_params.staging || is_customer
|
|||
_.contains(['customer25.invalid'], page_params.domain);
|
||||
|
||||
exports.experimental_background = page_params.staging || _.contains(['mit.edu'], page_params.domain);
|
||||
exports.full_width = page_params.staging;
|
||||
|
||||
exports.show_digest_email_setting = page_params.staging;
|
||||
|
||||
|
|
|
@ -851,6 +851,17 @@ exports.switchBackground = function (homecolor, narrowcolor) {
|
|||
return ("Background has been changed");
|
||||
};
|
||||
|
||||
/* This method allows an advanced user to use the console
|
||||
* to switch the application to span full width of the browser.
|
||||
*/
|
||||
exports.switchToFullWidth = function () {
|
||||
$("#full-width-style").remove();
|
||||
$('head').append('<style id="full-width-style" type="text/css">' +
|
||||
'#home .alert-bar, .recipient-bar-content, #compose-container, .app-main, .header-main { max-width: none; }' +
|
||||
'</style>');
|
||||
return ("Switched to full width");
|
||||
};
|
||||
|
||||
/* END OF EXPERIMENTS */
|
||||
|
||||
$(function () {
|
||||
|
@ -1624,6 +1635,10 @@ $(function () {
|
|||
exports.switchBackground();
|
||||
}
|
||||
|
||||
if (feature_flags.full_width) {
|
||||
exports.switchToFullWidth();
|
||||
}
|
||||
|
||||
// initialize other stuff
|
||||
composebox_typeahead.initialize();
|
||||
search.initialize();
|
||||
|
|
Loading…
Reference in New Issue