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:
YJDave
2018-01-16 23:01:15 +05:30
committed by Tim Abbott
parent 3280135a4c
commit c3a289b473
3 changed files with 8 additions and 2 deletions

View File

@@ -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);