Ensure that star are displayed on non-round note

This commit is contained in:
2016-02-12 18:57:36 +01:00
parent 540637580a
commit a7abe7eddb
2 changed files with 4 additions and 1 deletions

View File

@@ -15,10 +15,13 @@ directives.directive('album', function() {
});
directives.controller('AlbumCtrl', function($scope,$http,$log,$uibModal,albumService) {
//we need to make sure rating is not rendered before note is known
$scope.render = false;
$scope.album = { Note:-1};
albumService.get($scope.id)
.then(function(data) {
$scope.album = data;
$scope.render = true;
}, function(err) {
$log.error('Could not fetch album ' + $scope.id + ' :' + err);
});

View File

@@ -3,7 +3,7 @@
<div class="cover">
<img class="img-responsive img-rounded" alt="{{album.titleDisplay}}" ng-src="{{album.CoverURL}}"/>
<div class="over-img-rating">
<uib-rating ng-model="album.Note" readonly="true"></uib-rating>
<uib-rating ng-if="render" ng-model="album.Note" readonly="true"></uib-rating>
</div>
<div class="over-img-ref">{{album.ref}}</div>
</div>