Skip to content

Commit

Permalink
Merge branch 'master' into SHIBUI-693
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Aug 16, 2018
2 parents c43cb21 + da800be commit 51b72c2
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 16 deletions.
6 changes: 4 additions & 2 deletions ui/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@
</ul>
</div>
</nav>
<router-outlet></router-outlet>
<notification-list></notification-list>
<main role="main">
<router-outlet></router-outlet>
<notification-list></notification-list>
</main>
<footer>
<div class="row">
<div class="col-md-8 copyright">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ProviderEditorNavComponent } from '../component/provider-editor-nav.com
import { NgbModalStub } from '../../../../testing/modal.stub';
import { MetadataProvider } from '../../domain/model';
import { of } from 'rxjs';
import { DifferentialService } from '../../../core/service/differential.service';

@Component({
template: `
Expand Down Expand Up @@ -44,7 +45,11 @@ describe('Provider Edit Component', () => {
TestBed.configureTestingModule({
imports: [
NgbDropdownModule.forRoot(),
RouterTestingModule,
RouterTestingModule.withRoutes([
{path: 'edit', children: []},
{path: 'foo', children: []},
{path: '', children: []}
]),
SharedModule,
StoreModule.forRoot({
provider: combineReducers(fromRoot.reducers),
Expand All @@ -64,6 +69,7 @@ describe('Provider Edit Component', () => {
ProviderEditorNavComponent
],
providers: [
DifferentialService,
{ provide: NgbModal, useClass: NgbModalStub },
{ provide: ActivatedRoute, useValue: activatedRoute },
{ provide: APP_BASE_HREF, useValue: '/' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h3 class="tag tag-primary">
role="button">
<span class="label pull-left" i18n="@@action--save">Save</span>
<span class="direction pull-right">
<i class="fa fa-fw fa-lg next d-block fa-2x"
<i class="fa fa-fw next d-block fa-2x"
[ngClass]="{
'fa-save': !(wizardIsSaving$ | async),
'fa-spinner': (wizardIsSaving$ | async),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ <h3 class="tag tag-primary">
<button class="nav-link save btn" aria-label="Save" role="button" (click)="onSave(resolver)" [disabled]="saving$ | async">
<span class="label pull-left" i18n="@@action--save">Save</span>
<span class="direction pull-right">
<i class="fa fa-fw fa-save next d-block fa-2x"></i>
<i class="fa fa-fw next d-block fa-2x"
[ngClass]="{
'fa-save': !(saving$ | async),
'fa-spinner fa-pulse': (saving$ | async)
}"></i>
<ng-container i18n="@@action--save">Save</ng-container>
</span>
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="widget form-group">
<label [attr.for]="id" class="d-flex justify-content-between control-label">
<label [attr.for]="id" [id]="id" class="d-flex justify-content-between control-label">
<span>
{{ schema.title }}
<i class="fa fa-asterisk text-danger" aria-hidden="true" *ngIf="required"></i>
Expand All @@ -22,6 +22,6 @@
[placeholder]="schema.placeholder || ''"
[attr.disabled]="schema.readOnly?true:null"
role="textbox"
aria-label="Name ID Format (type for auto-complete)">
[attr.aria-label]="schema.title">
</auto-complete>
</div>
</div>
5 changes: 3 additions & 2 deletions ui/src/app/schema-form/widget/number/number.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
[attr.placeholder]="schema.placeholder"
[attr.maxLength]="schema.maxLength || null"
[attr.minLength]="schema.minLength || null"
[attr.step]="schema.multipleOf || schema.widget.step">
</div>
[attr.step]="schema.multipleOf || schema.widget.step"
[attr.aria-label]="schema.title">
</div>
5 changes: 3 additions & 2 deletions ui/src/app/schema-form/widget/select/select.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
<select *ngIf="schema.type !== 'array'"
[formControl]="control"
[attr.name]="name"
class="form-control">
class="form-control"
[attr.aria-label]="schema.title">
<option disabled selected>{{ schema.placeholder || schema.title }}</option>
<option *ngFor="let option of schema.oneOf" [ngValue]="option.enum[0]">{{option.description}}</option>
</select>
<select *ngIf="schema.type === 'array'" multiple [formControl]="control" [attr.name]="name" [attr.disabled]="schema.readOnly" class="form-control">
<option *ngFor="let option of schema.items.oneOf" [ngValue]="option.enum[0]">{{option.description}}</option>
</select>
<input *ngIf="schema.readOnly" [attr.name]="name" type="hidden" [formControl]="control">
</div>
</div>
3 changes: 2 additions & 1 deletion ui/src/app/schema-form/widget/string/string.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
[attr.placeholder]="schema.placeholder"
[attr.maxLength]="schema.maxLength || null"
[attr.minLength]="schema.minLength || null"
[attr.disabled]="(schema.widget.id=='color' && schema.readOnly)?true:null">
[attr.disabled]="(schema.widget.id=='color' && schema.readOnly)?true:null"
[attr.aria-label]="schema.title">
<input *ngIf="(schema.widget.id === 'color' && schema.readOnly)" [attr.name]="name" type="hidden" [formControl]="control">
<small class="form-text text-danger" *ngIf="errorMessages && errorMessages.length && control.touched">
{{ errorMessages }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@
[attr.maxLength]="schema.maxLength || null"
[attr.minLength]="schema.minLength || null"
[rows]="schema.widget.rows || 5"
[formControl]="control"></textarea>
</div>
[formControl]="control"
[attr.aria-label]="schema.title"></textarea>
</div>
2 changes: 2 additions & 0 deletions ui/src/app/shared/autocomplete/autocomplete.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
[attr.aria-activedescendant]="activeDescendant"
[placeholder]="placeholder"
attr.aria-owns="{{ id }}__listbox"
[attr.aria-labelledby]="id"
(focus)="handleInputFocus()"
(blur)="handleInputBlur()"
/>
Expand All @@ -21,6 +22,7 @@
type="button"
aria-haspopup="true"
aria-expanded="false"
[attr.aria-labelledby]="id"
(click)="state.setState({menuOpen: !state.currentState.menuOpen})">
<i class="fa fa-caret-down"></i>
</button>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/wizard/component/wizard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h3 class="tag tag-primary">
Save
</span>
<span class="direction pull-right">
<i class="fa fa-fw fa-lg next d-block fa-2x"
<i class="fa fa-fw next d-block fa-2x"
[ngClass]="{
'fa-save': !(disabled$ | async),
'fa-spinner': (disabled$ | async),
Expand Down

0 comments on commit 51b72c2

Please sign in to comment.