Browse Source

Merge branch 'master' of github.com:Squidex/squidex into feature_permissions

# Conflicts:
#	src/Squidex/app/shell/pages/internal/profile-menu.component.ts
pull/332/head
Sebastian Stehle 7 years ago
parent
commit
936b356e19
  1. 8
      src/Squidex/app/features/assets/pages/assets-page.component.html
  2. 10
      src/Squidex/app/features/content/shared/assets-editor.component.ts
  3. 14
      src/Squidex/app/features/content/shared/references-editor.component.ts
  4. 30
      src/Squidex/app/features/schemas/pages/schema/field.component.ts
  5. 2
      src/Squidex/app/framework/angular/forms/control-errors.component.ts
  6. 4
      src/Squidex/app/framework/angular/forms/date-time-editor.component.ts
  7. 4
      src/Squidex/app/framework/angular/forms/dropdown.component.ts
  8. 4
      src/Squidex/app/framework/angular/forms/slider.component.ts
  9. 2
      src/Squidex/app/framework/angular/forms/tag-editor.component.ts
  10. 4
      src/Squidex/app/framework/angular/forms/toggle.component.ts
  11. 8
      src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts
  12. 2
      src/Squidex/app/framework/angular/modals/modal-dialog.component.ts
  13. 2
      src/Squidex/app/framework/angular/modals/onboarding-tooltip.component.ts
  14. 2
      src/Squidex/app/framework/angular/modals/tooltip.component.ts
  15. 4
      src/Squidex/app/shared/components/asset.component.ts
  16. 2
      src/Squidex/app/shared/components/geolocation-editor.component.ts
  17. 4
      src/Squidex/app/shell/pages/internal/profile-menu.component.ts
  18. 12
      src/Squidex/app/theme/_panels.scss

8
src/Squidex/app/features/assets/pages/assets-page.component.html

@ -51,8 +51,10 @@
<sqx-assets-list [state]="assetsState" [isListView]="isListView"></sqx-assets-list>
</ng-container>
<ng-container sidebar>
<ng-container sidebar>
<div class="sidebar-section">
<h3>Tags</h3>
<a class="sidebar-item" (click)="resetTags()" [class.active]="assetsState.isTagSelectionEmpty()">
<div class="row">
<div class="col">
@ -60,10 +62,6 @@
</div>
</div>
</a>
</div>
<div class="sidebar-section">
<h3>Tags</h3>
<a class="sidebar-item" *ngFor="let tag of assetsState.tags | async" (click)="toggleTag(tag.name)" [class.active]="assetsState.isTagSelected(tag.name)">
<div class="row">

10
src/Squidex/app/features/content/shared/assets-editor.component.ts

