Merge pull request #1788 from crazyserver/MOBILE-1973

Mobile 1973
main
Juan Leyva 2019-03-01 12:05:42 +01:00 committed by GitHub
commit 4c602c62bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 11 deletions

View File

@ -18,8 +18,8 @@
<ion-list *ngIf="contents && contents.length > 0"> <ion-list *ngIf="contents && contents.length > 0">
<ng-container *ngFor="let file of contents"> <ng-container *ngFor="let file of contents">
<a *ngIf="file.type === 'folder'" ion-item class="item-media" [navPush]="'AddonModFolderIndexPage'" [navParams]="{path: file.filepath, courseId: courseId, module: file}"> <a *ngIf="file.type === 'folder'" ion-item class="item-media" [navPush]="'AddonModFolderIndexPage'" [navParams]="{path: file.filepath, courseId: courseId, module: file}">
<img [src]="file.fileicon" alt="" role="presentation" item-start> <ion-icon name="folder" item-start></ion-icon>
<p>{{file.name}}</p> <h2>{{file.name}}</h2>
</a> </a>
<core-file *ngIf="file.type !== 'folder'" [file]="file" [component]="component" [componentId]="file.contextid"></core-file> <core-file *ngIf="file.type !== 'folder'" [file]="file" [component]="component" [componentId]="file.contextid"></core-file>
</ng-container> </ng-container>

View File

@ -94,7 +94,7 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy {
// Create the navigation modal. // Create the navigation modal.
this.navigationModal = modalCtrl.create('AddonModQuizNavigationModalPage', { this.navigationModal = modalCtrl.create('AddonModQuizNavigationModalPage', {
page: this page: this
}); }, { cssClass: 'core-modal-lateral' });
} }
/** /**

View File

@ -664,6 +664,22 @@ ion-app.app-root {
} }
} }
.core-#{$color-name}-item.item-input {
border-bottom: 0 !important;
&.item-md .item-inner {
@include md-input-highlight($color-base);
}
&.item-ios .item-inner {
@include ios-input-highlight($color-base);
}
&.item-wp .item-inner {
border-color: $color-base;
}
}
.core-#{$color-name}-selected-item { .core-#{$color-name}-selected-item {
@include safe-area-border-start(5px, solid, $color-base); @include safe-area-border-start(5px, solid, $color-base);
@ -721,13 +737,22 @@ ion-app.app-root {
width: 100%; width: 100%;
} }
.core-modal-fullscreen { .core-modal-fullscreen .modal-wrapper {
.modal-wrapper { position: absolute;
position: absolute; @include position(0 !important, null, null, 0 !important);
@include position(0 !important, null, null, 0 !important); display: block;
display: block; width: 100% !important;
width: 100% !important; height: 100% !important;
height: 100% !important; }
@media only screen and (min-height: 600px) and (min-width: 768px) {
.core-modal-lateral .modal-wrapper {
position: absolute;
@include position(0 !important, 0 !important, 0 !important, auto);
display: block;
height: 100% !important;
width: auto;
min-width: 400px;
} }
} }

View File

@ -243,7 +243,7 @@ export class CoreSyncBaseProvider {
if (!siteId) { if (!siteId) {
// No site ID defined, sync all sites. // No site ID defined, sync all sites.
this.logger.debug(`Try to sync '${syncFunctionLog}' in all sites.`); this.logger.debug(`Try to sync '${syncFunctionLog}' in all sites.`);
promise = this.sitesProvider.getSitesIds(); promise = this.sitesProvider.getLoggedInSitesIds();
} else { } else {
this.logger.debug(`Try to sync '${syncFunctionLog}' in site '${siteId}'.`); this.logger.debug(`Try to sync '${syncFunctionLog}' in site '${siteId}'.`);
promise = Promise.resolve([siteId]); promise = Promise.resolve([siteId]);

View File

@ -1050,6 +1050,19 @@ export class CoreSitesProvider {
}); });
} }
/**
* Get the list of IDs of sites stored and not logged out.
*
* @return {Promise<string[]>} Promise resolved when the sites IDs are retrieved.
*/
getLoggedInSitesIds(): Promise<string[]> {
return this.appDB.getRecords(this.SITES_TABLE, {loggedOut : 0}).then((sites) => {
return sites.map((site) => {
return site.id;
});
});
}
/** /**
* Get the list of IDs of sites stored. * Get the list of IDs of sites stored.
* *