Skip to content

Commit

Permalink
Improvements in template.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Apr 4, 2019
1 parent ad3ca51 commit 00b82a3
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ export class FieldLanguagesComponent {
public languageChange = new EventEmitter<AppLanguageDto>();

@Output()
public showAllControlsChange = new EventEmitter<AppLanguageDto>();
public showAllControlsChange = new EventEmitter<boolean>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
<button type="reset" class="float-left btn btn-secondary" (click)="emitComplete()">Cancel</button>

<div class="float-right" *ngIf="!isEditing">
<button type="button" class="btn btn-outline-success mr-1" (click)="addField(false, false)">Create and close</button>
<button type="button" class="btn btn-success mr-1" (click)="addField(true, false)">Create and add field</button>
<button type="button" class="btn btn-outline-success mr-1" (click)="addField(false)">Create and close</button>
<button type="button" class="btn btn-success mr-1" (click)="addField(true)">Create and add field</button>
<button type="button" class="btn btn-success" (click)="addField(false, true)">Create and edit field</button>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class FieldWizardComponent implements OnInit {
this.complete.emit();
}

public addField(addNew: boolean, edit: boolean) {
public addField(addNew: boolean, edit = false) {
const value = this.addFieldForm.submit();

if (value) {
Expand Down Expand Up @@ -97,7 +97,7 @@ export class FieldWizardComponent implements OnInit {
this.selectedTab = tab;
}

public save(addNew: boolean) {
public save(addNew = false) {
const value = this.editForm.submit();

if (value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</div>

<div class="form-group row" *ngIf="!language.isMaster">
<div class="col offset-3 col-9" *ngIf="!isMaster">
<div class="col offset-3 col-9">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="{{language.iso2Code}}_isOptional" formControlName="isOptional" />
<label class="form-check-label" for="{{language.iso2Code}}_isOptional">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span class="star" *ngFor="let star of snapshot.starsArray" (mouseenter)="setPreview(star)" (click)="setValue(star)" [class.selected]="star <= snapshot.stars"></span>
</span>

<button type="button" class="btn btn-text" [class.hidden]="!value" (click)="reset()">Clear</button>
<button type="button" class="btn btn-text" [class.hidden]="!snapshot.value" (click)="reset()">Clear</button>
</ng-container>

<ng-template #noStars>
Expand Down
2 changes: 1 addition & 1 deletion src/Squidex/app/shared/components/help-markdown.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ renderer.link = (href, title, text) => {
pure: true
})
export class HelpMarkdownPipe implements PipeTransform {
public transform(text: string): string {
public transform(text: string | null): string {
if (text) {
return Marked(text, { renderer });
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</div>

<div class="form-check" *ngIf="enableArchive">
<input class="form-check-input" type="checkbox" id="archivedItems" [ngModel]="archived" (ngModelChange)="archivedChanged.emit($event)" />
<input class="form-check-input" type="checkbox" id="archivedItems" [ngModel]="archived" (ngModelChange)="archivedChange.emit($event)" />
<label class="form-check-label" for="archivedItems">
Archived items
</label>
Expand Down
3 changes: 2 additions & 1 deletion src/Squidex/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
}
},
"angularCompilerOptions": {
"preserveWhitespaces": true
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}

0 comments on commit 00b82a3

Please sign in to comment.