Merge pull request #3472 from FinnStutzenstein/templateChanges

Template changes and IE fix
This commit is contained in:
Emanuel Schütze 2017-11-03 12:55:17 +01:00 committed by GitHub
commit bed42b5c66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 8 deletions

View File

@ -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>

View File

@ -218,7 +218,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;
} }

View File

@ -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;
} }