replace ng prime with material

This commit is contained in:
annampak 2017-12-22 15:46:36 +02:00
parent 62a7c1fad3
commit bc4e033247
9 changed files with 30 additions and 19 deletions

View File

@ -18,10 +18,10 @@ export class RestBase {
/*
*/
protocol: string = "http";
hostname: string = "192.168.32.103";
hostname: string = "192.168.32.171";
port: number = 8080;
webappname: string = "dmp-backend";
restpath: string = "rest";
webappname: string = "";
restpath: string = "";
/*
protocol: string = "http";

View File

@ -64,7 +64,7 @@ export class DataManagementPlanEditorComponent implements AfterViewInit {
let projectRequestItem: RequestItem<ProjectCriteria> = new RequestItem();
projectRequestItem.criteria = new ProjectCriteria();
this.projectAutoCompleteConfiguration = new AutoCompleteConfiguration(this.projectService.get.bind(this.projectService), projectRequestItem);
this.projectAutoCompleteConfiguration = new AutoCompleteConfiguration(this.projectService.getWithExternal.bind(this.projectService), projectRequestItem);
if (itemId != null) {
this.isNew = false;

View File

@ -1,5 +1,5 @@
<div [formGroup]="form">
<!-- <p-radioButton name="{{field.id}}" value="true" label="Yes" formControlName="value"></p-radioButton> -->
<mat-radio-button name="{{field.id}}" value="true" label="Yes" formControlName="value"></mat-radio-button>
<br>
<!-- <p-radioButton name="{{field.id}}" value="false" label="No" formControlName="value"></p-radioButton> -->
<mat-radio-button name="{{field.id}}" value="false" label="No" formControlName="value"></mat-radio-button>
</div>

View File

@ -1,3 +1,5 @@
<div [formGroup]="form" class="form-group">
<!-- <p-checkbox [formControl]="form.get('value')" label="{{field.data.label}}" binary="true"></p-checkbox> -->
</div>
<mat-checkbox [formControl]="form.get('value')" binary="true">{{field.data.label}}</mat-checkbox>
</div>
<!-- label="{{field.data.label}}" -->

View File

@ -1,5 +1,7 @@
<div [formGroup]="form">
<div *ngFor="let option of this.field.data.options let index = index">
<!-- <p-radioButton name="{{field.id}}" [value]="option.value" label="{{option.label}}" formControlName="value"></p-radioButton> -->
<mat-radio-button name="{{field.id}}" [value]="option.value" formControlName="value">{{option.label}}</mat-radio-button>
</div>
</div>
</div>
<!-- label="{{option.label}}" -->

View File

@ -1,10 +1,10 @@
<div class="ui-g dynamic-formc full-width full-height">
<!-- <ng-sidebar-container contentClass="scrollableContent">
<ng-sidebar mode="push" position="right" [(opened)]="visibleSidebar">
<mat-sidenav-container contentClass="scrollableContent">
<mat-sidenav mode="push" position="right" [(opened)]="visibleSidebar">
<table-of-content class="toc-container full-height" [model]="dataModel"></table-of-content>
</ng-sidebar>
</mat-sidenav>
<div class="ui-g" ng-sidebar-content>
<mat-sidenav-content class="ui-g">
<button type="button" style="margin: 15px;" class="btn btn-primary" (click)="toggleSidebar()" icon="fa-arrow-left">Table Of Contents</button>
<button type="button" *ngIf="dataModel&&dataModel.status != 1" style="margin-top: 15px;margin-bottom: 15px;margin-right: 15px;"
class="btn btn-primary" type="button" (click)="save();">Save</button>
@ -12,7 +12,7 @@
class="btn btn-primary" (click)="submit();">Save and Finalize</button>
<div class="ui-g-12">
<div class="alignment-center">
<ngb-pagination *ngIf="pages" [collectionSize]="pages.length*10" [page]="currentPageIndex" (pageChange)="changePageIndex($event)" aria-label="Default pagination"></ngb-pagination>
<!-- <ngb-pagination *ngIf="pages" [collectionSize]="pages.length*10" [page]="currentPageIndex" (pageChange)="changePageIndex($event)" aria-label="Default pagination"></ngb-pagination> -->
</div>
</div>
<div class="ui-g-12">
@ -27,6 +27,6 @@
</div>
</form>
</div>
</div>
</ng-sidebar-container> -->
</mat-sidenav-content>
</mat-sidenav-container>
</div>

View File

@ -10,6 +10,7 @@ import { NgForm } from '@angular/forms';
import { Router, ActivatedRoute, ParamMap, Params } from '@angular/router';
import 'rxjs/add/operator/switchMap';
import { Location } from '@angular/common';
import {MatSidenavModule} from '@angular/material/sidenav';
declare function simple_notifier(type: string, title: string, message: string): any;

View File

@ -36,6 +36,10 @@ export class ProjectService {
return this.http.post<ProjectModel[]>(this.actionUrl + 'get', requestItem, { headers: this.headers });
}
getWithExternal(requestItem: RequestItem<ProjectCriteria>): Observable<ProjectModel[]> {
return this.http.post<ProjectModel[]>(this.actionUrl + 'getWithExternal', requestItem, { headers: this.headers });
}
getSingle(id: string): Observable<ProjectModel> {
return this.http.get<ProjectModel>(this.actionUrl + 'getSingle/' + id, { headers: this.headers });
}

View File

@ -24,7 +24,8 @@ import {
MatTooltipModule,
MatCheckboxModule,
MatTabsModule,
MatStepperModule
MatStepperModule,
MatRadioModule
} from '@angular/material';
import { CdkTableModule } from '@angular/cdk/table';
import { SnackBarNotificationComponent } from '../components/notificaiton/snack-bar-notification.component';
@ -62,7 +63,8 @@ import { CovalentLayoutModule, CovalentChipsModule, CovalentDialogsModule } from
CovalentLayoutModule,
CovalentChipsModule,
CovalentDialogsModule,
MatStepperModule
MatStepperModule,
MatRadioModule
],
providers: [