minor fixes

This commit is contained in:
annampak 2017-11-01 14:01:14 +02:00
parent ce829dafc7
commit 63d509d0cb
6 changed files with 38 additions and 25 deletions

View File

@ -32,7 +32,7 @@ export class DatasetsComponent implements OnInit {
//required by the table
public filterQuery = "";
public rowsOnPage = 10;
//public sortBy = "email";
public sortBy = "label";
public sortOrder = "asc";
//visibility rules for containers
@ -50,10 +50,10 @@ export class DatasetsComponent implements OnInit {
@Input() datasetCount = 0;
@Input() dmpIdforDatasets: string;
@Input() dmpLabelforDatasets: string;
@Input() statusDropDown: DropdownField;
dataset: any;
saveAndDescribe:boolean;
//@ViewChild(DataTable) projectsTable;
dataSetValue: boolean
@Input()
@ -86,6 +86,9 @@ export class DatasetsComponent implements OnInit {
this.datasetProfileDropDown = new DropdownField();
this.datasetProfileDropDown.options = [];
this.saveAndDescribe = false;
this.statusDropDown = new DropdownField();
this.statusDropDown.options =[];
this.statusDropDown.options= [{key:'0', value:"active"},{key:'1', value:"inactive"}]
}

View File

@ -2,13 +2,19 @@
<table class="table table-striped" [mfData]="tableData | dmpTableFilter : filterQuery"
#mf="mfDataTable" [mfRowsOnPage]="rowsOnPage" [(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
<table class="table table-striped" [mfData]="tableData | dmpTableFilter : filterQuery" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
[(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
<thead>
<tr>
<th colspan="1">
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Filter' />
<input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' />
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
</th>
<th colspan="1">
<!-- <input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' /> -->
<select class="form-control" [id]="statusid" [(ngModel)]="statusDropDownkey" [name]="statusDropDown"
#datasetfield >
<option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select>
</th>
<th>
<button class="btn btn-default" (click)="refreshTable($event)">
@ -23,9 +29,9 @@
<th>
<mfDefaultSorter by="label">Label</mfDefaultSorter>
</th>
<th>
<th>
<mfDefaultSorter by="status">Status</mfDefaultSorter>
</th>
</th>
<th>
<mfDefaultSorter by="uri">Uri</mfDefaultSorter>
</th>
@ -38,14 +44,14 @@
<th>
<mfDefaultSorter>Actions </mfDefaultSorter>
</th>
</tr>
</thead>
<tbody>
<tr class="grayout-empty-table" *ngIf="!mf.data[0]">
<td colspan="5">No elements</td>
</tr>
<tr *ngFor="let dataset of mf.data" class="hover">
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{dataset.id}}</td>
<td>{{dataset?.label}}</td>
@ -56,13 +62,13 @@
<td><a class="editGridColumn" (click)="editRow(dataset, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit Properties" id="editDataset"></i>
<i class="fa fa-eraser fa-fw" data-toggle="tooltip" title="delete Dataset"></i>
<i class="fa fa-list-alt fa-fw" data-toggle="tooltip" title="describe dataset" id="describeDataset"></i></a></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<button type="button" class="btn btn-info btncustom" (click) = "newDataset(item)" >New Dataset</button>
<button type="button" class="btn btn-info btncustom" (click)="newDataset(item)">New Dataset</button>
<mfBootstrapPaginator [rowsOnPageSet]="[5,20,40]"></mfBootstrapPaginator>
</td>
</tr>
@ -82,29 +88,30 @@
</div>
<div class="modal-body">
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewDmp()">
<div class="form-group">
<label for="recipient-name" class="col-form-label">Dataset Profile:</label>
<select class="form-control" [id]="datasetProfileDropDownKey" [(ngModel)]="dataset.profile" [name]="datasetProfileDropDown" #datasetfield>
<div class="form-group">
<label for="recipient-name" class="col-form-label">Dataset Profile:</label>
<select class="form-control" [id]="datasetProfileDropDownKey" [(ngModel)]="dataset.profile" [name]="datasetProfileDropDown"
#datasetfield>
<option *ngFor="let opt of datasetProfileDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select>
</div>
</div>
<div class="form-group">
<label for="label-name" class="form-control-label">Label:</label>
<input type="text" class="form-control" id="label-name" [(ngModel)]= "dataset.label" name = "label">
<input type="text" class="form-control" id="label-name" [(ngModel)]="dataset.label" name="label">
</div>
<div class="form-group">
<label for="abbreviation-text" class="form-control-label">DMP:</label>
<input class="form-control" id="abbreviation-text" [(ngModel)]= "dataset.dmp" name = "dmp" disabled>
<input class="form-control" id="abbreviation-text" [(ngModel)]="dataset.dmp" name="dmp" disabled>
</div>
<div class="form-group">
<label for="uri-text" class="form-control-label">Uri:</label>
<input class="form-control" id="uri-text" [(ngModel)]= "dataset.uri" name = "uri">
<input class="form-control" id="uri-text" [(ngModel)]="dataset.uri" name="uri">
</div>
<!-- <div class="form-group">
<!-- <div class="form-group">
<label for="start-date" class="form-control-label">Properties:</label>
<input class="form-control" id="startDate-date" [(ngModel)]= "dataset.properties" name = "properties">
</div> -->
<!-- <div class="form-group">
<!-- <div class="form-group">
<label for="end-date" class="form-control-label">End Date:</label>
<input class="form-control" id="endDate-date" [(ngModel)]= "dataset.endDate" name = "endDate">
</div> -->

View File

@ -37,7 +37,7 @@ export class DmpComponent implements OnInit{
//required by the table
public filterQuery = "";
public rowsOnPage = 10;
//public sortBy = "email";
public sortBy = "label";
public sortOrder = "asc";
//visibility rules for containers

View File

@ -7,6 +7,8 @@
<tr>
<th colspan="1">
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Filter' />
</th>
<th colspan="1">
<input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' />
</th>
<th>

View File

@ -37,7 +37,7 @@ export class ProjectsComponent implements OnInit{
//required by the table
public filterQuery = "";
public rowsOnPage = 10;
//public sortBy = "email";
public sortBy = "label";
public sortOrder = "asc";
//visibility rules for containers

View File

@ -25,7 +25,8 @@ export class GlobalInterceptor implements HttpInterceptor {
var auth2 = gapi.auth2.getAuthInstance();
    auth2.signOut().then(function () {
      console.log('User signed out.');
localStorage.removeItem('currentUser');
localStorage.removeItem('currentUser');
this.router.navigate(['/login-page']);
    });
this.tokenService.setToken(null);
//EDW VALE TO KWDIKA GIA TO LOGOUT KAI SXOLIASE TON OPOU ALLOU TON EXEIS