mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	js: Convert static/js/loading.js to ES6 module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							a3e6ebb04c
						
					
				
				
					commit
					3faae49dc0
				
			@@ -1,8 +1,6 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
import render_loader from "../templates/loader.hbs";
 | 
			
		||||
 | 
			
		||||
const render_loader = require("../templates/loader.hbs");
 | 
			
		||||
 | 
			
		||||
exports.make_indicator = function (outer_container, opts) {
 | 
			
		||||
export function make_indicator(outer_container, opts) {
 | 
			
		||||
    opts = opts || {};
 | 
			
		||||
    let container = outer_container;
 | 
			
		||||
 | 
			
		||||
@@ -47,9 +45,9 @@ exports.make_indicator = function (outer_container, opts) {
 | 
			
		||||
    container.css({width: 38 + text_width, height: 0});
 | 
			
		||||
 | 
			
		||||
    outer_container.data("destroying", false);
 | 
			
		||||
};
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
exports.destroy_indicator = function (container) {
 | 
			
		||||
export function destroy_indicator(container) {
 | 
			
		||||
    if (container.data("destroying")) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
@@ -62,6 +60,4 @@ exports.destroy_indicator = function (container) {
 | 
			
		||||
    container.removeData("spinner_obj");
 | 
			
		||||
    container.empty();
 | 
			
		||||
    container.css({width: 0, height: 0});
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
window.loading = exports;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user