automated changes
This commit is contained in:
commit
47b30e2402
|
@ -19,6 +19,8 @@
|
||||||
"testTsconfig": "tsconfig.spec.json",
|
"testTsconfig": "tsconfig.spec.json",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
"styles": [
|
"styles": [
|
||||||
|
"../node_modules/primeng/resources/themes/omega/theme.css" ,
|
||||||
|
"../node_modules/primeng/resources/primeng.css",
|
||||||
"./../node_modules/bootstrap/dist/css/bootstrap.min.css",
|
"./../node_modules/bootstrap/dist/css/bootstrap.min.css",
|
||||||
"styles.css"
|
"styles.css"
|
||||||
],
|
],
|
||||||
|
|
|
@ -6821,6 +6821,11 @@
|
||||||
"utila": "0.4.0"
|
"utila": "0.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"primeng": {
|
||||||
|
"version": "5.0.0-rc.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/primeng/-/primeng-5.0.0-rc.0.tgz",
|
||||||
|
"integrity": "sha1-fb5YXppO84emPfSyyR3VbeXpJVI="
|
||||||
|
},
|
||||||
"process": {
|
"process": {
|
||||||
"version": "0.11.10",
|
"version": "0.11.10",
|
||||||
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
"ng2-datepicker": "^2.1.3",
|
"ng2-datepicker": "^2.1.3",
|
||||||
"ng4-loading-spinner": "^1.0.27",
|
"ng4-loading-spinner": "^1.0.27",
|
||||||
"ngx-webstorage": "^1.8.0",
|
"ngx-webstorage": "^1.8.0",
|
||||||
|
"primeng": "^5.0.0-rc.0",
|
||||||
"rxjs": "^5.4.2",
|
"rxjs": "^5.4.2",
|
||||||
"zone.js": "^0.8.17"
|
"zone.js": "^0.8.17"
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,14 +10,17 @@ import { DmpComponent } from './dmps/dmp.component';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { UserWorkspaceComponent } from './user-workspace/user-workspace.component';
|
import { UserWorkspaceComponent } from './user-workspace/user-workspace.component';
|
||||||
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
||||||
|
import { BreadcrumbService } from './services/breadcrumb.service';
|
||||||
|
|
||||||
const appRoutes: Routes = [
|
const appRoutes: Routes = [
|
||||||
|
//{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||||
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||||
|
//{ path: 'dataset', component: DatasetsComponent },
|
||||||
{ path: 'login', component: MainSignInComponent},
|
{ path: 'login', component: MainSignInComponent},
|
||||||
//{ path: 'projects', component: ProjectsComponent},
|
{ path: 'projects', component: ProjectsComponent},
|
||||||
//{ path: 'dmps', component: DmpComponent},
|
{ path: 'dmps', component: DmpComponent},
|
||||||
{ path: 'workspace', component: UserWorkspaceComponent},
|
{ path: 'workspace', component: UserWorkspaceComponent},
|
||||||
//{ path: '', component: EmptyComponent},
|
{ path: 'welcome', component: EmptyComponent},
|
||||||
{ path: '', redirectTo: '/login', pathMatch: 'full' },
|
{ path: '', redirectTo: '/login', pathMatch: 'full' },
|
||||||
{ path: '**', component: PageNotFoundComponent },
|
{ path: '**', component: PageNotFoundComponent },
|
||||||
/*
|
/*
|
||||||
|
@ -43,7 +46,7 @@ const appRoutes: Routes = [
|
||||||
RouterModule
|
RouterModule
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
BreadcrumbService
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class AppRoutingModule { }
|
export class AppRoutingModule { }
|
||||||
|
|
|
@ -36,14 +36,22 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
-webkit-box-shadow: 0px 0px 12px 2px rgba(0,0,0,0.73);
|
||||||
|
-moz-box-shadow: 0px 0px 12px 2px rgba(0,0,0,0.73);
|
||||||
|
box-shadow: 0px 0px 12px 2px rgba(0,0,0,0.73);
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar-title
|
|
||||||
{
|
.navbar-title {
|
||||||
position: absolute;
|
/*
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
text-align: center;
|
*/
|
||||||
margin:0 auto;
|
margin:0 auto;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.navbar-toggle {
|
.navbar-toggle {
|
||||||
z-index:3;
|
z-index:3;
|
||||||
|
|
|
@ -1,45 +1,58 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<nav class="navbar navbar-default">
|
<nav class="navbar navbar-default shadowed">
|
||||||
<div class="container-fluid">
|
<div class="col-md-5" >
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
<!--
|
||||||
|
<button class="btn btn-primary " [ngClass]="{true:'visible', false:'invisible'}[tokenService.isLoggedIn() == true]" (click)='slideNav()'>
|
||||||
<div class="navbar-header">
|
<span style="font-size:20px;cursor:pointer" >☰</span>
|
||||||
|
</button>
|
||||||
</div>
|
-->
|
||||||
|
<div class="nav navbar-nav navbar-left">
|
||||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
<div class="dropdown" [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]">
|
||||||
<div class="collapse navbar-collapse">
|
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"> Quick Navigate <span class="caret"></span> </button>
|
||||||
|
|
||||||
<div class="nav navbar-nav navbar-left" >
|
|
||||||
<button class="btn btn-primary navbar-btn navbar-left" [ngClass]="{true:'visible', false:'invisible'}[tokenService.isLoggedIn() == true]" (click)='slideNav()'>
|
|
||||||
<span style="font-size:20px;cursor:pointer" >☰</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h3 class="navbar-title">Data Management Plans Creator</h3>
|
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
|
||||||
<li class="dropdown" [ngClass]="{true:'invisible'}[loggedInAs == null]">
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Quick links <span class="caret"></span></a>
|
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a href="#">Action</a></li>
|
<li><a class="cursor" (click)="goToDMPs()">My DMPs</a></li>
|
||||||
<li><a href="#">Another action</a></li>
|
<li><a class="cursor" (click)="goToProjects()">My Projects</a></li>
|
||||||
<li><a href="#">Something else here</a></li>
|
|
||||||
<li role="separator" class="divider"></li>
|
|
||||||
<li><a href="#">Separated link</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</div>
|
||||||
<li [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]"><a>{{tokenService.getEmail()}}</a></li>
|
|
||||||
<li class="cursor" [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]" (click)="logout()"><a>Logout</a></li>
|
</div>
|
||||||
<li class="cursor" [ngClass]="{true:'invisible'}[tokenService.isLoggedIn() == true]" (click)="login()" ><a>Login</a></li>
|
</div>
|
||||||
</ul>
|
|
||||||
</div><!-- /.navbar-collapse -->
|
|
||||||
</div><!-- /.container-fluid -->
|
|
||||||
|
<div class="col-md-3" >
|
||||||
|
<h3 class="navbar-title">Data Management Plans Creator</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4" >
|
||||||
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
<li class="dropdown" [ngClass]="{true:'invisible'}[loggedInAs == null]">
|
||||||
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Quick links <span class="caret"></span></a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="#">Action</a></li>
|
||||||
|
<li><a href="#">Another action</a></li>
|
||||||
|
<li><a href="#">Something else here</a></li>
|
||||||
|
<li role="separator" class="divider"></li>
|
||||||
|
<li><a href="#">Separated link</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]"><a>{{tokenService.getEmail()}}</a></li>
|
||||||
|
<li class="cursor" [ngClass]="{false:'invisible'}[tokenService.isLoggedIn() == true]" (click)="logout()"><a>Logout</a></li>
|
||||||
|
<li class="cursor" [ngClass]="{true:'invisible'}[tokenService.isLoggedIn() == true]" (click)="login()" ><a>Login</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- breadcrumb bar -->
|
||||||
|
<div *ngIf="breadcrumbData.length!=0" class="col-md-12">
|
||||||
|
<p-breadcrumb [model]="breadcrumbData" [home]="breadcrumbHome"></p-breadcrumb>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="parent_div">
|
<div class="parent_div">
|
||||||
|
|
||||||
<div id="appSidebar" class="sidenav child_div_left">
|
<div id="appSidebar" class="sidenav child_div_left">
|
||||||
|
@ -59,10 +72,8 @@
|
||||||
|
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
|
|
||||||
|
|
||||||
<!--this should be invisible -->
|
<!--this should be invisible -->
|
||||||
<app-main-sign-in [ngClass]="'invisible'"></app-main-sign-in>
|
<app-main-sign-in [ngClass]="'invisible'"></app-main-sign-in>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,9 @@ import { JsonObjest } from '../app/entities/JsonObject.class';
|
||||||
import { TokenService, TokenProvider } from './services/login/token.service';
|
import { TokenService, TokenProvider } from './services/login/token.service';
|
||||||
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||||
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
||||||
|
import {BreadcrumbModule,MenuItem} from 'primeng/primeng';
|
||||||
|
import { BreadcrumbService } from './services/breadcrumb.service';
|
||||||
|
|
||||||
|
|
||||||
import { AutocompleteRemoteComponent } from './form/fields/autocomplete-remote/autocomplete-remote.component';
|
import { AutocompleteRemoteComponent } from './form/fields/autocomplete-remote/autocomplete-remote.component';
|
||||||
|
|
||||||
|
@ -22,21 +25,56 @@ export class AppComponent implements OnInit {
|
||||||
|
|
||||||
sliderExpanded : boolean = false;
|
sliderExpanded : boolean = false;
|
||||||
|
|
||||||
constructor(private tokenService : TokenService, private router: Router) {
|
|
||||||
|
breadcrumbHome: MenuItem = {icon: 'fa fa-home'};
|
||||||
|
breadcrumbData: MenuItem[] = new Array<MenuItem>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
breadcrumbData: MenuItem[] = [
|
||||||
|
{label:'Categories'},
|
||||||
|
{label:'Sports'},
|
||||||
|
{label:'Football'},
|
||||||
|
{label:'Countries'},
|
||||||
|
{label:'Spain'},
|
||||||
|
{label:'F.C. Barcelona'},
|
||||||
|
{label:'Squad'},
|
||||||
|
{label:'Lionel Messi', url: '/login'}
|
||||||
|
];
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
constructor(private tokenService : TokenService, private router: Router, private breadcrumbService : BreadcrumbService) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
this.breadcrumbService.breadcrumbDataEmitter.subscribe(
|
||||||
|
(data) => {
|
||||||
|
this.breadcrumbData = data;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.breadcrumbService.breadcrumbHomeEmitter.subscribe(
|
||||||
|
(data) => {
|
||||||
|
this.breadcrumbHome = data;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
clearbreadCrumb(){
|
||||||
|
this.breadcrumbData.length = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
slideNav(){
|
slideNav(){
|
||||||
|
|
||||||
$("#appSidebar").toggleClass("expanded");
|
$("#appSidebar").toggleClass("expanded");
|
||||||
$("#appBody").toggleClass("expanded");
|
$("#appBody").toggleClass("expanded");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,5 +96,14 @@ export class AppComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
goToDMPs(){
|
||||||
|
this.router.navigate(['/dmps'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ }});
|
||||||
|
}
|
||||||
|
|
||||||
|
goToProjects(){
|
||||||
|
this.router.navigate(['/projects'], { queryParams: { /*refresh : Math.random() ,returnUrl: this.state.url*/ }});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ import { GlobalInterceptor } from './services/interceptor';
|
||||||
import { TabModule } from './tabs/tab.module';
|
import { TabModule } from './tabs/tab.module';
|
||||||
import { AngularDraggableModule } from 'angular2-draggable';
|
import { AngularDraggableModule } from 'angular2-draggable';
|
||||||
|
|
||||||
|
import { BreadcrumbService } from './services/breadcrumb.service';
|
||||||
import { NativeLoginService } from './services/login/native-login.service';
|
import { NativeLoginService } from './services/login/native-login.service';
|
||||||
import { GooggleSignInComponent } from './login/googgle-sign-in/googgle-sign-in.component';
|
import { GooggleSignInComponent } from './login/googgle-sign-in/googgle-sign-in.component';
|
||||||
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component';
|
||||||
|
@ -42,24 +43,23 @@ import { NguiAutoCompleteModule } from '@ngui/auto-complete';
|
||||||
|
|
||||||
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
|
|
||||||
|
import {BreadcrumbModule,MenuItem} from 'primeng/primeng';
|
||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { DatasetTableFilterPipe } from './pipes/dataset-table-filter.pipe';
|
import { DatasetTableFilterPipe } from './pipes/dataset-table-filter.pipe';
|
||||||
import { DatasetStatusFilterPipe } from './pipes/dataset-status-filter.pipe';
|
import { DatasetStatusFilterPipe } from './pipes/dataset-status-filter.pipe';
|
||||||
import { DatasetsComponent } from './datasets/dataset.component';
|
import { DatasetsComponent } from './datasets/dataset.component';
|
||||||
import { DatasetRoutingModule } from './datasets/dataset-routing.module';
|
|
||||||
|
|
||||||
import { DmpComponent } from './dmps/dmp.component';
|
import { DmpComponent } from './dmps/dmp.component';
|
||||||
import { DmpTableFilterPipe } from './pipes/dmp-table-filter.pipe';
|
import { DmpTableFilterPipe } from './pipes/dmp-table-filter.pipe';
|
||||||
import { DmpStatusFilterPipe } from './pipes/dmp-status-filter.pipe';
|
import { DmpStatusFilterPipe } from './pipes/dmp-status-filter.pipe';
|
||||||
import { DmpVersionFilterPipe } from './pipes/dmp-version-filter.pipe';
|
import { DmpVersionFilterPipe } from './pipes/dmp-version-filter.pipe';
|
||||||
import { DmpRoutingModule } from './dmps/dmp-routing.module';
|
|
||||||
|
|
||||||
import { ProjectTableFilterPipe } from './pipes/project-table-filter.pipe';
|
import { ProjectTableFilterPipe } from './pipes/project-table-filter.pipe';
|
||||||
import { ProjectsComponent } from './projects/projects.component';
|
import { ProjectsComponent } from './projects/projects.component';
|
||||||
import { ProjectRoutingModule } from './projects/project-routing.module';
|
|
||||||
import { ProjectDetailComponent } from './projects/project.detail';
|
import { ProjectDetailComponent } from './projects/project.detail';
|
||||||
import { ModalComponent } from './modal/modal.component';
|
import { ModalComponent } from './modal/modal.component';
|
||||||
import { NgDatepickerModule } from 'ng2-datepicker';
|
import { NgDatepickerModule } from 'ng2-datepicker';
|
||||||
|
@ -109,16 +109,14 @@ import { Ng4LoadingSpinnerModule } from 'ng4-loading-spinner';
|
||||||
HttpModule,
|
HttpModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
TabModule,
|
TabModule,
|
||||||
DmpRoutingModule,
|
|
||||||
CommonModule,
|
CommonModule,
|
||||||
DatasetRoutingModule,
|
|
||||||
ProjectRoutingModule,
|
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
AngularDraggableModule,
|
AngularDraggableModule,
|
||||||
DataTableModule,
|
DataTableModule,
|
||||||
NgDatepickerModule,
|
NgDatepickerModule,
|
||||||
Ng4LoadingSpinnerModule,
|
Ng4LoadingSpinnerModule,
|
||||||
NguiAutoCompleteModule,
|
NguiAutoCompleteModule,
|
||||||
|
BreadcrumbModule,
|
||||||
SidebarModule.forRoot()
|
SidebarModule.forRoot()
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -127,7 +125,7 @@ import { Ng4LoadingSpinnerModule } from 'ng4-loading-spinner';
|
||||||
useClass: GlobalInterceptor,
|
useClass: GlobalInterceptor,
|
||||||
multi: true,
|
multi: true,
|
||||||
},
|
},
|
||||||
ServerService, dataModelBuilder, GlobalVariables, AuthGuard, PaginationService, TokenService, LocalStorageService, RestBase, EestoreService,NativeLoginService
|
ServerService, BreadcrumbService, dataModelBuilder, GlobalVariables, AuthGuard, PaginationService, TokenService, LocalStorageService, RestBase, EestoreService,NativeLoginService
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
|
||||||
|
|
||||||
import { DatasetsComponent } from './dataset.component';
|
|
||||||
//import { ProjectDetailComponent } from './project.detail';
|
|
||||||
import { DynamicFormComponent } from '../form/dynamic-form.component';
|
|
||||||
import { AuthGuard } from '../guards/auth.guard';
|
|
||||||
|
|
||||||
const datasetsRoutes: Routes = [
|
|
||||||
{ path: 'dataset', component: DatasetsComponent },
|
|
||||||
{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] }
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
RouterModule.forChild(datasetsRoutes)
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
RouterModule
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class DatasetRoutingModule { }
|
|
|
@ -41,10 +41,6 @@ export class DatasetsComponent implements OnInit {
|
||||||
public sortBy = "label";
|
public sortBy = "label";
|
||||||
public sortOrder = "asc";
|
public sortOrder = "asc";
|
||||||
|
|
||||||
//visibility rules for containers
|
|
||||||
tableVisible: boolean = true;
|
|
||||||
editorVisible: boolean = false;
|
|
||||||
|
|
||||||
|
|
||||||
// for tableIds
|
// for tableIds
|
||||||
showIDs : boolean = false;
|
showIDs : boolean = false;
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
|
||||||
|
|
||||||
import { DmpComponent } from './dmp.component';
|
|
||||||
import { DynamicFormComponent } from '../form/dynamic-form.component';
|
|
||||||
import { AuthGuard } from '../guards/auth.guard';
|
|
||||||
|
|
||||||
const projectsRoutes: Routes = [
|
|
||||||
//{ path: 'tabs/dmps', component: DmpComponent },
|
|
||||||
{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] }
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
RouterModule.forChild(projectsRoutes)
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
RouterModule
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class DmpRoutingModule { }
|
|
|
@ -16,6 +16,8 @@ import { FormGroup, FormControl } from '@angular/forms'; //na dw
|
||||||
import { NgForm } from '@angular/forms';
|
import { NgForm } from '@angular/forms';
|
||||||
import { DatasetsComponent } from '../datasets/dataset.component';
|
import { DatasetsComponent } from '../datasets/dataset.component';
|
||||||
import { StatusToString } from '../pipes/various/status-to-string';
|
import { StatusToString } from '../pipes/various/status-to-string';
|
||||||
|
import {MenuItem} from 'primeng/primeng';
|
||||||
|
import { BreadcrumbService } from '../services/breadcrumb.service';
|
||||||
|
|
||||||
declare var $ :any;
|
declare var $ :any;
|
||||||
|
|
||||||
|
@ -31,55 +33,70 @@ declare function simple_notifier(type: string, title: string, message:string): a
|
||||||
|
|
||||||
export class DmpComponent implements OnInit{
|
export class DmpComponent implements OnInit{
|
||||||
|
|
||||||
// Start ALTERNATIVE
|
|
||||||
//whole dmp data model
|
//whole dmp data model
|
||||||
tableData : any[] = new Array();
|
tableData : any[] = new Array();
|
||||||
|
|
||||||
//organisation editor data model
|
|
||||||
editingOrganisation: any = {};
|
|
||||||
organisationEditorForm : any;
|
|
||||||
|
|
||||||
//required by the table
|
//required by the table
|
||||||
public filterQuery = "";
|
public filterQuery = "";
|
||||||
public rowsOnPage = 10;
|
public rowsOnPage = 10;
|
||||||
public sortBy = "label";
|
public sortBy = "label";
|
||||||
public sortOrder = "asc";
|
public sortOrder = "asc";
|
||||||
|
|
||||||
//visibility rules for containers
|
|
||||||
tableVisible: boolean = true;
|
|
||||||
editorVisible: boolean = true;
|
|
||||||
|
|
||||||
|
|
||||||
// for tableIds
|
// for tableIds
|
||||||
showIDs : boolean = false;
|
showIDs : boolean = false;
|
||||||
// END ALTERNATIVE
|
|
||||||
|
public stateConfig : any = {
|
||||||
|
"dmps" : {
|
||||||
|
"tableVisible" : true,
|
||||||
|
"selectedID" : null,
|
||||||
|
"selectedLabel" : null
|
||||||
|
},
|
||||||
|
"datasets" : {
|
||||||
|
"tableVisible" : false,
|
||||||
|
"selectedID" : null,
|
||||||
|
"selectedLabel" : null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
breadcrumbHome: MenuItem = {icon: 'fa fa-home'};
|
||||||
|
|
||||||
|
/*
|
||||||
|
breadcrumbData: MenuItem[] = [];
|
||||||
|
*/
|
||||||
|
|
||||||
|
breadcrumbData: MenuItem[] = [
|
||||||
|
{label:'Categories'},
|
||||||
|
{label:'Sports'},
|
||||||
|
{label:'Football'},
|
||||||
|
{label:'Countries'},
|
||||||
|
{label:'Spain'},
|
||||||
|
{label:'F.C. Barcelona'},
|
||||||
|
{label:'Squad'},
|
||||||
|
{label:'Lionel Messi', url: 'https://en.wikipedia.org/wiki/Lionel_Messi'}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dmp:any;
|
dmp:any;
|
||||||
@Input() dmpTableVisible: boolean;
|
|
||||||
@Input() dmpCount = 0;
|
|
||||||
@Input() projectsDropDown:DropdownField;
|
@Input() projectsDropDown:DropdownField;
|
||||||
@Input() dataSetVisibe:boolean;
|
|
||||||
@Input() statusDropDown: DropdownField;
|
@Input() statusDropDown: DropdownField;
|
||||||
@Input() isSelected:boolean;
|
|
||||||
//@Input() projects: Project[];
|
|
||||||
dmpIdforDatasets: string;
|
|
||||||
dmpLabelforDatasets:string;
|
|
||||||
@ViewChild(DatasetsComponent) datasetsComponent:DatasetsComponent;
|
@ViewChild(DatasetsComponent) datasetsComponent:DatasetsComponent;
|
||||||
|
|
||||||
|
|
||||||
@ViewChild('isignOutBtn') isignOutBtn;
|
|
||||||
constructor(
|
constructor(
|
||||||
private serverService: ServerService,
|
private serverService: ServerService,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
|
private breadcrumbService : BreadcrumbService,
|
||||||
private router: Router){
|
private router: Router){
|
||||||
this.projectsDropDown = new DropdownField();
|
this.projectsDropDown = new DropdownField();
|
||||||
this.projectsDropDown.options = [];
|
this.projectsDropDown.options = [];
|
||||||
this.statusDropDown = new DropdownField();
|
this.statusDropDown = new DropdownField();
|
||||||
this.statusDropDown.options= [{key:'', value:null},{key:'0', value:"Active"},{key:'1', value:"Inactive"}, {key:'2', value:"Submitted"}, {key:'3', value:"Cancel"}]
|
this.statusDropDown.options= [{key:'', value:null},{key:'0', value:"Active"},{key:'1', value:"Inactive"}, {key:'2', value:"Submitted"}, {key:'3', value:"Cancel"}]
|
||||||
//this.projects = [];
|
//this.projects = [];
|
||||||
this.dmpTableVisible = false;
|
|
||||||
this.dataSetVisibe = false;
|
|
||||||
this.isSelected=false;
|
|
||||||
|
|
||||||
this.dmp = {
|
this.dmp = {
|
||||||
id: null,
|
id: null,
|
||||||
|
@ -110,6 +127,11 @@ export class DmpComponent implements OnInit{
|
||||||
simple_notifier("danger",null,"Could not load User's Projects");
|
simple_notifier("danger",null,"Could not load User's Projects");
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
this.breadcrumbService.setData(this.breadcrumbData);
|
||||||
|
this.breadcrumbService.setData(this.breadcrumbData);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,40 +211,30 @@ SaveDmp(){
|
||||||
|
|
||||||
|
|
||||||
selectDmp(item){
|
selectDmp(item){
|
||||||
this.dmpIdforDatasets = item.id;
|
this.stateConfig.dmps.selectedID = item.id;
|
||||||
this.dmpLabelforDatasets = item.label;
|
this.stateConfig.dmps.selectedLabel = item.label;
|
||||||
if(this.dataSetVisibe == false)
|
if(this.stateConfig.datasets.tableVisible == false)
|
||||||
this.dataSetVisibe = true;
|
this.stateConfig.datasets.tableVisible = true;
|
||||||
else
|
else
|
||||||
this.datasetsComponent.getDatasetForDmpMethod(item.id);
|
this.datasetsComponent.getDatasetForDmpMethod(item.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
editRow(item, elementId){
|
editRow(item, elementId){
|
||||||
this.isSelected = true;
|
|
||||||
if (elementId == "editDMP"){
|
if (elementId == "editDMP"){
|
||||||
this.dmp.label = item.label;
|
this.dmp = item;
|
||||||
this.dmp.previous = item.previous;
|
|
||||||
this.dmp.version = item.version;
|
|
||||||
this.dmp.profile = item.profile;
|
|
||||||
this.dmp.profileData = item.profileData;
|
|
||||||
this.dmp.id = item.id;
|
|
||||||
this.dmp.project = item.project.id;
|
this.dmp.project = item.project.id;
|
||||||
this.dmp.description = item.description;
|
|
||||||
this.dmp.status = item.status;
|
//setTimeout(function() {
|
||||||
setTimeout(function() {
|
|
||||||
$("#newDmpModal").modal("show");
|
$("#newDmpModal").modal("show");
|
||||||
},0);
|
//},0);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(elementId == "changeVersionDMP"){
|
if(elementId == "changeVersionDMP"){
|
||||||
this.dmp.label = item.label;
|
|
||||||
this.dmp.previous = item.previous;
|
|
||||||
this.dmp.version = item.version;
|
this.dmp = item;
|
||||||
this.dmp.profile = item.profile;
|
|
||||||
this.dmp.profileData = item.profileData;
|
|
||||||
this.dmp.id = item.id;
|
|
||||||
this.dmp.project = item.project.id;
|
this.dmp.project = item.project.id;
|
||||||
this.dmp.description = item.description;
|
|
||||||
$("#newVersionDmpModal").modal("show");
|
$("#newVersionDmpModal").modal("show");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<meta name="google-signin-client_id" content="524432312250-vhgidft856v8qftsc81kls4c74v87d8o.apps.googleusercontent.com">
|
<!--
|
||||||
|
<div class="col-md-12 ">
|
||||||
|
<p-breadcrumb [model]="breadcrumbData" [home]="breadcrumbHome"></p-breadcrumb>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
<table class="table table-striped customTable" [mfData]="tableData | dmpTableFilter : filterQuery | dmpVersionFilter : versionFilter |dmpstatusFilter: statusFilter"
|
<table *ngIf="stateConfig.dmps.tableVisible" 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">
|
||||||
|
@ -70,14 +74,16 @@
|
||||||
<td>{{dmp?.description}}</td>
|
<td>{{dmp?.description}}</td>
|
||||||
<td>{{dmp?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
<td>{{dmp?.created | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
|
||||||
<td>{{dmp?.status | statusToString }}</td>
|
<td>{{dmp?.status | statusToString }}</td>
|
||||||
<td><a href="#" class="editGridColumn" (click)="editRow(dmp, 'editDMP')"> <!--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)="editRow(dmp, 'editDMP')"> <!--btn btn-primary btn-rounded css for button style -->
|
||||||
<a href="#" class="editGridColumn" (click)="editRow(dmp, 'changeVersionDMP')">
|
<i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i></a>
|
||||||
|
<a class="editGridColumn cursor-link" (click)="editRow(dmp, 'changeVersionDMP')">
|
||||||
<i class="fa fa-clone fa-fw" data-toggle="tooltip" title="create new version" id="changeVersionDMP"></i> </a>
|
<i class="fa fa-clone fa-fw" data-toggle="tooltip" title="create new version" id="changeVersionDMP"></i> </a>
|
||||||
<a href="#" class="editGridColumn" (click)="markDMPForDelete(dmp)">
|
<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>
|
<i class="fa fa-eraser fa-fw" data-toggle="modal" data-target="#delete-dmp-confirm" title="delete DMP"></i> </a>
|
||||||
<a href="#" class="editGridColumn" (click)="editRow(dmp, 'showDatasets')">
|
<a class="editGridColumn cursor-link" (click)="editRow(dmp, 'showDatasets')">
|
||||||
<i class="fa fa-table fa-fw" data-toggle="tooltip" title="show dataset for this DMP" id="showDatasets"></i></a></td>
|
<i class="fa fa-table fa-fw" data-toggle="tooltip" title="show dataset for this DMP" id="showDatasets"></i></a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
|
@ -131,7 +137,8 @@
|
||||||
<label for="abbreviation-text" class="form-control-label">Description:</label>
|
<label for="abbreviation-text" class="form-control-label">Description:</label>
|
||||||
<textarea rows="3" class="form-control" id="abbreviation-text" [(ngModel)]="dmp.description" name="description"></textarea>
|
<textarea rows="3" class="form-control" id="abbreviation-text" [(ngModel)]="dmp.description" name="description"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="form-group">
|
<!--
|
||||||
|
<div class="form-group">
|
||||||
<label for="reference-text" class="form-control-label">Profile Data:</label>
|
<label for="reference-text" class="form-control-label">Profile Data:</label>
|
||||||
<textarea class="form-control" id="reference-text" [(ngModel)]="dmp.profileData" name="profileData"></textarea>
|
<textarea class="form-control" id="reference-text" [(ngModel)]="dmp.profileData" name="profileData"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
@ -142,7 +149,8 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="end-date" class="form-control-label">End Date:</label>
|
<label for="end-date" class="form-control-label">End Date:</label>
|
||||||
<input class="form-control" id="endDate-date" [(ngModel)]= "dmp.endDate" name = "endDate">
|
<input class="form-control" id="endDate-date" [(ngModel)]= "dmp.endDate" name = "endDate">
|
||||||
</div> -->
|
</div>
|
||||||
|
-->
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -154,7 +162,6 @@
|
||||||
</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">
|
||||||
|
@ -188,41 +195,44 @@
|
||||||
<input class="form-control" id="abbreviation-text" [(ngModel)]="dmp.version" name="version">
|
<input class="form-control" id="abbreviation-text" [(ngModel)]="dmp.version" 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" (click)="cloneDMP(dmp);">Save Dmp</button>
|
<button type="submit" class="btn btn-primary" (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">×</span>
|
<span aria-hidden="true">×</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 DMPs-->
|
|
||||||
<!-- <modal *ngIf="item && show" [(show)]="show" [item]="item" [(dataSetVisibe)]="dataSetVisibe"></modal> -->
|
<!--Modal for DMPs-->
|
||||||
|
<!-- <modal *ngIf="item && show" [(show)]="show" [item]="item" [(dataSetVisibe)]="stateConfig.datasets.tableVisible"></modal> -->
|
||||||
<!--DATASET TABLE-->
|
|
||||||
<datasets-table *ngIf="dataSetVisibe" [dmpIdforDatasets]="dmpIdforDatasets" [dmpLabelforDatasets]="dmpLabelforDatasets" [(dataSetVisibe)]="dataSetVisibe"></datasets-table>
|
<!--DATASET TABLE-->
|
||||||
|
<datasets-table *ngIf="stateConfig.datasets.tableVisible" [dmpIdforDatasets]="stateConfig.dmps.selectedID" [dmpLabelforDatasets]="stateConfig.dmps.selectedLabel" [(dataSetVisibe)]="stateConfig.datasets.tableVisible"></datasets-table>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Confirmation module- do not delete -->
|
||||||
|
|
||||||
|
<confirmation [confirmationID]="'delete-dmp-confirm'" [confirmationTitle]="'Caution'" [confirmationDescr]="'This action will delete this DMP. Are you sure ? This is not revertable !'" (responseSender)="deleteDMP($event)"></confirmation>
|
||||||
|
|
||||||
|
|
||||||
<!-- Confirmation module- do not delete -->
|
|
||||||
<confirmation [confirmationID]="'delete-dmp-confirm'" [confirmationTitle]="'Caution'" [confirmationDescr]="'This action will delete this DMP. Are you sure you want to delete this DMP ? This is not revertable !'"
|
|
||||||
(responseSender)="deleteDMP($event)"></confirmation>
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
.hide{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
.btncustom{
|
.btncustom{
|
||||||
background-color:#337ab7;
|
background-color:#337ab7;
|
||||||
color:white;
|
color:white;
|
||||||
|
@ -5,27 +13,85 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.parent-div {
|
.parent-div {
|
||||||
height: calc(100vh - 80px);
|
height: calc(100vh - 60px); /* is height of window minus heigh of header bar */
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.child-div-left{
|
.child-div-left{
|
||||||
|
|
||||||
|
-webkit-box-shadow: 0px 0px 9px 2px rgba(0,0,0,0.75);
|
||||||
|
-moz-box-shadow: 0px 0px 9px 2px rgba(0,0,0,0.75);
|
||||||
|
box-shadow: 0px 0px 9px 2px rgba(0,0,0,0.75);
|
||||||
|
|
||||||
|
padding:0px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
-webkit-transition: width 0.5s; /* For Safari 3.1 to 6.0 */
|
||||||
|
transition: width 0.5s;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.child-div-caret{
|
||||||
|
position: absolute;
|
||||||
|
left: 98%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
z-index: 9999;
|
||||||
|
font-size: 2em;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.child-div-right {
|
.child-div-right {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
-webkit-transition: 0.5s; /* For Safari 3.1 to 6.0 */
|
||||||
|
transition: width 0.5s;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.shrink-width{
|
||||||
|
width: 0px;
|
||||||
|
/*visibility:hidden;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.form-body-container{
|
.form-body-container{
|
||||||
height: calc(100vh - 80px - 130px);
|
padding-bottom: 10px;
|
||||||
|
height: calc(100vh - 85px - 138px); /* is height of window minus heigh of app header bar minus height of form footer bar */
|
||||||
overflow-y:scroll;
|
overflow-y:scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-footer-seperator{
|
||||||
|
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: rgb(112, 112, 112);
|
||||||
|
|
||||||
|
/*
|
||||||
|
-webkit-box-shadow: 0px 0px 11px 1px rgba(0,0,0,0.75);
|
||||||
|
-moz-box-shadow: 0px 0px 11px 1px rgba(0,0,0,0.75);
|
||||||
|
box-shadow: 0px 0px 11px 1px rgba(0,0,0,0.75);
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*border-width: thin;*/
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
.form-footer-container {
|
.form-footer-container {
|
||||||
height: 130px;
|
|
||||||
|
/*
|
||||||
|
-webkit-box-shadow: 0px -3px 5px 0px rgba(128,128,128,1);
|
||||||
|
-moz-box-shadow: 0px -3px 5px 0px rgba(128,128,128,1);
|
||||||
|
box-shadow: 0px -3px 5px 0px rgba(128,128,128,1);
|
||||||
|
*/
|
||||||
|
|
||||||
|
height: 138px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress{
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 0px;
|
||||||
}
|
}
|
|
@ -1,10 +1,8 @@
|
||||||
<div class="parent-div">
|
<div class="parent-div">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-8 col-sm-9 child-div-left" >
|
<div class=" child-div-left" [ngClass]="{true:'col-md-8 col-sm-9', false:'col-md-12 col-sm-12'}[expandedToc]">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12 form-body-container" id="form-container">
|
<div class="col-md-12 form-body-container" id="form-container">
|
||||||
|
|
||||||
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||||
|
@ -38,8 +36,20 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-12 form-footer-seperator" >
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12 form-footer-container" >
|
<div class="col-md-12 form-footer-container" >
|
||||||
|
|
||||||
|
<div >
|
||||||
|
<div class="progress">
|
||||||
|
<div class="progress-bar" role="progressbar" aria-valuenow= "" aria-valuemin="0" aria-valuemax="100" [ngStyle]="{'width': dirtyValues + '%'}">
|
||||||
|
<!-- {{dirtyValues}}% -->
|
||||||
|
</div>
|
||||||
|
</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)="SaveFinalize();">Save</button>
|
||||||
|
@ -88,12 +98,17 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-4 col-sm-3 child-div-right" id="toc-container">
|
<div class="child-div-caret" (click)="toggleTOC()">
|
||||||
|
<i class="fa toc-toggler" [ngClass]="{true:'fa-arrow-right', false:'fa-arrow-left'}[expandedToc]" aria-hidden="true" ></i>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="child-div-right" [ngClass]="{true:'col-md-4 col-sm-3', false:'shrink-width' }[expandedToc]" id="toc-container">
|
||||||
<toc [dataModel]="dataModel" (setPage)="setPage($event)"></toc>
|
<toc [dataModel]="dataModel" (setPage)="setPage($event)"></toc>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,6 @@ export class DynamicFormComponent implements OnInit {
|
||||||
private fragment: string;
|
private fragment: string;
|
||||||
xml2jsonOBJ: any;
|
xml2jsonOBJ: any;
|
||||||
|
|
||||||
expandedForm : boolean = false;
|
|
||||||
expandedToc : boolean = true;
|
expandedToc : boolean = true;
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,7 +233,7 @@ export class DynamicFormComponent implements OnInit {
|
||||||
(data) => {
|
(data) => {
|
||||||
console.log("Updated dataset");
|
console.log("Updated dataset");
|
||||||
//simple_notifier("success",null,"Saved form progress");
|
//simple_notifier("success",null,"Saved form progress");
|
||||||
this.router.navigate(['/workspace'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
this.router.navigate(['/welcome'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
simple_notifier("danger",null,"Could not save form progress");
|
simple_notifier("danger",null,"Could not save form progress");
|
||||||
|
@ -295,4 +294,8 @@ export class DynamicFormComponent implements OnInit {
|
||||||
this.tokenService.setToken(null); //kanonika prepei na mpei mesa sthn function.....
|
this.tokenService.setToken(null); //kanonika prepei na mpei mesa sthn function.....
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toggleTOC(){
|
||||||
|
this.expandedToc = !this.expandedToc;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,3 +1,10 @@
|
||||||
.cursor-hand{
|
.cursor-hand{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toc-toggler {
|
||||||
|
position: absolute;
|
||||||
|
left: 0%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
|
@ -1,43 +1,43 @@
|
||||||
<body data-spy="scroll" data-target="#toc">
|
<body data-spy="scroll" data-target="#toc">
|
||||||
<nav id="toc" data-toggle="toc">
|
<nav id="toc" data-toggle="toc">
|
||||||
<ul class="nav flex-column">
|
<ul class="nav flex-column">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<div *ngFor="let group of dataModel.groups"> <!-- All contents in the first page -->
|
<div *ngFor="let group of dataModel.groups"> <!-- All contents in the first page -->
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a class="cursor-hand" (click)='scrollToElemID(group.key, group.page)'>{{group.title}}</a>
|
<a class="cursor-hand" (click)='scrollToElemID(group.key, group.page)'>{{group.title}}</a>
|
||||||
<ul *ngFor="let field of group.groupFields">
|
<ul *ngFor="let field of group.groupFields">
|
||||||
<li *ngIf="field.visible == 'true' && field.label"> <!-- && field.label for sections without field label as data summery -->
|
<li *ngIf="field.visible == 'true' && field.label"> <!-- && field.label for sections without field label as data summery -->
|
||||||
<a class="cursor-hand" (click)='scrollToElemID(field.key, group.page)'>{{field.label}} </a>
|
<a class="cursor-hand" (click)='scrollToElemID(field.key, group.page)'>{{field.label}} </a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <div *ngFor="let group of dataModel.groups">
|
<!-- <div *ngFor="let group of dataModel.groups">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a class="nav-link" [routerLink]="['.']" fragment="{{group.key}}">{{group.title}}</a>
|
<li><a class="nav-link" [routerLink]="['.']" fragment="{{group.key}}">{{group.title}}</a>
|
||||||
<ul *ngFor="let field of group.groupFields">
|
<ul *ngFor="let field of group.groupFields">
|
||||||
<li *ngIf="field.visible == 'true'">
|
<li *ngIf="field.visible == 'true'">
|
||||||
<a class="nav-link" href="#field.key">{{field.label}}</a>
|
<a class="nav-link" href="#field.key">{{field.label}}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</body>
|
</body>
|
|
@ -39,7 +39,7 @@ export class MainSignInComponent implements OnInit {
|
||||||
this.createProjectEditorForm();
|
this.createProjectEditorForm();
|
||||||
//debugger;
|
//debugger;
|
||||||
if(this.tokenService.isLoggedIn()){
|
if(this.tokenService.isLoggedIn()){
|
||||||
this.router.navigate(['workspace'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
this.router.navigate(['/welcome'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ export class MainSignInComponent implements OnInit {
|
||||||
simple_notifier("success",null,"Successful login");
|
simple_notifier("success",null,"Successful login");
|
||||||
|
|
||||||
this.tokenService.login(response['token'], TokenProvider.native, this.creds.username, response['email']);
|
this.tokenService.login(response['token'], TokenProvider.native, this.creds.username, response['email']);
|
||||||
this.router.navigate(['/workspace'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
this.router.navigate(['/welcome'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
simple_notifier("danger",null,"Failed to login");
|
simple_notifier("danger",null,"Failed to login");
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
|
||||||
|
|
||||||
import { ProjectsComponent } from './projects.component';
|
|
||||||
import { ProjectDetailComponent } from './project.detail';
|
|
||||||
import { DynamicFormComponent } from '../form/dynamic-form.component';
|
|
||||||
import { AuthGuard } from '../guards/auth.guard';
|
|
||||||
|
|
||||||
const projectsRoutes: Routes = [
|
|
||||||
// { path: 'tabs/projects', component: ProjectsComponent }, // canActivate: [AuthGuard]
|
|
||||||
{ path: 'dynamic-form/:id', component: DynamicFormComponent, canActivate: [AuthGuard] }
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
RouterModule.forChild(projectsRoutes)
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
RouterModule
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class ProjectRoutingModule { }
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { Injectable, EventEmitter } from '@angular/core';
|
||||||
|
import {Observable} from 'rxjs/Observable';
|
||||||
|
import {MenuItem} from 'primeng/primeng';
|
||||||
|
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class BreadcrumbService {
|
||||||
|
|
||||||
|
|
||||||
|
breadcrumbHomeEmitter : EventEmitter<MenuItem> = new EventEmitter<MenuItem>();
|
||||||
|
breadcrumbDataEmitter : EventEmitter<Array<MenuItem>> = new EventEmitter<Array<MenuItem>>();
|
||||||
|
|
||||||
|
|
||||||
|
setData(breadcrumbData : Array<MenuItem>){
|
||||||
|
this.breadcrumbDataEmitter.emit(breadcrumbData);
|
||||||
|
}
|
||||||
|
|
||||||
|
setHome(breadcrumbHome: MenuItem) {
|
||||||
|
this.breadcrumbHomeEmitter.emit(breadcrumbHome);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
import { Injectable, Inject} from '@angular/core';
|
import { Injectable, Inject} from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import {LocalStorageService} from 'ngx-webstorage';
|
import {LocalStorageService} from 'ngx-webstorage';
|
||||||
|
import {Router} from '@angular/router';
|
||||||
import 'rxjs/add/operator/map';
|
import 'rxjs/add/operator/map';
|
||||||
import { DOCUMENT } from '@angular/platform-browser';
|
import { DOCUMENT } from '@angular/platform-browser';
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@ declare function sign_out_google(): any;
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class TokenService {
|
export class TokenService {
|
||||||
|
|
||||||
constructor (private storage : LocalStorageService, @Inject(DOCUMENT) private document) {
|
constructor (private storage : LocalStorageService, @Inject(DOCUMENT) private document, private router : Router) {
|
||||||
//var csrfToken : string = jQuery(document).find('meta[name="csrf-token"]').attr('content');
|
//var csrfToken : string = jQuery(document).find('meta[name="csrf-token"]').attr('content');
|
||||||
//this.setCSRFToken(csrfToken);
|
//this.setCSRFToken(csrfToken);
|
||||||
}
|
}
|
||||||
|
@ -83,6 +84,7 @@ export class TokenService {
|
||||||
|
|
||||||
|
|
||||||
logout(){
|
logout(){
|
||||||
|
debugger;
|
||||||
//set the log out actions here
|
//set the log out actions here
|
||||||
this.setLoggedIn(false);
|
this.setLoggedIn(false);
|
||||||
this.setEmail(null);
|
this.setEmail(null);
|
||||||
|
@ -95,7 +97,9 @@ export class TokenService {
|
||||||
|
|
||||||
this.setProvider(null);
|
this.setProvider(null);
|
||||||
|
|
||||||
window.location.reload();
|
this.router.navigate(['/login'], { queryParams: { /*returnUrl: this.state.url*/ }});
|
||||||
|
|
||||||
|
//window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue