This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +44
-26
lines changed
directives/font-submission Expand file tree Collapse file tree 4 files changed +44
-26
lines changed Original file line number Diff line number Diff line change
1
+ ( function ( ) {
2
+ 'use strict' ;
3
+
4
+ angular . module ( 'tcUIComponents' ) . directive ( 'fontSubmission' , fontSubmission ) ;
5
+
6
+ function fontSubmission ( ) {
7
+ return {
8
+ restrict : 'E' ,
9
+ templateUrl : 'directives/font-submission/font-submission.html' ,
10
+ scope : true ,
11
+ controller : [ '$scope' , function ( $scope ) {
12
+ console . log ( 'scope on font submission directive: ' , $scope . submissionForm ) ;
13
+ } ] ,
14
+ controllerAs : 'fontSubmission'
15
+ }
16
+ }
17
+ } ) ( ) ;
Original file line number Diff line number Diff line change
1
+ label.tc-label Font Source
2
+
3
+ dropdown(
4
+ name ="'font-source{{$index + 1}}'" ,
5
+ options ="vm.fontList{{$index + 1}}" ,
6
+ placeholder ="'Select from the list'" ,
7
+ searchable ="false" ,
8
+ clearable ="false" ,
9
+ on-change ="vm.selectFont" ,
10
+ value ="vm.submissionForm.fonts[{{$index}}].source"
11
+ )
12
+
13
+ tc-input.fieldset__input (
14
+ label-text ="Font Name" ,
15
+ placeholder ="Select font source to edit field"
16
+ input-value ="font.name" ,
17
+ input-name ="fontName{{$index}}"
18
+ )
19
+
20
+ tc-input.fieldset__input (
21
+ label-text ="Font URL" ,
22
+ placeholder ="Select font source to edit field" ,
23
+ input-value ="font.sourceUrl" ,
24
+ input-name ="fontUrl{{$index}}"
25
+ )
Original file line number Diff line number Diff line change 212
212
script( src ="directives/external-account/external-links-data.directive.js" )
213
213
script( src ="directives/external-account/external-web-links.directive.js" )
214
214
script( src ="directives/focus-on.directive.js" )
215
+ script( src ="directives/font-submission/font-submission.directive.js" )
215
216
script( src ="directives/header/header-menu-item.directive.js" )
216
217
script( src ="directives/history-graph/history-graph.directive.js" )
217
218
script( src ="directives/input-sticky-placeholder/input-sticky-placeholder.directive.js" )
Original file line number Diff line number Diff line change 111
111
112
112
.form-block__fields
113
113
.fieldsets
114
- ng-form.fieldset ( name ="font{{$index + 1}}" , ng-repeat ="font in vm.submissionForm.fonts track by font.id" )
115
- label.tc-label Font Source
116
-
117
- dropdown(
118
- name ="'font-source{{$index + 1}}'" ,
119
- options ="vm.fontList{{$index + 1}}" ,
120
- placeholder ="'Select from the list'" ,
121
- searchable ="false" ,
122
- clearable ="false" ,
123
- on-change ="vm.selectFont" ,
124
- value ="vm.submissionForm.fonts[{{$index}}].source"
125
- )
126
-
127
- tc-input.fieldset__input (
128
- label-text ="Font Name" ,
129
- placeholder ="Select font source to edit field"
130
- input-value ="font.name" ,
131
- input-name ="fontName{{$index}}"
132
- )
133
-
134
- tc-input.fieldset__input (
135
- label-text ="Font URL" ,
136
- placeholder ="Select font source to edit field" ,
137
- input-value ="font.sourceUrl" ,
138
- input-name ="fontUrl{{$index}}"
139
- )
114
+ font-submission.fieldset ( ng-repeat ="font in vm.submissionForm.fonts track by font.id" )
140
115
141
116
button.fieldset__button.tc-btn.tc-btn-s ( type ="button" , ng-click ="vm.createAnotherFontFieldset()" ) + Add Font
142
117
You can’t perform that action at this time.
0 commit comments