Skip to content

Commit 8d6cb15

Browse files
committed
Set the Multiple Choice authoring styling to be encapsulated. Also fixed some other minor styling issues.
1 parent 71a04e9 commit 8d6cb15

4 files changed

Lines changed: 49 additions & 30 deletions

File tree

src/main/webapp/site/src/messages.xlf

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@
12391239
</context-group>
12401240
<context-group purpose="location">
12411241
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
1242-
<context context-type="linenumber">32</context>
1242+
<context context-type="linenumber">41</context>
12431243
</context-group>
12441244
</trans-unit>
12451245
<trans-unit datatype="html" id="c04678929731aad2662284b7ce56c5c75b410df5">
@@ -6123,7 +6123,7 @@
61236123
</context-group>
61246124
<context-group purpose="location">
61256125
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6126-
<context context-type="linenumber">56</context>
6126+
<context context-type="linenumber">65</context>
61276127
</context-group>
61286128
</trans-unit>
61296129
<trans-unit datatype="html" id="d63d6215608fa83637b7cfc6dc6a4d92b6ad11ef">
@@ -6191,7 +6191,7 @@
61916191
</context-group>
61926192
<context-group purpose="location">
61936193
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6194-
<context context-type="linenumber">59</context>
6194+
<context context-type="linenumber">68</context>
61956195
</context-group>
61966196
</trans-unit>
61976197
<trans-unit datatype="html" id="828bc0d28636c4fda125fbf32af8df99cf1fe83e">
@@ -6244,7 +6244,7 @@
62446244
</context-group>
62456245
<context-group purpose="location">
62466246
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6247-
<context context-type="linenumber">87</context>
6247+
<context context-type="linenumber">98</context>
62486248
</context-group>
62496249
</trans-unit>
62506250
<trans-unit datatype="html" id="3a12bd96093f8972cbd9d52a68fb9178aaee4388">
@@ -6279,7 +6279,7 @@
62796279
</context-group>
62806280
<context-group purpose="location">
62816281
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6282-
<context context-type="linenumber">99</context>
6282+
<context context-type="linenumber">110</context>
62836283
</context-group>
62846284
</trans-unit>
62856285
<trans-unit datatype="html" id="826b25211922a1b46436589233cb6f1a163d89b7">
@@ -6326,11 +6326,11 @@
63266326
</context-group>
63276327
<context-group purpose="location">
63286328
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6329-
<context context-type="linenumber">110</context>
6329+
<context context-type="linenumber">121</context>
63306330
</context-group>
63316331
<context-group purpose="location">
63326332
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6333-
<context context-type="linenumber">113</context>
6333+
<context context-type="linenumber">124</context>
63346334
</context-group>
63356335
</trans-unit>
63366336
<trans-unit datatype="html" id="e3b469b69eef004764c51b7a8b3efa761501ab73">
@@ -6571,7 +6571,7 @@
65716571
</context-group>
65726572
<context-group purpose="location">
65736573
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6574-
<context context-type="linenumber">90</context>
6574+
<context context-type="linenumber">101</context>
65756575
</context-group>
65766576
</trans-unit>
65776577
<trans-unit datatype="html" id="029590c3a6ac353df3f0f8a2dfe7272a871656fe">
@@ -6597,7 +6597,7 @@
65976597
</context-group>
65986598
<context-group purpose="location">
65996599
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6600-
<context context-type="linenumber">102</context>
6600+
<context context-type="linenumber">113</context>
66016601
</context-group>
66026602
</trans-unit>
66036603
<trans-unit datatype="html" id="bcfc99153c2c0d547f3af6670ddfaae5e6ffb429">
@@ -6697,6 +6697,10 @@
66976697
<context context-type="sourcefile">../../wise5/components/match/match-authoring/match-authoring.component.html</context>
66986698
<context context-type="linenumber">12</context>
66996699
</context-group>
6700+
<context-group purpose="location">
6701+
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6702+
<context context-type="linenumber">32</context>
6703+
</context-group>
67006704
</trans-unit>
67016705
<trans-unit datatype="html" id="1fc2618c7ca4b3722929d8739dbf6d9ab4f7dacf">
67026706
<source>Add Choice</source>
@@ -6731,7 +6735,7 @@
67316735
</context-group>
67326736
<context-group purpose="location">
67336737
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6734-
<context context-type="linenumber">49</context>
6738+
<context context-type="linenumber">58</context>
67356739
</context-group>
67366740
</trans-unit>
67376741
<trans-unit datatype="html" id="b75de65916c3254e808d6757d451c2c9abe56d06">
@@ -6847,56 +6851,56 @@
68476851
<source> Single Answer </source>
68486852
<context-group purpose="location">
68496853
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6850-
<context context-type="linenumber">16</context>
6854+
<context context-type="linenumber">20</context>
68516855
</context-group>
68526856
</trans-unit>
68536857
<trans-unit datatype="html" id="89573ba7e055d0f1cf66d9ac94bf5f47a7ada4b2">
68546858
<source> Multiple Answer </source>
68556859
<context-group purpose="location">
68566860
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6857-
<context context-type="linenumber">19</context>
6861+
<context context-type="linenumber">27</context>
68586862
</context-group>
68596863
</trans-unit>
68606864
<trans-unit datatype="html" id="51e09577ccc3a404bf3aa3bf88c6d5398135803b">
68616865
<source> There are no choices. Click the "Add Choice" button to add a choice. </source>
68626866
<context-group purpose="location">
68636867
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6864-
<context context-type="linenumber">37</context>
6868+
<context context-type="linenumber">46</context>
68656869
</context-group>
68666870
</trans-unit>
68676871
<trans-unit datatype="html" id="3f2b2b4a6ec318a31f7f5f9b526480846a27547a">
68686872
<source>Choice Text</source>
68696873
<context-group purpose="location">
68706874
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6871-
<context context-type="linenumber">44</context>
6875+
<context context-type="linenumber">53</context>
68726876
</context-group>
68736877
</trans-unit>
68746878
<trans-unit datatype="html" id="946344604c321ff0c86a78f6e047f9142b309dd1">
68756879
<source> Is Correct </source>
68766880
<context-group purpose="location">
68776881
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6878-
<context context-type="linenumber">67</context>
6882+
<context context-type="linenumber">78</context>
68796883
</context-group>
68806884
</trans-unit>
68816885
<trans-unit datatype="html" id="4488359b3a14b99b193ac292e1f16ee47766ab8b">
68826886
<source>Is Correct</source>
68836887
<context-group purpose="location">
68846888
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6885-
<context context-type="linenumber">66</context>
6889+
<context context-type="linenumber">77</context>
68866890
</context-group>
68876891
</trans-unit>
68886892
<trans-unit datatype="html" id="e29c5e189e57e8d8dc3f52df4abe7bce4bfca53c">
68896893
<source>Feeback</source>
68906894
<context-group purpose="location">
68916895
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6892-
<context context-type="linenumber">74</context>
6896+
<context context-type="linenumber">85</context>
68936897
</context-group>
68946898
</trans-unit>
68956899
<trans-unit datatype="html" id="5317cde482fdb766008de3e1ae09cf0610366abc">
68966900
<source>Optional</source>
68976901
<context-group purpose="location">
68986902
<context context-type="sourcefile">../../wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html</context>
6899-
<context context-type="linenumber">79</context>
6903+
<context context-type="linenumber">90</context>
69006904
</context-group>
69016905
</trans-unit>
69026906
<trans-unit datatype="html" id="6817513ddcee06a7cb2a7b2708e5616b861db81c">

