RED-9762: removed open component view preference.
This commit is contained in:
parent
3544538c19
commit
8a3d372223
@ -11,12 +11,6 @@
|
|||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="config.IS_DOCUMINE" class="iqser-input-group">
|
|
||||||
<mat-slide-toggle color="primary" formControlName="openScmDialogByDefault">
|
|
||||||
{{ 'preferences-screen.form.open-structured-view-by-default' | translate }}
|
|
||||||
</mat-slide-toggle>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *allow="roles.getTables" class="iqser-input-group">
|
<div *allow="roles.getTables" class="iqser-input-group">
|
||||||
<label [translate]="'preferences-screen.form.table-extraction-type'"></label>
|
<label [translate]="'preferences-screen.form.table-extraction-type'"></label>
|
||||||
<input formControlName="tableExtractionType" />
|
<input formControlName="tableExtractionType" />
|
||||||
|
|||||||
@ -23,7 +23,6 @@ import { MatCheckbox } from '@angular/material/checkbox';
|
|||||||
interface PreferencesForm {
|
interface PreferencesForm {
|
||||||
// preferences
|
// preferences
|
||||||
autoExpandFiltersOnActions: boolean;
|
autoExpandFiltersOnActions: boolean;
|
||||||
openScmDialogByDefault: boolean;
|
|
||||||
tableExtractionType: string;
|
tableExtractionType: string;
|
||||||
// warnings preferences
|
// warnings preferences
|
||||||
loadAllAnnotationsWarning: boolean;
|
loadAllAnnotationsWarning: boolean;
|
||||||
@ -78,7 +77,6 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit {
|
|||||||
this.form = this._formBuilder.group({
|
this.form = this._formBuilder.group({
|
||||||
// preferences
|
// preferences
|
||||||
autoExpandFiltersOnActions: [this.userPreferenceService.getAutoExpandFiltersOnActions()],
|
autoExpandFiltersOnActions: [this.userPreferenceService.getAutoExpandFiltersOnActions()],
|
||||||
openScmDialogByDefault: [this.userPreferenceService.getOpenScmDialogByDefault()],
|
|
||||||
tableExtractionType: [this.userPreferenceService.getTableExtractionType()],
|
tableExtractionType: [this.userPreferenceService.getTableExtractionType()],
|
||||||
// warnings preferences
|
// warnings preferences
|
||||||
loadAllAnnotationsWarning: [this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning)],
|
loadAllAnnotationsWarning: [this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning)],
|
||||||
@ -105,9 +103,6 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit {
|
|||||||
if (this.form.controls.autoExpandFiltersOnActions.value !== this.userPreferenceService.getAutoExpandFiltersOnActions()) {
|
if (this.form.controls.autoExpandFiltersOnActions.value !== this.userPreferenceService.getAutoExpandFiltersOnActions()) {
|
||||||
await this.userPreferenceService.toggleAutoExpandFiltersOnActions();
|
await this.userPreferenceService.toggleAutoExpandFiltersOnActions();
|
||||||
}
|
}
|
||||||
if (this.form.controls.openScmDialogByDefault.value !== this.userPreferenceService.getOpenScmDialogByDefault()) {
|
|
||||||
await this.userPreferenceService.toggleOpenScmDialogByDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.form.controls.tableExtractionType.value !== this.userPreferenceService.getTableExtractionType()) {
|
if (this.form.controls.tableExtractionType.value !== this.userPreferenceService.getTableExtractionType()) {
|
||||||
await this.userPreferenceService.save(PreferencesKeys.tableExtractionType, this.form.controls.tableExtractionType.value);
|
await this.userPreferenceService.save(PreferencesKeys.tableExtractionType, this.form.controls.tableExtractionType.value);
|
||||||
@ -137,7 +132,6 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit {
|
|||||||
#patchValues() {
|
#patchValues() {
|
||||||
this.form.patchValue({
|
this.form.patchValue({
|
||||||
autoExpandFiltersOnActions: this.userPreferenceService.getAutoExpandFiltersOnActions(),
|
autoExpandFiltersOnActions: this.userPreferenceService.getAutoExpandFiltersOnActions(),
|
||||||
openScmDialogByDefault: this.userPreferenceService.getOpenScmDialogByDefault(),
|
|
||||||
tableExtractionType: this.userPreferenceService.getTableExtractionType(),
|
tableExtractionType: this.userPreferenceService.getTableExtractionType(),
|
||||||
loadAllAnnotationsWarning: this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning),
|
loadAllAnnotationsWarning: this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning),
|
||||||
helpModeDialog: this.userPreferenceService.getBool(KEYS.helpModeDialog),
|
helpModeDialog: this.userPreferenceService.getBool(KEYS.helpModeDialog),
|
||||||
|
|||||||
@ -10,7 +10,6 @@ export const PreferencesKeys = {
|
|||||||
filesListingMode: 'Files-Listing-Mode',
|
filesListingMode: 'Files-Listing-Mode',
|
||||||
autoExpandFiltersOnActions: 'Auto-Expand-Filters-On-Actions',
|
autoExpandFiltersOnActions: 'Auto-Expand-Filters-On-Actions',
|
||||||
loadAllAnnotationsWarning: 'Load-All-Annotations-Warning',
|
loadAllAnnotationsWarning: 'Load-All-Annotations-Warning',
|
||||||
openScmDialogByDefault: 'Open-Structured-Component-Management-By-Default',
|
|
||||||
tableExtractionType: 'Table-Extraction-Type',
|
tableExtractionType: 'Table-Extraction-Type',
|
||||||
addRedactionDefaultOption: 'Add-Redaction-Default',
|
addRedactionDefaultOption: 'Add-Redaction-Default',
|
||||||
addHintDefaultOption: 'Add-Hint-Default',
|
addHintDefaultOption: 'Add-Hint-Default',
|
||||||
@ -65,15 +64,6 @@ export class UserPreferenceService extends IqserUserPreferenceService {
|
|||||||
await this.save(PreferencesKeys.autoExpandFiltersOnActions, nextValue);
|
await this.save(PreferencesKeys.autoExpandFiltersOnActions, nextValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
getOpenScmDialogByDefault(): boolean {
|
|
||||||
return this._getAttribute(PreferencesKeys.openScmDialogByDefault, 'false') === 'true';
|
|
||||||
}
|
|
||||||
|
|
||||||
async toggleOpenScmDialogByDefault(): Promise<void> {
|
|
||||||
const nextValue = (!this.getOpenScmDialogByDefault()).toString();
|
|
||||||
await this.save(PreferencesKeys.openScmDialogByDefault, nextValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
getBool(key: string, defaultValue = 'false') {
|
getBool(key: string, defaultValue = 'false') {
|
||||||
return this._getAttribute(key, defaultValue) === 'true';
|
return this._getAttribute(key, defaultValue) === 'true';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user