@ -65,24 +65,24 @@ export class AssetsEditorComponent implements ControlValueAccessor {
this.updateValue();
}
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}, () => {
this.oldAssets = ImmutableArray.empty();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
});
}
} else {
this.oldAssets = ImmutableArray.empty();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
}
public setDisabledState(isDisabled: boolean): void {
this.isDisabled = isDisabled;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public registerOnChange(fn: any) {
@ -140,7 +140,7 @@ export class AssetsEditorComponent implements ControlValueAccessor {
this.callTouched();
this.callChange(ids);
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public sort(assets: AssetDto[]) {

14
src/Squidex/app/features/content/shared/references-editor.component.ts

@ -74,11 +74,11 @@ export class ReferencesEditorComponent implements ControlValueAccessor, OnInit {
.subscribe(dto => {
this.schema = dto;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}, () => {
this.isInvalidSchema = true;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
});
}
@ -95,24 +95,24 @@ export class ReferencesEditorComponent implements ControlValueAccessor, OnInit {
this.updateValue();
}
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}, () => {
this.contentItems = ImmutableArray.empty();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
});
}
} else {
this.contentItems = ImmutableArray.empty();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
}
public setDisabledState(isDisabled: boolean): void {
this.isDisabled = isDisabled;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public registerOnChange(fn: any) {
@ -161,6 +161,6 @@ export class ReferencesEditorComponent implements ControlValueAccessor, OnInit {
this.callTouched();
this.callChange(ids);
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
}

30
src/Squidex/app/features/schemas/pages/schema/field.component.ts

@ -5,7 +5,7 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { Component, Input, OnInit } from '@angular/core';
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { onErrorResumeNext } from 'rxjs/operators';
@ -32,7 +32,7 @@ import {
fadeAnimation
]
})
export class FieldComponent implements OnInit {
export class FieldComponent implements OnChanges {
@Input()
public field: NestedFieldDto | RootFieldDto;
@ -50,7 +50,7 @@ export class FieldComponent implements OnInit {
public isEditing = false;
public selectedTab = 0;
public editForm: EditFieldForm;
public editForm = new EditFieldForm(this.formBuilder);
public addFieldDialog = new DialogModel();
@ -60,25 +60,33 @@ export class FieldComponent implements OnInit {
) {
}
public ngOnInit() {
this.editForm = new EditFieldForm(this.formBuilder);
this.editForm.load(this.field.properties);
public ngOnChanges(changes: SimpleChanges) {
if (changes['field']) {
this.editForm.load(this.field.properties);
if (this.field.isLocked) {
this.editForm.form.disable();
if (this.field.isLocked) {
this.editForm.form.disable();
}
}
}
public toggleEditing() {
this.isEditing = !this.isEditing;
if (changes['schema']) {
this.isEditing = false;
this.selectedTab = 0;
}
}
public selectTab(tab: number) {
this.selectedTab = tab;
}
public toggleEditing() {
this.isEditing = !this.isEditing;
}
public cancel() {
this.isEditing = false;
this.editForm.load(this.field);
}

2
src/Squidex/app/framework/angular/forms/control-errors.component.ts

@ -152,6 +152,6 @@ export class ControlErrorsComponent implements OnChanges, OnDestroy {
this.errorMessages = errors;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
}

4
src/Squidex/app/framework/angular/forms/date-time-editor.component.ts

@ -122,7 +122,7 @@ export class DateTimeEditorComponent implements ControlValueAccessor, OnDestroy,
this.timeControl.enable({ emitEvent: false });
}
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public registerOnChange(fn: any) {
@ -144,7 +144,7 @@ export class DateTimeEditorComponent implements ControlValueAccessor, OnDestroy,
this.updateValue();
this.touched();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
});

4
src/Squidex/app/framework/angular/forms/dropdown.component.ts

@ -68,13 +68,13 @@ export class DropdownComponent implements AfterContentInit, ControlValueAccessor
public writeValue(obj: any) {
this.selectIndex(this.items && obj ? this.items.indexOf(obj) : 0);
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public setDisabledState(isDisabled: boolean): void {
this.isDisabled = isDisabled;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public registerOnChange(fn: any) {

4
src/Squidex/app/framework/angular/forms/slider.component.ts

@ -59,13 +59,13 @@ export class SliderComponent implements ControlValueAccessor {
this.updateThumbPosition();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public setDisabledState(isDisabled: boolean): void {
this.isDisabled = isDisabled;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public registerOnChange(fn: any) {

2
src/Squidex/app/framework/angular/forms/tag-editor.component.ts

@ -185,7 +185,7 @@ export class TagEditorComponent implements AfterViewInit, ControlValueAccessor,
this.items = [];
}
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public setDisabledState(isDisabled: boolean): void {

4
src/Squidex/app/framework/angular/forms/toggle.component.ts

@ -36,13 +36,13 @@ export class ToggleComponent implements ControlValueAccessor {
public writeValue(obj: any) {
this.isChecked = Types.isBoolean(obj) ? obj : null;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public setDisabledState(isDisabled: boolean): void {
this.isDisabled = isDisabled;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
public registerOnChange(fn: any) {

8
src/Squidex/app/framework/angular/modals/dialog-renderer.component.ts

@ -56,7 +56,7 @@ export class DialogRendererComponent implements OnDestroy, OnInit {
if (!isOpen) {
this.cancel();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
});
@ -70,7 +70,7 @@ export class DialogRendererComponent implements OnDestroy, OnInit {
}, notification.displayTime);
}
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
});
this.dialogsSubscription =
@ -81,7 +81,7 @@ export class DialogRendererComponent implements OnDestroy, OnInit {
this.dialogRequest = request;
this.dialogView.show();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
});
}
@ -107,7 +107,7 @@ export class DialogRendererComponent implements OnDestroy, OnInit {
if (index >= 0) {
this.notifications.splice(index, 1);
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
}
}

2
src/Squidex/app/framework/angular/modals/modal-dialog.component.ts

@ -64,6 +64,6 @@ export class ModalDialogComponent implements AfterViewInit {
this.hasTabs = this.tabsElement.nativeElement.children.length > 0;
this.hasFooter = this.footerElement.nativeElement.children.length > 0;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
}

2
src/Squidex/app/framework/angular/modals/onboarding-tooltip.component.ts

@ -75,7 +75,7 @@ export class OnboardingTooltipComponent implements OnDestroy, OnInit {
if (this.isSameOrParent(fromPoint)) {
this.tooltipModal.show();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
this.closeTimer = setTimeout(() => {
this.hideThis();

2
src/Squidex/app/framework/angular/modals/tooltip.component.ts

@ -54,7 +54,7 @@ export class TooltipComponent implements OnDestroy, OnInit {
this.renderer.listen(this.target, 'mouseenter', () => {
this.modal.show();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
});
this.targetMouseLeaveListener =

4
src/Squidex/app/shared/components/asset.component.ts

@ -213,7 +213,7 @@ export class AssetComponent implements OnDestroy, OnInit {
private setProgress(progress: number) {
this.progress = progress;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
private updateAsset(asset: AssetDto, emitEvent: boolean) {
@ -228,6 +228,6 @@ export class AssetComponent implements OnDestroy, OnInit {
this.renameCancel();
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
}

2
src/Squidex/app/shared/components/geolocation-editor.component.ts

@ -105,7 +105,7 @@ export class GeolocationEditorComponent implements ControlValueAccessor, AfterVi
this.geolocationForm.enable();
}
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
}
private setDisabledStateOSM(isDisabled: boolean): void {

4
src/Squidex/app/shell/pages/internal/profile-menu.component.ts

@ -52,8 +52,8 @@ export class ProfileMenuComponent implements OnDestroy, OnInit {
.subscribe(user => {
this.profileId = user!.id;
this.profileDisplayName = user!.displayName;
this.changeDetector.detectChanges();
this.changeDetector.markForCheck();
});
}

12
src/Squidex/app/theme/_panels.scss

@ -282,15 +282,9 @@
}
&-section {
& {
border-top: 1px solid $color-border;
padding: 15px;
padding-bottom: 30px;
}
&:first-child {
padding-top: 45px;
}
border-top: 1px solid $color-border;
padding: 15px;
padding-bottom: 30px;
}
&-item {

Loading…
Cancel
Save