Merge pull request #3114 from emanuelschuetze/assignment-fixes

Fixed assignment JS bugs (Fixed #3099)
This commit is contained in:
Norman Jäckel 2017-03-21 17:28:03 +01:00 committed by GitHub
commit b7d3acc94b
2 changed files with 4 additions and 3 deletions

View File

@ -26,7 +26,7 @@ angular.module('OpenSlidesApp.assignments', [])
config = Config.get('assignments_poll_100_percent_base').value;
var base = this.poll.getPercentBase(config);
if (typeof base === 'object') {
if (typeof base === 'object' && base !== null) {
// this.poll.pollmethod === 'yna'
base = base[this.id];
}
@ -96,7 +96,7 @@ angular.module('OpenSlidesApp.assignments', [])
var isReached;
var config = Config.get('assignments_poll_100_percent_base').value;
var base = this.poll.getPercentBase(config);
if (typeof base === 'object') {
if (typeof base === 'object' && base !== null) {
// this.poll.pollmethod === 'yna'
base = base[this.id];
}

View File

@ -123,7 +123,8 @@
</div>
<h3 translate>Election result</h3>
<button os-perms="assignments.can_manage" ng-click="createBallot()" class="btn btn-default btn-sm">
<button os-perms="assignments.can_manage" ng-show="assignment.phase != 2" ng-click="createBallot()"
class="btn btn-default btn-sm">
<i class="fa fa-bar-chart fa-lg"></i>
<translate>New ballot</translate>
</button>