From fab6264ce6c0a27a242a460c0217ee9a216bc6e1 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 7 Sep 2017 16:41:11 +0200 Subject: [PATCH] use loading screen from pages.js --- www/common/common-interface.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index a8122dcc6..466c1aec2 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -7,10 +7,11 @@ define([ '/common/notify.js', '/common/visible.js', '/common/tippy.min.js', + '/customize/pages.js', '/common/hyperscript.js', '/bower_components/bootstrap-tokenfield/dist/bootstrap-tokenfield.js', 'css!/common/tippy.css', -], function ($, Messages, Util, AppConfig, Alertify, Notify, Visible, Tippy, h) { +], function ($, Messages, Util, AppConfig, Alertify, Notify, Visible, Tippy, Pages, h) { var UI = {}; /* @@ -171,7 +172,7 @@ define([ */ UI.spinner = function (parent) { var $target = $('', { - 'class': 'fa fa-spinner fa-pulse fa-4x fa-fw' + 'class': 'fa fa-circle-o-notch fa-spin fa-4x fa-fw', }).hide(); $(parent).append($target); @@ -212,16 +213,15 @@ define([ } $container = $loading.find('.loadingContainer'); } else { - $loading = $('
', {id: LOADING}); - $container = $('
', {'class': 'loadingContainer'}); - if (!hideLogo) { - $container.append(''); + $loading = $(Pages.loadingScreen()); + $container = $loading.find('.loadingContainer'); + if (hideLogo) { + $loading.find('img').hide(); + } else { + $loading.find('img').show(); } - var $spinner = $('
', {'class': 'spinnerContainer'}); - UI.spinner($spinner).show(); - var $text = $('

').text(loadingText || Messages.loading); - $container.append($spinner).append($text); - $loading.append($container); + var $spinner = $loading.find('.spinnerContainer'); + $spinner.show(); $('body').append($loading); } if (Messages.tips && !hideTips) {