mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	compose: Extract the 'Sending...' from template to be added with Js.
In this we change the way 'Sending...' is displayed. Instead of hardcoding it into the template we make change the paradigm so that we can have a flexible message about what's happening rather than just always saying 'Sending...'. For eg. this will help in the upcoming feature of Scheduled Messages by having this message say 'Scheduling...'.
This commit is contained in:
		@@ -47,6 +47,14 @@ exports.clear_all_everyone_warnings = function () {
 | 
			
		||||
    $("#compose-send-status").hide();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
function show_sending_indicator(whats_happening) {
 | 
			
		||||
    if (whats_happening === undefined) {
 | 
			
		||||
        whats_happening = 'Sending...';
 | 
			
		||||
    }
 | 
			
		||||
    $("#sending-indicator").html(i18n.t(whats_happening));
 | 
			
		||||
    $("#sending-indicator").show();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function show_announce_warnings() {
 | 
			
		||||
    var stream_count = stream_data.get_subscriber_count(compose_state.stream_name()) || 0;
 | 
			
		||||
 | 
			
		||||
@@ -537,7 +545,7 @@ function validate_private_message() {
 | 
			
		||||
 | 
			
		||||
exports.validate = function () {
 | 
			
		||||
    $("#compose-send-button").attr('disabled', 'disabled').blur();
 | 
			
		||||
    $("#sending-indicator").show();
 | 
			
		||||
    show_sending_indicator();
 | 
			
		||||
 | 
			
		||||
    if (/^\s*$/.test(compose_state.message_content())) {
 | 
			
		||||
        compose_error(i18n.t("You have nothing to send!"), $("#compose-textarea"));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user