MOBILE-3320 core: Improve inline loading styles
parent
7b097320cd
commit
94ec1c9734
|
@ -3,7 +3,7 @@
|
||||||
<h2>{{ 'addon.block_activitymodules.pluginname' | translate }}</h2>
|
<h2>{{ 'addon.block_activitymodules.pluginname' | translate }}</h2>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="margin">
|
||||||
<ion-item class="ion-text-wrap item-media" *ngFor="let entry of entries" detail="false" button
|
<ion-item class="ion-text-wrap item-media" *ngFor="let entry of entries" detail="false" button
|
||||||
(click)="gotoCoureListModType(entry)">
|
(click)="gotoCoureListModType(entry)">
|
||||||
<img slot="start" [src]="entry.icon" alt="" role="presentation" class="core-module-icon">
|
<img slot="start" [src]="entry.icon" alt="" role="presentation" class="core-module-icon">
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</core-context-menu-item>
|
</core-context-menu-item>
|
||||||
</core-context-menu>
|
</core-context-menu>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="margin">
|
||||||
<div class="safe-padding-horizontal" [hidden]="showFilter || !showSelectorFilter">
|
<div class="safe-padding-horizontal" [hidden]="showFilter || !showSelectorFilter">
|
||||||
<!-- "Time" selector. -->
|
<!-- "Time" selector. -->
|
||||||
<core-combobox [label]="'core.show' | translate" [selection]="selectedFilter" (onChange)="selectedChanged($event)">
|
<core-combobox [label]="'core.show' | translate" [selection]="selectedFilter" (onChange)="selectedChanged($event)">
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</core-horizontal-scroll-controls>
|
</core-horizontal-scroll-controls>
|
||||||
</div>
|
</div>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="safe-area-page">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="safe-area-page margin">
|
||||||
<core-empty-box *ngIf="courses.length == 0" image="assets/img/icons/courses.svg" inline="true"
|
<core-empty-box *ngIf="courses.length == 0" image="assets/img/icons/courses.svg" inline="true"
|
||||||
[message]="'addon.block_recentlyaccessedcourses.nocourses' | translate"></core-empty-box>
|
[message]="'addon.block_recentlyaccessedcourses.nocourses' | translate"></core-empty-box>
|
||||||
<!-- List of courses. -->
|
<!-- List of courses. -->
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</core-horizontal-scroll-controls>
|
</core-horizontal-scroll-controls>
|
||||||
</div>
|
</div>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="safe-area-page">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="safe-area-page margin">
|
||||||
<div
|
<div
|
||||||
[id]="scrollElementId"
|
[id]="scrollElementId"
|
||||||
[hidden]="!items || items.length === 0"
|
[hidden]="!items || items.length === 0"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<h2>{{ 'addon.block_sitemainmenu.pluginname' | translate }}</h2>
|
<h2>{{ 'addon.block_sitemainmenu.pluginname' | translate }}</h2>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="margin">
|
||||||
<ng-container *ngIf="mainMenuBlock">
|
<ng-container *ngIf="mainMenuBlock">
|
||||||
<ion-item class="ion-text-wrap" *ngIf="mainMenuBlock.summary">
|
<ion-item class="ion-text-wrap" *ngIf="mainMenuBlock.summary">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</core-horizontal-scroll-controls>
|
</core-horizontal-scroll-controls>
|
||||||
</div>
|
</div>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="safe-area-page">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="safe-area-page margin">
|
||||||
<core-empty-box *ngIf="courses.length == 0" image="assets/img/icons/courses.svg" inline="true"
|
<core-empty-box *ngIf="courses.length == 0" image="assets/img/icons/courses.svg" inline="true"
|
||||||
[message]="'addon.block_starredcourses.nocourses' | translate"></core-empty-box>
|
[message]="'addon.block_starredcourses.nocourses' | translate"></core-empty-box>
|
||||||
<!-- List of courses. -->
|
<!-- List of courses. -->
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</core-context-menu-item>
|
</core-context-menu-item>
|
||||||
</core-context-menu>
|
</core-context-menu>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="margin">
|
||||||
<div class="safe-padding-horizontal">
|
<div class="safe-padding-horizontal">
|
||||||
<core-combobox [selection]="filter" (onChange)="switchFilter($event)">
|
<core-combobox [selection]="filter" (onChange)="switchFilter($event)">
|
||||||
<ion-select-option class="ion-text-wrap" value="all">
|
<ion-select-option class="ion-text-wrap" value="all">
|
||||||
|
@ -35,12 +35,12 @@
|
||||||
</ion-select-option>
|
</ion-select-option>
|
||||||
</core-combobox>
|
</core-combobox>
|
||||||
</div>
|
</div>
|
||||||
<core-loading [hideUntil]="timeline.loaded" [hidden]="sort != 'sortbydates'" [fullscreen]="false">
|
<core-loading [hideUntil]="timeline.loaded" [hidden]="sort != 'sortbydates'" [fullscreen]="false" class="margin">
|
||||||
<addon-block-timeline-events [events]="timeline.events" showCourse="true" [canLoadMore]="timeline.canLoadMore"
|
<addon-block-timeline-events [events]="timeline.events" showCourse="true" [canLoadMore]="timeline.canLoadMore"
|
||||||
(loadMore)="loadMoreTimeline()" [from]="dataFrom" [to]="dataTo"></addon-block-timeline-events>
|
(loadMore)="loadMoreTimeline()" [from]="dataFrom" [to]="dataTo"></addon-block-timeline-events>
|
||||||
</core-loading>
|
</core-loading>
|
||||||
<core-loading [hideUntil]="timelineCourses.loaded" [hidden]="sort != 'sortbycourses'"
|
<core-loading [hideUntil]="timelineCourses.loaded" [hidden]="sort != 'sortbycourses'"
|
||||||
[fullscreen]="false" class="safe-area-page">
|
[fullscreen]="false" class="safe-area-page margin">
|
||||||
<ion-grid class="ion-no-padding">
|
<ion-grid class="ion-no-padding">
|
||||||
<ion-row class="ion-no-padding">
|
<ion-row class="ion-no-padding">
|
||||||
<ion-col *ngFor="let course of timelineCourses.courses" class="ion-no-padding" size="12" size-md="6">
|
<ion-col *ngFor="let course of timelineCourses.courses" class="ion-no-padding" size="12" size-md="6">
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
<!-- Scroll bottom. -->
|
<!-- Scroll bottom. -->
|
||||||
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="loaded && newMessages > 0">
|
<ion-fab slot="fixed" core-fab vertical="bottom" horizontal="end" *ngIf="loaded && newMessages > 0">
|
||||||
<ion-fab-button size="small" (click)="scrollToFirstUnreadMessage()" color="light"
|
<ion-fab-button size="small" (click)="scrollToFirstUnreadMessage()" color="light"
|
||||||
[attr.aria-label]="'addon.messages.newmessages' | translate">
|
[attr.aria-label]="'addon.messages.newmessages' | translate">
|
||||||
<ion-icon name="fas-arrow-down" aria-hidden="true"></ion-icon>
|
<ion-icon name="fas-arrow-down" aria-hidden="true"></ion-icon>
|
||||||
<span class="core-discussion-messages-badge">{{ newMessages }}</span>
|
<span class="core-discussion-messages-badge">{{ newMessages }}</span>
|
||||||
</ion-fab-button>
|
</ion-fab-button>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false">
|
<core-loading [hideUntil]="loaded" class="margin">
|
||||||
|
|
||||||
<!-- User and status of the submission. -->
|
<!-- User and status of the submission. -->
|
||||||
<ion-item class="ion-text-wrap" *ngIf="!blindMarking && user" core-user-link [userId]="submitId" [courseId]="courseId"
|
<ion-item class="ion-text-wrap" *ngIf="!blindMarking && user" core-user-link [userId]="submitId" [courseId]="courseId"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="margin">
|
||||||
<ion-item class="ion-text-wrap" (click)="editPost()" *ngIf="offlinePost || (canEdit && isOnline)">
|
<ion-item class="ion-text-wrap" (click)="editPost()" *ngIf="offlinePost || (canEdit && isOnline)">
|
||||||
<ion-icon name="fas-pen" slot="start" aria-hidden="true"></ion-icon>
|
<ion-icon name="fas-pen" slot="start" aria-hidden="true"></ion-icon>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<div class="core-loading-container" *ngIf="!hideUntil" role="status" [@coreShowHideAnimation]>
|
<div class="core-loading-container" *ngIf="!hideUntil" role="status" [@coreShowHideAnimation]>
|
||||||
<span class="core-loading-spinner">
|
<ion-spinner color="primary"></ion-spinner>
|
||||||
<ion-spinner color="primary"></ion-spinner>
|
<p class="core-loading-message" *ngIf="message" role="status">{{message}}</p>
|
||||||
<p class="core-loading-message" *ngIf="message" role="status">{{message}}</p>
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div #content class="core-loading-content" [id]="uniqueId" [attr.aria-busy]="hideUntil" [@coreShowHideAnimation]>
|
<div #content class="core-loading-content" [id]="uniqueId" [attr.aria-busy]="hideUntil" [@coreShowHideAnimation]>
|
||||||
<ng-content *ngIf="hideUntil">
|
<ng-content *ngIf="hideUntil">
|
||||||
|
|
|
@ -4,35 +4,44 @@
|
||||||
--loading-background: var(--ion-background-color);
|
--loading-background: var(--ion-background-color);
|
||||||
--loading-spinner: var(--ion-color-primary);
|
--loading-spinner: var(--ion-color-primary);
|
||||||
--loading-text-color: var(--ion-text-color);
|
--loading-text-color: var(--ion-text-color);
|
||||||
|
--loading-inline-margin: 0;
|
||||||
|
--loading-inline-min-height: 28px;
|
||||||
|
|
||||||
position: static;
|
position: static;
|
||||||
color: var(--loading-text-color);
|
color: var(--loading-text-color);
|
||||||
|
|
||||||
|
&.margin {
|
||||||
|
--loading-inline-margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.core-loading-loaded {
|
||||||
|
--loading-inline-margin: 0;
|
||||||
|
--loading-inline-min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
ion-spinner {
|
ion-spinner {
|
||||||
--color: var(--loading-spinner);
|
--color: var(--loading-spinner);
|
||||||
color: var(--color);
|
color: var(--color);
|
||||||
}
|
}
|
||||||
|
|
||||||
> .core-loading-container {
|
.core-loading-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@include position(0, 0, 0, 0);
|
@include position(0, 0, 0, 0);
|
||||||
display: table;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
justify-content: center;
|
||||||
clear: both;
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 10px 0 0 0;
|
padding: 0;
|
||||||
background-color: var(--loading-background);
|
background-color: var(--loading-background);
|
||||||
-webkit-transition: all 200ms ease-in-out;
|
@include core-transition(all, 200ms);
|
||||||
transition: all 200ms ease-in-out;
|
}
|
||||||
|
|
||||||
.core-loading-spinner {
|
.core-loading-message {
|
||||||
display: table-cell;
|
@include margin(10px, 0, 0, 0);
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.core-loading-content {
|
.core-loading-content {
|
||||||
|
@ -48,21 +57,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.core-loading-inline {
|
&.core-loading-inline {
|
||||||
display: block;
|
--loading-background: transparent;
|
||||||
|
|
||||||
.core-loading-container {
|
|
||||||
padding-top: 20px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.core-loading-loaded.core-loading-inline {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 102px;
|
display: block;
|
||||||
|
min-height: var(--loading-inline-min-height);
|
||||||
|
margin-top: var(--loading-inline-margin);
|
||||||
|
margin-bottom: var(--loading-inline-margin);
|
||||||
|
|
||||||
|
.core-loading-message {
|
||||||
|
@include margin(0, 0, 0, 10px);
|
||||||
|
}
|
||||||
|
|
||||||
.core-loading-container {
|
.core-loading-container {
|
||||||
padding-top: 10px;
|
flex-direction: row;
|
||||||
position: absolute;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host-context(ion-item) {
|
||||||
|
&.core-loading-inline {
|
||||||
|
position: static;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="blocks && blocks.length > 0 && !hideBlocks" [class.core-hide-blocks]="hideBottomBlocks" class="core-course-blocks-side">
|
<div *ngIf="blocks && blocks.length > 0 && !hideBlocks" [class.core-hide-blocks]="hideBottomBlocks" class="core-course-blocks-side">
|
||||||
<core-loading [hideUntil]="dataLoaded" [fullscreen]="false">
|
<core-loading [hideUntil]="dataLoaded" [fullscreen]="false" class="margin">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<!-- Course expand="block"s. -->
|
<!-- Course expand="block"s. -->
|
||||||
<ng-container *ngFor="let block of blocks">
|
<ng-container *ngFor="let block of blocks">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</h2>
|
</h2>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
<core-loading [hideUntil]="loaded" [fullscreen]="false">
|
<core-loading [hideUntil]="loaded" [fullscreen]="false" class="margin">
|
||||||
<ion-item *ngIf="block.contents?.content" class="ion-text-wrap core-block-content">
|
<ion-item *ngIf="block.contents?.content" class="ion-text-wrap core-block-content">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<core-format-text [text]="block.contents?.content" contextLevel="block" [contextInstanceId]="block.instanceid"
|
<core-format-text [text]="block.contents?.content" contextLevel="block" [contextInstanceId]="block.instanceid"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<core-loading *ngIf="!disabled" [hideUntil]="commentsLoaded || !displaySpinner">
|
<core-loading *ngIf="!disabled" [hideUntil]="commentsLoaded || !displaySpinner" [fullscreen]="false">
|
||||||
<div *ngIf="!countError" (click)="openComments($event)" [class.core-comments-clickable]="!disabled">
|
<div *ngIf="!countError" (click)="openComments($event)" [class.core-comments-clickable]="!disabled">
|
||||||
{{ 'core.comments.commentscount' | translate : {'$a': commentsCount} }}
|
{{ 'core.comments.commentscount' | translate : {'$a': commentsCount} }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<ion-icon name="fas-search" slot="icon-only" aria-hidden="true"></ion-icon>
|
<ion-icon name="fas-search" slot="icon-only" aria-hidden="true"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
<ion-button [hidden]="!downloadAllCoursesEnabled || !courses || courses.length < 2 || downloadAllCoursesLoading"
|
<ion-button [hidden]="!downloadAllCoursesEnabled || !courses || courses.length < 2 || downloadAllCoursesLoading"
|
||||||
(click)="prefetchCourses()" [attr.aria-label]="'core.courses.downloadcourses' | translate">
|
(click)="prefetchCourses()" [attr.aria-label]="'core.courses.downloadcourses' | translate">
|
||||||
<ion-icon [name]="downloadAllCoursesIcon" slot="icon-only" aria-hidden="true"></ion-icon>
|
<ion-icon [name]="downloadAllCoursesIcon" slot="icon-only" aria-hidden="true"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
<ion-spinner [hidden]="!downloadAllCoursesEnabled || !courses || courses.length < 2 ||
|
<ion-spinner [hidden]="!downloadAllCoursesEnabled || !courses || courses.length < 2 ||
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<core-loading [hideUntil]="dataLoaded" [fullscreen]="false">
|
<core-loading [hideUntil]="dataLoaded" [fullscreen]="false" class="margin">
|
||||||
<core-compile-html [text]="content" [javascript]="javascript" [jsData]="jsData" [forceCompile]="forceCompile" #compile>
|
<core-compile-html [text]="content" [javascript]="javascript" [jsData]="jsData" [forceCompile]="forceCompile" #compile>
|
||||||
</core-compile-html>
|
</core-compile-html>
|
||||||
</core-loading>
|
</core-loading>
|
||||||
|
|
Loading…
Reference in New Issue