Browse Source

Code cleanup.

pull/118/head
Sebastian Stehle 9 years ago
parent
commit
c9754cef61
  1. 2
      src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.html
  2. 8
      src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts
  3. 2
      src/Squidex/app/features/apps/pages/apps-page.component.html
  4. 8
      src/Squidex/app/features/assets/pages/assets-page.component.ts
  5. 10
      src/Squidex/app/features/content/pages/contents/contents-page.component.html
  6. 8
      src/Squidex/app/features/content/shared/assets-editor.component.ts
  7. 2
      src/Squidex/app/features/content/shared/content-item.component.html
  8. 2
      src/Squidex/app/features/dashboard/pages/dashboard-page.component.html
  9. 2
      src/Squidex/app/features/schemas/pages/schema/field.component.html
  10. 34
      src/Squidex/app/features/schemas/pages/schema/schema-page.component.html
  11. 2
      src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.html
  12. 2
      src/Squidex/app/features/settings/pages/clients/client.component.html
  13. 12
      src/Squidex/app/features/settings/pages/clients/clients-page.component.html
  14. 12
      src/Squidex/app/features/settings/pages/contributors/contributors-page.component.html
  15. 8
      src/Squidex/app/features/settings/pages/languages/language.component.ts
  16. 12
      src/Squidex/app/features/settings/pages/languages/languages-page.component.html
  17. 12
      src/Squidex/app/features/webhooks/pages/webhooks-page.component.html
  18. 62
      src/Squidex/app/framework/angular/autocomplete.component.ts
  19. 2
      src/Squidex/app/framework/angular/control-errors.component.html
  20. 2
      src/Squidex/app/framework/angular/dialog-renderer.component.html
  21. 34
      src/Squidex/app/framework/angular/image-source.directive.ts
  22. 183
      src/Squidex/app/framework/angular/modal-target.directive.ts
  23. 5
      src/Squidex/app/framework/angular/modal-view.directive.ts
  24. 25
      src/Squidex/app/framework/angular/onboarding-tooltip.component.html
  25. 48
      src/Squidex/app/framework/angular/onboarding-tooltip.component.scss
  26. 29
      src/Squidex/app/framework/angular/onboarding-tooltip.component.ts
  27. 8
      src/Squidex/app/framework/angular/panel-container.directive.ts
  28. 56
      src/Squidex/app/framework/angular/rich-editor.component.ts
  29. 12
      src/Squidex/app/framework/angular/template-wrapper.directive.ts
  30. 17
      src/Squidex/app/framework/angular/user-report.component.ts
  31. 4
      src/Squidex/app/shared/components/asset.component.html
  32. 2
      src/Squidex/app/shared/components/language-selector.component.html
  33. 4
      src/Squidex/app/shell/pages/internal/apps-menu.component.html
  34. 2
      src/Squidex/app/shell/pages/internal/profile-menu.component.html
  35. 14
      src/Squidex/app/theme/_mixins.scss

2
src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.html

@ -75,7 +75,7 @@
</div> </div>
</sqx-panel> </sqx-panel>
<div class="modal" *sqxModalView="eventConsumerErrorDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="eventConsumerErrorDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">

8
src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts

