Skip to content

Commit

Permalink
Move templates to own files
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima committed Sep 5, 2023
1 parent 8517052 commit fbd2824
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 58 deletions.
8 changes: 4 additions & 4 deletions src/app/teacher/authoring-tool.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ import { ProjectAuthoringComponent } from '../../assets/wise5/authoringTool/proj
import { AuthoringToolComponent } from '../../assets/wise5/authoringTool/authoring-tool.component';
import { ChooseMoveNodeLocationComponent } from '../../assets/wise5/authoringTool/choose-node-location/choose-move-node-location/choose-move-node-location.component';
import { ChooseCopyNodeLocationComponent } from '../../assets/wise5/authoringTool/choose-node-location/choose-copy-node-location/choose-copy-node-location.component';
import { NodeIconAndTitleComponent } from '../../assets/wise5/authoringTool/choose-node-location/node-icon-and-title.component';
import { InsertNodeInsideButtonComponent } from '../../assets/wise5/authoringTool/choose-node-location/insert-node-inside-button.component';
import { InsertNodeAfterButtonComponent } from '../../assets/wise5/authoringTool/choose-node-location/insert-node-after-button.component';
import { NodeWithMoveAfterButtonComponent } from '../../assets/wise5/authoringTool/choose-node-location/node-with-move-after-button.component';
import { InsertNodeAfterButtonComponent } from '../../assets/wise5/authoringTool/choose-node-location/insert-node-after-button/insert-node-after-button.component';
import { InsertNodeInsideButtonComponent } from '../../assets/wise5/authoringTool/choose-node-location/insert-node-inside-button/insert-node-inside-button.component';
import { NodeIconAndTitleComponent } from '../../assets/wise5/authoringTool/choose-node-location/node-icon-and-title/node-icon-and-title.component';
import { NodeWithMoveAfterButtonComponent } from '../../assets/wise5/authoringTool/choose-node-location/node-with-move-after-button/node-with-move-after-button.component';

@NgModule({
declarations: [
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<button
mat-raised-button
color="primary"
[disabled]="disabled"
(click)="insertEvent.emit()"
matTooltip="Insert after"
matTooltipPosition="above"
i18n-matTooltip
>
<mat-icon style="margin: 0">subdirectory_arrow_left</mat-icon>
</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
selector: 'insert-node-after-button',
templateUrl: './insert-node-after-button.component.html'
})
export class InsertNodeAfterButtonComponent {
@Input() protected disabled: boolean;
@Output() protected insertEvent = new EventEmitter();
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<button
mat-raised-button
color="primary"
(click)="insertEvent.emit()"
matTooltip="Insert inside"
matTooltipPosition="above"
i18n-matTooltip
>
<mat-icon style="margin: 0">call_received</mat-icon>
</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Component, EventEmitter, Output } from '@angular/core';

@Component({
selector: 'insert-node-inside-button',
templateUrl: './insert-node-inside-button.component.html'
})
export class InsertNodeInsideButtonComponent {
@Output() protected insertEvent = new EventEmitter();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<node-icon [nodeId]="nodeId" size="18"></node-icon>&nbsp;
<span *ngIf="showPosition">{{ getNodePosition(nodeId) }}:&nbsp;</span>{{ getNodeTitle(nodeId) }}
</div>
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { Component, Input } from '@angular/core';
import { TeacherProjectService } from '../../services/teacherProjectService';
import { TeacherProjectService } from '../../../services/teacherProjectService';

@Component({
selector: 'node-icon-and-title',
template: `<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<node-icon [nodeId]="nodeId" size="18"></node-icon>&nbsp;
<span *ngIf="showPosition">{{ getNodePosition(nodeId) }}:&nbsp;</span>{{ getNodeTitle(nodeId) }}
</div>`
templateUrl: './node-icon-and-title.component.html'
})
export class NodeIconAndTitleComponent {
@Input() protected nodeId: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<node-icon-and-title [nodeId]="nodeId"></node-icon-and-title>
<insert-node-after-button
[disabled]="disabled"
(insertEvent)="insertEvent.emit()"
></insert-node-after-button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';

@Component({
selector: 'node-with-move-after-button',
template: `<div fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
<node-icon-and-title [nodeId]="nodeId"></node-icon-and-title>
<insert-node-after-button
[disabled]="disabled"
(insertEvent)="insertEvent.emit()"
></insert-node-after-button>
</div>`
templateUrl: './node-with-move-after-button.component.html'
})
export class NodeWithMoveAfterButtonComponent {
@Input() protected disabled: boolean;
Expand Down
8 changes: 4 additions & 4 deletions src/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -9508,15 +9508,15 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<trans-unit id="f951d80b53d5536f79142285e8ba09f190a3c723" datatype="html">
<source>Insert after</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/choose-node-location/insert-node-after-button.component.ts</context>
<context context-type="linenumber">10</context>
<context context-type="sourcefile">src/assets/wise5/authoringTool/choose-node-location/insert-node-after-button/insert-node-after-button.component.html</context>
<context context-type="linenumber">6</context>
</context-group>
</trans-unit>
<trans-unit id="58d8632bc944efc0ead43c0e0cd298492e2f17a5" datatype="html">
<source>Insert inside</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/choose-node-location/insert-node-inside-button.component.ts</context>
<context context-type="linenumber">9</context>
<context context-type="sourcefile">src/assets/wise5/authoringTool/choose-node-location/insert-node-inside-button/insert-node-inside-button.component.html</context>
<context context-type="linenumber">5</context>
</context-group>
</trans-unit>
<trans-unit id="f79611b9cc78f612ae8cc2cce08ff9f14581aeb3" datatype="html">
Expand Down

0 comments on commit fbd2824

Please sign in to comment.