Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmf add loading div onload #4305

Merged
merged 1 commit into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 9 additions & 7 deletions contribs/gmf/apps/desktop/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
<% } %>
</head>
<body ng-class="{'gmf-profile-chart-active': !!profileChartActive}">
<header>
<div class="logo">
<img src="<%=require("./image/logo.png")%>" />
<span>by Camptocamp</span>
</div>
</header>
<div ng-show="mainCtrl.loading" class="loading-mask">
<i class="fa fa-spinner fa-spin spinner-loading-mask"></i>
</div>
<header>
<div class="logo">
<img src="<%=require("./image/logo.png")%>" />
<span>by Camptocamp</span>
</div>
</header>
<main>
<div class="gmf-app-data-panel"
<div class="gmf-app-data-panel"
ngeo-resizemap="mainCtrl.map"
ngeo-resizemap-state="mainCtrl.dataPanelActive"
Expand Down
15 changes: 9 additions & 6 deletions contribs/gmf/apps/desktop_alt/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
<% } %>
</head>
<body ng-class="{'gmf-profile-chart-active': !!profileChartActive, 'gmf-query-grid-active': !!queryGridActive}" ng-keydown="mainCtrl.onKeydown($event)">
<header>
<div class="logo">
<img src="<%=require("./image/logo.png")%>" />
<span>by Camptocamp</span>
</div>
</header>
<div ng-show="mainCtrl.loading" class="loading-mask">
<i class="fa fa-spinner fa-spin spinner-loading-mask"></i>
</div>
<header>
<div class="logo">
<img src="<%=require("./image/logo.png")%>" />
<span>by Camptocamp</span>
</div>
</header>
<main>
<div class="gmf-app-data-panel"
ngeo-resizemap="mainCtrl.map"
Expand Down
Binary file added contribs/gmf/apps/mobile/image/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion contribs/gmf/apps/mobile/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,24 @@
<link href="<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
<% } %>
</head>

<body ng-class="{'gmf-mobile-nav-is-visible': mainCtrl.navIsVisible(),
'gmf-mobile-nav-left-is-visible': mainCtrl.leftNavIsVisible(),
'gmf-mobile-nav-right-is-visible': mainCtrl.rightNavIsVisible()}">
<div ng-show="mainCtrl.loading" class="loading-mask">
<i class="fa fa-spinner fa-spin spinner-loading-mask"></i>
&nbsp;
<img src="<%=require("./image/logo.png")%>" />
</div>
<main ng-class="{'gmf-search-is-active': mainCtrl.searchOverlayVisible}">
<gmf-map
gmf-map-map="mainCtrl.map"
gmf-map-manage-resize="mainCtrl.manageResize"
gmf-map-resize-transition="mainCtrl.resizeTransition"
ngeo-map-query=""
ngeo-map-query-map="::mainCtrl.map"
ngeo-map-query-active="mainCtrl.queryActive"></gmf-map>
ngeo-map-query-active="mainCtrl.queryActive">
</gmf-map>
<gmf-displayquerywindow
gmf-displayquerywindow-featuresstyle="::mainCtrl.queryFeatureStyle"
gmf-displayquerywindow-defaultcollapsed="false">
Expand Down
Binary file added contribs/gmf/apps/mobile_alt/image/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions contribs/gmf/apps/mobile_alt/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<body ng-class="{'gmf-mobile-nav-is-visible': mainCtrl.navIsVisible(),
'gmf-mobile-nav-left-is-visible': mainCtrl.leftNavIsVisible(),
'gmf-mobile-nav-right-is-visible': mainCtrl.rightNavIsVisible()}">
<div ng-show="mainCtrl.loading" class="loading-mask">
<i class="fa fa-spinner fa-spin spinner-loading-mask"></i>
&nbsp;
<img src="<%=require("./image/logo.png")%>" />
</div>
<main ng-class="{'gmf-search-is-active': mainCtrl.searchOverlayVisible}">
<gmf-map
gmf-map-map="mainCtrl.map"
Expand Down
11 changes: 10 additions & 1 deletion contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'angular';
import 'angular-gettext';
import 'angular-dynamic-locale';
import gmfAuthenticationModule from 'gmf/authentication/module.js';

import gmfBackgroundlayerselectorComponent from 'gmf/backgroundlayerselector/component.js';
import gmfDatasourceModule from 'gmf/datasource/module.js';
import gmfDisclaimerComponent from 'gmf/disclaimer/component.js';
Expand Down Expand Up @@ -104,6 +103,16 @@ const exports = function(config, $scope, $injector) {
*/
this.gmfThemes_ = $injector.get('gmfThemes');

/**
* Checks if the themes are loaded
* @type {boolean}
* @export
*/
this.loading = true;
this.gmfThemes_.getThemesObject().finally((themes) => {
this.loading = false;
});

/**
* Permalink service
* @type {gmf.permalink.Permalink}
Expand Down
10 changes: 10 additions & 0 deletions contribs/gmf/src/controllers/desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ $border-color: darken($brand-primary, $standard-variation) !default;

@import '~gmf/layertree/desktop.scss';

.loading-mask {
display: flex;
align-items: center;
justify-content: center;
height:100%;
}
.spinner-loading-mask {
color: red;
font-size: 125px;
}

html, body {
position: relative;
Expand Down
11 changes: 11 additions & 0 deletions contribs/gmf/src/controllers/mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ $border-color: black !default;
* Mobile specific css only !
* Please, use shared less files to describe desktop-mobile shared css
*/
.spinner-loading-mask {
color: red;
font-size: 125px;
}

.loading-mask {
display: flex;
align-items: center;
justify-content: center;
height:100%;
}

main>* {
position: absolute;
Expand Down