@ -39,6 +39,10 @@ export class EventConsumersPageComponent extends ComponentBase implements OnDest
super(dialogs); super(dialogs);
} }
public ngOnDestroy() {
this.subscription.unsubscribe();
}
public ngOnInit() { public ngOnInit() {
this.load(false, true); this.load(false, true);
@ -48,10 +52,6 @@ export class EventConsumersPageComponent extends ComponentBase implements OnDest
}); });
} }
public ngOnDestroy() {
this.subscription.unsubscribe();
}
public load(showInfo = false, showError = false) { public load(showInfo = false, showError = false) {
this.eventConsumersService.getEventConsumers() this.eventConsumersService.getEventConsumers()
.subscribe(dtos => { .subscribe(dtos => {

2
src/Squidex/app/features/apps/pages/apps-page.component.html

@ -16,7 +16,7 @@
</div> </div>
</div> </div>
<div class="modal" *sqxModalView="addAppDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="addAppDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">

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

@ -46,6 +46,10 @@ export class AssetsPageComponent extends AppComponentBase implements OnDestroy,
super(dialogs, apps, authService); super(dialogs, apps, authService);
} }
public ngOnDestroy() {
this.assetUpdatedSubscription.unsubscribe();
}
public ngOnInit() { public ngOnInit() {
this.assetUpdatedSubscription = this.assetUpdatedSubscription =
this.messageBus.of(AssetUpdated) this.messageBus.of(AssetUpdated)
@ -58,10 +62,6 @@ export class AssetsPageComponent extends AppComponentBase implements OnDestroy,
this.load(); this.load();
} }
public ngOnDestroy() {
this.assetUpdatedSubscription.unsubscribe();
}
public search() { public search() {
this.assetsPager = new Pager(0, 0, 12); this.assetsPager = new Pager(0, 0, 12);
this.assertQuery = this.assetsFilter.value; this.assertQuery = this.assetsFilter.value;

10
src/Squidex/app/features/content/pages/contents/contents-page.component.html

@ -20,15 +20,15 @@
</a> </a>
</form> </form>
<sqx-onboarding-tooltip id="contentArchive" [for]="archive" position="topRight" after="6000" <sqx-onboarding-tooltip id="contentArchive" [for]="archive" position="bottomRight" after="6000">
text="Click this icon to show the advanced search menu and to show the archive!"> Click this icon to show the advanced search menu and to show the archive!
</sqx-onboarding-tooltip> </sqx-onboarding-tooltip>
<sqx-onboarding-tooltip id="contentFind" [for]="findInput" position="topRight" after="120000" <sqx-onboarding-tooltip id="contentFind" [for]="findInput" position="bottomRight" after="120000">
text="Search for content using full text search over all fields and languages!"> Search for content using full text search over all fields and languages!
</sqx-onboarding-tooltip> </sqx-onboarding-tooltip>
<div class="dropdown-menu" *sqxModalView="searchModal" closeAlways="true" [sqxModalTarget]="searchInput" position="topRight"> <div class="dropdown-menu" *sqxModalView="searchModal" closeAlways="true" [sqxModalTarget]="searchInput">
<sqx-search-form <sqx-search-form
[canArchive]="!isReadOnly" [canArchive]="!isReadOnly"
(queryChanged)="contentsFilter.setValue($event, { emitEvent: false })" (queryChanged)="contentsFilter.setValue($event, { emitEvent: false })"

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

@ -51,6 +51,10 @@ export class AssetsEditorComponent extends AppComponentBase implements ControlVa
super(dialogs, apps, authService); super(dialogs, apps, authService);
} }
public ngOnDestroy() {
this.assetUpdatedSubscription.unsubscribe();
}
public ngOnInit() { public ngOnInit() {
this.assetUpdatedSubscription = this.assetUpdatedSubscription =
this.messageBus.of(AssetUpdated) this.messageBus.of(AssetUpdated)
@ -61,10 +65,6 @@ export class AssetsEditorComponent extends AppComponentBase implements ControlVa
}); });
} }
public ngOnDestroy() {
this.assetUpdatedSubscription.unsubscribe();
}
public writeValue(value: string[]) { public writeValue(value: string[]) {
this.oldAssets = ImmutableArray.empty<AssetDto>(); this.oldAssets = ImmutableArray.empty<AssetDto>();

2
src/Squidex/app/features/content/shared/content-item.component.html

@ -16,7 +16,7 @@
<button type="button" class="btn btn-link btn-decent" (click)="dropdown.toggle(); $event.stopPropagation()" [class.active]="dropdown.isOpen | async" #optionsButton> <button type="button" class="btn btn-link btn-decent" (click)="dropdown.toggle(); $event.stopPropagation()" [class.active]="dropdown.isOpen | async" #optionsButton>
<i class="icon-dots"></i> <i class="icon-dots"></i>
</button> </button>
<div class="dropdown-menu" *sqxModalView="dropdown" closeAlways="true" [sqxModalTarget]="optionsButton" position="topRight" [@fade]> <div class="dropdown-menu" *sqxModalView="dropdown" closeAlways="true" [sqxModalTarget]="optionsButton" @fade>
<a class="dropdown-item" (click)="publishing.emit(); $event.stopPropagation()" *ngIf="content.status === 'Draft'"> <a class="dropdown-item" (click)="publishing.emit(); $event.stopPropagation()" *ngIf="content.status === 'Draft'">
Publish Publish
</a> </a>

2
src/Squidex/app/features/dashboard/pages/dashboard-page.component.html

@ -1,6 +1,6 @@
<sqx-title message="{app} | Dashboard" parameter1="app" value1="{{appName() | async}}"></sqx-title> <sqx-title message="{app} | Dashboard" parameter1="app" value1="{{appName() | async}}"></sqx-title>
<div class="dashboard" [@fade]> <div class="dashboard" @fade>
<div class="dashboard-inner"> <div class="dashboard-inner">
<div> <div>

2
src/Squidex/app/features/schemas/pages/schema/field.component.html

@ -26,7 +26,7 @@
<button type="button" class="btn btn-link btn-decent" (click)="dropdown.toggle()" [class.active]="dropdown.isOpen | async" #optionsButton> <button type="button" class="btn btn-link btn-decent" (click)="dropdown.toggle()" [class.active]="dropdown.isOpen | async" #optionsButton>
<i class="icon-dots"></i> <i class="icon-dots"></i>
</button> </button>
<div class="dropdown-menu" *sqxModalView="dropdown" closeAlways="true" [sqxModalTarget]="optionsButton" position="topRight" [@fade]> <div class="dropdown-menu" *sqxModalView="dropdown" closeAlways="true" [sqxModalTarget]="optionsButton" @fade>
<a class="dropdown-item" (click)="enabling.emit()" *ngIf="field.isDisabled" [class.disabled]="field.isLocked"> <a class="dropdown-item" (click)="enabling.emit()" *ngIf="field.isDisabled" [class.disabled]="field.isLocked">
Enable Enable
</a> </a>

34
src/Squidex/app/features/schemas/pages/schema/schema-page.component.html

@ -8,7 +8,7 @@
JSON Preview JSON Preview
</button> </button>
<div class="btn-group" data-toggle="buttons"> <div class="btn-group" data-toggle="buttons" #buttonPublish>
<button type="button" class="btn btn-publishing btn-toggle" [class.btn-success]="schema.isPublished" [disabled]="schema.isPublished" (click)="publish()"> <button type="button" class="btn btn-publishing btn-toggle" [class.btn-success]="schema.isPublished" [disabled]="schema.isPublished" (click)="publish()">
Published Published
</button> </button>
@ -18,10 +18,10 @@
</div> </div>
<div class="dropdown dropdown-options"> <div class="dropdown dropdown-options">
<button type="button" class="btn btn-link btn-decent" (click)="editOptionsDropdown.toggle()" [class.active]="editOptionsDropdown.isOpen | async" #optionsButton> <button type="button" class="btn btn-link btn-decent" (click)="editOptionsDropdown.toggle()" [class.active]="editOptionsDropdown.isOpen | async" #buttonOptions>
<i class="icon-dots"></i> <i class="icon-dots"></i>
</button> </button>
<div class="dropdown-menu" *sqxModalView="editOptionsDropdown" closeAlways="true" [sqxModalTarget]="optionsButton" position="topRight" [@fade]> <div class="dropdown-menu" *sqxModalView="editOptionsDropdown" closeAlways="true" [sqxModalTarget]="buttonOptions" @fade>
<a class="dropdown-item" (click)="configureScriptsDialog.show()"> <a class="dropdown-item" (click)="configureScriptsDialog.show()">
Scripts Scripts
</a> </a>
@ -30,6 +30,14 @@
</a> </a>
</div> </div>
</div> </div>
<sqx-onboarding-tooltip id="history" [for]="buttonOptions" position="bottomRight" after="60000">
Open the context menu to delete the schema or to create some scripts for content changes.
</sqx-onboarding-tooltip>
<sqx-onboarding-tooltip id="history" [for]="buttonPublish" position="bottomRight" after="240000">
Note, that you have to publish the schema before you can add content to it.
</sqx-onboarding-tooltip>
</div> </div>
<h3 class="panel-title"> <h3 class="panel-title">
@ -76,7 +84,7 @@
<div class="row no-gutters mt-3"> <div class="row no-gutters mt-3">
<div class="col"> <div class="col">
<div class="form-check"> <div class="form-check">
<label class="form-check-label pull-left"> <label class="form-check-label">
<input class="form-check-input" type="checkbox" formControlName="isLocalizable"> Localizable <input class="form-check-input" type="checkbox" formControlName="isLocalizable"> Localizable
</label> </label>
</div> </div>
@ -96,17 +104,25 @@
</div> </div>
</div> </div>
<div class="panel-sidebar"> <div class="panel-sidebar">
<a class="panel-link" routerLink="history" routerLinkActive="active"> <a class="panel-link" routerLink="history" routerLinkActive="active" #linkHistory>
<i class="icon-time"></i> <i class="icon-time"></i>
</a> </a>
<a class="panel-link" routerLink="help" routerLinkActive="active"> <a class="panel-link" routerLink="help" routerLinkActive="active" #linkHelp>
<i class="icon-help"></i> <i class="icon-help"></i>
</a> </a>
<sqx-onboarding-tooltip id="history" [for]="linkHistory" position="leftTop" after="120000">
The sidebar navigation contains useful context specific links. Here you can view the history how this schema has changed over time.
</sqx-onboarding-tooltip>
<sqx-onboarding-tooltip id="help" [for]="linkHelp" position="leftTop" after="180000">
Click the help icon to show a context specific help page. Go to <a href="https://docs.squidex.io" target="_blank">https://docs.squidex.io</a> for the full documentation.
</sqx-onboarding-tooltip>
</div> </div>
</div> </div>
</sqx-panel> </sqx-panel>
<div class="modal" *sqxModalView="editSchemaDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="editSchemaDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
@ -125,7 +141,7 @@
</div> </div>
</div> </div>
<div class="modal" *sqxModalView="exportSchemaDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="exportSchemaDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
@ -144,7 +160,7 @@
</div> </div>
</div> </div>
<div class="modal" *sqxModalView="configureScriptsDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="configureScriptsDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content"> <div class="modal-content">

2
src/Squidex/app/features/schemas/pages/schemas/schemas-page.component.html

@ -53,7 +53,7 @@
</div> </div>
</sqx-panel> </sqx-panel>
<div class="modal" *sqxModalView="addSchemaDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="addSchemaDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">

2
src/Squidex/app/features/settings/pages/clients/client.component.html

@ -82,7 +82,7 @@
</table> </table>
</div> </div>
<div class="modal" *sqxModalView="tokenDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="tokenDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">

12
src/Squidex/app/features/settings/pages/clients/clients-page.component.html

@ -43,12 +43,20 @@
</div> </div>
</div> </div>
<div class="panel-sidebar"> <div class="panel-sidebar">
<a class="panel-link" routerLink="history" routerLinkActive="active"> <a class="panel-link" routerLink="history" routerLinkActive="active" #linkHistory>
<i class="icon-time"></i> <i class="icon-time"></i>
</a> </a>
<a class="panel-link" routerLink="help" routerLinkActive="active"> <a class="panel-link" routerLink="help" routerLinkActive="active" #linkHelp>
<i class="icon-help"></i> <i class="icon-help"></i>
</a> </a>
<sqx-onboarding-tooltip id="history" [for]="linkHistory" position="leftTop" after="120000">
The sidebar navigation contains useful context specific links. Here you can view the history how this schema has changed over time.
</sqx-onboarding-tooltip>
<sqx-onboarding-tooltip id="help" [for]="linkHelp" position="leftTop" after="180000">
Click the help icon to show a context specific help page. Go to <a href="https://docs.squidex.io" target="_blank">https://docs.squidex.io</a> for the full documentation.
</sqx-onboarding-tooltip>
</div> </div>
</div> </div>
</sqx-panel> </sqx-panel>

12
src/Squidex/app/features/settings/pages/contributors/contributors-page.component.html

@ -75,12 +75,20 @@
</div> </div>
</div> </div>
<div class="panel-sidebar"> <div class="panel-sidebar">
<a class="panel-link" routerLink="history" routerLinkActive="active"> <a class="panel-link" routerLink="history" routerLinkActive="active" #linkHistory>
<i class="icon-time"></i> <i class="icon-time"></i>
</a> </a>
<a class="panel-link" routerLink="help" routerLinkActive="active"> <a class="panel-link" routerLink="help" routerLinkActive="active" #linkHelp>
<i class="icon-help"></i> <i class="icon-help"></i>
</a> </a>
<sqx-onboarding-tooltip id="history" [for]="linkHistory" position="leftTop" after="120000">
The sidebar navigation contains useful context specific links. Here you can view the history how this schema has changed over time.
</sqx-onboarding-tooltip>
<sqx-onboarding-tooltip id="help" [for]="linkHelp" position="leftTop" after="180000">
Click the help icon to show a context specific help page. Go to <a href="https://docs.squidex.io" target="_blank">https://docs.squidex.io</a> for the full documentation.
</sqx-onboarding-tooltip>
</div> </div>
</div> </div>
</sqx-panel> </sqx-panel>

8
src/Squidex/app/features/settings/pages/languages/language.component.ts

@ -54,6 +54,10 @@ export class LanguageComponent implements OnInit, OnChanges, OnDestroy {
) { ) {
} }
public ngOnDestroy() {
this.isMasterSubscription.unsubscribe();
}
public ngOnInit() { public ngOnInit() {
this.isMasterSubscription = this.isMasterSubscription =
this.editForm.controls['isMaster'].valueChanges this.editForm.controls['isMaster'].valueChanges
@ -65,10 +69,6 @@ export class LanguageComponent implements OnInit, OnChanges, OnDestroy {
this.resetEditForm(); this.resetEditForm();
} }
public ngOnDestroy() {
this.isMasterSubscription.unsubscribe();
}
public ngOnChanges() { public ngOnChanges() {
this.resetEditForm(); this.resetEditForm();
} }

12
src/Squidex/app/features/settings/pages/languages/languages-page.component.html

@ -35,12 +35,20 @@
</div> </div>
</div> </div>
<div class="panel-sidebar"> <div class="panel-sidebar">
<a class="panel-link" routerLink="history" routerLinkActive="active"> <a class="panel-link" routerLink="history" routerLinkActive="active" #linkHistory>
<i class="icon-time"></i> <i class="icon-time"></i>
</a> </a>
<a class="panel-link" routerLink="help" routerLinkActive="active"> <a class="panel-link" routerLink="help" routerLinkActive="active" #linkHelp>
<i class="icon-help"></i> <i class="icon-help"></i>
</a> </a>
<sqx-onboarding-tooltip id="history" [for]="linkHistory" position="leftTop" after="120000">
The sidebar navigation contains useful context specific links. Here you can view the history how this schema has changed over time.
</sqx-onboarding-tooltip>
<sqx-onboarding-tooltip id="help" [for]="linkHelp" position="leftTop" after="180000">
Click the help icon to show a context specific help page. Go to <a href="https://docs.squidex.io" target="_blank">https://docs.squidex.io</a> for the full documentation.
</sqx-onboarding-tooltip>
</div> </div>
</div> </div>
</sqx-panel> </sqx-panel>

12
src/Squidex/app/features/webhooks/pages/webhooks-page.component.html

@ -51,12 +51,20 @@
</div> </div>
<div class="panel-sidebar"> <div class="panel-sidebar">
<a class="panel-link" routerLink="events" routerLinkActive="active"> <a class="panel-link" routerLink="events" routerLinkActive="active" #linkHistory>
<i class="icon-time"></i> <i class="icon-time"></i>
</a> </a>
<a class="panel-link" routerLink="help" routerLinkActive="active"> <a class="panel-link" routerLink="help" routerLinkActive="active" #linkHelp>
<i class="icon-help"></i> <i class="icon-help"></i>
</a> </a>
<sqx-onboarding-tooltip id="history" [for]="linkHistory" position="leftTop" after="120000">
The sidebar navigation contains useful context specific links. Here you can view the history how this schema has changed over time.
</sqx-onboarding-tooltip>
<sqx-onboarding-tooltip id="help" [for]="linkHelp" position="leftTop" after="180000">
Click the help icon to show a context specific help page. Go to <a href="https://docs.squidex.io" target="_blank">https://docs.squidex.io</a> for the full documentation.
</sqx-onboarding-tooltip>
</div> </div>
</div> </div>
</sqx-panel> </sqx-panel>

62
src/Squidex/app/framework/angular/autocomplete.component.ts

@ -54,37 +54,6 @@ export class AutocompleteComponent implements ControlValueAccessor, OnDestroy, O
public queryInput = new FormControl(); public queryInput = new FormControl();
public writeValue(value: any) {
if (!value) {
this.resetForm();
} else {
const item = this.items.find(i => i === value);
if (item) {
this.queryInput.setValue(value.title || '');
}
}
this.reset();
}
public setDisabledState(isDisabled: boolean): void {
if (isDisabled) {
this.reset();
this.queryInput.disable();
} else {
this.queryInput.enable();
}
}
public registerOnChange(fn: any) {
this.callChange = fn;
}
public registerOnTouched(fn: any) {
this.callTouched = fn;
}
public ngOnDestroy() { public ngOnDestroy() {
this.subscription.unsubscribe(); this.subscription.unsubscribe();
} }
@ -132,6 +101,37 @@ export class AutocompleteComponent implements ControlValueAccessor, OnDestroy, O
return true; return true;
} }
public writeValue(value: any) {
if (!value) {
this.resetForm();
} else {
const item = this.items.find(i => i === value);
if (item) {
this.queryInput.setValue(value.title || '');
}
}
this.reset();
}
public setDisabledState(isDisabled: boolean): void {
if (isDisabled) {
this.reset();
this.queryInput.disable();
} else {
this.queryInput.enable();
}
}
public registerOnChange(fn: any) {
this.callChange = fn;
}
public registerOnTouched(fn: any) {
this.callTouched = fn;
}
public blur() { public blur() {
this.reset(); this.reset();
this.callTouched(); this.callTouched();

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

@ -1,4 +1,4 @@
<div class="errors-container" *ngIf="errorMessages" [@fade]> <div class="errors-container" *ngIf="errorMessages" @fade>
<div class="errors"> <div class="errors">
<span *ngFor="let message of errorMessages"> <span *ngFor="let message of errorMessages">
{{message}} {{message}}

2
src/Squidex/app/framework/angular/dialog-renderer.component.html

@ -21,7 +21,7 @@
</div> </div>
<div class="notification-container notification-container-{{position}}"> <div class="notification-container notification-container-{{position}}">
<div class="alert alert-dismissible alert-{{notification.messageType}}" *ngFor="let notification of notifications" (click)="close(notification)" [@fade]> <div class="alert alert-dismissible alert-{{notification.messageType}}" *ngFor="let notification of notifications" (click)="close(notification)" @fade>
<button type="button" class="close" data-dismiss="alert" (close)="close(notification)">&times;</button> <button type="button" class="close" data-dismiss="alert" (close)="close(notification)">&times;</button>
{{notification.message}} {{notification.message}}

34
src/Squidex/app/framework/angular/image-source.directive.ts

@ -15,6 +15,7 @@ import { MathHelper } from './../utils/math-helper';
export class ImageSourceDirective implements OnChanges, OnDestroy, OnInit, AfterViewInit { export class ImageSourceDirective implements OnChanges, OnDestroy, OnInit, AfterViewInit {
private parentResizeListener: Function; private parentResizeListener: Function;
private loadingTimer: any;
private size: any; private size: any;
private loadRetries = 0; private loadRetries = 0;
private loadQuery: string | null = null; private loadQuery: string | null = null;
@ -34,18 +35,9 @@ export class ImageSourceDirective implements OnChanges, OnDestroy, OnInit, After
) { ) {
} }
public ngOnChanges() {
this.loadQuery = null;
this.loadRetries = 0;
this.setImageSource();
}
public ngAfterViewInit() {
this.resize(this.parent);
}
public ngOnDestroy() { public ngOnDestroy() {
clearTimeout(this.loadingTimer);
this.parentResizeListener(); this.parentResizeListener();
} }
@ -60,6 +52,17 @@ export class ImageSourceDirective implements OnChanges, OnDestroy, OnInit, After
}); });
} }
public ngAfterViewInit() {
this.resize(this.parent);
}
public ngOnChanges() {
this.loadQuery = null;
this.loadRetries = 0;
this.setImageSource();
}
@HostListener('load') @HostListener('load')
public onLoad() { public onLoad() {
this.renderer.setElementStyle(this.element.nativeElement, 'visibility', 'visible'); this.renderer.setElementStyle(this.element.nativeElement, 'visibility', 'visible');
@ -105,11 +108,12 @@ export class ImageSourceDirective implements OnChanges, OnDestroy, OnInit, After
this.loadRetries++; this.loadRetries++;
if (this.loadRetries <= 10) { if (this.loadRetries <= 10) {
setTimeout(() => { this.loadingTimer =
this.loadQuery = MathHelper.guid(); setTimeout(() => {
this.loadQuery = MathHelper.guid();
this.setImageSource(); this.setImageSource();
}, this.loadRetries * 1000); }, this.loadRetries * 1000);
} }
} }
} }

