File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
courses/components/course-progress Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 33 < img *ngIf ="course.courseImage " [src] ="course.courseImage " core-external-content alt =""/>
44 </ div >
55 < ion-item tappable text-wrap detail-none (click) ="openCourse(course) " [title] ="course.displayname || course.fullname " class ="core-course-link " [class.item-disabled] ="course.visible == 0 " [class.core-course-more-than-title] ="(course.progress != null && course.progress >= 0) ">
6- < div class ="core-course-title " [class.core-course-with-buttons] ="courseOptionMenuEnabled || (downloadCourseEnabled && showDownload) ">
6+ < div class ="core-course-title " [class.core-course-with-buttons] ="courseOptionMenuEnabled || (downloadCourseEnabled && showDownload) " [class.core-course-with-spinner] =" (downloadCourseEnabled && prefetchCourseData.prefetchCourseIcon == 'spinner') || showSpinner " >
77 < p *ngIf ="course.categoryname || (course.displayname && course.shortname && course.fullname != course.displayname) " class ="core-course-additional-info ">
88 < span *ngIf ="course.categoryname " class ="core-course-category "> < core-format-text [text] ="course.categoryname "> </ core-format-text > </ span >
99 < span *ngIf ="course.categoryname && course.displayname && course.shortname && course.fullname != course.displayname " class ="core-course-category "> | </ span >
3030 < ion-spinner *ngIf ="(downloadCourseEnabled && prefetchCourseData.prefetchCourseIcon == 'spinner') || showSpinner "> </ ion-spinner >
3131
3232 <!-- Downloaded icon. -->
33- < ion-icon *ngIf ="downloadCourseEnabled && prefetchCourseData.downloadSucceeded && !showSpinner " class ="core-icon-downloaded " name ="cloud-done " color ="success " [attr.aria-label] ="'core.downloaded' | translate " role ="status "> </ ion-icon >
33+ < ion-icon *ngIf ="downloadCourseEnabled && prefetchCourseData.downloadSucceeded && !showSpinner " class ="core-icon-downloaded " name ="cloud-done " color ="success " [attr.aria-label] ="'core.downloaded' | translate " role ="status "> </ ion-icon >
3434
3535 <!-- Options menu. -->
3636 < button ion-button icon-only clear color ="dark " (click) ="showCourseOptionsMenu($event) " *ngIf ="!showSpinner " [attr.aria-label] ="('core.displayoptions' | translate) ">
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ ion-app.app-root core-courses-course-progress {
6262
6363 & .core-course-with-buttons {
6464 max-width : calc (100% - 50px );
65+
66+ & .core-course-with-spinner {
67+ max-width : calc (100% - 100px );
68+ }
6569 }
6670 }
6771
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ export class CoreLoginReconnectPage {
5050 protected siteConfig : any ;
5151 protected isLoggedOut : boolean ;
5252 protected siteId : string ;
53+ protected viewLeft = false ;
54+ protected eventThrown = false ;
5355
5456 constructor ( protected navCtrl : NavController ,
5557 navParams : NavParams ,
@@ -121,6 +123,14 @@ export class CoreLoginReconnectPage {
121123 } ) ;
122124 }
123125
126+ /**
127+ * View destroyed.
128+ */
129+ ionViewWillUnload ( ) : void {
130+ this . viewLeft = true ;
131+ this . eventsProvider . trigger ( CoreEventsProvider . LOGIN_SITE_UNCHECKED , { config : this . siteConfig } , this . siteId ) ;
132+ }
133+
124134 /**
125135 * Get some data (like identity providers) from the site config.
126136 *
@@ -131,6 +141,11 @@ export class CoreLoginReconnectPage {
131141
132142 this . identityProviders = this . loginHelper . getValidIdentityProviders ( config , disabledFeatures ) ;
133143 this . showForgottenPassword = ! this . loginHelper . isForgottenPasswordDisabled ( config ) ;
144+
145+ if ( ! this . eventThrown && ! this . viewLeft ) {
146+ this . eventThrown = true ;
147+ this . eventsProvider . trigger ( CoreEventsProvider . LOGIN_SITE_CHECKED , { config : config } ) ;
148+ }
134149 }
135150
136151 /**
You can’t perform that action at this time.
0 commit comments