From 1b25d9c37643a6d04756b3ea0ccff2cf511fcc6c Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Sun, 13 Mar 2016 21:07:25 +0100 Subject: [PATCH 1/2] Added loading spinner icon. Only for loading resolve object from server. --- openslides/core/static/css/app.css | 4 ++++ openslides/core/static/js/core/site.js | 20 ++++++++++++++++++++ openslides/core/static/templates/index.html | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index accc49747..d2defa24e 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -545,6 +545,10 @@ img { margin-top: 25px; } +.spacer-bottom { + margin-bottom: 7px; +} + .spacer-right { margin-right: 5px; } diff --git a/openslides/core/static/js/core/site.js b/openslides/core/static/js/core/site.js index e87b45de4..6c17afce0 100644 --- a/openslides/core/static/js/core/site.js +++ b/openslides/core/static/js/core/site.js @@ -432,6 +432,26 @@ angular.module('OpenSlidesApp.core.site', [ } ]) +.directive('routeLoadingIndicator', [ + '$rootScope', + '$state', + function($rootScope, $state) { + return { + restrict: 'E', + template: "

Loading ...

", + link: function(scope, elem, attrs) { + scope.isRouteLoading = false; + $rootScope.$on('$stateChangeStart', function() { + scope.isRouteLoading = true; + }); + $rootScope.$on('$stateChangeSuccess', function() { + scope.isRouteLoading = false; + }); + } + }; + } +]) + .controller('MainMenuCtrl', [ '$scope', 'mainMenu', diff --git a/openslides/core/static/templates/index.html b/openslides/core/static/templates/index.html index f771fa36c..0061c4b11 100644 --- a/openslides/core/static/templates/index.html +++ b/openslides/core/static/templates/index.html @@ -161,7 +161,8 @@
-
+ +