Template changes and IE fix
- Fix IE11 that projector shows JS error if 'startsWith' is used. Projector was updated very slowly. - Hide the valid/invalid/casted ballot rows on projector if empty. - Use 80% width for motion reason in PDF.
This commit is contained in:
parent
e774e2127d
commit
9e46924c77
@ -77,20 +77,22 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- total votes (valid/invalid/casts) -->
|
<!-- total votes (valid/invalid/casts) -->
|
||||||
<tr class="total">
|
<tr class="total" ng-if="poll.has_votes && poll.getVote('votesvalid').value !== null">
|
||||||
<td>
|
<td>
|
||||||
<translate>Valid ballots</translate>
|
<translate>Valid ballots</translate>
|
||||||
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votesvalid')">
|
<td ng-init="vote = poll.getVote('votesvalid')">
|
||||||
{{ vote.value }} {{ vote.percentStr }}
|
{{ vote.value }} {{ vote.percentStr }}
|
||||||
<tr class="total">
|
|
||||||
|
<tr class="total" ng-if="poll.has_votes && poll.getVote('votesinvalid').value !== null">
|
||||||
<td>
|
<td>
|
||||||
<translate>Invalid ballots</translate>
|
<translate>Invalid ballots</translate>
|
||||||
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votesinvalid')">
|
<td ng-init="vote = poll.getVote('votesinvalid')">
|
||||||
{{ vote.value }} {{ vote.percentStr }}
|
{{ vote.value }} {{ vote.percentStr }}
|
||||||
<tr class="total bg-info">
|
|
||||||
|
<tr class="total bg-info" ng-if="poll.has_votes && poll.getVote('votescast').value !== null">
|
||||||
<td>
|
<td>
|
||||||
<translate>Casted ballots</translate>
|
<translate>Casted ballots</translate>
|
||||||
<td ng-if="poll.has_votes" ng-init="vote = poll.getVote('votescast')">
|
<td ng-init="vote = poll.getVote('votescast')">
|
||||||
{{ vote.value }} {{ vote.percentStr }}
|
{{ vote.value }} {{ vote.percentStr }}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -217,7 +217,8 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
|
|||||||
if (matchingElement) {
|
if (matchingElement) {
|
||||||
// copy all changed properties.
|
// copy all changed properties.
|
||||||
_.forEach(newElement, function (value, key) {
|
_.forEach(newElement, function (value, key) {
|
||||||
if (newElement.hasOwnProperty(key) && !key.startsWith('$')) {
|
// key has own property and does not start with a '$'.
|
||||||
|
if (newElement.hasOwnProperty(key) && key.indexOf('$') != 0) {
|
||||||
if (typeof matchingElement[key] === 'undefined' || matchingElement[key] !== value) {
|
if (typeof matchingElement[key] === 'undefined' || matchingElement[key] !== value) {
|
||||||
matchingElement[key] = value;
|
matchingElement[key] = value;
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,14 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
|
|||||||
style: 'heading3',
|
style: 'heading3',
|
||||||
marginTop: 25,
|
marginTop: 25,
|
||||||
});
|
});
|
||||||
reason.push(converter.convertHTML(motion.getReason(motionVersion), 'none'));
|
reason.push({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
width: '80%',
|
||||||
|
stack: converter.convertHTML(motion.getReason(motionVersion), 'none'),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user