Skip to content

Commit a4f093a

Browse files
authored
Merge pull request #4423 from crazyserver/MOBILE-3063
Mobile 3063
2 parents 1862738 + 30b86ab commit a4f093a

File tree

2 files changed

+35
-42
lines changed

2 files changed

+35
-42
lines changed

src/addons/mod/glossary/pages/entry/entry.html

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -60,43 +60,41 @@ <h2>
6060
<core-file *ngFor="let file of offlineEntry.attachments.online" [file]="file" [component]="component"
6161
[componentId]="componentId" />
6262
</div>
63-
<div *ngIf="offlineEntry && offlineEntryFiles">
64-
<core-local-file *ngFor="let file of offlineEntryFiles" [file]="file" />
65-
</div>
66-
<ion-item class="ion-text-wrap"
67-
*ngIf="onlineEntry && tagsEnabled && entry && onlineEntry.tags && onlineEntry.tags.length > 0">
68-
<ion-label>
69-
<div slot="start">{{ 'core.tag.tags' | translate }}:</div>
70-
<core-tag-list [tags]="onlineEntry.tags" />
71-
</ion-label>
72-
</ion-item>
73-
<ion-item *ngIf="canDelete || canEdit">
74-
<div slot="end">
75-
<ion-button *ngIf="canDelete" fill="clear" color="danger" (click)="deleteEntry()"
76-
[ariaLabel]="'addon.mod_glossary.deleteentry' | translate">
77-
<ion-icon slot="icon-only" name="fas-trash" aria-hidden="true" />
78-
</ion-button>
79-
<ion-button *ngIf="canEdit" fill="clear" (click)="editEntry()"
80-
[ariaLabel]="'addon.mod_glossary.editentry' | translate">
81-
<ion-icon slot="icon-only" name="fas-pen" aria-hidden="true" />
82-
</ion-button>
83-
</div>
84-
</ion-item>
85-
<ion-item class="ion-text-wrap" *ngIf="onlineEntry && !onlineEntry.approved">
86-
<ion-label>
87-
<p><em>{{ 'addon.mod_glossary.entrypendingapproval' | translate }}</em></p>
88-
</ion-label>
89-
</ion-item>
90-
<core-comments *ngIf="glossary && glossary.allowcomments && onlineEntry && onlineEntry.id > 0 && commentsEnabled"
91-
contextLevel="module" [instanceId]="glossary.coursemodule" component="mod_glossary" [itemId]="onlineEntry.id"
92-
area="glossary_entry" [courseId]="glossary.course" [showItem]="true" [title]="entry.concept" />
93-
<core-rating-rate *ngIf="glossary && ratingInfo && onlineEntry" [ratingInfo]="ratingInfo" contextLevel="module"
94-
[instanceId]="glossary.coursemodule" [itemId]="onlineEntry.id" [itemSetId]="0" [courseId]="glossary.course"
95-
[aggregateMethod]="glossary.assessed" [scaleId]="glossary.scale" [userId]="entry.userid" (onUpdate)="ratingUpdated()" />
96-
<core-rating-aggregate *ngIf="glossary && ratingInfo && onlineEntry" [ratingInfo]="ratingInfo" contextLevel="module"
97-
[instanceId]="glossary.coursemodule" [itemId]="onlineEntry.id" [courseId]="glossary.course"
98-
[aggregateMethod]="glossary.assessed" [scaleId]="glossary.scale" />
9963
</div>
64+
<div *ngIf="offlineEntry && offlineEntryFiles">
65+
<core-local-file *ngFor="let file of offlineEntryFiles" [file]="file" />
66+
</div>
67+
<ion-item class="ion-text-wrap" *ngIf="onlineEntry && tagsEnabled && entry && onlineEntry.tags && onlineEntry.tags.length > 0">
68+
<ion-label>
69+
<div slot="start">{{ 'core.tag.tags' | translate }}:</div>
70+
<core-tag-list [tags]="onlineEntry.tags" />
71+
</ion-label>
72+
</ion-item>
73+
<ion-item *ngIf="canDelete || canEdit">
74+
<div slot="end">
75+
<ion-button *ngIf="canDelete" fill="clear" color="danger" (click)="deleteEntry()"
76+
[ariaLabel]="'addon.mod_glossary.deleteentry' | translate">
77+
<ion-icon slot="icon-only" name="fas-trash" aria-hidden="true" />
78+
</ion-button>
79+
<ion-button *ngIf="canEdit" fill="clear" (click)="editEntry()" [ariaLabel]="'addon.mod_glossary.editentry' | translate">
80+
<ion-icon slot="icon-only" name="fas-pen" aria-hidden="true" />
81+
</ion-button>
82+
</div>
83+
</ion-item>
84+
<ion-item class="ion-text-wrap" *ngIf="onlineEntry && !onlineEntry.approved">
85+
<ion-label>
86+
<p><em>{{ 'addon.mod_glossary.entrypendingapproval' | translate }}</em></p>
87+
</ion-label>
88+
</ion-item>
89+
<core-comments *ngIf="glossary && glossary.allowcomments && onlineEntry && onlineEntry.id > 0 && commentsEnabled"
90+
contextLevel="module" [instanceId]="glossary.coursemodule" component="mod_glossary" [itemId]="onlineEntry.id"
91+
area="glossary_entry" [courseId]="glossary.course" [showItem]="true" [title]="entry.concept" />
92+
<core-rating-rate *ngIf="glossary && ratingInfo && onlineEntry" [ratingInfo]="ratingInfo" contextLevel="module"
93+
[instanceId]="glossary.coursemodule" [itemId]="onlineEntry.id" [itemSetId]="0" [courseId]="glossary.course"
94+
[aggregateMethod]="glossary.assessed" [scaleId]="glossary.scale" [userId]="entry.userid" (onUpdate)="ratingUpdated()" />
95+
<core-rating-aggregate *ngIf="glossary && ratingInfo && onlineEntry" [ratingInfo]="ratingInfo" contextLevel="module"
96+
[instanceId]="glossary.coursemodule" [itemId]="onlineEntry.id" [courseId]="glossary.course"
97+
[aggregateMethod]="glossary.assessed" [scaleId]="glossary.scale" />
10098
</ng-container>
10199

102100
<ion-card *ngIf="!entry" class="core-warning-card">

src/core/directives/reading-mode.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,7 @@ export class CoreReadingModeDirective implements AfterViewInit, OnDestroy {
223223
ngOnDestroy(): void {
224224
this.viewportPromise?.cancel();
225225

226-
if (this.enabled && document.body.querySelectorAll('[core-reading-mode]')) {
227-
// Do not disable if there are more instances of the directive in the DOM.
228-
229-
return;
230-
}
231-
this.disableReadingMode();
226+
// Disable reading mode should be done by the user.
232227
}
233228

234229
}

0 commit comments

Comments
 (0)