mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
create stream: Add div element indicating stream creation result.
Add div element to inform user whether stream is successfully created or not. This will help to inform user in case if current user is not subscribed to created stream.
This commit is contained in:
@@ -87,9 +87,9 @@ function ajaxSubscribeForCreation(stream_name, description, principals, invite_o
|
||||
announce: JSON.stringify(announce),
|
||||
},
|
||||
success: function () {
|
||||
$(".stream_change_property_info").hide();
|
||||
$("#create_stream_name").val("");
|
||||
$("#create_stream_description").val("");
|
||||
ui_report.success(i18n.t("Stream successfully created!"), $(".stream_create_info"));
|
||||
loading.destroy_indicator($('#stream_creating_indicator'));
|
||||
// The rest of the work is done via the subscribe event we will get
|
||||
},
|
||||
@@ -102,7 +102,7 @@ function ajaxSubscribeForCreation(stream_name, description, principals, invite_o
|
||||
stream_name_error.select();
|
||||
}
|
||||
|
||||
ui_report.error(i18n.t("Error creating stream"), xhr, $(".stream_change_property_info"));
|
||||
ui_report.error(i18n.t("Error creating stream"), xhr, $(".stream_create_info"));
|
||||
loading.destroy_indicator($('#stream_creating_indicator'));
|
||||
},
|
||||
});
|
||||
@@ -223,6 +223,7 @@ exports.show_new_stream_modal = function () {
|
||||
}
|
||||
|
||||
stream_name_error.clear_errors();
|
||||
$(".stream_create_info").hide();
|
||||
|
||||
$("#stream-checkboxes label.checkbox").on('change', function (e) {
|
||||
var elem = $(this);
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.alert.stream_create_info {
|
||||
margin: 10px 10px 0px 10px;
|
||||
}
|
||||
|
||||
/* alert box compoent changes */
|
||||
.alert-box {
|
||||
position: absolute;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<div class="hide" id="stream-creation" tabindex="-1" role="dialog"
|
||||
aria-label="{{t 'Stream creation' }}">
|
||||
<form id="stream_creation_form" class="form-inline">
|
||||
<div class="alert stream_create_info"></div>
|
||||
<div id="stream_creating_indicator"></div>
|
||||
<div class="stream-creation-body">
|
||||
<section class="block">
|
||||
|
||||
Reference in New Issue
Block a user