Browse Source

More dead code.

pull/353/head
Sebastian Stehle 7 years ago
parent
commit
5dfda1885b
  1. 10
      src/Squidex/app/app.module.ts
  2. 10
      src/Squidex/app/framework/angular/forms/file-drop.directive.ts
  3. 40
      src/Squidex/app/framework/angular/user-report.component.ts
  4. 4
      src/Squidex/app/framework/configurations.ts
  5. 9
      src/Squidex/app/framework/module.ts

10
src/Squidex/app/app.module.ts

@ -23,8 +23,7 @@ import {
DecimalSeparatorConfig,
SqxFrameworkModule,
SqxSharedModule,
TitlesConfig,
UserReportConfig
TitlesConfig
} from './shared';
import { SqxShellModule } from './shell';
@ -66,10 +65,6 @@ export function configCurrency() {
return new CurrencyConfig('EUR', '€', true);
}
export function configUserReport() {
return new UserReportConfig('221afe63-0ca2-42aa-8efe-188d77964a7f');
}
@NgModule({
imports: [
BrowserModule,
@ -93,8 +88,7 @@ export function configUserReport() {
{ provide: ApiUrlConfig, useFactory: configApiUrl },
{ provide: CurrencyConfig, useFactory: configCurrency },
{ provide: DecimalSeparatorConfig, useFactory: configDecimalSeparator },
{ provide: TitlesConfig, useFactory: configTitles },
{ provide: UserReportConfig, useFactory: configUserReport }
{ provide: TitlesConfig, useFactory: configTitles }
],
entryComponents: [AppComponent]
})

10
src/Squidex/app/framework/angular/forms/file-drop.directive.ts

@ -50,11 +50,13 @@ export class FileDropDirective {
const result: File[] = [];
for (let i = 0; i < event.clipboardData.items.length; i++) {
const file = event.clipboardData.items[i].getAsFile();
if (event.clipboardData) {
for (let i = 0; i < event.clipboardData.items.length; i++) {
const file = event.clipboardData.items[i].getAsFile();
if (this.isAllowedFile(file)) {
result.push(file!);
if (this.isAllowedFile(file)) {
result.push(file!);
}
}
}

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

@ -1,40 +0,0 @@
/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { timer } from 'rxjs';
import {
ResourceLoaderService,
ResourceOwner,
UserReportConfig
} from '@app/framework/internal';
@Component({
selector: 'sqx-user-report',
template: ''
})
export class UserReportComponent extends ResourceOwner implements OnInit {
constructor(changeDetector: ChangeDetectorRef,
private readonly config: UserReportConfig,
private readonly resourceLoader: ResourceLoaderService
) {
super();
changeDetector.detach();
}
public ngOnInit() {
window['_urq'] = window['_urq'] || [];
window['_urq'].push(['initSite', this.config.siteId]);
this.own(
timer(4000).subscribe(() => {
this.resourceLoader.loadScript('https://cdn.userreport.com/userreport.js');
}));
}
}

4
src/Squidex/app/framework/configurations.ts

@ -44,8 +44,4 @@ export class DecimalSeparatorConfig {
export class ProductionModeConfig {
constructor(public readonly isProductionMode: boolean) { }
}
export class UserReportConfig {
constructor(public readonly siteId: string) { }
}

9
src/Squidex/app/framework/module.ts

@ -83,8 +83,7 @@ import {
TitleService,
ToggleComponent,
TooltipDirective,
TransformInputDirective,
UserReportComponent
TransformInputDirective
} from './declarations';
@NgModule({
@ -153,8 +152,7 @@ import {
TitleComponent,
ToggleComponent,
TooltipDirective,
TransformInputDirective,
UserReportComponent
TransformInputDirective
],
exports: [
AutocompleteComponent,
@ -218,8 +216,7 @@ import {
TitleComponent,
ToggleComponent,
TooltipDirective,
TransformInputDirective,
UserReportComponent
TransformInputDirective
]
})
export class SqxFrameworkModule {

Loading…
Cancel
Save