This commit is contained in:
Nikolaos Laskaris 2017-11-15 19:32:34 +02:00
parent ec8c3075df
commit f5fb1fc9b4
5 changed files with 16 additions and 9 deletions

View File

@ -36,4 +36,8 @@ tr.hover:hover > * {
background-color:#337ab7;
color:white;
margin-top:15px;
}
.cursor-hand{
cursor: pointer;
}

View File

@ -114,6 +114,7 @@ export class DatasetsComponent implements OnInit {
label: '',
reference: '',
uri: '',
status: 0,
properties: '',
profile: { "id": '' },
dmp: { "id": '' }
@ -188,10 +189,13 @@ export class DatasetsComponent implements OnInit {
}
editRow(item, event) {
debugger;
if (event.toElement.id == "editDataset"){
this.dataset = item;
//this.dataset = item;
this.dataset.label = item.label;
this.dataset.uri = item.uri;
this.dataset.created = item.created;
this.dataset.status = item.status;
//this.dataset.dmp = item.dmp;
this.dataset.profile = item.profile==null ? null : item.profile.id;
this.dataset.id = item.id;
@ -200,7 +204,6 @@ export class DatasetsComponent implements OnInit {
else if(event.toElement.id == "describeDataset"){
this.describeDataset(item);
}
return false;
}

View File

@ -61,11 +61,11 @@
<td>{{dataset?.description}}</td>
<td>{{dataset?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
<td>{{dataset?.status | statusToString }}</td>
<td><a href="#" class="editGridColumn" (click)="editRow(dataset, $event)">
<td><a class="editGridColumn cursor-hand" (click)="editRow(dataset, $event)">
<i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit Properties" id="editDataset"></i></a>
<a href="#" class="editGridColumn" (click)="editRow(dataset, $event)">
<a class="editGridColumn cursor-hand" (click)="editRow(dataset, $event)">
<i class="fa fa-eraser fa-fw" data-toggle="modal" data-target="#delete-dataset-confirm" (click)="markDatasetForDelete(dataset)" title="delete Dataset"></i></a>
<a href="#" class="editGridColumn" (click)="editRow(dataset, $event)">
<a class="editGridColumn cursor-hand" (click)="editRow(dataset, $event)">
<i class="fa fa-list-alt fa-fw" data-toggle="tooltip" title="describe dataset" id="describeDataset"></i></a></td>
</tr>

View File

@ -51,7 +51,7 @@
</div>
<div>
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid || finalizeStatus" (click)="SaveFinalize();">Save</button>
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid || finalizeStatus" (click)="SaveForm();">Save</button>
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid || finalizeStatus" data-toggle="modal" data-target="#confirmModal">Finalize</button>
</div>
@ -121,7 +121,7 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" (click)="SaveFinalize();">Save and Finalize</button>
<button type="button" class="btn btn-primary" (click)="SaveFinalizeForm();">Save and Finalize</button>
</div>
</div>
</div>

View File

@ -252,14 +252,14 @@ export class DynamicFormComponent implements OnInit {
});
}
onSubmit() {
SaveForm() {
let final = false;
this.submitForm(false);
this.payLoad = JSON.stringify(this.form.value);
}
SaveFinalize(){
SaveFinalizeForm(){
$("#confirmModal").modal("hide");
let final = true;
this.submitForm(final);