Skip to content

Commit

Permalink
AT: Move preview unit button to top bar
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima committed Oct 23, 2023
1 parent 46bea79 commit 83a3491
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ <h3 fxLayout="row" fxLayoutAlign="start center" class="title-header">
>
<mat-icon>info</mat-icon>
</button>
<button
mat-icon-button
aria-label="Preview Unit"
i18n-aria-label
matTooltip="Preview Unit"
i18n-matTooltip
(click)="previewProject()"
>
<mat-icon>visibility</mat-icon>
</button>
<button
mat-icon-button
*ngIf="runId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export class TopBarComponent implements OnInit {
return projectInfo;
}

protected previewProject(): void {
window.open(`${this.configService.getConfigParam('previewProjectURL')}`);
}

protected showHelp(): void {
window.open(
'https://docs.google.com/document/d/1G8lVtiUlGXLRAyFOvkEdadHYhJhJLW4aor9dol2VzeU',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@
>
<mat-icon>delete</mat-icon>
</button>
<button
mat-raised-button
color="primary"
(click)="previewProject()"
matTooltip="Preview Unit"
matTooltipPosition="above"
i18n-matTooltip
>
<mat-icon>visibility</mat-icon>
</button>
</div>
</div>
<div class="all-nodes-div">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component } from '@angular/core';
import { ConfigService } from '../../services/configService';
import { DeleteNodeService } from '../../services/deleteNodeService';
import { TeacherProjectService } from '../../services/teacherProjectService';
import { TeacherDataService } from '../../services/teacherDataService';
Expand All @@ -25,7 +24,6 @@ export class ProjectAuthoringComponent {
private subscriptions: Subscription = new Subscription();

constructor(
private configService: ConfigService,
private deleteNodeService: DeleteNodeService,
private projectService: TeacherProjectService,
private dataService: TeacherDataService,
Expand Down Expand Up @@ -59,10 +57,6 @@ export class ProjectAuthoringComponent {
this.unselectAllItems();
}

protected previewProject(): void {
window.open(`${this.configService.getConfigParam('previewProjectURL')}`);
}

protected getNodePositionById(nodeId: string): string {
return this.projectService.getNodePositionById(nodeId);
}
Expand Down
40 changes: 22 additions & 18 deletions src/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">38</context>
<context context-type="linenumber">48</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/components/common/feedbackRule/edit-feedback-rules/edit-feedback-rules.component.html</context>
Expand Down Expand Up @@ -1454,8 +1454,12 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<context context-type="linenumber">8</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">62</context>
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">23</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">25</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html</context>
Expand Down Expand Up @@ -9685,7 +9689,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">150</context>
<context context-type="linenumber">140</context>
</context-group>
</trans-unit>
<trans-unit id="a10dba8eb1f22a5f90f90e79b8305963eec3ee38" datatype="html">
Expand All @@ -9700,7 +9704,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">217</context>
<context context-type="linenumber">207</context>
</context-group>
</trans-unit>
<trans-unit id="0217500199a3e48a7b95762b14b79dad49e76beb" datatype="html">
Expand All @@ -9715,7 +9719,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">218</context>
<context context-type="linenumber">208</context>
</context-group>
</trans-unit>
<trans-unit id="f951d80b53d5536f79142285e8ba09f190a3c723" datatype="html">
Expand Down Expand Up @@ -9823,25 +9827,25 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<source>Switch to Grading View</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">25</context>
<context context-type="linenumber">35</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">27</context>
<context context-type="linenumber">37</context>
</context-group>
</trans-unit>
<trans-unit id="b8ae83571c90788bf730befdbb3de4c7cf14ed8e" datatype="html">
<source> Help </source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">43,45</context>
<context context-type="linenumber">53,55</context>
</context-group>
</trans-unit>
<trans-unit id="ffac8783eaf153173408c8a9014a7484fa6a9175" datatype="html">
<source>User Menu</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">48</context>
<context context-type="linenumber">58</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html</context>
Expand All @@ -9852,7 +9856,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<source> Go Home </source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">73,75</context>
<context context-type="linenumber">83,85</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html</context>
Expand All @@ -9863,7 +9867,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<source> Sign Out </source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">77,79</context>
<context context-type="linenumber">87,89</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html</context>
Expand Down Expand Up @@ -12100,7 +12104,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
}}"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">109,111</context>
<context context-type="linenumber">99,101</context>
</context-group>
</trans-unit>
<trans-unit id="3374b45efd7fad4f098ebbfb6a888d7236906a0c" datatype="html">
Expand All @@ -12109,7 +12113,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
}}"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">119,121</context>
<context context-type="linenumber">109,111</context>
</context-group>
</trans-unit>
<trans-unit id="6a6a2c1fda09ebe6ab5a6a8313989c4cf4d8b194" datatype="html">
Expand All @@ -12118,28 +12122,28 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
}}"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">129,131</context>
<context context-type="linenumber">119,121</context>
</context-group>
</trans-unit>
<trans-unit id="b3b4847175a6193afa85eb431bbe16d1f04470fa" datatype="html">
<source>Has Rubric</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">138</context>
<context context-type="linenumber">128</context>
</context-group>
</trans-unit>
<trans-unit id="791981839110791639" datatype="html">
<source>Are you sure you want to delete the selected item?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts</context>
<context context-type="linenumber">106</context>
<context context-type="linenumber">100</context>
</context-group>
</trans-unit>
<trans-unit id="1189930234736223663" datatype="html">
<source>Are you sure you want to delete the <x id="PH" equiv-text="selectedNodeIds.length"/> selected items?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts</context>
<context context-type="linenumber">107</context>
<context context-type="linenumber">101</context>
</context-group>
</trans-unit>
<trans-unit id="e8fb2ceb6f8d4c3e90a6a688e9024461e67f44f0" datatype="html">
Expand Down

0 comments on commit 83a3491

Please sign in to comment.