mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
compose_banner: Rename classnames to main-view-banner.
Previously, we have duplicate stylings in compose banner and unread banner. This is rather messy and creates a lot of styling rules. We should define an abstraction for them. This change will rename compose_banner to main-view-banner.
This commit is contained in:
@@ -519,7 +519,7 @@ export function initialize() {
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
const $target = $(event.target).parents(".compose_banner");
|
||||
const $target = $(event.target).parents(".main-view-banner");
|
||||
const stream_id = Number.parseInt($target.attr("data-stream-id"), 10);
|
||||
const topic_name = $target.attr("data-topic-name");
|
||||
|
||||
@@ -538,7 +538,7 @@ export function initialize() {
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
const $target = $(event.target).parents(".compose_banner");
|
||||
const $target = $(event.target).parents(".main-view-banner");
|
||||
const stream_id = Number.parseInt($target.attr("data-stream-id"), 10);
|
||||
const topic_name = $target.attr("data-topic-name");
|
||||
|
||||
@@ -560,7 +560,7 @@ export function initialize() {
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
const {$banner_container} = get_input_info(event);
|
||||
const $invite_row = $(event.target).parents(".compose_banner");
|
||||
const $invite_row = $(event.target).parents(".main-view-banner");
|
||||
|
||||
const user_id = Number.parseInt($invite_row.data("user-id"), 10);
|
||||
const stream_id = Number.parseInt($invite_row.data("stream-id"), 10);
|
||||
|
||||
@@ -309,7 +309,7 @@ export function process_escape_key(e) {
|
||||
}
|
||||
|
||||
// Check for errors in compose box; close errors if they exist
|
||||
if ($(".compose_banner").length) {
|
||||
if ($("main-view-banner").length) {
|
||||
compose_banner.clear_all();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.compose_banner {
|
||||
.main-view-banner {
|
||||
margin-bottom: 20px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid;
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.compose_banner {
|
||||
.main-view-banner {
|
||||
.above_compose_banner_action_link {
|
||||
color: hsl(200deg 100% 50%);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div
|
||||
class="compose_banner {{banner_type}} {{classname}}"
|
||||
class="main-view-banner {{banner_type}} {{classname}}"
|
||||
{{#if user_id}}data-user-id="{{user_id}}"{{/if}}
|
||||
{{#if stream_id}}data-stream-id="{{stream_id}}"{{/if}}
|
||||
{{#if topic_name}}data-topic-name="{{topic_name}}"{{/if}}>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="above_compose_banner compose_banner success {{classname}}">
|
||||
<div class="above_compose_banner main-view-banner success {{classname}}">
|
||||
<p>
|
||||
{{banner_text}}
|
||||
{{#if link_text}} <a class="above_compose_banner_action_link" {{#if above_composebox_narrow_url}}href="{{above_composebox_narrow_url}}"{{/if}} data-message-id="{{link_msg_id}}">{{link_text}}</a>{{/if}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div
|
||||
class="compose_banner success message_scheduled_success_compose_banner"
|
||||
class="main-view-banner success message_scheduled_success_compose_banner"
|
||||
data-scheduled-message-id="{{scheduled_message_id}}">
|
||||
<p class="banner_content">{{t 'Your message has been scheduled for {deliver_at}.' }}
|
||||
<a href="#scheduled">{{t "View scheduled messages" }}</a>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="upload_banner file_{{file_id}} compose_banner {{banner_type}}">
|
||||
<div class="upload_banner file_{{file_id}} main-view-banner {{banner_type}}">
|
||||
<div class="moving_bar"></div>
|
||||
<p class="upload_msg">{{banner_text}}</p>
|
||||
<a role="button" class="zulip-icon zulip-icon-close main-view-banner-close-button"></a>
|
||||
|
||||
Reference in New Issue
Block a user