mirror of https://github.com/zulip/zulip.git
scheduled_messages_overlay_ui: Use CSS to display no scheduled messages.
This commit is contained in:
parent
1b60019c60
commit
eb5f679121
|
@ -64,9 +64,6 @@ export function launch() {
|
||||||
url: "/json/scheduled_messages",
|
url: "/json/scheduled_messages",
|
||||||
success(data) {
|
success(data) {
|
||||||
hide_loading_indicator();
|
hide_loading_indicator();
|
||||||
if (data.scheduled_messages.length === 0) {
|
|
||||||
$(".no-overlay-messages").show();
|
|
||||||
} else {
|
|
||||||
// Saving formatted data is helpful when user is trying to edit a scheduled message.
|
// Saving formatted data is helpful when user is trying to edit a scheduled message.
|
||||||
scheduled_messages.override_scheduled_messages_data(
|
scheduled_messages.override_scheduled_messages_data(
|
||||||
format(data.scheduled_messages),
|
format(data.scheduled_messages),
|
||||||
|
@ -76,7 +73,6 @@ export function launch() {
|
||||||
});
|
});
|
||||||
const $messages_list = $("#scheduled_messages_overlay .overlay-messages-list");
|
const $messages_list = $("#scheduled_messages_overlay .overlay-messages-list");
|
||||||
$messages_list.append(rendered_list);
|
$messages_list.append(rendered_list);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
error(xhr) {
|
error(xhr) {
|
||||||
hide_loading_indicator();
|
hide_loading_indicator();
|
||||||
|
|
|
@ -12,5 +12,9 @@
|
||||||
|
|
||||||
.no-overlay-messages {
|
.no-overlay-messages {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
|
&:only-child {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue