Browse Source

Various style fixes.

pull/248/head
Sebastian Stehle 8 years ago
parent
commit
52d9e7001d
  1. 2
      src/Squidex.Domain.Apps.Core.Model/Rules/Triggers/ContentChangedTrigger.cs
  2. 5
      src/Squidex.Domain.Apps.Core.Operations/HandleRules/Triggers/ContentChangedTriggerHandler.cs
  3. 7
      src/Squidex/Areas/Api/Controllers/Rules/Models/Converters/RuleTriggerDtoFactory.cs
  4. 12
      src/Squidex/Areas/Api/Controllers/Rules/Models/Triggers/ContentChangedTriggerDto.cs
  5. 18
      src/Squidex/app/features/content/pages/content/content-field.component.html
  6. 5
      src/Squidex/app/features/content/pages/contents/search-form.component.html
  7. 8
      src/Squidex/app/features/rules/pages/rules/triggers/asset-changed-trigger.component.html
  8. 9
      src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.html
  9. 9
      src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.ts
  10. 23
      src/Squidex/app/features/schemas/pages/schema/field.component.html
  11. 12
      src/Squidex/app/features/schemas/pages/schema/schema-edit-form.component.html
  12. 5
      src/Squidex/app/features/schemas/pages/schema/schema-page.component.html
  13. 37
      src/Squidex/app/features/schemas/pages/schema/types/assets-validation.component.html
  14. 4
      src/Squidex/app/features/schemas/pages/schema/types/assets-validation.component.scss
  15. 6
      src/Squidex/app/features/schemas/pages/schema/types/boolean-ui.component.html
  16. 15
      src/Squidex/app/features/schemas/pages/schema/types/boolean-validation.component.html
  17. 4
      src/Squidex/app/features/schemas/pages/schema/types/boolean-validation.component.scss
  18. 6
      src/Squidex/app/features/schemas/pages/schema/types/date-time-ui.component.html
  19. 13
      src/Squidex/app/features/schemas/pages/schema/types/date-time-validation.component.html
  20. 4
      src/Squidex/app/features/schemas/pages/schema/types/date-time-validation.component.scss
  21. 2
      src/Squidex/app/features/schemas/pages/schema/types/geolocation-ui.component.html
  22. 11
      src/Squidex/app/features/schemas/pages/schema/types/geolocation-validation.component.html
  23. 4
      src/Squidex/app/features/schemas/pages/schema/types/geolocation-validation.component.scss
  24. 11
      src/Squidex/app/features/schemas/pages/schema/types/json-validation.component.html
  25. 4
      src/Squidex/app/features/schemas/pages/schema/types/json-validation.component.scss
  26. 8
      src/Squidex/app/features/schemas/pages/schema/types/number-ui.component.html
  27. 19
      src/Squidex/app/features/schemas/pages/schema/types/number-validation.component.html
  28. 4
      src/Squidex/app/features/schemas/pages/schema/types/number-validation.component.scss
  29. 23
      src/Squidex/app/features/schemas/pages/schema/types/references-validation.component.html
  30. 4
      src/Squidex/app/features/schemas/pages/schema/types/references-validation.component.scss
  31. 8
      src/Squidex/app/features/schemas/pages/schema/types/string-ui.component.html
  32. 27
      src/Squidex/app/features/schemas/pages/schema/types/string-validation.component.html
  33. 4
      src/Squidex/app/features/schemas/pages/schema/types/string-validation.component.scss
  34. 15
      src/Squidex/app/features/schemas/pages/schema/types/tags-validation.component.html
  35. 4
      src/Squidex/app/features/schemas/pages/schema/types/tags-validation.component.scss
  36. 4
      src/Squidex/app/features/schemas/pages/schemas/schema-form.component.html
  37. 24
      src/Squidex/app/features/settings/pages/languages/language.component.html
  38. 4
      src/Squidex/app/shared/components/app-form.component.html
  39. 4
      src/Squidex/app/shared/components/asset.component.html
  40. 4
      src/Squidex/app/shared/components/geolocation-editor.component.html
  41. 2
      src/Squidex/app/theme/_bootstrap-vars.scss
  42. 1
      src/Squidex/app/theme/_bootstrap.scss
  43. 2
      src/Squidex/wwwroot/theme.html
  44. 10
      tests/Squidex.Domain.Apps.Core.Tests/Operations/HandleRules/Triggers/ContentChangedTriggerTests.cs

2
src/Squidex.Domain.Apps.Core.Model/Rules/Triggers/ContentChangedTrigger.cs

@ -15,6 +15,8 @@ namespace Squidex.Domain.Apps.Core.Rules.Triggers
{
public ImmutableList<ContentChangedTriggerSchema> Schemas { get; set; }
public bool HandleAll { get; set; }
public override T Accept<T>(IRuleTriggerVisitor<T> visitor)
{
return visitor.Visit(this);

5
src/Squidex.Domain.Apps.Core.Operations/HandleRules/Triggers/ContentChangedTriggerHandler.cs

@ -17,6 +17,11 @@ namespace Squidex.Domain.Apps.Core.HandleRules.Triggers
{
protected override bool Triggers(Envelope<AppEvent> @event, ContentChangedTrigger trigger)
{
if (trigger.HandleAll)
{
return true;
}
if (trigger.Schemas != null && @event.Payload is SchemaEvent schemaEvent)
{
foreach (var schema in trigger.Schemas)

7
src/Squidex/Areas/Api/Controllers/Rules/Models/Converters/RuleTriggerDtoFactory.cs

@ -33,10 +33,9 @@ namespace Squidex.Areas.Api.Controllers.Rules.Models.Converters
public RuleTriggerDto Visit(ContentChangedTrigger trigger)
{
return new ContentChangedTriggerDto
{
Schemas = trigger.Schemas.Select(x => SimpleMapper.Map(x, new ContentChangedTriggerSchemaDto())).ToList()
};
var schemas = trigger.Schemas.Select(x => SimpleMapper.Map(x, new ContentChangedTriggerSchemaDto())).ToList();
return new ContentChangedTriggerDto { Schemas = schemas, HandleAll = trigger.HandleAll };
}
}
}

12
src/Squidex/Areas/Api/Controllers/Rules/Models/Triggers/ContentChangedTriggerDto.cs

@ -25,12 +25,16 @@ namespace Squidex.Areas.Api.Controllers.Rules.Models.Triggers
[Required]
public List<ContentChangedTriggerSchemaDto> Schemas { get; set; }
/// <summary>
/// Determines whether the trigger should handle all content changes events.
/// </summary>
public bool HandleAll { get; set; }
public override RuleTrigger ToTrigger()
{
return new ContentChangedTrigger
{
Schemas = Schemas.Select(x => SimpleMapper.Map(x, new ContentChangedTriggerSchema())).ToImmutableList()
};
var schemas = Schemas.Select(x => SimpleMapper.Map(x, new ContentChangedTriggerSchema())).ToImmutableList();
return new ContentChangedTrigger { HandleAll = HandleAll, Schemas = schemas };
}
}
}

18
src/Squidex/app/features/content/pages/content/content-field.component.html

@ -1,6 +1,6 @@
<div class="table-items-row" [class.invalid]="fieldForm.invalid">
<label>
{{field.displayName}} <span class="field-required" [class.hidden]="!field.properties.isRequired">*</span>
{{field.displayName}} <span class="fieldRequired" [class.hidden]="!field.properties.isRequired">*</span>
</label>
<span class="field-disabled" *ngIf="field.isDisabled">Disabled</span>
@ -24,7 +24,7 @@
<div *ngSwitchCase="'Number'">
<div [ngSwitch]="field.properties.editor">
<div *ngSwitchCase="'Input'">
<input class="form-control" type="number" [formControlName]="partition" [placeholder]="field.properties.placeholder || ''">
<input class="form-control" type="number" [formControlName]="partition" [placeholder]="field.properties.placeholder || ''" />
</div>
<div *ngSwitchCase="'Stars'">
<sqx-stars [formControlName]="partition" [maximumStars]="field.properties.maxValue"></sqx-stars>
@ -37,8 +37,9 @@
</div>
<div *ngSwitchCase="'Radio'">
<div class="form-check form-check-inline" *ngFor="let value of field.properties.allowedValues">
<input class="form-check-input" type="radio" [value]="value" [formControlName]="partition" />
<label class="form-check-label">
<input class="form-check-input" type="radio" [value]="value" [formControlName]="partition"> {{value}}
{{value}}
</label>
</div>
</div>
@ -47,10 +48,10 @@
<div *ngSwitchCase="'String'">
<div [ngSwitch]="field.properties.editor">
<div *ngSwitchCase="'Input'">
<input class="form-control" type="text" [formControlName]="partition" [placeholder]="field.properties.placeholder || ''">
<input class="form-control" type="text" [formControlName]="partition" [placeholder]="field.properties.placeholder || ''" />
</div>
<div *ngSwitchCase="'Slug'">
<input class="form-control" type="text" [formControlName]="partition" [placeholder]="field.properties.placeholder || ''" sqxSlugifyInput>
<input class="form-control" type="text" [formControlName]="partition" [placeholder]="field.properties.placeholder || ''" sqxSlugifyInput />
</div>
<div *ngSwitchCase="'TextArea'">
<textarea class="form-control" [formControlName]="partition" rows="5" [placeholder]="field.properties.placeholder || ''"></textarea>
@ -69,8 +70,9 @@
</div>
<div *ngSwitchCase="'Radio'">
<div class="form-check form-check-inline" *ngFor="let value of field.properties.allowedValues">
<input class="form-check-input" type="radio" value="{{value}}" [formControlName]="partition" />
<label class="form-check-label">
<input class="form-check-input" type="radio" value="{{value}}" [formControlName]="partition"> {{value}}
{{value}}
</label>
</div>
</div>
@ -82,10 +84,8 @@
<sqx-toggle [formControlName]="partition"></sqx-toggle>
</div>
<div *ngSwitchCase="'Checkbox'">
<div class="form-check form-check-inline">
<label class="form-check-label">
<div class="form-check">
<input class="form-check-input" type="checkbox" [formControlName]="partition" sqxIndeterminateValue />
</label>
</div>
</div>
</div>

5
src/Squidex/app/features/content/pages/contents/search-form.component.html

@ -26,8 +26,9 @@
</div>
<div class="form-check" *ngIf="canArchive">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" [ngModel]="archived" (ngModelChange)="archivedChanged.emit($event)" /> Archived items
<input class="form-check-input" type="checkbox" id="archivedItems" [ngModel]="archived" (ngModelChange)="archivedChanged.emit($event)" />
<label class="form-check-label" for="archivedItems">
Archived items
</label>
</div>

8
src/Squidex/app/features/rules/pages/rules/triggers/asset-changed-trigger.component.html

@ -4,7 +4,7 @@
<form [formGroup]="triggerForm" class="form-horizontal" (ngSubmit)="save()">
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="sendCreate" formControlName="sendCreate">
<input class="form-check-input" type="checkbox" id="sendCreate" formControlName="sendCreate" />
<label class="form-check-label" for="sendCreate">
created
</label>
@ -12,7 +12,7 @@
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="sendUpdate" formControlName="sendUpdate">
<input class="form-check-input" type="checkbox" id="sendUpdate" formControlName="sendUpdate" />
<label class="form-check-label" for="sendUpdate">
updated
</label>
@ -20,7 +20,7 @@
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="sendRename" formControlName="sendRename">
<input class="form-check-input" type="checkbox" id="sendRename" formControlName="sendRename" />
<label class="form-check-label" for="sendRename">
renamed
</label>
@ -28,7 +28,7 @@
</div>
<div class="form-group">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="sendDelete" formControlName="sendDelete">
<input class="form-check-input" type="checkbox" id="sendDelete" formControlName="sendDelete" />
<label class="form-check-label" for="sendDelete">
deleted
</label>

9
src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.html

@ -1,6 +1,6 @@
<h3 class="rule-title">Trigger rule when an events for a schemas happens</h3>
<table class="table table-middle table-sm table-fixed table-borderless">
<table class="table table-middle table-sm table-fixed table-borderless" *ngIf="!handleAll">
<colgroup>
<col style="width: 100%" />
<col style="width: 40px" />
@ -71,3 +71,10 @@
<button type="submit" class="btn btn-success" [disabled]="!hasSchema">Add Schema</button>
</form>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" [(ngModel)]="handleAll" id="handleAll" />
<label class="form-check-label" for="handleAll">
Trigger on all content events
</label>
</div>

9
src/Squidex/app/features/rules/pages/rules/triggers/content-changed-trigger.component.ts

@ -9,7 +9,8 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import {
ImmutableArray,
SchemaDto
SchemaDto,
Types
} from 'shared';
export interface TriggerSchemaForm {
@ -36,6 +37,8 @@ export class ContentChangedTriggerComponent implements OnInit {
@Output()
public triggerChanged = new EventEmitter<object>();
public handleAll = false;
public triggerSchemas: ImmutableArray<TriggerSchemaForm>;
public schemaToAdd: SchemaDto;
@ -48,6 +51,8 @@ export class ContentChangedTriggerComponent implements OnInit {
public ngOnInit() {
const triggerSchemas: any[] = (this.trigger.schemas = this.trigger.schemas || []);
this.handleAll = Types.isBoolean(this.trigger.handleAll) ? this.trigger.handleAll : false;
this.triggerSchemas =
ImmutableArray.of(
triggerSchemas.map(triggerSchema => {
@ -88,7 +93,7 @@ export class ContentChangedTriggerComponent implements OnInit {
};
});
this.triggerChanged.emit({ schemas });
this.triggerChanged.emit({ schemas, handleAll: this.handleAll });
}
public removeSchema(schemaForm: TriggerSchemaForm) {

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

@ -81,10 +81,10 @@
<div class="table-items-row-details-tab" [class.hidden]="selectedTab !== 0">
<div class="form-group row">
<label for="field-label" class="col col-3 col-form-label">Name</label>
<label class="col col-3 col-form-label" for="fieldName">Name</label>
<div class="col col-6">
<input type="text" class="form-control" id="field-label" readonly [ngModel]="field.name" [ngModelOptions]="{standalone: true}" />
<input type="text" class="form-control" id="fieldName" readonly [ngModel]="field.name" [ngModelOptions]="{standalone: true}" />
<small class="form-text text-muted">
The name of the field in the API response.
@ -93,12 +93,12 @@
</div>
<div class="form-group row">
<label for="field-label" class="col col-3 col-form-label">Label</label>
<label class="col col-3 col-form-label" for="fieldLabel">Label</label>
<div class="col col-6">
<sqx-control-errors for="label" [submitted]="editFormSubmitted"></sqx-control-errors>
<input type="text" class="form-control" id="field-label" maxlength="100" formControlName="label" />
<input type="text" class="form-control" id="fieldLabel" maxlength="100" formControlName="label" />
<small class="form-text text-muted">
Define the display name for the field for documentation and user interfaces.
@ -107,12 +107,12 @@
</div>
<div class="form-group row">
<label for="field-hints" class="col col-3 col-form-label">Hints</label>
<label class="col col-3 col-form-label" for="fieldHints">Hints</label>
<div class="col col-6">
<sqx-control-errors for="hints" [submitted]="editFormSubmitted"></sqx-control-errors>
<input type="text" class="form-control" id="field-hints" maxlength="100" formControlName="hints" />
<input type="text" class="form-control" id="fieldHints" maxlength="100" formControlName="hints" />
<small class="form-text text-muted">
Define some hints for the user and editor for the field for documentation and user interfaces.
@ -121,13 +121,16 @@
</div>
<div class="form-group row">
<div class="form-check offset-3 col col-9">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" formControlName="isListField"> List Field
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldListfield" formControlName="isListField" />
<label class="form-check-label" for="fieldListfield">
List Field
</label>
</div>
<small class="form-text text-muted">
List fields are shown as a column in the content list. If no list field is defined, the first field is shown.
List fields are shown as a column in the content list. If no list field is defined, the first field is shown by default.
</small>
</div>
</div>

12
src/Squidex/app/features/schemas/pages/schema/schema-edit-form.component.html

@ -1,24 +1,24 @@
<form [formGroup]="editForm" (ngSubmit)="saveSchema()">
<div class="form-group">
<label for="schema-name">Name</label>
<label for="schemaName">Name</label>
<input type="text" class="form-control" id="schema-name" [attr.value]="name" readonly />
<input type="text" class="form-control" id="schemaName" [attr.value]="name" readonly />
</div>
<div class="form-group">
<label for="schema-label">Label</label>
<label for="schemaLabel">Label</label>
<sqx-control-errors for="label" [submitted]="editFormSubmitted"></sqx-control-errors>
<input type="text" class="form-control" id="schema-label" formControlName="label" />
<input type="text" class="form-control" id="schemaLabel" formControlName="label" />
</div>
<div class="form-group">
<label for="schema-hints">Hints</label>
<label for="schemaHints">Hints</label>
<sqx-control-errors for="hints" [submitted]="editFormSubmitted"></sqx-control-errors>
<textarea type="text" class="form-control" id="schema-hints" formControlName="hints" rows="4"></textarea>
<textarea type="text" class="form-control" id="schemaHints" formControlName="hints" rows="4"></textarea>
</div>
<div class="form-group clearfix">

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

@ -93,8 +93,9 @@
<div class="row no-gutters mt-3">
<div class="col pr-2">
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" formControlName="isLocalizable"> Localizable
<input class="form-check-input" type="checkbox" id="isLocalizable" formControlName="isLocalizable" />
<label class="form-check-label" for="isLocalizable">
Localizable
</label>
</div>

37
src/Squidex/app/features/schemas/pages/schema/types/assets-validation.component.html

@ -1,9 +1,12 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
</div>
</div>
@ -11,12 +14,12 @@
<label class="col col-3 col-form-label">Items</label>
<div class="col col-3 minmax-col">
<input type="number" class="form-control" id="field-min-items" formControlName="minItems" placeholder="Min Assets" />
<input type="number" class="form-control" formControlName="minItems" placeholder="Min Assets" />
<label class="col-form-label minmax-label">-</label>
</div>
<div class="col col-3">
<input type="number" class="form-control" id="field-max-items" formControlName="maxItems" placeholder="Max Assets" />
<input type="number" class="form-control" formControlName="maxItems" placeholder="Max Assets" />
</div>
</div>
@ -24,12 +27,12 @@
<label class="col col-3 col-form-label">Size</label>
<div class="col col-3 minmax-col">
<input type="number" class="form-control" id="field-min-size" formControlName="minSize" placeholder="Min Size" />
<input type="number" class="form-control" formControlName="minSize" placeholder="Min Size" />
<label class="col-form-label minmax-label">-</label>
</div>
<div class="col col-3">
<input type="number" class="form-control" id="field-max-size" formControlName="maxSize" placeholder="Max Size" />
<input type="number" class="form-control" formControlName="maxSize" placeholder="Max Size" />
</div>
<div class="col col-3">
<label class="col-form-label">bytes</label>
@ -37,10 +40,10 @@
</div>
<div class="form-group2 row">
<label class="col col-3 col-form-checkbox-label" for="field-must-be-image">Must be Image</label>
<label class="col col-3 col-form-checkbox-label" for="fieldMustBeImage">Must be Image</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-must-be-image" formControlName="mustBeImage" />
<input class="form-check-input" type="checkbox" id="fieldMustBeImage" formControlName="mustBeImage" />
</div>
</div>
@ -48,12 +51,12 @@
<label class="col col-3 col-form-label">Width</label>
<div class="col col-2 minmax-col">
<input type="number" class="form-control" id="field-min-width" formControlName="minWidth" />
<input type="number" class="form-control" formControlName="minWidth" />
<label class="col-form-label minmax-label">-</label>
</div>
<div class="col col-2">
<input type="number" class="form-control" id="field-max-width" formControlName="maxWidth" />
<input type="number" class="form-control" formControlName="maxWidth" />
</div>
<div class="col col-2">
<label class="col-form-label">px</label>
@ -64,12 +67,12 @@
<label class="col col-3 col-form-label">Height</label>
<div class="col col-2 minmax-col">
<input type="number" class="form-control" id="field-min-height" formControlName="minHeight" />
<input type="number" class="form-control" formControlName="minHeight" />
<label class="col-form-label minmax-label">-</label>
</div>
<div class="col col-2">
<input type="number" class="form-control" id="field-max-height" formControlName="maxHeight" />
<input type="number" class="form-control" formControlName="maxHeight" />
</div>
<div class="col col-2">
<label class="col-form-label">px</label>
@ -80,12 +83,12 @@
<label class="col col-3 col-form-label">AspectRatio</label>
<div class="col col-2 minmax-col">
<input type="number" class="form-control" id="field-aspect-height" formControlName="aspectWidth" placeholder="4" />
<input type="number" class="form-control" formControlName="aspectWidth" placeholder="4" />
<label class="col-form-label minmax-label">:</label>
</div>
<div class="col col-2">
<input type="number" class="form-control" id="field-aspect-height" formControlName="aspectHeight" placeholder="3" />
<input type="number" class="form-control" formControlName="aspectHeight" placeholder="3" />
</div>
<div class="col col-2">
<label class="col-form-label">px</label>
@ -93,7 +96,7 @@
</div>
<div class="form-group2 row">
<label for="field-allowed-values" class="col col-3 col-form-label">
<label class="col col-3 col-form-label">
Allowed Extensions
</label>

4
src/Squidex/app/features/schemas/pages/schema/types/assets-validation.component.scss

@ -11,10 +11,6 @@
}
}
.form-check-input {
margin: 0;
}
.form-group {
margin-top: .5rem;
}

6
src/Squidex/app/features/schemas/pages/schema/types/boolean-ui.component.html

@ -1,9 +1,9 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label for="field-placeholder" class="col col-3 col-form-label">Placeholder</label>
<label class="col col-3 col-form-label" for="fieldPlaceholder">Placeholder</label>
<div class="col col-6">
<input type="text" class="form-control" id="field-placeholder" maxlength="100" formControlName="placeholder" />
<input type="text" class="form-control" id="fieldPlaceholder" maxlength="100" formControlName="placeholder" />
<small class="form-text text-muted">
Define the placeholder for the input control.
@ -11,7 +11,7 @@
</div>
</div>
<div class="form-group row">
<label for="field-editor" class="col col-3 col-form-label">Editor</label>
<label class="col col-3 col-form-label">Editor</label>
<div class="col col-9">
<label class="btn btn-radio" [class.active]="editForm.controls.editor.value === 'Checkbox'">

15
src/Squidex/app/features/schemas/pages/schema/types/boolean-validation.component.html

@ -1,17 +1,20 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
</div>
</div>
<div class="form-group row" *ngIf="showDefaultValue | async">
<label class="col col-3 col-form-checkbox-label" for="field-default-value">Default Value</label>
<label class="col col-3 col-form-checkbox-label" for="fieldDefaultValue">Default Value</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-default-value" formControlName="defaultValue" sqxIndeterminateValue />
<input class="form-check-input" type="checkbox" id="fieldDefaultValue" formControlName="defaultValue" sqxIndeterminateValue />
</div>
</div>
</div>

4
src/Squidex/app/features/schemas/pages/schema/types/boolean-validation.component.scss

@ -1,6 +1,2 @@
@import '_vars';
@import '_mixins';
.form-check-input {
margin: 0;
}

6
src/Squidex/app/features/schemas/pages/schema/types/date-time-ui.component.html

@ -1,9 +1,9 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label for="field-placeholder" class="col col-3 col-form-label">Placeholder</label>
<label class="col col-3 col-form-label" for="fieldPlaceholder">Placeholder</label>
<div class="col col-6">
<input type="text" class="form-control" id="field-placeholder" maxlength="100" formControlName="placeholder" />
<input type="text" class="form-control" id="fieldPlaceholder" maxlength="100" formControlName="placeholder" />
<small class="form-text text-muted">
Define the placeholder for the input control.
@ -11,7 +11,7 @@
</div>
</div>
<div class="form-group row">
<label for="field-editor" class="col col-3 col-form-label">Editor</label>
<label class="col col-3 col-form-label">Editor</label>
<div class="col col-9">
<label class="btn btn-radio" [class.active]="editForm.controls.editor.value === 'Date'">

13
src/Squidex/app/features/schemas/pages/schema/types/date-time-validation.component.html

@ -1,9 +1,12 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
</div>
</div>
@ -36,7 +39,7 @@
</div>
<div class="form-group row" *ngIf="showDefaultValue | async">
<label class="col col-3 col-form-label" for="field-default-value">Default Value</label>
<label class="col col-3 col-form-label" for="fieldDefaultValue">Default Value</label>
<div class="col col-9">
<sqx-date-time-editor enforceTime="true" mode="DateTime" formControlName="defaultValue"></sqx-date-time-editor>

4
src/Squidex/app/features/schemas/pages/schema/types/date-time-validation.component.scss

@ -1,6 +1,2 @@
@import '_vars';
@import '_mixins';
.form-check-input {
margin: 0;
}

2
src/Squidex/app/features/schemas/pages/schema/types/geolocation-ui.component.html

@ -1,6 +1,6 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label for="field-editor" class="col col-3 col-form-label">Editor</label>
<label class="col col-3 col-form-label">Editor</label>
<div class="col col-9">
<label class="btn btn-radio" [class.active]="editForm.controls.editor.value === 'Map'">

11
src/Squidex/app/features/schemas/pages/schema/types/geolocation-validation.component.html

@ -1,9 +1,12 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
</div>
</div>
</div>

4
src/Squidex/app/features/schemas/pages/schema/types/geolocation-validation.component.scss

@ -1,10 +1,6 @@
@import '_vars';
@import '_mixins';
.form-check-input {
margin: 0;
}
.form-group {
margin-top: .5rem;
}

11
src/Squidex/app/features/schemas/pages/schema/types/json-validation.component.html

@ -1,9 +1,12 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
</div>
</div>
</div>

4
src/Squidex/app/features/schemas/pages/schema/types/json-validation.component.scss

@ -1,10 +1,6 @@
@import '_vars';
@import '_mixins';
.form-check-input {
margin: 0;
}
.form-group {
margin-top: .5rem;
}

8
src/Squidex/app/features/schemas/pages/schema/types/number-ui.component.html

@ -1,9 +1,9 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label for="field-placeholder" class="col col-3 col-form-label">Placeholder</label>
<label class="col col-3 col-form-label" for="fieldPlaceholder">Placeholder</label>
<div class="col col-6">
<input type="text" class="form-control" id="field-placeholder" maxlength="100" formControlName="placeholder" />
<input type="text" class="form-control" id="fieldPlaceholder" maxlength="100" formControlName="placeholder" />
<small class="form-text text-muted">
Define the placeholder for the input control.
@ -11,7 +11,7 @@
</div>
</div>
<div class="form-group row">
<label for="field-editor" class="col col-3 col-form-label">Editor</label>
<label class="col col-3 col-form-label">Editor</label>
<div class="col col-9">
<label class="btn btn-radio" [class.active]="editForm.controls.editor.value === 'Input'">
@ -45,7 +45,7 @@
</div>
</div>
<div class="form-group row" [class.hidden]="hideAllowedValues | async">
<label for="field-allowed-values" class="col col-3 col-form-label">Allowed Values</label>
<label class="col col-3 col-form-label">Allowed Values</label>
<div class="col col-6">
<sqx-tag-editor formControlName="allowedValues" [converter]="converter"></sqx-tag-editor>

19
src/Squidex/app/features/schemas/pages/schema/types/number-validation.component.html

@ -1,9 +1,12 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
</div>
</div>
@ -11,20 +14,20 @@
<label class="col col-3 col-form-label">Range</label>
<div class="col col-3 minmax-col">
<input type="number" class="form-control" id="field-min-value" formControlName="minValue" placeholder="Min Value" />
<input type="number" class="form-control" formControlName="minValue" placeholder="Min Value" />
<label class="col-form-label minmax-label">-</label>
</div>
<div class="col col-3">
<input type="number" class="form-control" id="field-max-value" formControlName="maxValue" placeholder="Max Value" />
<input type="number" class="form-control" formControlName="maxValue" placeholder="Max Value" />
</div>
</div>
<div class="form-group row" *ngIf="showDefaultValue | async">
<label class="col col-3 col-form-label" for="field-default-value">Default Value</label>
<label class="col col-3 col-form-label" for="fieldDefaultValue">Default Value</label>
<div class="col col-6">
<input type="number" class="form-control" id="field-default-value" formControlName="defaultValue" />
<input type="number" class="form-control" id="fieldDefaultValue" formControlName="defaultValue" />
</div>
</div>
</div>

4
src/Squidex/app/features/schemas/pages/schema/types/number-validation.component.scss

@ -10,7 +10,3 @@
@include absolute(0, -2rem, auto, auto);
}
}
.form-check-input {
margin: 0;
}

23
src/Squidex/app/features/schemas/pages/schema/types/references-validation.component.html

@ -1,19 +1,12 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label for="field-placeholder" class="col col-3 col-form-label">Schema</label>
<div class="col col-6">
<select class="form-control" formControlName="schemaId">
<option *ngFor="let schema of schemas" [ngValue]="schema.id">{{schema.displayName}}</option>
</select>
</div>
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
</div>
</div>
@ -21,12 +14,12 @@
<label class="col col-3 col-form-label">Items</label>
<div class="col col-3 minmax-col">
<input type="number" class="form-control" id="field-min-items" formControlName="minItems" placeholder="Min Items" />
<input type="number" class="form-control" formControlName="minItems" placeholder="Min Items" />
<label class="col-form-label minmax-label">-</label>
</div>
<div class="col col-3">
<input type="number" class="form-control" id="field-max-items" formControlName="maxItems" placeholder="Max Items" />
<input type="number" class="form-control" formControlName="maxItems" placeholder="Max Items" />
</div>
</div>
</div>

4
src/Squidex/app/features/schemas/pages/schema/types/references-validation.component.scss

@ -11,10 +11,6 @@
}
}
.form-check-input {
margin: 0;
}
.form-group {
margin-top: .5rem;
}

8
src/Squidex/app/features/schemas/pages/schema/types/string-ui.component.html

@ -1,9 +1,9 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label for="field-input-placeholder" class="col col-3 col-form-label">Placeholder</label>
<label class="col col-3 col-form-label" for="fieldPlaceholder">Placeholder</label>
<div class="col col-6">
<input type="text" class="form-control" id="field-input-placeholder" maxlength="100" formControlName="placeholder" />
<input type="text" class="form-control" id="fieldPlaceholder" maxlength="100" formControlName="placeholder" />
<small class="form-text text-muted">
Define the placeholder for the input control.
@ -11,7 +11,7 @@
</div>
</div>
<div class="form-group row">
<label for="field-input-editor" class="col col-3 col-form-label">Editor</label>
<label class="col col-3 col-form-label">Editor</label>
<div class="col col-9">
<label class="btn btn-radio" [class.active]="editForm.controls.editor.value === 'Input'">
@ -66,7 +66,7 @@
</div>
</div>
<div class="form-group row" [class.hidden]="hideAllowedValues | async">
<label for="field-allowed-values" class="col col-3 col-form-label">Allowed Values</label>
<label class="col col-3 col-form-label">Allowed Values</label>
<div class="col col-6">
<sqx-tag-editor formControlName="allowedValues"></sqx-tag-editor>

27
src/Squidex/app/features/schemas/pages/schema/types/string-validation.component.html

@ -1,9 +1,12 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
</div>
</div>
@ -11,20 +14,20 @@
<label class="col col-3 col-form-label">Length</label>
<div class="col col-3 minmax-col">
<input type="number" class="form-control" id="field-min-length" formControlName="minLength" placeholder="Min Length" />
<input type="number" class="form-control" formControlName="minLength" placeholder="Min Length" />
<label class="col-form-label minmax-label">-</label>
</div>
<div class="col col-3">
<input type="number" class="form-control" id="field-max-length" formControlName="maxLength" placeholder="Max Length" />
<input type="number" class="form-control" formControlName="maxLength" placeholder="Max Length" />
</div>
</div>
<div class="form-group row">
<label class="col col-3 col-form-label" for="field-pattern">Pattern</label>
<label class="col col-3 col-form-label" for="fieldPattern">Pattern</label>
<div class="col col-6">
<input type="text" class="form-control" id="field-pattern" formControlName="pattern" placeholder="Regex Pattern" #patternInput
<input type="text" class="form-control" id="fieldPattern" formControlName="pattern" placeholder="Regex Pattern" #patternInput
autocomplete="off"
autocorrect="off"
autocapitalize="off"
@ -44,18 +47,18 @@
</small>
</div>
<div class="form-group row" *ngIf="showPatternMessage">
<label class="col col-3 col-form-label" for="field-pattern-message">Pattern Message</label>
<label class="col col-3 col-form-label" for="fieldPatternMessage">Pattern Message</label>
<div class="col col-6">
<input type="text" class="form-control" id="field-pattern-message" formControlName="patternMessage" />
<input type="text" class="form-control" id="fieldPatternMessage" formControlName="patternMessage" />
</div>
</div>
<div class="form-group row" *ngIf="showDefaultValue | async">
<label class="col col-3 col-form-label" for="field-default-value">Default Value</label>
<label class="col col-3 col-form-label" for="fieldDefaultValue">Default Value</label>
<div class="col col-6">
<input type="text" class="form-control" id="field-default-value" formControlName="defaultValue" />
<input type="text" class="form-control" id="fieldDefaultValue" formControlName="defaultValue" />
</div>
</div>
</div>

4
src/Squidex/app/features/schemas/pages/schema/types/string-validation.component.scss

@ -34,10 +34,6 @@
}
}
.form-check-input {
margin: 0;
}
.truncate {
@include truncate;
}

15
src/Squidex/app/features/schemas/pages/schema/types/tags-validation.component.html

@ -1,9 +1,12 @@
<div [formGroup]="editForm">
<div class="form-group row">
<label class="col col-3 col-form-checkbox-label" for="field-required">Required</label>
<div class="col col-6">
<input type="checkbox" class="form-check-input" id="field-required" formControlName="isRequired" />
<div class="col col-9 offset-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="fieldRequired" formControlName="isRequired" />
<label class="form-check-label" for="fieldRequired">
Required
</label>
</div>
</div>
</div>
@ -11,12 +14,12 @@
<label class="col col-3 col-form-label">Items</label>
<div class="col col-3 minmax-col">
<input type="number" class="form-control" id="field-min-items" formControlName="minItems" placeholder="Min Items" />
<input type="number" class="form-control" formControlName="minItems" placeholder="Min Items" />
<label class="col-form-label minmax-label">-</label>
</div>
<div class="col col-3">
<input type="number" class="form-control" id="field-max-items" formControlName="maxItems" placeholder="Max Items" />
<input type="number" class="form-control" formControlName="maxItems" placeholder="Max Items" />
</div>
</div>
</div>

4
src/Squidex/app/features/schemas/pages/schema/types/tags-validation.component.scss

@ -11,10 +11,6 @@
}
}
.form-check-input {
margin: 0;
}
.form-group {
margin-top: .5rem;
}

4
src/Squidex/app/features/schemas/pages/schemas/schema-form.component.html

@ -4,11 +4,11 @@
</div>
<div class="form-group">
<label for="schema-name">Name</label>
<label for="schemaName">Name</label>
<sqx-control-errors for="name" submitOnly="true" [submitted]="createFormSubmitted"></sqx-control-errors>
<input type="text" class="form-control" id="schema-name" formControlName="name" autocomplete="off" sqxLowerCaseInput sqxFocusOnInit />
<input type="text" class="form-control" id="schemaName" formControlName="name" autocomplete="off" sqxLowerCaseInput sqxFocusOnInit />
<small class="form-text text-muted">
The schema name becomes part of the api url,<br /> e.g {{apiUrl.buildUrl("api/content/")}}{{ctx.appName}}/<b>{{schemaName | async}}</b>/.

24
src/Squidex/app/features/settings/pages/languages/language.component.html

@ -35,7 +35,7 @@
<div class="table-items-row-details-tab">
<div class="form-group row" *ngIf="allLanguages.length > 1">
<label for="field-label" class="col col-3 col-form-label fallback-label">Fallback</label>
<label class="col col-3 col-form-label fallback-label">Fallback</label>
<div class="col col-9">
<div class="fallback-languages" dnd-sortable-container [sortableData]="fallbackLanguages" *ngIf="fallbackLanguages.length > 0">
@ -60,26 +60,36 @@
</div>
</div>
<div class="form-check offset-3 col col-9" *ngIf="!language.isMaster">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" formControlName="isMaster"> Is Master
<div class="form-group row" *ngIf="!language.isMaster">
<div class="col offset-3 col-9">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="isMaster" formControlName="isMaster" />
<label class="form-check-label" for="isMaster">
Is Master
</label>
</div>
<small class="form-text text-muted">
Master language is the last fallback language, when no value for a content and a language is available.
</small>
</div>
</div>
<div class="form-check offset-3 col col-9" *ngIf="!isMaster">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" formControlName="isOptional"> Is Optional
<div class="form-group row" *ngIf="!language.isMaster">
<div class="col offset-3 col-9" *ngIf="!isMaster">
<div class="form-check">
<input class="form-check-input" type="checkbox" is="isOptional" formControlName="isOptional" />
<label class="form-check-label" for="isOptional">
Is Optional
</label>
</div>
<small class="form-text text-muted">
Values for optional languages must not be specified, even if the field is set to required.
</small>
</div>
</div>
</div>
</form>
</div>
</div>

4
src/Squidex/app/shared/components/app-form.component.html

@ -4,11 +4,11 @@
</div>
<div class="form-group">
<label for="app-name">Name</label>
<label for="appName">Name</label>
<sqx-control-errors for="name" submitOnly="true" [submitted]="createFormSubmitted"></sqx-control-errors>
<input type="text" class="form-control" id="app-name" formControlName="name" autocomplete="off" sqxLowerCaseInput sqxFocusOnInit />
<input type="text" class="form-control" id="appName" formControlName="name" autocomplete="off" sqxLowerCaseInput sqxFocusOnInit />
<small class="form-text text-muted">
The app name becomes part of the api url,<br /> e.g {{apiUrl.buildUrl("api/content/")}}<b>{{appName | async}}</b>/.

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

@ -79,11 +79,11 @@
<div class="modal-body">
<form [formGroup]="renameForm" (ngSubmit)="renameAsset()">
<div class="form-group">
<label for="asset-name">Name</label>
<label for="assetName">Name</label>
<sqx-control-errors for="name" [submitted]="renameFormSubmitted"></sqx-control-errors>
<input type="text" class="form-control" id="asset-name" formControlName="name" autocomplete="off" sqxFocusOnInit />
<input type="text" class="form-control" id="assetName" formControlName="name" autocomplete="off" sqxFocusOnInit />
</div>
<div class="form-group clearfix">

