MOBILE-2689 courses: Show download spinner separate from menu
parent
9391a8a24a
commit
c716d1a0b1
|
@ -1,5 +1,6 @@
|
||||||
<ion-item text-wrap (click)="action('download')" *ngIf="downloadCourseEnabled">
|
<ion-item text-wrap (click)="action('download')" *ngIf="downloadCourseEnabled">
|
||||||
<ion-icon [name]="prefetch.prefetchCourseIcon" item-start></ion-icon>
|
<ion-icon *ngIf="prefetch.prefetchCourseIcon != 'spinner'" [name]="prefetch.prefetchCourseIcon" item-start></ion-icon>
|
||||||
|
<ion-spinner *ngIf="prefetch.prefetchCourseIcon == 'spinner'" item-start></ion-spinner>
|
||||||
<h2>{{ prefetch.title | translate }}</h2>
|
<h2>{{ prefetch.title | translate }}</h2>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item text-wrap (click)="action('hide')" *ngIf="!course.hidden">
|
<ion-item text-wrap (click)="action('hide')" *ngIf="!course.hidden">
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="core-button-spinner" *ngIf="courseOptionMenuEnabled">
|
<div class="core-button-spinner" *ngIf="courseOptionMenuEnabled">
|
||||||
<!-- Options menu. -->
|
|
||||||
<button ion-button icon-only clear color="dark" (click)="showCourseOptionsMenu($event)" *ngIf="prefetchCourseData.prefetchCourseIcon != 'spinner' && !showSpinner">
|
|
||||||
<core-icon name="more"></core-icon>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Download course spinner. -->
|
<!-- Download course spinner. -->
|
||||||
<ion-spinner *ngIf="prefetchCourseData.prefetchCourseIcon == 'spinner' || showSpinner"></ion-spinner>
|
<ion-spinner *ngIf="prefetchCourseData.prefetchCourseIcon == 'spinner' || showSpinner"></ion-spinner>
|
||||||
|
|
||||||
|
<!-- Options menu. -->
|
||||||
|
<button ion-button icon-only clear color="dark" (click)="showCourseOptionsMenu($event)" *ngIf="!showSpinner">
|
||||||
|
<core-icon name="more"></core-icon>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item text-wrap *ngIf="course.summary && course.summary.length" [class.item-disabled]="course.visible == 0">
|
<ion-item text-wrap *ngIf="course.summary && course.summary.length" [class.item-disabled]="course.visible == 0">
|
||||||
|
|
|
@ -57,6 +57,14 @@ ion-app.app-root core-courses-course-progress {
|
||||||
&.core-course-more-than-title {
|
&.core-course-more-than-title {
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.core-button-spinner .spinner {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-button[icon-only] {
|
||||||
|
min-width: 50px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
@include margin(0, 0, 0, null);
|
@include margin(0, 0, 0, null);
|
||||||
|
|
|
@ -178,7 +178,9 @@ export class CoreCoursesCourseProgressComponent implements OnInit, OnDestroy {
|
||||||
if (action) {
|
if (action) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'download':
|
case 'download':
|
||||||
|
if (this.prefetchCourseData.prefetchCourseIcon != 'spinner') {
|
||||||
this.prefetchCourse(e);
|
this.prefetchCourse(e);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'hide':
|
case 'hide':
|
||||||
this.setCourseHidden(true);
|
this.setCourseHidden(true);
|
||||||
|
|
Loading…
Reference in New Issue