Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/addon/mod/glossary/pages/entry/entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ion-refresher>

<core-loading [hideUntil]="loaded">
<ng-container *ngIf="entry">
<ng-container *ngIf="entry && loaded">
<ion-item text-wrap *ngIf="showAuthor">
<ion-avatar core-user-avatar [user]="entry" (click)="openUserProfile(post.userid)" item-start></ion-avatar>
<h2><core-format-text [text]="entry.concept" contextLevel="module" [contextInstanceId]="glossary && glossary.coursemodule" [courseId]="courseId"></core-format-text></h2>
Expand Down
10 changes: 5 additions & 5 deletions src/directives/format-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class CoreFormatTextDirective implements OnChanges {
* Detect changes on input properties.
*/
ngOnChanges(changes: { [name: string]: SimpleChange }): void {
if (changes.text) {
if (changes.text || changes.filter || changes.contextLevel || changes.contextInstanceId) {
this.hideShowMore();
this.formatAndRenderContents();
}
Expand Down Expand Up @@ -302,7 +302,7 @@ export class CoreFormatTextDirective implements OnChanges {
return;
} else {
// Open a new state with the contents.
const filter = this.utils.isTrueOrOne(this.filter);
const filter = typeof this.filter != 'undefined' ? this.utils.isTrueOrOne(this.filter) : undefined;

this.textUtils.expandText(this.fullTitle || this.translate.instant('core.description'), this.text,
this.component, this.componentId, undefined, filter, this.contextLevel, this.contextInstanceId, this.courseId);
Expand Down Expand Up @@ -413,8 +413,8 @@ export class CoreFormatTextDirective implements OnChanges {
this.contextInstanceId = site.getSiteHomeId();
}

this.filter = typeof this.filter == 'undefined' ?
!!(this.contextLevel && typeof this.contextInstanceId != 'undefined') : !!this.filter;
const filter = typeof this.filter == 'undefined' ?
!!(this.contextLevel && typeof this.contextInstanceId != 'undefined') : this.utils.isTrueOrOne(this.filter);

result.options = {
clean: this.utils.isTrueOrOne(this.clean),
Expand All @@ -424,7 +424,7 @@ export class CoreFormatTextDirective implements OnChanges {
wsNotFiltered: this.utils.isTrueOrOne(this.wsNotFiltered)
};

if (this.filter) {
if (filter) {
return this.filterHelper.getFiltersAndFormatText(this.text, this.contextLevel, this.contextInstanceId,
result.options, result.siteId).then((res) => {

Expand Down