183
src/Squidex/app/framework/angular/modal-target.directive.ts

@ -6,7 +6,16 @@
*/ */
import { AfterViewInit, Directive, ElementRef, Input, OnDestroy, OnInit, Renderer } from '@angular/core'; import { AfterViewInit, Directive, ElementRef, Input, OnDestroy, OnInit, Renderer } from '@angular/core';
import { Observable, Subscription } from 'rxjs';
const POSITION_TOPLEFT = 'topLeft';
const POSITION_TOPRIGHT = 'topRight';
const POSITION_BOTTOMLEFT = 'bottomLeft';
const POSITION_BOTTOMRIGHT = 'bottomRight';
const POSITION_LEFTTOP = 'leftTop';
const POSITION_LEFTBOTTOM = 'leftBottom';
const POSITION_RIGHTTOP = 'rightTop';
const POSITION_RIGHTBOTTOM = 'rightBottom';
const POSITION_FULL = 'full';
@Directive({ @Directive({
selector: '[sqxModalTarget]' selector: '[sqxModalTarget]'
@ -14,7 +23,7 @@ import { Observable, Subscription } from 'rxjs';
export class ModalTargetDirective implements AfterViewInit, OnDestroy, OnInit { export class ModalTargetDirective implements AfterViewInit, OnDestroy, OnInit {
private elementResizeListener: Function; private elementResizeListener: Function;
private targetResizeListener: Function; private targetResizeListener: Function;
private timer: Subscription; private renderTimer: any;
private targetElement: any; private targetElement: any;
@Input('sqxModalTarget') @Input('sqxModalTarget')
@ -24,10 +33,10 @@ export class ModalTargetDirective implements AfterViewInit, OnDestroy, OnInit {
public offset = 2; public offset = 2;
@Input() @Input()
public position = 'topLeft'; public position = POSITION_BOTTOMRIGHT;
@Input() @Input()
public auto = true; public autoPosition = true;
constructor( constructor(
private readonly renderer: Renderer, private readonly renderer: Renderer,
@ -35,6 +44,18 @@ export class ModalTargetDirective implements AfterViewInit, OnDestroy, OnInit {
) { ) {
} }
public ngOnDestroy() {
if (this.targetResizeListener) {
this.targetResizeListener();
}
if (this.elementResizeListener) {
this.elementResizeListener();
}
clearInterval(this.renderTimer);
}
public ngOnInit() { public ngOnInit() {
if (this.target) { if (this.target) {
this.targetElement = this.target; this.targetElement = this.target;
@ -49,29 +70,15 @@ export class ModalTargetDirective implements AfterViewInit, OnDestroy, OnInit {
this.updatePosition(); this.updatePosition();
}); });
this.timer = this.renderTimer =
Observable.timer(100, 100).subscribe(() => { setInterval(() => {
this.updatePosition(); this.updatePosition();
}); }, 100);
}
}
public ngOnDestroy() {
if (this.targetResizeListener) {
this.targetResizeListener();
}
if (this.elementResizeListener) {
this.elementResizeListener();
}
if (this.timer) {
this.timer.unsubscribe();
} }
} }
public ngAfterViewInit() { public ngAfterViewInit() {
const modalRef = this.element.nativeElement; const modalRef = this.element.nativeElement;
this.renderer.setElementStyle(modalRef, 'position', 'fixed'); this.renderer.setElementStyle(modalRef, 'position', 'fixed');
this.renderer.setElementStyle(modalRef, 'z-index', '1000000'); this.renderer.setElementStyle(modalRef, 'z-index', '1000000');
@ -83,59 +90,115 @@ export class ModalTargetDirective implements AfterViewInit, OnDestroy, OnInit {
const viewportHeight = document.documentElement.clientHeight; const viewportHeight = document.documentElement.clientHeight;
const viewportWidth = document.documentElement.clientWidth; const viewportWidth = document.documentElement.clientWidth;
const modalRef = this.element.nativeElement; const modalRef = this.element.nativeElement;
const modalRect = this.element.nativeElement.getBoundingClientRect(); const modalRect = this.element.nativeElement.getBoundingClientRect();
const targetRect: ClientRect = this.targetElement.getBoundingClientRect(); const targetRect: ClientRect = this.targetElement.getBoundingClientRect();
let top = 0, left = 0; const fix = this.autoPosition;
if (this.position === 'topLeft' || this.position === 'topRight') {
top = targetRect.bottom + this.offset;
if (this.auto && top + modalRect.height > viewportHeight) { let t = 0
const t = targetRect.top - modalRect.height - this.offset; let l = 0;
if (t > 0) { switch (this.position) {
top = t; case POSITION_LEFTTOP:
case POSITION_RIGHTTOP:
{
t = targetRect.top;
break;
} }
} case POSITION_LEFTBOTTOM:
} else { case POSITION_RIGHTBOTTOM:
top = targetRect.top - modalRect.height - this.offset; {
t = targetRect.bottom - modalRect.height;
if (this.auto && top < 0) { break;
const t = targetRect.bottom + this.offset; }
case POSITION_BOTTOMLEFT:
if (t + modalRect.height > viewportHeight) { case POSITION_BOTTOMRIGHT:
top = t; {
t = targetRect.bottom + this.offset;
if (fix && t + modalRect.height > viewportHeight) {
const candidate = targetRect.top - modalRect.height - this.offset;
if (candidate > 0) {
t = candidate;
}
}
break;
}
case POSITION_TOPLEFT:
case POSITION_TOPRIGHT:
{
t = targetRect.top - modalRect.height - this.offset;
if (fix && t < 0) {
const candidate = targetRect.bottom + this.offset;
if (candidate + modalRect.height > viewportHeight) {
t = candidate;
}
}
break;
} }
}
} }
if (this.position === 'topLeft' || this.position === 'bottomLeft') { switch (this.position) {
left = targetRect.left + this.offset; case POSITION_TOPLEFT:
case POSITION_BOTTOMLEFT:
if (this.auto && left + modalRect.width > viewportWidth) { {
const l = targetRect.right - modalRect.width - this.offset; l = targetRect.left;
break;
if (l > 0) { }
left = l; case POSITION_TOPRIGHT:
case POSITION_BOTTOMRIGHT:
{
l = targetRect.right - modalRect.width
break;
}
case POSITION_RIGHTTOP:
case POSITION_RIGHTBOTTOM:
{
l = targetRect.right + this.offset;
if (fix && l + modalRect.width > viewportWidth) {
const candidate = targetRect.right - modalRect.width - this.offset;
if (candidate > 0) {
l = candidate;
}
}
break;
} }
} case POSITION_LEFTTOP:
} else { case POSITION_LEFTBOTTOM:
left = targetRect.right - modalRect.width - this.offset; {
l = targetRect.left - modalRect.width - this.offset;
if (this.autoPosition && l < 0) {
const candidate = targetRect.right + this.offset;
if (candidate + modalRect.width > viewportWidth) {
l = candidate;
}
}
break;
}
}
if (this.auto && left < 0) { if (this.position === POSITION_FULL) {
const l = targetRect.left + this.offset; t = targetRect.top - this.offset;
l = targetRect.left - this.offset;
if (l + modalRect.width > viewportWidth) { const w = targetRect.width + 2 * this.offset;
left = l; const h = targetRect.height + 2 * this.offset;
}
} this.renderer.setElementStyle(modalRef, 'width', `${w}px`);
this.renderer.setElementStyle(modalRef, 'height', `${h}px`);
} }
this.renderer.setElementStyle(modalRef, 'top', top + 'px'); this.renderer.setElementStyle(modalRef, 'top', `${t}px`);
this.renderer.setElementStyle(modalRef, 'left', left + 'px'); this.renderer.setElementStyle(modalRef, 'left', `${l}px`);
this.renderer.setElementStyle(modalRef, 'right', 'auto'); this.renderer.setElementStyle(modalRef, 'right', 'auto');
this.renderer.setElementStyle(modalRef, 'bottom', 'auto'); this.renderer.setElementStyle(modalRef, 'bottom', 'auto');
this.renderer.setElementStyle(modalRef, 'margin', '0'); this.renderer.setElementStyle(modalRef, 'margin', '0');

5
src/Squidex/app/framework/angular/modal-view.directive.ts

@ -36,6 +36,8 @@ export class ModalViewDirective implements OnChanges, OnDestroy {
public ngOnDestroy() { public ngOnDestroy() {
this.stopListening(); this.stopListening();
this.modalView.hide();
} }
public ngOnChanges(changes: SimpleChanges) { public ngOnChanges(changes: SimpleChanges) {
@ -49,7 +51,8 @@ export class ModalViewDirective implements OnChanges, OnDestroy {
} }
if (this.modalView) { if (this.modalView) {
this.subscription = this.modalView.isOpen.subscribe(isOpen => { this.subscription =
this.modalView.isOpen.subscribe(isOpen => {
if (isOpen === (this.renderedView !== null)) { if (isOpen === (this.renderedView !== null)) {
return; return;
} }

25
src/Squidex/app/framework/angular/onboarding-tooltip.component.html

@ -1,16 +1,19 @@
<div *sqxModalView="tooltipModal;onRoot:true" closeAlways="true" [sqxModalTarget]="for" [position]="position" [offset]="4" [auto]="false"> <div *sqxModalView="tooltipModal;onRoot:true" closeAlways="true" @fade>
<div class="onboarding-tooltip" [ngClass]="position">
<div class="arrow1"></div>
<div class="arrow2"></div>
<div class="content">{{text}}</div> <div class="onboarding-rect" [sqxModalTarget]="for" [offset]="4" [autoPosition]="false" position="full"></div>
<div class="onboarding-help" [sqxModalTarget]="for" [offset]="4" [autoPosition]="false" [position]="position">
<div class="onboarding-text">
<ng-content></ng-content>
</div>
<a (click)="hideThis()" class="hide-this btn-link btn-default btn-sm"> <div class="onboarding-buttons clearfix">
<i class="icon-close"></i> <button (click)="hideAll()" class="btn btn-link btn-primary btn-sm float-left">
</a> Stop Tour
</button>
<button (click)="hideAll()" class="hide-all btn-link btn-primary btn-sm"> <button (click)="hideThis()" class="btn btn-link btn-success btn-sm float-right">
Hide all Tooltips Got It
</button> </button>
</div>
</div> </div>
</div> </div>

48
src/Squidex/app/framework/angular/onboarding-tooltip.component.scss

@ -1,46 +1,28 @@
@import '_mixins'; @import '_mixins';
@import '_vars'; @import '_vars';
$color: $color-theme-blue; $color: #1a2129;
$size-arrow: 10px; .onboarding {
&-help {
// sass-lint:disable class-name-format @include border-radius;
background: $color;
.onboarding-tooltip { border: 0;
& {
@include box-shadow(0, 2px, 20px, .3);
max-width: 20rem; max-width: 20rem;
background: $color-dark-foreground; padding: .75rem;
border: 1px solid $color;
position: relative;
}
.content {
padding: 1.6rem 1.6rem 2.5rem;
} }
.hide-this { &-text {
@include absolute(.1rem, .1rem, auto, auto); font-size: .9rem;
font-weight: normal;
color: $color-dark-foreground;
} }
.hide-all { &-buttons {
@include absolute(auto, .1rem, .1rem, auto); margin: .8rem -.5rem 0;
} }
&.topRight { &-rect {
& { @include box-shadow-raw(0 0 0 9999px rgba(0, 0, 0, .5));
margin-right: -$size-arrow - 1;
}
.arrow1 {
@include caret-top($color, $size-arrow);
@include absolute(-$size-arrow * 2, $size-arrow * .5, auto, auto);
}
.arrow2 {
@include caret-top($color-dark-foreground, $size-arrow);
@include absolute(-$size-arrow * 2 + 1, $size-arrow * .5, auto, auto);
}
} }
} }

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

@ -11,10 +11,15 @@ import { ModalView } from './../utils/modal-view';
import { OnboardingService } from './../services/onboarding.service'; import { OnboardingService } from './../services/onboarding.service';
import { fadeAnimation } from './animations';
@Component({ @Component({
selector: 'sqx-onboarding-tooltip', selector: 'sqx-onboarding-tooltip',
styleUrls: ['./onboarding-tooltip.component.scss'], styleUrls: ['./onboarding-tooltip.component.scss'],
templateUrl: './onboarding-tooltip.component.html' templateUrl: './onboarding-tooltip.component.html',
animations: [
fadeAnimation
]
}) })
export class OnboardingTooltipComponent implements OnDestroy, OnInit { export class OnboardingTooltipComponent implements OnDestroy, OnInit {
private showTimer: any; private showTimer: any;
@ -29,14 +34,11 @@ export class OnboardingTooltipComponent implements OnDestroy, OnInit {
@Input() @Input()
public id: string; public id: string;
@Input()
public position = 'left';
@Input() @Input()
public after = 1000; public after = 1000;
@Input() @Input()
public text: string; public position = 'left';
constructor( constructor(
private readonly onboardingService: OnboardingService, private readonly onboardingService: OnboardingService,
@ -45,15 +47,10 @@ export class OnboardingTooltipComponent implements OnDestroy, OnInit {
} }
public ngOnDestroy() { public ngOnDestroy() {
if (this.showTimer) { clearTimeout(this.showTimer);
clearTimeout(this.showTimer); clearTimeout(this.closeTimer);
this.showTimer = null;
}
if (this.closeTimer) { this.tooltipModal.hide();
clearTimeout(this.closeTimer);
this.closeTimer = null;
}
if (this.forClickListener) { if (this.forClickListener) {
this.forClickListener(); this.forClickListener();
@ -64,12 +61,14 @@ export class OnboardingTooltipComponent implements OnDestroy, OnInit {
public ngOnInit() { public ngOnInit() {
if (this.for && this.id) { if (this.for && this.id) {
this.showTimer = setTimeout(() => { this.showTimer = setTimeout(() => {
if (this.onboardingService.shouldShow(this.id)) { if (this.onboardingService.shouldShow(this.id) || true) {
this.tooltipModal.show(); this.tooltipModal.show();
this.closeTimer = setTimeout(() => { this.closeTimer = setTimeout(() => {
this.hideThis(); this.hideThis();
}, 10000); }, 10000);
this.onboardingService.disable(this.id);
} }
}, this.after); }, this.after);
@ -84,14 +83,12 @@ export class OnboardingTooltipComponent implements OnDestroy, OnInit {
public hideThis() { public hideThis() {
this.onboardingService.disable(this.id); this.onboardingService.disable(this.id);
this.tooltipModal.hide();
this.ngOnDestroy(); this.ngOnDestroy();
} }
public hideAll() { public hideAll() {
this.onboardingService.disableAll(); this.onboardingService.disableAll();
this.tooltipModal.hide();
this.ngOnDestroy(); this.ngOnDestroy();
} }

8
src/Squidex/app/framework/angular/panel-container.directive.ts

@ -28,14 +28,14 @@ export class PanelContainerDirective implements AfterViewInit, OnDestroy {
this.invalidate(); this.invalidate();
} }
public ngAfterViewInit() {
this.invalidate({ force: true, resize: true });
}
public ngOnDestroy() { public ngOnDestroy() {
this.isInit = true; this.isInit = true;
} }
public ngAfterViewInit() {
this.invalidate({ force: true, resize: true });
}
public push(panel: PanelComponent) { public push(panel: PanelComponent) {
this.panels.push(panel); this.panels.push(panel);

56
src/Squidex/app/framework/angular/rich-editor.component.ts

@ -28,6 +28,7 @@ export class RichEditorComponent implements ControlValueAccessor, AfterViewInit,
private callChange = (v: any) => { /* NOOP */ }; private callChange = (v: any) => { /* NOOP */ };
private callTouched = () => { /* NOOP */ }; private callTouched = () => { /* NOOP */ };
private tinyEditor: any; private tinyEditor: any;
private tinyInitTimer: any;
private value: string; private value: string;
private isDisabled = false; private isDisabled = false;
@ -39,28 +40,10 @@ export class RichEditorComponent implements ControlValueAccessor, AfterViewInit,
) { ) {
} }
public writeValue(value: string) { public ngOnDestroy() {
this.value = Types.isString(value) ? value : ''; clearTimeout(this.tinyInitTimer);
if (this.tinyEditor) {
this.tinyEditor.setContent(this.value);
}
}
public setDisabledState(isDisabled: boolean): void {
this.isDisabled = isDisabled;
if (this.tinyEditor) {
this.tinyEditor.setMode(isDisabled ? 'readonly' : 'design');
}
}
public registerOnChange(fn: any) {
this.callChange = fn;
}
public registerOnTouched(fn: any) { tinymce.remove(this.editor);
this.callTouched = fn;
} }
public ngAfterViewInit() { public ngAfterViewInit() {
@ -86,16 +69,37 @@ export class RichEditorComponent implements ControlValueAccessor, AfterViewInit,
self.callTouched(); self.callTouched();
}); });
setTimeout(() => { this.tinyInitTimer =
self.tinyEditor.setContent(this.value || ''); setTimeout(() => {
}, 500); self.tinyEditor.setContent(this.value || '');
}, 500);
}, },
removed_menuitems: 'newdocument', plugins: 'code', target: this.editor.nativeElement removed_menuitems: 'newdocument', plugins: 'code', target: this.editor.nativeElement
}); });
}); });
} }
public ngOnDestroy() { public writeValue(value: string) {
tinymce.remove(this.editor); this.value = Types.isString(value) ? value : '';
if (this.tinyEditor) {
this.tinyEditor.setContent(this.value);
}
}
public setDisabledState(isDisabled: boolean): void {
this.isDisabled = isDisabled;
if (this.tinyEditor) {
this.tinyEditor.setMode(isDisabled ? 'readonly' : 'design');
}
}
public registerOnChange(fn: any) {
this.callChange = fn;
}
public registerOnTouched(fn: any) {
this.callTouched = fn;
} }
} }

12
src/Squidex/app/framework/angular/template-wrapper.directive.ts

@ -27,6 +27,12 @@ export class TemplateWrapperDirective implements OnDestroy, OnInit, OnChanges {
) { ) {
} }
public ngOnDestroy() {
if (this.view) {
this.view.destroy();
}
}
public ngOnInit() { public ngOnInit() {
this.view = this.viewContainer.createEmbeddedView(this.templateRef, { this.view = this.viewContainer.createEmbeddedView(this.templateRef, {
'\$implicit': this.item, '\$implicit': this.item,
@ -43,10 +49,4 @@ export class TemplateWrapperDirective implements OnDestroy, OnInit, OnChanges {
} }
} }
} }
public ngOnDestroy() {
if (this.view) {
this.view.destroy();
}
}
} }

17
src/Squidex/app/framework/angular/user-report.component.ts

@ -5,7 +5,7 @@
* Copyright (c) Sebastian Stehle. All rights reserved * Copyright (c) Sebastian Stehle. All rights reserved
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { ResourceLoaderService } from './../services/resource-loader.service'; import { ResourceLoaderService } from './../services/resource-loader.service';
import { UserReportConfig } from './../configurations'; import { UserReportConfig } from './../configurations';
@ -14,7 +14,9 @@ import { UserReportConfig } from './../configurations';
selector: 'sqx-user-report', selector: 'sqx-user-report',
template: '' template: ''
}) })
export class UserReportComponent implements OnInit { export class UserReportComponent implements OnDestroy, OnInit {
private loadingTimer: any;
constructor(config: UserReportConfig, constructor(config: UserReportConfig,
private readonly resourceLoader: ResourceLoaderService private readonly resourceLoader: ResourceLoaderService
) { ) {
@ -22,9 +24,14 @@ export class UserReportComponent implements OnInit {
window['_urq'].push(['initSite', config.siteId]); window['_urq'].push(['initSite', config.siteId]);
} }
public ngOnDestroy() {
clearTimeout(this.loadingTimer);
}
public ngOnInit() { public ngOnInit() {
setTimeout(() => { this.loadingTimer =
this.resourceLoader.loadScript('https://cdn.userreport.com/userreport.js'); setTimeout(() => {
}, 4000); this.resourceLoader.loadScript('https://cdn.userreport.com/userreport.js');
}, 4000);
} }
} }

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

@ -1,6 +1,6 @@
<div class="card" (sqxFileDrop)="updateFile($event)" dnd-draggable [dragEnabled]="!!asset" [dragData]="asset"> <div class="card" (sqxFileDrop)="updateFile($event)" dnd-draggable [dragEnabled]="!!asset" [dragData]="asset">
<div class="card-block"> <div class="card-block">
<div class="file-preview" *ngIf="asset && progress == 0" [@fade]> <div class="file-preview" *ngIf="asset && progress == 0" @fade>
<span class="file-type" *ngIf="asset.fileType"> <span class="file-type" *ngIf="asset.fileType">
{{asset.fileType}} {{asset.fileType}}
</span> </span>
@ -61,7 +61,7 @@
</div> </div>
</div> </div>
<div class="modal" *sqxModalView="renameDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="renameDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">

2
src/Squidex/app/shared/components/language-selector.component.html

@ -8,7 +8,7 @@
<button type="button" class="btn btn-secondary dropdown-toggle" [attr.title]="selectedLanguage.englishName" (click)="dropdown.toggle(); $event.stopPropagation()" #button> <button type="button" class="btn btn-secondary dropdown-toggle" [attr.title]="selectedLanguage.englishName" (click)="dropdown.toggle(); $event.stopPropagation()" #button>
{{selectedLanguage.iso2Code}} {{selectedLanguage.iso2Code}}
</button> </button>
<div class="dropdown-menu" *sqxModalView="dropdown" closeAlways="true" [sqxModalTarget]="button" position="topRight" [@fade]> <div class="dropdown-menu" *sqxModalView="dropdown" closeAlways="true" [sqxModalTarget]="button" @fade>
<div class="dropdown-item" *ngFor="let language of languages" [class.active]="language == selectedLanguage" (click)="selectLanguage(language)"> <div class="dropdown-item" *ngFor="let language of languages" [class.active]="language == selectedLanguage" (click)="selectLanguage(language)">
<strong class="iso-code">{{language.iso2Code}}</strong> &nbsp; &nbsp; ({{language.englishName}}) <strong class="iso-code">{{language.iso2Code}}</strong> &nbsp; &nbsp; ({{language.englishName}})
</div> </div>

4
src/Squidex/app/shell/pages/internal/apps-menu.component.html

@ -2,7 +2,7 @@
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<span class="nav-link dropdown-toggle" id="app-name" (click)="modalMenu.toggle()">{{appName}}</span> <span class="nav-link dropdown-toggle" id="app-name" (click)="modalMenu.toggle()">{{appName}}</span>
<div class="dropdown-menu" *sqxModalView="modalMenu" closeAlways="true" [@fade]> <div class="dropdown-menu" *sqxModalView="modalMenu" closeAlways="true" @fade>
<a class="dropdown-item all-apps" routerLink="/app"> <a class="dropdown-item all-apps" routerLink="/app">
<span class="all-apps-text">All Apps</span> <span class="all-apps-text">All Apps</span>
<span class="all-apps-pill badge badge-pill badge-primary">{{apps.length}}</span> <span class="all-apps-pill badge badge-pill badge-primary">{{apps.length}}</span>
@ -23,7 +23,7 @@
</li> </li>
</ul> </ul>
<div class="modal" *sqxModalView="modalDialog;onRoot:true" [@fade]> <div class="modal" *sqxModalView="modalDialog;onRoot:true" @fade>
<div class="modal-backdrop"></div> <div class="modal-backdrop"></div>
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">

2
src/Squidex/app/shell/pages/internal/profile-menu.component.html

@ -8,7 +8,7 @@
</span> </span>
</span> </span>
<div class="dropdown-menu" *sqxModalView="modalMenu" closeAlways="true" [@fade]> <div class="dropdown-menu" *sqxModalView="modalMenu" closeAlways="true" @fade>
<a class="dropdown-item" routerLink="/app/administration" *ngIf="isAdmin"> <a class="dropdown-item" routerLink="/app/administration" *ngIf="isAdmin">
Administration Administration
</a> </a>

14
src/Squidex/app/theme/_mixins.scss

@ -234,16 +234,10 @@
box-shadow: inset $x-axis $y-axis $blur rgba(0, 0, 0, $alpha); box-shadow: inset $x-axis $y-axis $blur rgba(0, 0, 0, $alpha);
} }
@mixin box-shadow-raw($shadow) { @mixin box-shadow-raw($shadows...) {
-webkit-box-shadow: $shadow; -webkit-box-shadow: $shadows;
-moz-box-shadow: $shadow; -moz-box-shadow: $shadows;
box-shadow: $shadow; box-shadow: $shadows;
}
@mixin box-shadow-raw($shadow1, $shadow2) {
-webkit-box-shadow: $shadow1, $shadow2;
-moz-box-shadow: $shadow1, $shadow2;
box-shadow: $shadow1, $shadow2;
} }
@mixin border-radius-clip() { @mixin border-radius-clip() {

Loading…
Cancel
Save