Browse Source

Minor fixes

pull/1/head
Sebastian Stehle 9 years ago
parent
commit
a8b9710f9f
  1. 10
      src/Squidex/app/app.module.ts
  2. 4
      src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.html
  3. 4
      src/Squidex/app/features/administration/pages/users/users-page.component.html
  4. 4
      src/Squidex/app/features/content/pages/contents/contents-page.component.html
  5. 4
      src/Squidex/app/features/settings/pages/clients/clients-page.component.ts
  6. 6
      src/Squidex/app/features/settings/pages/contributors/contributors-page.component.html
  7. 4
      src/Squidex/app/features/settings/pages/languages/languages-page.component.html
  8. 25
      src/Squidex/app/shared/services/schemas.service.ts
  9. 58
      src/Squidex/package.json

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

@ -5,8 +5,9 @@
* Copyright (c) Sebastian Stehle. All rights reserved * Copyright (c) Sebastian Stehle. All rights reserved
*/ */
import { NgModule } from '@angular/core'; import { ApplicationRef, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
@ -47,6 +48,7 @@ export function configUserReport() {
@NgModule({ @NgModule({
imports: [ imports: [
BrowserModule, BrowserModule,
BrowserAnimationsModule,
SqxFrameworkModule.forRoot(), SqxFrameworkModule.forRoot(),
SqxSharedModule.forRoot(), SqxSharedModule.forRoot(),
SqxShellModule, SqxShellModule,
@ -62,14 +64,14 @@ export function configUserReport() {
{ provide: TitlesConfig, useFactory: configTitles }, { provide: TitlesConfig, useFactory: configTitles },
{ provide: UserReportConfig, useFactory: configUserReport } { provide: UserReportConfig, useFactory: configUserReport }
], ],
bootstrap: [AppComponent] entryComponents: [AppComponent]
}) })
export class AppModule { export class AppModule {
/*public ngDoBootstrap(appRef: ApplicationRef) { public ngDoBootstrap(appRef: ApplicationRef) {
try { try {
appRef.bootstrap(AppComponent); appRef.bootstrap(AppComponent);
} catch (e) { } catch (e) {
console.log('Application element not found'); console.log('Application element not found');
} }
}*/ }
} }

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

@ -35,7 +35,7 @@
</thead> </thead>
<tbody> <tbody>
<template ngFor let-eventConsumer [ngForOf]="eventConsumers"> <ng-template ngFor let-eventConsumer [ngForOf]="eventConsumers">
<tr [class.faulted]="eventConsumer.error && eventConsumer.error.length > 0"> <tr [class.faulted]="eventConsumer.error && eventConsumer.error.length > 0">
<td> <td>
<span class="truncate"> <span class="truncate">
@ -60,7 +60,7 @@
</td> </td>
</tr> </tr>
<tr class="spacer"></tr> <tr class="spacer"></tr>
</template> </ng-template>
</tbody> </tbody>
</table> </table>
</div> </div>

4
src/Squidex/app/features/administration/pages/users/users-page.component.html

@ -45,7 +45,7 @@
</thead> </thead>
<tbody> <tbody>
<template ngFor let-user [ngForOf]="usersItems"> <ng-template ngFor let-user [ngForOf]="usersItems">
<tr> <tr>
<td> <td>
<img class="user-picture" [attr.title]="user.name" [attr.src]="user.pictureUrl" /> <img class="user-picture" [attr.title]="user.name" [attr.src]="user.pictureUrl" />
@ -68,7 +68,7 @@
</td> </td>
</tr> </tr>
<tr class="spacer"></tr> <tr class="spacer"></tr>
</template> </ng-template>
</tbody> </tbody>
</table> </table>

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

@ -53,7 +53,7 @@
</thead> </thead>
<tbody> <tbody>
<template ngFor let-content [ngForOf]="contentItems"> <ng-template ngFor let-content [ngForOf]="contentItems">
<tr [routerLink]="[content.id]" routerLinkActive="active" class="content" <tr [routerLink]="[content.id]" routerLinkActive="active" class="content"
[sqxContent]="content" [sqxContent]="content"
[language]="languageSelected" [language]="languageSelected"
@ -63,7 +63,7 @@
(publishing)="publishContent(content)" (publishing)="publishContent(content)"
(deleting)="deleteContent(content)"></tr> (deleting)="deleteContent(content)"></tr>
<tr class="spacer"></tr> <tr class="spacer"></tr>
</template> </ng-template>
</tbody> </tbody>
</table> </table>

4
src/Squidex/app/features/settings/pages/clients/clients-page.component.ts

@ -34,6 +34,7 @@ export class ClientsPageComponent extends AppComponentBase implements OnInit {
public appClients: ImmutableArray<AppClientDto>; public appClients: ImmutableArray<AppClientDto>;
public addClientFormSubmitted = false;
public addClientForm: FormGroup = public addClientForm: FormGroup =
this.formBuilder.group({ this.formBuilder.group({
name: ['', name: ['',
@ -92,10 +93,12 @@ export class ClientsPageComponent extends AppComponentBase implements OnInit {
} }
public resetClientForm() { public resetClientForm() {
this.addClientFormSubmitted = false;
this.addClientForm.reset(); this.addClientForm.reset();
} }
public attachClient() { public attachClient() {
this.addClientFormSubmitted = true;
this.addClientForm.markAsDirty(); this.addClientForm.markAsDirty();
if (this.addClientForm.valid) { if (this.addClientForm.valid) {
@ -104,6 +107,7 @@ export class ClientsPageComponent extends AppComponentBase implements OnInit {
const requestDto = new CreateAppClientDto(this.addClientForm.get('name').value); const requestDto = new CreateAppClientDto(this.addClientForm.get('name').value);
const reset = () => { const reset = () => {
this.addClientFormSubmitted = false;
this.addClientForm.reset(); this.addClientForm.reset();
this.addClientForm.enable(); this.addClientForm.enable();
}; };

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

@ -40,7 +40,7 @@
</thead> </thead>
<tbody> <tbody>
<template ngFor let-contributor [ngForOf]="appContributors"> <ng-template ngFor let-contributor [ngForOf]="appContributors">
<tr> <tr>
<td> <td>
<img class="user-picture" [attr.title]="userName(contributor.contributorId) | async" [attr.src]="userPicture(contributor.contributorId) | async" /> <img class="user-picture" [attr.title]="userName(contributor.contributorId) | async" [attr.src]="userPicture(contributor.contributorId) | async" />
@ -63,14 +63,14 @@
</td> </td>
</tr> </tr>
<tr class="spacer"></tr> <tr class="spacer"></tr>
</template> </ng-template>
</tbody> </tbody>
</table> </table>
<div class="table-items-footer"> <div class="table-items-footer">
<form class="form-inline" [formGroup]="addContributorForm" (ngSubmit)="assignContributor()"> <form class="form-inline" [formGroup]="addContributorForm" (ngSubmit)="assignContributor()">
<div class="form-group mr-2"> <div class="form-group mr-2">
<sqx-autocomplete [source]="usersDataSource" formControlName="user" [inputName]="contributor"></sqx-autocomplete> <sqx-autocomplete [source]="usersDataSource" formControlName="user" [inputName]="'contributor'"></sqx-autocomplete>
</div> </div>
<button type="submit" class="btn btn-success" [disabled]="!addContributorForm.valid">Add Contributor</button> <button type="submit" class="btn btn-success" [disabled]="!addContributorForm.valid">Add Contributor</button>

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

@ -36,7 +36,7 @@
</thead> </thead>
<tbody> <tbody>
<template ngFor let-language [ngForOf]="appLanguages"> <ng-template ngFor let-language [ngForOf]="appLanguages">
<tr> <tr>
<td> <td>
<span class="language-code"> <span class="language-code">
@ -60,7 +60,7 @@
</td> </td>
</tr> </tr>
<tr class="spacer"></tr> <tr class="spacer"></tr>
</template> </ng-template>
</tbody> </tbody>
</table> </table>

25
src/Squidex/app/shared/services/schemas.service.ts

@ -109,6 +109,7 @@ export class FieldDto {
export abstract class FieldPropertiesDto { export abstract class FieldPropertiesDto {
constructor( constructor(
public readonly fieldType: string,
public readonly label: string, public readonly label: string,
public readonly hints: string, public readonly hints: string,
public readonly placeholder: string, public readonly placeholder: string,
@ -132,9 +133,7 @@ export class StringFieldPropertiesDto extends FieldPropertiesDto {
public readonly maxLength?: number | null, public readonly maxLength?: number | null,
public readonly allowedValues?: string[] public readonly allowedValues?: string[]
) { ) {
super(label, hints, placeholder, isRequired, isListField, isLocalizable); super('String', label, hints, placeholder, isRequired, isListField, isLocalizable);
this['fieldType'] = 'String';
} }
} }
@ -149,9 +148,7 @@ export class NumberFieldPropertiesDto extends FieldPropertiesDto {
public readonly minValue?: number, public readonly minValue?: number,
public readonly allowedValues?: number[] public readonly allowedValues?: number[]
) { ) {
super(label, hints, placeholder, isRequired, isListField, isLocalizable); super('Number', label, hints, placeholder, isRequired, isListField, isLocalizable);
this['fieldType'] = 'Number';
} }
} }
@ -165,9 +162,7 @@ export class DateTimeFieldPropertiesDto extends FieldPropertiesDto {
public readonly maxValue?: string, public readonly maxValue?: string,
public readonly minValue?: string public readonly minValue?: string
) { ) {
super(label, hints, placeholder, isRequired, isListField, isLocalizable); super('DateTime', label, hints, placeholder, isRequired, isListField, isLocalizable);
this['fieldType'] = 'DateTime';
} }
} }
@ -179,9 +174,7 @@ export class BooleanFieldPropertiesDto extends FieldPropertiesDto {
public readonly editor: string, public readonly editor: string,
public readonly defaultValue?: boolean public readonly defaultValue?: boolean
) { ) {
super(label, hints, placeholder, isRequired, isListField, isLocalizable); super('Boolean', label, hints, placeholder, isRequired, isListField, isLocalizable);
this['fieldType'] = 'Boolean';
} }
} }
@ -192,9 +185,7 @@ export class GeolocationFieldPropertiesDto extends FieldPropertiesDto {
isLocalizable: boolean, isLocalizable: boolean,
public readonly editor: string public readonly editor: string
) { ) {
super(label, hints, placeholder, isRequired, isListField, isLocalizable); super('Geolocation', label, hints, placeholder, isRequired, isListField, isLocalizable);
this['fieldType'] = 'Geolocation';
} }
} }
@ -204,9 +195,7 @@ export class JsonFieldPropertiesDto extends FieldPropertiesDto {
isListField: boolean, isListField: boolean,
isLocalizable: boolean isLocalizable: boolean
) { ) {
super(label, hints, placeholder, isRequired, isListField, isLocalizable); super('Json', label, hints, placeholder, isRequired, isListField, isLocalizable);
this['fieldType'] = 'Json';
} }
} }

