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
*/
import { NgModule } from '@angular/core';
import { ApplicationRef, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppComponent } from './app.component';
@ -47,6 +48,7 @@ export function configUserReport() {
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
SqxFrameworkModule.forRoot(),
SqxSharedModule.forRoot(),
SqxShellModule,
@ -62,14 +64,14 @@ export function configUserReport() {
{ provide: TitlesConfig, useFactory: configTitles },
{ provide: UserReportConfig, useFactory: configUserReport }
],
bootstrap: [AppComponent]
entryComponents: [AppComponent]
})
export class AppModule {
/*public ngDoBootstrap(appRef: ApplicationRef) {
public ngDoBootstrap(appRef: ApplicationRef) {
try {
appRef.bootstrap(AppComponent);
} catch (e) {
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>
<tbody>
<template ngFor let-eventConsumer [ngForOf]="eventConsumers">
<ng-template ngFor let-eventConsumer [ngForOf]="eventConsumers">
<tr [class.faulted]="eventConsumer.error && eventConsumer.error.length > 0">
<td>
<span class="truncate">
@ -60,7 +60,7 @@
</td>
</tr>
<tr class="spacer"></tr>
</template>
</ng-template>
</tbody>
</table>
</div>

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

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

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

@ -53,7 +53,7 @@
</thead>
<tbody>
<template ngFor let-content [ngForOf]="contentItems">
<ng-template ngFor let-content [ngForOf]="contentItems">
<tr [routerLink]="[content.id]" routerLinkActive="active" class="content"
[sqxContent]="content"
[language]="languageSelected"
@ -63,7 +63,7 @@
(publishing)="publishContent(content)"
(deleting)="deleteContent(content)"></tr>
<tr class="spacer"></tr>
</template>
</ng-template>
</tbody>
</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 addClientFormSubmitted = false;
public addClientForm: FormGroup =
this.formBuilder.group({
name: ['',
@ -92,10 +93,12 @@ export class ClientsPageComponent extends AppComponentBase implements OnInit {
}
public resetClientForm() {
this.addClientFormSubmitted = false;
this.addClientForm.reset();
}
public attachClient() {
this.addClientFormSubmitted = true;
this.addClientForm.markAsDirty();
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 reset = () => {
this.addClientFormSubmitted = false;
this.addClientForm.reset();
this.addClientForm.enable();
};

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

@ -40,7 +40,7 @@
</thead>
<tbody>
<template ngFor let-contributor [ngForOf]="appContributors">
<ng-template ngFor let-contributor [ngForOf]="appContributors">
<tr>
<td>
<img class="user-picture" [attr.title]="userName(contributor.contributorId) | async" [attr.src]="userPicture(contributor.contributorId) | async" />
@ -63,14 +63,14 @@
</td>
</tr>
<tr class="spacer"></tr>
</template>
</ng-template>
</tbody>
</table>
<div class="table-items-footer">
<form class="form-inline" [formGroup]="addContributorForm" (ngSubmit)="assignContributor()">
<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>
<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>
<tbody>
<template ngFor let-language [ngForOf]="appLanguages">
<ng-template ngFor let-language [ngForOf]="appLanguages">
<tr>
<td>
<span class="language-code">
@ -60,7 +60,7 @@
</td>
</tr>
<tr class="spacer"></tr>
</template>
</ng-template>
</tbody>
</table>

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

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

58
src/Squidex/package.json

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

Loading…
Cancel
Save