Treat zero as not null

pull/2179/head
Hagen Schink 10 years ago
parent 4c1bd38aa8
commit 303babb43d
  1. 4
      app/assets/javascripts/angular/work_packages/controllers/details-tab-overview-controller.js
  2. 4
      public/templates/work_packages/tabs/overview.html

@ -197,4 +197,8 @@ module.exports = function($scope,
return $scope.isGroupEmpty(element);
}).length > 0;
};
$scope.isPropertyEmpty = function(property) {
return property === undefined || property === null;
};
}

@ -14,12 +14,12 @@
<dl>
<dt ng-repeat-start="propertyData in group.attributes"
ng-show="propertyData.value || !toggleStates.hideAllAttributes"
ng-show="!(isPropertyEmpty(propertyData.value) && toggleStates.hideAllAttributes)"
ng-bind="propertyData.label"
class="work-package-attributes--label">
</dt>
<dd ng-repeat-end
ng-show="propertyData.value || !toggleStates.hideAllAttributes"
ng-show="!(isPropertyEmpty(propertyData.value) && toggleStates.hideAllAttributes)"
ng-switch="propertyData.value"
class="work-package-attributes--value-container">
<div ng-switch-when="null" class="work-package-attributes--value">

Loading…
Cancel
Save