This commit is contained in:
parent
910173c907
commit
6f605960e5
|
@ -14,10 +14,10 @@ import { MainSignInComponent } from './login/main-sign-in/main-sign-in.component
|
|||
const appRoutes: Routes = [
|
||||
{ path: 'dynamic-form', component: DynamicFormComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'login', component: MainSignInComponent},
|
||||
//{ path: 'projects', component: ProjectsComponent},
|
||||
//{ path: 'dmps', component: DmpComponent},
|
||||
{ path: 'projects', component: ProjectsComponent},
|
||||
{ path: 'dmps', component: DmpComponent},
|
||||
{ path: 'workspace', component: UserWorkspaceComponent},
|
||||
//{ path: '', component: EmptyComponent},
|
||||
{ path: 'welcome', component: EmptyComponent},
|
||||
{ path: '', redirectTo: '/login', pathMatch: 'full' },
|
||||
{ path: '**', component: PageNotFoundComponent },
|
||||
/*
|
||||
|
|
|
@ -1,17 +1,32 @@
|
|||
|
||||
<div>
|
||||
<nav class="navbar navbar-default shadowed">
|
||||
<div class="col-md-5 form-footer-seperator" >
|
||||
<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>
|
||||
<div class="col-md-5" >
|
||||
<!--
|
||||
<button class="btn btn-primary " [ngClass]="{true:'visible', false:'invisible'}[tokenService.isLoggedIn() == true]" (click)='slideNav()'>
|
||||
<span style="font-size:20px;cursor:pointer" >☰</span>
|
||||
</button>
|
||||
-->
|
||||
<div class="nav navbar-nav navbar-left">
|
||||
<div class="dropdown ">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"> Manage <span class="caret"></span> </button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="cursor" (click)="goToDMPs()">My DMPs</a></li>
|
||||
<li><a class="cursor" (click)="goToProjects()">My Projects</a></li>
|
||||
<li><a class="cursor"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 form-footer-seperator" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3" >
|
||||
<h3 class="navbar-title">Data Management Plans Creator</h3>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-footer-seperator" >
|
||||
<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>
|
||||
|
|
|
@ -58,5 +58,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*/ }});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
}
|
||||
|
||||
.parent-div {
|
||||
height: calc(100vh - 65px); /* is height of window minus heigh of header bar */
|
||||
height: calc(100vh - 60px); /* is height of window minus heigh of header bar */
|
||||
width:100%;
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,12 @@
|
|||
|
||||
padding:0px;
|
||||
height: 100%;
|
||||
-webkit-transition: 0.5s; /* For Safari 3.1 to 6.0 */
|
||||
transition: 0.5s;
|
||||
-webkit-transition: width 0.5s; /* For Safari 3.1 to 6.0 */
|
||||
transition: width 0.5s;
|
||||
|
||||
-webkit-transition-delay: visibility 5.6s; /* Safari */
|
||||
transition-delay: visibility 5.6s;
|
||||
|
||||
}
|
||||
|
||||
.child-div-caret{
|
||||
|
@ -45,9 +49,12 @@
|
|||
.child-div-right {
|
||||
overflow-y: scroll;
|
||||
height: 100%;
|
||||
|
||||
-webkit-transition: 0.5s; /* For Safari 3.1 to 6.0 */
|
||||
transition: 0.5s;
|
||||
transition: visibility 0s, opacity 0.5s linear;
|
||||
transition: width 0.5s;
|
||||
|
||||
-webkit-transition-delay: visibility 5.6s; /* Safari */
|
||||
transition-delay: visibility 5.6s;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ export class DynamicFormComponent implements OnInit {
|
|||
(data) => {
|
||||
console.log("Updated dataset");
|
||||
//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) => {
|
||||
simple_notifier("danger",null,"Could not save form progress");
|
||||
|
@ -295,7 +295,6 @@ export class DynamicFormComponent implements OnInit {
|
|||
}
|
||||
|
||||
toggleTOC(){
|
||||
console.log("toggling toc")
|
||||
this.expandedToc = !this.expandedToc;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ export class MainSignInComponent implements OnInit {
|
|||
this.createProjectEditorForm();
|
||||
//debugger;
|
||||
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");
|
||||
|
||||
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 => {
|
||||
simple_notifier("danger",null,"Failed to login");
|
||||
|
|
Loading…
Reference in New Issue