src/main/webapp/wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.html

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-form-field>
1+
<mat-form-field class="prompt">
22
<mat-label i18n>Prompt</mat-label>
33
<textarea matInput
44
[ngModel]="authoringComponentContent.prompt"
@@ -13,21 +13,30 @@
1313
<mat-radio-group aria-labelledby="selection-type-label"
1414
[(ngModel)]="authoringComponentContent.choiceType"
1515
(ngModelChange)="componentChanged()">
16-
<mat-radio-button class="choice-radio-button" value="radio" i18n>
16+
<mat-radio-button
17+
class="choice-radio-button"
18+
color="primary"
19+
value="radio"
20+
i18n>
1721
Single Answer
1822
</mat-radio-button>
19-
<mat-radio-button class="choice-radio-button" value="checkbox" i18n>
23+
<mat-radio-button
24+
class="choice-radio-button"
25+
color="primary"
26+
value="checkbox"
27+
i18n>
2028
Multiple Answer
2129
</mat-radio-button>
2230
</mat-radio-group>
2331
</p>
32+
<span class="choices-label" i18n>Choices</span>
2433
<button mat-raised-button
2534
color="primary"
2635
class="add-choice-button"
2736
(click)="addChoice()"
2837
i18nMatTooltip
2938
matTooltip="Add Choice"
30-
matTooltipDirection="above"
39+
matTooltipPosition="above"
3140
i18n-aria-label
3241
aria-label="Add">
3342
<mat-icon>add</mat-icon>
@@ -54,13 +63,15 @@
5463
(click)="chooseChoiceAsset(choice)"
5564
i18n-matTooltip
5665
matTooltip="Choose an Image"
57-
matTooltipDirection="above"
66+
matTooltipPosition="above"
5867
i18n-aria-label
5968
aria-label="Image">
6069
<mat-icon>insert_photo</mat-icon>
6170
</button>
6271
<div>
63-
<mat-checkbox [(ngModel)]="choice.isCorrect"
72+
<mat-checkbox
73+
color="primary"
74+
[(ngModel)]="choice.isCorrect"
6475
(change)="feedbackChanged()"
6576
i18n-aria-label
6677
aria-label="Is Correct"
@@ -85,7 +96,7 @@
8596
(click)="moveChoiceUp(choice.id)"
8697
i18n-matTooltip
8798
matTooltip="Move Up"
88-
matTooltipDirection="above"
99+
matTooltipPosition="above"
89100
i18n-aria-label
90101
aria-label="Up">
91102
<mat-icon>arrow_upward</mat-icon>
@@ -97,7 +108,7 @@
97108
(click)="moveChoiceDown(choice.id)"
98109
i18n-matTooltip
99110
matTooltip="Move Down"
100-
matTooltipDirection="above"
111+
matTooltipPosition="above"
101112
i18n-aria-label
102113
aria-label="Down">
103114
<mat-icon>arrow_downward</mat-icon>
@@ -108,7 +119,7 @@
108119
(click)="deleteChoice(choice.id)"
109120
i18n-matTooltip
110121
matTooltip="Delete"
111-
matTooltipDirection="above"
122+
matTooltipPosition="above"
112123
i18n-aria-label
113124
aria-label="Delete">
114125
<mat-icon>delete</mat-icon>

src/main/webapp/wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import '~style/abstracts/variables';
22

3-
.mat-form-field {
3+
.prompt {
44
width: 100%;
55
}
66

@@ -15,6 +15,11 @@ label.mat-radio-label {
1515
.mat-radio-button.choice-radio-button {
1616
display: block;
1717
margin-top: 10px;
18+
width: 5%;
19+
}
20+
21+
.choices-label {
22+
margin-right: 10px;
1823
}
1924

2025
.add-choice-button {

src/main/webapp/wise5/components/multipleChoice/multiple-choice-authoring/multiple-choice-authoring.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { UtilService } from '../../../services/utilService';
1111
@Component({
1212
selector: 'multiple-choice-authoring',
1313
templateUrl: 'multiple-choice-authoring.component.html',
14-
styleUrls: ['multiple-choice-authoring.component.scss'],
15-
encapsulation: ViewEncapsulation.None
14+
styleUrls: ['multiple-choice-authoring.component.scss']
1615
})
1716
export class MultipleChoiceAuthoring extends ComponentAuthoring {
1817
allowedConnectedComponentTypes = ['MultipleChoice'];

0 commit comments

Comments
 (0)