Merge pull request #4855 from tsiegleauq/firefox-file-manager

Add file manager patches for firefox
This commit is contained in:
Sean 2019-07-16 10:16:20 +02:00 committed by GitHub
commit bb33496f71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 7 deletions

View File

@ -1,4 +1,4 @@
import { Component, Input, ViewChild, OnDestroy } from '@angular/core';
import { Component, Input, ViewChild, OnDestroy, ChangeDetectionStrategy } from '@angular/core';
import { FormControl } from '@angular/forms';
import { MatSelect } from '@angular/material';
@ -34,7 +34,8 @@ import { Selectable } from '../selectable';
@Component({
selector: 'os-search-value-selector',
templateUrl: './search-value-selector.component.html',
styleUrls: ['./search-value-selector.component.scss']
styleUrls: ['./search-value-selector.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SearchValueSelectorComponent implements OnDestroy {
/**

View File

@ -91,6 +91,14 @@ export abstract class BaseViewComponent extends BaseComponent implements OnDestr
}
}
/**
* Translate alternative avoid endless loops during change detection
* @param original the original string to translate
*/
public translateSync(original: string): string {
return this.translate.instant(original);
}
/**
* To catch swipe gestures.
* Should be overwritten by children which need swipe gestures

View File

@ -51,7 +51,14 @@
</span>
<span class="visibility" *ngIf="directory && directory.inherited_access_groups_id !== true">
<span class="visible-for" *ngIf="directory.has_inherited_access_groups" translate>
<os-icon-container icon="visibility" matTooltip="{{ 'Allowed access groups for this directory' | translate }}">{{ directory.inherited_access_groups }}</os-icon-container>
<os-icon-container
icon="visibility"
matTooltip="{{ 'Allowed access groups for this directory' | translate }}"
>
<span *ngFor="let group of directory.inherited_access_groups; let last = last">
{{ translateSync(group.getTitle()) }}<span *ngIf="!last">,</span>
</span>
</os-icon-container>
</span>
</span>
</div>
@ -84,10 +91,8 @@
<!-- Info column -->
<div *pblNgridCellDef="'info'; row as mediafile" class="fill clickable" (click)="onEditFile(mediafile)">
<os-icon-container *ngIf="mediafile.access_groups.length" icon="group">
<span>
<span *ngFor="let group of mediafile.access_groups; let last = last">
{{ group.getTitle() | translate }}<span *ngIf="!last">,</span>
</span>
<span *ngFor="let group of mediafile.access_groups; let last = last">
{{ translateSync(group.getTitle()) }}<span *ngIf="!last">,</span>
</span>
</os-icon-container>
</div>