This commit is contained in:
parent
ec8c3075df
commit
f5fb1fc9b4
|
@ -37,3 +37,7 @@ tr.hover:hover > * {
|
||||||
color:white;
|
color:white;
|
||||||
margin-top:15px;
|
margin-top:15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cursor-hand{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
|
@ -114,6 +114,7 @@ export class DatasetsComponent implements OnInit {
|
||||||
label: '',
|
label: '',
|
||||||
reference: '',
|
reference: '',
|
||||||
uri: '',
|
uri: '',
|
||||||
|
status: 0,
|
||||||
properties: '',
|
properties: '',
|
||||||
profile: { "id": '' },
|
profile: { "id": '' },
|
||||||
dmp: { "id": '' }
|
dmp: { "id": '' }
|
||||||
|
@ -188,10 +189,13 @@ export class DatasetsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
editRow(item, event) {
|
editRow(item, event) {
|
||||||
|
debugger;
|
||||||
if (event.toElement.id == "editDataset"){
|
if (event.toElement.id == "editDataset"){
|
||||||
this.dataset = item;
|
//this.dataset = item;
|
||||||
this.dataset.label = item.label;
|
this.dataset.label = item.label;
|
||||||
this.dataset.uri = item.uri;
|
this.dataset.uri = item.uri;
|
||||||
|
this.dataset.created = item.created;
|
||||||
|
this.dataset.status = item.status;
|
||||||
//this.dataset.dmp = item.dmp;
|
//this.dataset.dmp = item.dmp;
|
||||||
this.dataset.profile = item.profile==null ? null : item.profile.id;
|
this.dataset.profile = item.profile==null ? null : item.profile.id;
|
||||||
this.dataset.id = item.id;
|
this.dataset.id = item.id;
|
||||||
|
@ -200,7 +204,6 @@ export class DatasetsComponent implements OnInit {
|
||||||
else if(event.toElement.id == "describeDataset"){
|
else if(event.toElement.id == "describeDataset"){
|
||||||
this.describeDataset(item);
|
this.describeDataset(item);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,11 +61,11 @@
|
||||||
<td>{{dataset?.description}}</td>
|
<td>{{dataset?.description}}</td>
|
||||||
<td>{{dataset?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
<td>{{dataset?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
||||||
<td>{{dataset?.status | statusToString }}</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>
|
<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>
|
<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>
|
<i class="fa fa-list-alt fa-fw" data-toggle="tooltip" title="describe dataset" id="describeDataset"></i></a></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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>
|
<button type="button" class="btn btn-default btncustom" [disabled]="!form.valid || finalizeStatus" data-toggle="modal" data-target="#confirmModal">Finalize</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -252,14 +252,14 @@ export class DynamicFormComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
SaveForm() {
|
||||||
let final = false;
|
let final = false;
|
||||||
this.submitForm(false);
|
this.submitForm(false);
|
||||||
|
|
||||||
this.payLoad = JSON.stringify(this.form.value);
|
this.payLoad = JSON.stringify(this.form.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveFinalize(){
|
SaveFinalizeForm(){
|
||||||
$("#confirmModal").modal("hide");
|
$("#confirmModal").modal("hide");
|
||||||
let final = true;
|
let final = true;
|
||||||
this.submitForm(final);
|
this.submitForm(final);
|
||||||
|
|
Loading…
Reference in New Issue