This commit is contained in:
Nikolaos Laskaris 2017-11-23 15:57:47 +02:00
parent 123660f250
commit c0ec59681d
9 changed files with 301 additions and 262 deletions

View File

@ -21,7 +21,7 @@ const appRoutes: Routes = [
{ path: 'projects', component: ProjectsComponent}, { path: 'projects', component: ProjectsComponent},
{ path: 'project', component: ProjectDetailedComponent}, { path: 'project', component: ProjectDetailedComponent},
{ path: 'dmps', component: DmpComponent}, { path: 'dmps', component: DmpComponent},
{ path: 'dmp', component: DmpDetailedComponent }, { path: 'dmp', component: DmpDetailedComponent},
{ path: 'welcome', component: HomepageComponent}, { path: 'welcome', component: HomepageComponent},
{ path: '', redirectTo: '/login', pathMatch: 'full' }, { path: '', redirectTo: '/login', pathMatch: 'full' },
{ path: '**', component: PageNotFoundComponent }, { path: '**', component: PageNotFoundComponent },

View File

@ -85,8 +85,6 @@
<router-outlet></router-outlet> <router-outlet></router-outlet>
<!--this should be invisible -->
</div> </div>
</div> </div>

View File

@ -66,4 +66,55 @@ tr.hover:hover > * {
.url-like{ .url-like{
color: #0645AD; color: #0645AD;
cursor: pointer; cursor: pointer;
} }
/* START - FOR DETAILS MODALS */
.modal.modal-fullscreen .modal-dialog,
.modal.modal-fullscreen .modal-content {
position: absolute;
left: 1%;
right: 1%;
top: 1%;
bottom: 1%;
}
.modal.modal-fullscreen .modal-dialog {
margin: 0;
width: 98%;
animation-duration:0.5s;
}
.modal.modal-fullscreen .modal-content {
border: none;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: inherit;
-moz-box-shadow: inherit;
-o-box-shadow: inherit;
box-shadow: inherit;
/* change bg color below */
/* background:#1abc9c; */
}
.modal.modal-fullscreen.force-fullscreen {
/* Remove the padding inside the body */
}
.modal.modal-fullscreen.force-fullscreen .modal-body {
padding: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-header,
.modal.modal-fullscreen.force-fullscreen .modal-footer {
left: 0;
position: absolute;
right: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-header {
top: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-footer {
bottom: 0;
}
/* END - FOR DETAILS MODALS */

View File

@ -265,7 +265,8 @@ export class DmpComponent implements OnInit{
viewDetailedDMP(dmp){ viewDetailedDMP(dmp){
console.log(dmp) console.log(dmp)
this.router.navigate(['/dmp'], { queryParams: { "dmpid":dmp.id, "label":dmp.label }}); this.router.navigate([{ outlets: { dmpDetails: [ 'dmp' ] }}]);
//this.router.navigate(['/dmp'], { queryParams: { "dmpid":dmp.id, "label":dmp.label }});
} }
viewDetailedProject(dmp){ viewDetailedProject(dmp){

View File

@ -1,232 +1,269 @@
<table class="table table-striped customTable" [mfData]="tableData | dmpTableFilter : filterQuery | dmpVersionFilter : versionFilter |dmpstatusFilter: statusFilter" <table class="table table-striped customTable" [mfData]="tableData | dmpTableFilter : filterQuery | dmpVersionFilter : versionFilter |dmpstatusFilter: statusFilter"
#mf="mfDataTable" [mfRowsOnPage]="rowsOnPage" [(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder"> #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage" [(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
<thead> <thead>
<tr class="rowFilter"> <tr class="rowFilter">
<th colspan="1"> <th colspan="1">
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' /> <input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
</th> </th>
<th colspan="1"> <th colspan="1">
<button class="btn btn-default " (click)="getDmps('false')"> <button class="btn btn-default " (click)="getDmps('false')">
<span class="glyphicon glyphicon-refresh"></span> <span class="glyphicon glyphicon-refresh"></span>
</button> </button>
</th> </th>
<th class="rowFilterTopBorder" colspan="3"> <th class="rowFilterTopBorder" colspan="3">
<button type="button" class="btn btn-info btnMoreFilters" data-toggle="collapse" data-target="#demo" (click)="clickFilters($event.target)">More filters</button> <button type="button" class="btn btn-info btnMoreFilters" data-toggle="collapse" data-target="#demo" (click)="clickFilters($event.target)">More filters</button>
<div id="demo" class="collapse"> <div id="demo" class="collapse">
<input style="margin-top: 5px;" class="form-control" type="number" [(ngModel)]="versionFilter" placeholder='Version' /> <input style="margin-top: 5px;" class="form-control" type="number" [(ngModel)]="versionFilter" placeholder='Version' />
<select style="margin-top: 5px;" class="form-control" [id]="statusid" [(ngModel)]="statusFilter" [name]="statusDropDown" <select style="margin-top: 5px;" class="form-control" [id]="statusid" [(ngModel)]="statusFilter" [name]="statusDropDown"
#datasetfield> #datasetfield>
<option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option> <option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select> </select>
</div> </div>
</th> </th>
</tr> </tr>
<tr> <tr>
<th [ngClass]="{true:'visible', false:'invisible'}[showIDs]"> <th [ngClass]="{true:'visible', false:'invisible'}[showIDs]">
<mfDefaultSorter by="id">ID</mfDefaultSorter> <mfDefaultSorter by="id">ID</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter by="label">Label</mfDefaultSorter> <mfDefaultSorter by="label">Label</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter by="version">Version</mfDefaultSorter> <mfDefaultSorter by="version">Version</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter by="previous">Previous</mfDefaultSorter> <mfDefaultSorter by="previous">Previous</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter by="project">Project</mfDefaultSorter> <mfDefaultSorter by="project">Project</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter by="description">Description</mfDefaultSorter> <mfDefaultSorter by="description">Description</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter by="created">Created at</mfDefaultSorter> <mfDefaultSorter by="created">Created at</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter by="status">Status</mfDefaultSorter> <mfDefaultSorter by="status">Status</mfDefaultSorter>
</th> </th>
<th> <th>
Actions Actions
</th> </th>
<th> <th>
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="grayout-empty-table" *ngIf="!mf.data[0]"> <tr class="grayout-empty-table" *ngIf="!mf.data[0]">
<td colspan="5">No elements</td> <td colspan="5">No elements</td>
</tr> </tr>
<tr *ngFor="let dmp of mf.data" class="hover"> <tr *ngFor="let dmp of mf.data" class="hover">
<td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{dmp?.id}}</td> <td [ngClass]="{true:'visible', false:'invisible'}[showIDs]">{{dmp?.id}}</td>
<td class="url-like" (click)="viewDetailedDMP(dmp)">{{(dmp?.label?.length > 40) ? (dmp?.label | slice:0:40)+'...':(dmp?.label) }}</td> <!-- data-toggle="modal" data-target="#dmp-deatils-fullscreen" -->
<td style="width:20px;">{{dmp?.version}}</td> <td class="url-like" (click)="viewDetailedDMP(dmp)">{{(dmp?.label?.length > 40) ? (dmp?.label | slice:0:40)+'...':(dmp?.label) }}</td>
<td style="width:300px;">{{dmp?.previous}}</td> <td style="width:20px;">{{dmp?.version}}</td>
<td class="url-like" (click)="viewDetailedProject(dmp)">{{(dmp?.project?.label?.length > 40) ? (dmp?.project?.label | slice:0:40)+'...':(dmp?.project?.label) }}</td> <td style="width:300px;">{{dmp?.previous}}</td>
<td>{{(dmp?.description?.length > 40) ? (dmp?.description | slice:0:40)+'...':(dmp?.description) }}</td> <td class="url-like" (click)="viewDetailedProject(dmp)">{{(dmp?.project?.label?.length > 40) ? (dmp?.project?.label | slice:0:40)+'...':(dmp?.project?.label) }}</td>
<td>{{dmp?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td> <td>{{(dmp?.description?.length > 40) ? (dmp?.description | slice:0:40)+'...':(dmp?.description) }}</td>
<td>{{dmp?.status | statusToString }}</td> <td>{{dmp?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
<td> <td>{{dmp?.status | statusToString }}</td>
<a class="editGridColumn cursor-link" (click)="editDmp(dmp)"> <!--btn btn-primary btn-rounded css for button style --> <td>
<i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i></a> <a class="editGridColumn cursor-link" (click)="editDmp(dmp)"> <!--btn btn-primary btn-rounded css for button style -->
<a class="editGridColumn cursor-link" (click)="editDmpVersion(dmp)"> <i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i></a>
<i class="fa fa-clone fa-fw" data-toggle="tooltip" title="create new version" id="changeVersionDMP"></i> </a> <a class="editGridColumn cursor-link" (click)="editDmpVersion(dmp)">
<a class="editGridColumn cursor-link" (click)="markDMPForDelete(dmp)"> <i class="fa fa-clone fa-fw" data-toggle="tooltip" title="create new version" id="changeVersionDMP"></i> </a>
<i class="fa fa-eraser fa-fw" data-toggle="modal" data-target="#delete-dmp-confirm" title="delete DMP"></i> </a> <a class="editGridColumn cursor-link" (click)="markDMPForDelete(dmp)">
<!-- <i class="fa fa-eraser fa-fw" data-toggle="modal" data-target="#delete-dmp-confirm" title="delete DMP"></i> </a>
<a class="editGridColumn cursor-link" (click)="selectDmp(dmp)"> <!--
<i class="fa fa-table fa-fw" data-toggle="tooltip" title="show dataset for this DMP" id="showDatasets"></i></a> <a class="editGridColumn cursor-link" (click)="selectDmp(dmp)">
--> <i class="fa fa-table fa-fw" data-toggle="tooltip" title="show dataset for this DMP" id="showDatasets"></i></a>
</td> -->
<td style="max-width:100px;"> </td>
<button type="button" class="btn btn-default table-button" (click)="showDatasetsOfDmp(dmp)"> <i class="fa fa-folder-o" aria-hidden="true"></i> Datasets</button> <td style="max-width:100px;">
</td> <button type="button" class="btn btn-default table-button" (click)="showDatasetsOfDmp(dmp)"> <i class="fa fa-folder-o" aria-hidden="true"></i> Datasets</button>
</tr> </td>
</tbody> </tr>
<tfoot> </tbody>
<tr> <tfoot>
<td colspan="1"> <tr>
<button type="button" class="btn btn-info btncustom" (click)="newDmpForm(item)">Create New</button> <td colspan="1">
</td> <button type="button" class="btn btn-info btncustom" (click)="newDmpForm(item)">Create New</button>
<td colspan="7"> </td>
<mfBootstrapPaginator [rowsOnPageSet]="[5,10,20]"></mfBootstrapPaginator> <td colspan="7">
</td> <mfBootstrapPaginator [rowsOnPageSet]="[5,10,20]"></mfBootstrapPaginator>
</tr> </td>
</tfoot> </tr>
</tfoot>
</table> </table>
<!-- </div> --> <!-- </div> -->
<!--Modal for new and edit DMP--> <!--Modal for new and edit DMP-->
<div class="modal fade" id="newDmpModal" tabindex="-1" role="dialog" aria-labelledby="newDmpModalLabel" aria-hidden="true"> <div class="modal fade" id="newDmpModal" tabindex="-1" role="dialog" aria-labelledby="newDmpModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header centered-text"> <div class="modal-header centered-text">
<h4 class="modal-title" id="modalLabel"><b>{{ dmp?.id ? "Edit Data Management Plan" : "New Data Management Plan" }}</b></h4> <h4 class="modal-title" id="modalLabel"><b>{{ dmp?.id ? "Edit Data Management Plan" : "New Data Management Plan" }}</b></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form #dmpForm="ngForm" (ngSubmit)="SaveNewDmp()"> <form #dmpForm="ngForm" (ngSubmit)="SaveNewDmp()">
<div class="form-group">
<div class="form-group"> <div class="form-group">
<div class="form-group"> <label for="label-name" class="form-control-label">Label:</label>
<label for="label-name" class="form-control-label">Label:</label> <input type="text" class="form-control" id="label-name" [ngModel]="dmp?.label" (ngModelChange)="dmp.label=$event" name="label" required>
<input type="text" class="form-control" id="label-name" [ngModel]="dmp?.label" (ngModelChange)="dmp.label=$event" name="label" required>
</div>
<label for="recipient-name" class="col-form-label">Project:</label>
<select class="form-control" id="projectsDropDownKey" [ngModel]="dmp?.project" (ngModelChange)="dmp.project=$event" name="projectsDropDown" required>
<option *ngFor="let opt of projectsDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select>
</div> </div>
<div class="form-group"> <label for="recipient-name" class="col-form-label">Project:</label>
<label for="status-name" class="col-form-label">Status:</label> <select class="form-control" id="projectsDropDownKey" [ngModel]="dmp?.project" (ngModelChange)="dmp.project=$event" name="projectsDropDown" required>
<select class="form-control" id="statusid" [ngModel]="dmp?.status" (ngModelChange)="dmp.status=$event" name="statusDropDown" (change)="SelectDMPStatus(dmp, $event, oldValue);"> <option *ngFor="let opt of projectsDropDown.options" [value]="opt.key">{{opt.value}}</option>
<option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option> </select>
</select> </div>
</div> <div class="form-group">
<div class="form-group"> <label for="status-name" class="col-form-label">Status:</label>
<label for="label-name" class="form-control-label">Previous:</label> <select class="form-control" id="statusid" [ngModel]="dmp?.status" (ngModelChange)="dmp.status=$event" name="statusDropDown" (change)="SelectDMPStatus(dmp, $event, oldValue);">
<input type="text" class="form-control" id="label-previous" [ngModel]="dmp?.previous" (ngModelChange)="dmp.previous=$event" name="previous" disabled> <option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option>
</div> </select>
<div class="form-group"> </div>
<label for="abbreviation-text" class="form-control-label">Version:</label> <div class="form-group">
<input class="form-control" id="abbreviation-text" [ngModel]="dmp?.version" (ngModelChange)="dmp.version=$event" name="version" disabled> <label for="label-name" class="form-control-label">Previous:</label>
</div> <input type="text" class="form-control" id="label-previous" [ngModel]="dmp?.previous" (ngModelChange)="dmp.previous=$event" name="previous" disabled>
<div class="form-group"> </div>
<label for="abbreviation-text" class="form-control-label">Description:</label> <div class="form-group">
<textarea rows="3" class="form-control" id="abbreviation-text" [ngModel]="dmp?.description" (ngModelChange)="dmp.description=$event" name="description"></textarea> <label for="abbreviation-text" class="form-control-label">Version:</label>
</div> <input class="form-control" id="abbreviation-text" [ngModel]="dmp?.version" (ngModelChange)="dmp.version=$event" name="version" disabled>
<!-- </div>
<div class="form-group"> <div class="form-group">
<label for="reference-text" class="form-control-label">Profile Data:</label> <label for="abbreviation-text" class="form-control-label">Description:</label>
<textarea class="form-control" id="reference-text" [(ngModel)]="dmp?.profileData" name="profileData"></textarea> <textarea rows="3" class="form-control" id="abbreviation-text" [ngModel]="dmp?.description" (ngModelChange)="dmp.description=$event" name="description"></textarea>
</div> </div>
<div class="form-group"> <!--
<label for="start-date" class="form-control-label">Start Date:</label> <div class="form-group">
<input class="form-control" id="startDate-date" [(ngModel)]= "dmp?.startDate" name = "startDate"> <label for="reference-text" class="form-control-label">Profile Data:</label>
</div> <textarea class="form-control" id="reference-text" [(ngModel)]="dmp?.profileData" name="profileData"></textarea>
<div class="form-group"> </div>
<label for="end-date" class="form-control-label">End Date:</label> <div class="form-group">
<input class="form-control" id="endDate-date" [(ngModel)]= "dmp?.endDate" name = "endDate"> <label for="start-date" class="form-control-label">Start Date:</label>
</div> <input class="form-control" id="startDate-date" [(ngModel)]= "dmp?.startDate" name = "startDate">
--> </div>
</form> <div class="form-group">
</div> <label for="end-date" class="form-control-label">End Date:</label>
<div class="modal-footer"> <input class="form-control" id="endDate-date" [(ngModel)]= "dmp?.endDate" name = "endDate">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div>
<button type="submit" class="btn btn-primary" (click)="SaveDmp();">Save Dmp</button> -->
</div> </form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary" (click)="SaveDmp();">Save Dmp</button>
</div> </div>
</div> </div>
</div> </div>
</div>
<!--Modal for changing version--> <!--Modal for changing version-->
<div class="modal fade" id="newVersionDmpModal" tabindex="-1" role="dialog" aria-labelledby="newVersionDmpModalLabel" aria-hidden="true"> <div class="modal fade" id="newVersionDmpModal" tabindex="-1" role="dialog" aria-labelledby="newVersionDmpModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title" id="modalLabel"><b>Clone Data Management Plan</b></h4> <h4 class="modal-title" id="modalLabel"><b>Clone Data Management Plan</b></h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form #dmpForm="ngForm" (ngSubmit)="SaveNewDmp()"> <form #dmpForm="ngForm" (ngSubmit)="SaveNewDmp()">
<div class="form-group"> <div class="form-group">
<label for="label-name" class="form-control-label">Label:</label> <label for="label-name" class="form-control-label">Label:</label>
<input type="text" class="form-control" id="label-name" [ngModel]="dmp?.label" (ngModelChange)="dmp.label=$event" name="label"> <input type="text" class="form-control" id="label-name" [ngModel]="dmp?.label" (ngModelChange)="dmp.label=$event" name="label">
</div> </div>
<div class="form-group" hidden> <div class="form-group" hidden>
<label for="recipient-name" class="col-form-label">Project:</label> <label for="recipient-name" class="col-form-label">Project:</label>
<select class="form-control" [id]="projectsDropDownKey" [ngModel]="dmp?.project" (ngModelChange)="dmp.project=$event" [name]="projectsDropDown" #datasetfield> <select class="form-control" [id]="projectsDropDownKey" [ngModel]="dmp?.project" (ngModelChange)="dmp.project=$event" [name]="projectsDropDown" #datasetfield>
<option *ngFor="let opt of projectsDropDown.options" [value]="opt.key">{{opt.value}}</option> <option *ngFor="let opt of projectsDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select> </select>
</div> </div>
<div class="form-group" hidden> <div class="form-group" hidden>
<label for="label-name" class="form-control-label">Previous:</label> <label for="label-name" class="form-control-label">Previous:</label>
<input type="text" class="form-control" id="label-previous" [ngModel]="dmp?.previous" (ngModelChange)="dmp.previous=$event" name="previous"> <input type="text" class="form-control" id="label-previous" [ngModel]="dmp?.previous" (ngModelChange)="dmp.previous=$event" name="previous">
</div> </div>
<div class="form-group" hidden> <div class="form-group" hidden>
<label for="abbreviation-text" class="form-control-label">Version:</label> <label for="abbreviation-text" class="form-control-label">Version:</label>
<input class="form-control" id="abbreviation-text" [ngModel]="dmp?.version" (ngModelChange)="dmp.version=$event" name="version"> <input class="form-control" id="abbreviation-text" [ngModel]="dmp?.version" (ngModelChange)="dmp.version=$event" name="version">
</div> </div>
</form> </form>
</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="submit" class="btn btn-primary" [disabled]="!dmpForm.form.valid" (click)="cloneDMP(dmp);">Save Dmp</button> <button type="submit" class="btn btn-primary" [disabled]="!dmpForm.form.valid" (click)="cloneDMP(dmp);">Save Dmp</button>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="modal" tabindex="-1" id="messageForChangingStatus" role="dialog"> <div class="modal" tabindex="-1" id="messageForChangingStatus" role="dialog">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Change Staus</h5> <h5 class="modal-title">Change Staus</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p>The submitted status is available only when all the DMP's datasets are "Submitted" or "Cancel"</p> <p>The submitted status is available only when all the DMP's datasets are "Submitted" or "Cancel"</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">OK</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">OK</button>
</div> </div>
</div>
</div> </div>
</div> </div>
</div>
<!-- MODAL FOR DETAILS -->
<button class="btn btn-primary" data-toggle="modal" data-target="#dmp-deatils-fullscreen" contenteditable="false">Open Fullscreen Modal</button>
<div class="modal fade modal-fullscreen footer-to-bottom" id="dmp-deatils-fullscreen" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog animated zoomInLeft">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
<p class="">One fine body…</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<router-outlet name="dmpDetails"></router-outlet>
<!-- Confirmation module- do not delete --> <!-- Confirmation module- do not delete -->

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { GooggleSignInComponent } from './googgle-sign-in.component';
describe('GooggleSignInComponent', () => {
let component: GooggleSignInComponent;
let fixture: ComponentFixture<GooggleSignInComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ GooggleSignInComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(GooggleSignInComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View File

@ -23,7 +23,7 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit, Injectable
} }
ngOnInit() { ngOnInit() {
//this.googleInit();
} }
ngAfterViewInit() { ngAfterViewInit() {
@ -47,7 +47,8 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit, Injectable
public auth2: any; public auth2: any;
public googleInit() { public googleInit() {
gapi.load('auth2', () => { gapi.load('auth2', () => {
this.auth2 = gapi.auth2.init({ this.auth2 = gapi.auth2.init({
client_id: this.clientId, client_id: this.clientId,
@ -56,15 +57,15 @@ export class GooggleSignInComponent implements OnInit, AfterViewInit, Injectable
}); });
//RE-Render the button (due to known issues of google-button with angular's lifecycle) //RE-Render the button (due to known issues of google-button with angular's lifecycle)
gapi.signin2.render('googleBtn', { gapi.signin2.render('googleBtn');
'onsuccess': console.log("SUCCESSFULLY RERENDERED THE BUTTON"),
'onfailure': console.log("FAILED TO RERENDER THE BUTTON")
});
var buttonElement = this.element.nativeElement.querySelector('#googleBtn'); var buttonElement = this.element.nativeElement.querySelector('#googleBtn');
this.attachSignin(buttonElement); this.attachSignin(buttonElement);
}); });
} }
public attachSignin(element) { public attachSignin(element) {

View File

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MainSignInComponent } from './main-sign-in.component';
describe('MainSignInComponent', () => {
let component: MainSignInComponent;
let fixture: ComponentFixture<MainSignInComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MainSignInComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MainSignInComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View File

@ -18,6 +18,8 @@ export class DmpDetailedComponent implements OnInit {
ngOnInit() { ngOnInit() {
console.log("LOADING DmpDetailedComponent")
let sub = this.route.queryParams.subscribe(params => { let sub = this.route.queryParams.subscribe(params => {
let dmpid = params.dmpid; let dmpid = params.dmpid;
@ -25,7 +27,6 @@ export class DmpDetailedComponent implements OnInit {
this.serverService.getDmp(dmpid, getParams).subscribe( this.serverService.getDmp(dmpid, getParams).subscribe(
response => { response => {
this.dmp = response; this.dmp = response;
debugger;
}, },
error => { error => {
console.log("Could not load dmp"); console.log("Could not load dmp");