58
src/Squidex/package.json

@ -10,33 +10,35 @@
"test:clean": "rimraf _test-output", "test:clean": "rimraf _test-output",
"dev": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/ & cpx node_modules/redoc/dist/redoc.min.js wwwroot/scripts/ && webpack-dev-server --config app-config/webpack.run.dev.js --inline --port 3000", "dev": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/ & cpx node_modules/redoc/dist/redoc.min.js wwwroot/scripts/ && webpack-dev-server --config app-config/webpack.run.dev.js --inline --port 3000",
"build": "webpack --config app-config/webpack.run.prod.js --display-error-details --bail", "build": "webpack --config app-config/webpack.run.prod.js --display-error-details --bail",
"build:nobail": "webpack --config app-config/webpack.run.prod.js --display-error-details",
"build:copy": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/ & cpx node_modules/redoc/dist/redoc.min.js wwwroot/scripts/", "build:copy": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/ & cpx node_modules/redoc/dist/redoc.min.js wwwroot/scripts/",
"build:clean": "rimraf wwwroot/build" "build:clean": "rimraf wwwroot/build"
}, },
"dependencies": { "dependencies": {
"@angular/common": "2.4.9", "@angular/animations": "4.0.1",
"@angular/compiler": "2.4.9", "@angular/common": "4.0.1",
"@angular/core": "2.4.9", "@angular/compiler": "4.0.1",
"@angular/forms": "2.4.9", "@angular/core": "4.0.1",
"@angular/http": "2.4.9", "@angular/forms": "4.0.1",
"@angular/platform-browser": "2.4.9", "@angular/http": "4.0.1",
"@angular/platform-browser-dynamic": "2.4.9", "@angular/platform-browser": "4.0.1",
"@angular/router": "3.4.9", "@angular/platform-browser-dynamic": "4.0.1",
"@angular/router": "4.0.1",
"babel-polyfill": "6.23.0", "babel-polyfill": "6.23.0",
"bootstrap": "4.0.0-alpha.6", "bootstrap": "4.0.0-alpha.6",
"core-js": "2.4.1", "core-js": "2.4.1",
"moment": "2.17.1", "moment": "2.18.1",
"mousetrap": "1.6.0", "mousetrap": "1.6.1",
"oidc-client": "1.3.0-beta.3", "oidc-client": "1.3.0",
"pikaday": "1.5.1", "pikaday": "1.5.1",
"redoc": "1.10.0", "redoc": "1.12.1",
"rxjs": "5.2.0", "rxjs": "5.3.0",
"zone.js": "0.7.7" "zone.js": "0.8.5"
}, },
"devDependencies": { "devDependencies": {
"@angular/compiler-cli": "2.4.9", "@angular/compiler-cli": "4.0.1",
"@angular/tsc-wrapped": "0.5.2", "@angular/tsc-wrapped": "4.0.1",
"@ngtools/webpack": "1.2.12", "@ngtools/webpack": "1.3.0",
"@types/core-js": "0.9.35", "@types/core-js": "0.9.35",
"@types/jasmine": "2.5.43", "@types/jasmine": "2.5.43",
"@types/mousetrap": "1.5.33", "@types/mousetrap": "1.5.33",
@ -45,10 +47,10 @@
"angular2-template-loader": "0.6.2", "angular2-template-loader": "0.6.2",
"awesome-typescript-loader": "3.1.2", "awesome-typescript-loader": "3.1.2",
"cpx": "1.5.0", "cpx": "1.5.0",
"css-loader": "0.27.2", "css-loader": "0.28.0",
"exports-loader": "0.6.4", "exports-loader": "0.6.4",
"extract-text-webpack-plugin": "2.1.0", "extract-text-webpack-plugin": "2.1.0",
"file-loader": "0.10.1", "file-loader": "0.11.1",
"html-loader": "0.4.5", "html-loader": "0.4.5",
"html-webpack-plugin": "2.28.0", "html-webpack-plugin": "2.28.0",
"istanbul-instrumenter-loader": "0.2.0", "istanbul-instrumenter-loader": "0.2.0",
@ -59,25 +61,25 @@
"karma-coverage": "1.1.1", "karma-coverage": "1.1.1",
"karma-htmlfile-reporter": "0.3.5", "karma-htmlfile-reporter": "0.3.5",
"karma-jasmine": "1.1.0", "karma-jasmine": "1.1.0",
"karma-mocha-reporter": "2.2.2", "karma-mocha-reporter": "2.2.3",
"karma-phantomjs-launcher": "1.0.4", "karma-phantomjs-launcher": "1.0.4",
"karma-sourcemap-loader": "0.3.7", "karma-sourcemap-loader": "0.3.7",
"karma-webpack": "2.0.2", "karma-webpack": "2.0.3",
"node-sass": "4.5.0", "node-sass": "4.5.2",
"null-loader": "0.1.1", "null-loader": "0.1.1",
"phantomjs-prebuilt": "2.1.14", "phantomjs-prebuilt": "2.1.14",
"raw-loader": "0.5.1", "raw-loader": "0.5.1",
"rimraf": "2.6.1", "rimraf": "2.6.1",
"sass-lint": "1.10.2", "sass-lint": "1.10.2",
"sass-loader": "6.0.3", "sass-loader": "6.0.3",
"style-loader": "0.13.2", "style-loader": "0.16.1",
"tslint": "4.5.1", "tslint": "4.5.1",
"tslint-loader": "3.4.3", "tslint-loader": "3.4.3",
"typemoq": "1.3.1", "typemoq": "1.4.1",
"typescript": "2.2.1", "typescript": "2.2.2",
"underscore": "1.8.3", "underscore": "1.8.3",
"webpack": "2.2.1", "webpack": "2.3.3",
"webpack-dev-server": "2.4.1", "webpack-dev-server": "2.4.2",
"webpack-merge": "4.0.0" "webpack-merge": "4.1.0"
} }
} }

Loading…
Cancel
Save