4
src/Squidex/app/shared/components/geolocation-editor.component.html

@ -11,7 +11,7 @@
<div class="form-group">
<sqx-control-errors for="latitude" style="z-index: 10000;"></sqx-control-errors>
<input type="number" class="form-control" formControlName="latitude" step="any" />
<input type="number" class="form-control" id="latitude" formControlName="latitude" step="any" />
</div>
<div class="form-group col-auto pr-2 pl-2">
@ -20,7 +20,7 @@
<div class="form-group">
<sqx-control-errors for="longitude" style="z-index: 10000;"></sqx-control-errors>
<input type="number" class="form-control" formControlName="longitude" step="any" />
<input type="number" class="form-control" id="longitude" formControlName="longitude" step="any" />
</div>
<div class="form-group col-auto">

2
src/Squidex/app/theme/_bootstrap-vars.scss

@ -23,8 +23,6 @@ $input-bg-disabled: $color-input-disabled;
$input-border-color: $color-input;
$input-color-placeholder: $color-text-decent;
$btn-padding-y: .5rem;
$badge-bg-level: 2;
$dropdown-border-color: $color-border;

1
src/Squidex/app/theme/_bootstrap.scss

@ -74,6 +74,7 @@
.alert-info {
background: $color-theme-blue;
border: 0;
}
a {

2
src/Squidex/wwwroot/theme.html

@ -569,7 +569,7 @@
</fieldset>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" class="form-check-input">
<input class="form-check-input" type="checkbox">
Check me out
</label>
</div>

10
tests/Squidex.Domain.Apps.Core.Tests/Operations/HandleRules/Triggers/ContentChangedTriggerTests.cs

@ -61,6 +61,16 @@ namespace Squidex.Domain.Apps.Core.Operations.HandleRules.Triggers
Assert.False(result);
}
[Fact]
public void Should_return_true_when_cathing_all_events()
{
var trigger = new ContentChangedTrigger { HandleAll = true };
var result = sut.Triggers(new Envelope<AppEvent>(new ContentCreated()), trigger);
Assert.True(result);
}
[Theory]
[MemberData(nameof(TestData))]
public void Should_return_result_depending_on_event(int expected, int sendCreate, int sendUpdate, int sendDelete, int sendPublish, AppEvent @event)

Loading…
Cancel
Save