|
295 | 295 |
|
296 | 296 | <template is="dom-if" if="[[post.Group.configuration.alternativePointForHeader]]"> |
297 | 297 | <div class="pointMainHeader layout horizontal center-center"> |
298 | | - [[post.Group.configuration.alternativePointForHeader]] |
| 298 | + |
| 299 | + <yp-magic-text content-id="[[post.Group.id]]" text-only content="[[post.Group.configuration.alternativePointForHeader]]" |
| 300 | + content-language="[[post.Group.language]]" |
| 301 | + class="ratingName" text-type="alternativePointForHeader"></yp-magic-text> |
| 302 | + |
299 | 303 | </div> |
300 | 304 | </template> |
301 | 305 |
|
|
392 | 396 |
|
393 | 397 | <template is="dom-if" if="[[post.Group.configuration.alternativePointAgainstHeader]]"> |
394 | 398 | <div class="pointMainHeader layout horizontal center-center"> |
395 | | - [[post.Group.configuration.alternativePointAgainstHeader]] |
| 399 | + <yp-magic-text content-id="[[post.Group.id]]" text-only content="[[post.Group.configuration.alternativePointAgainstHeader]]" |
| 400 | + content-language="[[post.Group.language]]" |
| 401 | + class="ratingName" text-type="alternativePointAgainstHeader"></yp-magic-text> |
396 | 402 | </div> |
397 | 403 | </template> |
398 | 404 |
|
| 405 | + <template is="dom-if" if="[[post.Group.configuration.alternativePointForLabel]]"> |
| 406 | + <yp-magic-text id="alternativePointForLabelId" hidden content-id="[[post.Group.id]]" text-only content="[[post.Group.configuration.alternativePointForLabel]]" |
| 407 | + content-language="[[post.Group.language]]" on-new-translation="_updatePointLabels" |
| 408 | + text-type="alternativePointForLabel"></yp-magic-text> |
| 409 | + </template> |
| 410 | + |
| 411 | + <template is="dom-if" if="[[post.Group.configuration.alternativePointAgainstLabel]]"> |
| 412 | + <yp-magic-text id="alternativePointAgainstLabelId" hidden content-id="[[post.Group.id]]" text-only content="[[post.Group.configuration.alternativePointAgainstLabel]]" |
| 413 | + content-language="[[post.Group.language]]" on-new-translation="_updatePointLabels" |
| 414 | + text-type="alternativePointAgainstLabel"></yp-magic-text> |
| 415 | + </template> |
399 | 416 |
|
400 | 417 | <paper-material id="pointDownMaterial" elevation="1" class="pointInputMaterial layout vertical" |
401 | 418 | animated hidden$="[[disableDebate]]"> |
|
1180 | 1197 | this.set('labelDown', this.t('point.against')); |
1181 | 1198 | } |
1182 | 1199 | } |
| 1200 | + |
| 1201 | + this.async(function () { |
| 1202 | + this._updatePointLabels(); |
| 1203 | + }); |
1183 | 1204 | }, |
1184 | 1205 |
|
1185 | 1206 | removeElementsByClass: function (rootElement, className) { |
|
1189 | 1210 | } |
1190 | 1211 | }, |
1191 | 1212 |
|
| 1213 | + _updatePointLabels: function () { |
| 1214 | + this.async(function () { |
| 1215 | + var forLabel = this.$$("#alternativePointForLabelId"); |
| 1216 | + var againstLabel = this.$$("#alternativePointAgainstLabelId"); |
| 1217 | + if (forLabel && forLabel.finalContent) { |
| 1218 | + this.set('labelUp', forLabel.finalContent); |
| 1219 | + } |
| 1220 | + if (againstLabel && againstLabel.finalContent) { |
| 1221 | + this.set('labelDown', againstLabel.finalContent); |
| 1222 | + } |
| 1223 | + }); |
| 1224 | + }, |
| 1225 | + |
1192 | 1226 | _processStoredPoints: function () { |
1193 | 1227 | console.info("_processStoredPoints"); |
1194 | 1228 | if (this.upPoints===null) { |
|
0 commit comments