Skip to content

Commit 98aedcb

Browse files
Merge pull request #2863 from WISE-Community/issue-2862-change-authoringViewComponentChanged-to-componentChanged
Change authoringViewComponentChanged() to componentChanged()
2 parents ac19905 + 26876a6 commit 98aedcb

58 files changed

Lines changed: 549 additions & 558 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/main/webapp/site/src/app/authoring-tool/edit-advanced-component/editAdvancedComponentAngularJSController.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ export class EditAdvancedComponentAngularJSController {
2020
this.idToOrder = this.ProjectService.idToOrder;
2121
}
2222

23-
authoringViewComponentChanged(): void {
23+
componentChanged(): void {
2424
this.ProjectService.nodeChanged();
2525
}
2626

2727
addConnectedComponent(): void {
2828
this.addConnectedComponentAndSetComponentIdIfPossible();
29-
this.authoringViewComponentChanged();
29+
this.componentChanged();
3030
}
3131

3232
addConnectedComponentAndSetComponentIdIfPossible(): void {
@@ -56,19 +56,19 @@ export class EditAdvancedComponentAngularJSController {
5656
}
5757

5858
connectedComponentTypeChanged(connectedComponent: any): void {
59-
this.authoringViewComponentChanged();
59+
this.componentChanged();
6060
}
6161

6262
connectedComponentNodeIdChanged(connectedComponent: any): void {
6363
connectedComponent.componentId = null;
6464
connectedComponent.type = null;
6565
this.automaticallySetConnectedComponentComponentIdIfPossible(connectedComponent);
66-
this.authoringViewComponentChanged();
66+
this.componentChanged();
6767
}
6868

6969
connectedComponentComponentIdChanged(connectedComponent: any): void {
7070
this.automaticallySetConnectedComponentTypeIfPossible(connectedComponent);
71-
this.authoringViewComponentChanged();
71+
this.componentChanged();
7272
}
7373

7474
isConnectedComponentTypeAllowed(componentType: string): boolean {
@@ -98,7 +98,7 @@ export class EditAdvancedComponentAngularJSController {
9898
if (this.authoringComponentContent.connectedComponents != null) {
9999
this.authoringComponentContent.connectedComponents.splice(index, 1);
100100
}
101-
this.authoringViewComponentChanged();
101+
this.componentChanged();
102102
}
103103
}
104104

src/main/webapp/wise5/authoringTool/components/component-authoring.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export abstract class ComponentAuthoring {
3838
.pipe(debounceTime(1000), distinctUntilChanged())
3939
.subscribe((prompt: string) => {
4040
this.authoringComponentContent.prompt = prompt;
41-
this.authoringViewComponentChanged();
41+
this.componentChanged();
4242
});
4343
}
4444

@@ -47,7 +47,7 @@ export abstract class ComponentAuthoring {
4747
this.resetUI();
4848
this.idToOrder = this.ProjectService.idToOrder;
4949
this.componentChangedSubscription = this.ProjectService.componentChanged$.subscribe(() => {
50-
this.authoringViewComponentChanged();
50+
this.componentChanged();
5151
});
5252
this.starterStateResponseSubscription =
5353
this.NodeService.starterStateResponse$.subscribe((args: any) => {
@@ -61,7 +61,7 @@ export abstract class ComponentAuthoring {
6161
this.promptChange.next(prompt);
6262
}
6363

64-
authoringViewComponentChanged(): void {
64+
componentChanged(): void {
6565
this.resetUI();
6666
this.ProjectService.nodeChanged();
6767
}

src/main/webapp/wise5/authoringTool/components/editComponentController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export abstract class EditComponentController {
4242
this.idToOrder = this.ProjectService.idToOrder;
4343
this.$translate = this.$filter('translate');
4444
this.componentChangedSubscription = this.ProjectService.componentChanged$.subscribe(() => {
45-
this.authoringViewComponentChanged();
45+
this.componentChanged();
4646
});
4747
this.starterStateResponseSubscription =
4848
this.NodeService.starterStateResponse$.subscribe((args: any) => {
@@ -57,7 +57,7 @@ export abstract class EditComponentController {
5757
this.starterStateResponseSubscription.unsubscribe();
5858
}
5959

60-
authoringViewComponentChanged(): void {
60+
componentChanged(): void {
6161
this.resetUI();
6262
this.ProjectService.nodeChanged();
6363
}

src/main/webapp/wise5/authoringTool/notebook/authorNotebookController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class AuthorNotebookController {
132132
this.SpaceService.removeSpace('public');
133133
}
134134

135-
authoringViewComponentChanged() {
135+
componentChanged() {
136136
this.save();
137137
}
138138

src/main/webapp/wise5/authoringTool/notebook/notebookAuthoring.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
2020
</div>
2121
<md-switch ng-model="authorNotebookController.project.notebook.enabled"
2222
class="md-primary"
23-
ng-change="authorNotebookController.authoringViewComponentChanged()">
23+
ng-change="authorNotebookController.componentChanged()">
2424
Student Notebook
2525
</md-switch>
2626
<div ng-if="authorNotebookController.project.notebook.enabled"
@@ -30,11 +30,11 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
3030
{{ ::'notebookLabel' | translate }}
3131
</label>
3232
<input ng-model="authorNotebookController.project.notebook.label"
33-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
33+
ng-change="authorNotebookController.componentChanged()"/>
3434
</md-input-container>
3535
<md-switch ng-model="authorNotebookController.project.notebook.itemTypes.note.enabled"
3636
class="md-primary"
37-
ng-change="authorNotebookController.authoringViewComponentChanged()"
37+
ng-change="authorNotebookController.componentChanged()"
3838
style="margin-left: 0px;">
3939
Enable Note
4040
</md-switch>
@@ -46,52 +46,52 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
4646
</label>
4747
<input ng-model="authorNotebookController.project.notebook.itemTypes.note.label.singular"
4848
ng-model-options="{ debounce: 1000 }"
49-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
49+
ng-change="authorNotebookController.componentChanged()"/>
5050
</md-input-container>
5151
<md-input-container>
5252
<label>
5353
{{ ::'labelPlural' | translate }}
5454
</label>
5555
<input ng-model="authorNotebookController.project.notebook.itemTypes.note.label.plural"
5656
ng-model-options="{ debounce: 1000 }"
57-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
57+
ng-change="authorNotebookController.componentChanged()"/>
5858
</md-input-container>
5959
<md-input-container>
6060
<label>
6161
{{ ::'labelLink' | translate }}
6262
</label>
6363
<input ng-model="authorNotebookController.project.notebook.itemTypes.note.label.link"
6464
ng-model-options="{ debounce: 1000 }"
65-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
65+
ng-change="authorNotebookController.componentChanged()"/>
6666
</md-input-container>
6767
<br/>
6868
<md-checkbox ng-model="authorNotebookController.project.notebook.itemTypes.note.enableAddNote"
69-
ng-change="authorNotebookController.authoringViewComponentChanged()"
69+
ng-change="authorNotebookController.componentChanged()"
7070
class="md-primary">
7171
{{ ::'enableAddNoteButton' | translate }}
7272
</md-checkbox>
7373
<br/>
7474
<md-checkbox ng-model="authorNotebookController.project.notebook.itemTypes.note.requireTextOnEveryNote"
75-
ng-change="authorNotebookController.authoringViewComponentChanged()"
75+
ng-change="authorNotebookController.componentChanged()"
7676
class="md-primary">
7777
{{ ::'requireTextOnEveryNote' | translate }}
7878
</md-checkbox>
7979
<br/>
8080
<md-checkbox ng-model="authorNotebookController.project.notebook.itemTypes.note.enableClipping"
81-
ng-change="authorNotebookController.authoringViewComponentChanged()"
81+
ng-change="authorNotebookController.componentChanged()"
8282
class="md-primary">
8383
{{ ::'enableClipping' | translate }}
8484
</md-checkbox>
8585
<br/>
8686
<md-checkbox ng-model="authorNotebookController.project.notebook.itemTypes.note.enableStudentUploads"
87-
ng-change="authorNotebookController.authoringViewComponentChanged()"
87+
ng-change="authorNotebookController.componentChanged()"
8888
class="md-primary">
8989
{{ ::'enableStudentUploads' | translate }}
9090
</md-checkbox>
9191
</div>
9292
<md-switch ng-model="authorNotebookController.project.notebook.itemTypes.report.enabled"
9393
class="md-primary"
94-
ng-change="authorNotebookController.authoringViewComponentChanged()"
94+
ng-change="authorNotebookController.componentChanged()"
9595
style="margin-left: 0px;">
9696
Enable Report
9797
</md-switch>
@@ -103,23 +103,23 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
103103
</label>
104104
<input ng-model="authorNotebookController.project.notebook.itemTypes.report.label.singular"
105105
ng-model-options="{ debounce: 1000 }"
106-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
106+
ng-change="authorNotebookController.componentChanged()"/>
107107
</md-input-container>
108108
<md-input-container>
109109
<label>
110110
{{ ::'labelPlural' | translate }}
111111
</label>
112112
<input ng-model="authorNotebookController.project.notebook.itemTypes.report.label.plural"
113113
ng-model-options="{ debounce: 1000 }"
114-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
114+
ng-change="authorNotebookController.componentChanged()"/>
115115
</md-input-container>
116116
<md-input-container>
117117
<label>
118118
{{ ::'labelLink' | translate }}
119119
</label>
120120
<input ng-model="authorNotebookController.project.notebook.itemTypes.report.label.link"
121121
ng-model-options="{ debounce: 1000 }"
122-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
122+
ng-change="authorNotebookController.componentChanged()"/>
123123
</md-input-container>
124124
<div ng-repeat="reportNote in authorNotebookController.project.notebook.itemTypes.report.notes">
125125
<md-input-container>
@@ -128,7 +128,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
128128
</label>
129129
<input ng-model="reportNote.title"
130130
ng-model-options="{ debounce: 1000 }"
131-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
131+
ng-change="authorNotebookController.componentChanged()"/>
132132
</md-input-container>
133133
<br/>
134134
<md-input-container>
@@ -138,7 +138,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
138138
<input ng-model="reportNote.maxScore"
139139
type="number"
140140
ng-model-options="{ debounce: 1000 }"
141-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
141+
ng-change="authorNotebookController.componentChanged()"/>
142142
</md-input-container>
143143
<br/>
144144
<md-input-container>
@@ -147,7 +147,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
147147
</label>
148148
<textarea rows="5" cols="100" ng-model="reportNote.description"
149149
ng-model-options="{ debounce: 1000 }"
150-
ng-change="authorNotebookController.authoringViewComponentChanged()"></textarea>
150+
ng-change="authorNotebookController.componentChanged()"></textarea>
151151
</md-input-container>
152152
<br/>
153153
<md-input-container>
@@ -156,7 +156,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
156156
</label>
157157
<textarea rows="5" cols="100" ng-model="reportNote.prompt"
158158
ng-model-options="{ debounce: 1000 }"
159-
ng-change="authorNotebookController.authoringViewComponentChanged()"></textarea>
159+
ng-change="authorNotebookController.componentChanged()"></textarea>
160160
</md-input-container>
161161
<br/>
162162
<label>
@@ -171,7 +171,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
171171
</div>
172172
<md-switch ng-model="authorNotebookController.project.teacherNotebook.enabled"
173173
class="md-primary"
174-
ng-change="authorNotebookController.authoringViewComponentChanged()">
174+
ng-change="authorNotebookController.componentChanged()">
175175
Teacher Notebook
176176
</md-switch>
177177
<div ng-if="authorNotebookController.project.teacherNotebook.enabled"
@@ -181,11 +181,11 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
181181
{{ ::'notebookLabel' | translate }}
182182
</label>
183183
<input ng-model="authorNotebookController.project.teacherNotebook.label"
184-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
184+
ng-change="authorNotebookController.componentChanged()"/>
185185
</md-input-container>
186186
<md-switch ng-model="authorNotebookController.project.teacherNotebook.itemTypes.report.enabled"
187187
class="md-primary"
188-
ng-change="authorNotebookController.authoringViewComponentChanged()"
188+
ng-change="authorNotebookController.componentChanged()"
189189
style="margin-left: 0px;">
190190
Enable Report
191191
</md-switch>
@@ -197,23 +197,23 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
197197
</label>
198198
<input ng-model="authorNotebookController.project.teacherNotebook.itemTypes.report.label.singular"
199199
ng-model-options="{ debounce: 1000 }"
200-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
200+
ng-change="authorNotebookController.componentChanged()"/>
201201
</md-input-container>
202202
<md-input-container>
203203
<label>
204204
{{ ::'labelPlural' | translate }}
205205
</label>
206206
<input ng-model="authorNotebookController.project.teacherNotebook.itemTypes.report.label.plural"
207207
ng-model-options="{ debounce: 1000 }"
208-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
208+
ng-change="authorNotebookController.componentChanged()"/>
209209
</md-input-container>
210210
<md-input-container>
211211
<label>
212212
{{ ::'labelLink' | translate }}
213213
</label>
214214
<input ng-model="authorNotebookController.project.teacherNotebook.itemTypes.report.label.link"
215215
ng-model-options="{ debounce: 1000 }"
216-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
216+
ng-change="authorNotebookController.componentChanged()"/>
217217
</md-input-container>
218218
<div ng-repeat="reportNote in authorNotebookController.project.teacherNotebook.itemTypes.report.notes">
219219
<md-input-container>
@@ -222,7 +222,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
222222
</label>
223223
<input ng-model="reportNote.title"
224224
ng-model-options="{ debounce: 1000 }"
225-
ng-change="authorNotebookController.authoringViewComponentChanged()"/>
225+
ng-change="authorNotebookController.componentChanged()"/>
226226
</md-input-container>
227227
<br/>
228228
<md-input-container>
@@ -231,7 +231,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
231231
</label>
232232
<textarea rows="5" cols="100" ng-model="reportNote.description"
233233
ng-model-options="{ debounce: 1000 }"
234-
ng-change="authorNotebookController.authoringViewComponentChanged()"></textarea>
234+
ng-change="authorNotebookController.componentChanged()"></textarea>
235235
</md-input-container>
236236
<br/>
237237
<md-input-container>
@@ -240,7 +240,7 @@ <h4>{{ ::'notebookSettings' | translate }}</h4>
240240
</label>
241241
<textarea rows="5" cols="100" ng-model="reportNote.prompt"
242242
ng-model-options="{ debounce: 1000 }"
243-
ng-change="authorNotebookController.authoringViewComponentChanged()"></textarea>
243+
ng-change="authorNotebookController.componentChanged()"></textarea>
244244
</md-input-container>
245245
<br/>
246246
<label>

0 commit comments

Comments
 (0)