-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ProjectAuthoringCompoonent): Extract
ProjectAuthoringParentComponent
- Loading branch information
1 parent
c226806
commit c771391
Showing
10 changed files
with
392 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...sets/wise5/authoringTool/project-authoring-parent/project-authoring-parent.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div id="top" class="view-content view-content--with-sidemenu"> | ||
<div class="l-constrained" fxLayout="column"> | ||
<div class="node-content md-whiteframe-1dp" fxLayout="row wrap"> | ||
<div class="main-content"> | ||
<concurrent-authors-message | ||
[projectId]="projectId" | ||
class="concurrent-authors-message center app-background" | ||
></concurrent-authors-message> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
17 changes: 17 additions & 0 deletions
17
...sets/wise5/authoringTool/project-authoring-parent/project-authoring-parent.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.node-content { | ||
padding: 0px 16px; | ||
position: relative; | ||
} | ||
|
||
.main-content { | ||
margin-bottom: 20px; | ||
width: 100%; | ||
} | ||
|
||
.concurrent-authors-message { | ||
position: sticky; | ||
top: 1px; | ||
padding: 4px 0; | ||
display: block; | ||
z-index: 3; | ||
} |
25 changes: 25 additions & 0 deletions
25
...assets/wise5/authoringTool/project-authoring-parent/project-authoring-parent.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component } from '@angular/core'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
import { TeacherProjectService } from '../../services/teacherProjectService'; | ||
|
||
@Component({ | ||
templateUrl: './project-authoring-parent.component.html', | ||
styleUrls: ['./project-authoring-parent.component.scss'] | ||
}) | ||
export class ProjectAuthoringParentComponent { | ||
protected projectId: number; | ||
|
||
constructor(private projectService: TeacherProjectService, private route: ActivatedRoute) {} | ||
|
||
ngOnInit(): void { | ||
this.projectId = Number(this.route.snapshot.paramMap.get('unitId')); | ||
this.projectService.notifyAuthorProjectBegin(this.projectId); | ||
window.onbeforeunload = (event) => { | ||
this.projectService.notifyAuthorProjectEnd(this.projectId); | ||
}; | ||
} | ||
|
||
ngOnDestroy(): void { | ||
this.projectService.notifyAuthorProjectEnd(this.projectId); | ||
} | ||
} |
Oops, something went wrong.