Fix row reference of work packages table service

pull/1280/merge
Till Breuer 11 years ago
parent 9552865dae
commit f736db3f9e
  1. 4
      app/assets/javascripts/angular/controllers/work-packages-controller.js
  2. 3
      app/assets/javascripts/angular/services/work-packages-table-service.js

@ -122,7 +122,7 @@ angular.module('openproject.workPackages.controllers')
// table data
WorkPackagesTableService.setColumns($scope.query.columns);
WorkPackagesTableService.addColumnMetaData(meta);
WorkPackagesTableService.setRows($scope.rows);
WorkPackagesTableService.setRows(WorkPackagesTableHelper.getRows(workPackages, $scope.query.groupBy));
WorkPackagesTableService.setBulkLinks(bulkLinks);
// query data
@ -136,7 +136,7 @@ angular.module('openproject.workPackages.controllers')
// yield updatable data to scope
$scope.columns = $scope.query.columns;
$scope.rows = WorkPackagesTableHelper.getRows(workPackages, $scope.query.groupBy);
$scope.rows = WorkPackagesTableService.getRows();
$scope.groupableColumns = WorkPackagesTableService.getGroupableColumns();
$scope.workPackageCountByGroup = meta.work_package_count_by_group;
$scope.totalEntries = QueryService.getTotalEntries();

@ -77,6 +77,9 @@ angular.module('openproject.workPackages.services')
setRows: function(rows) {
workPackagesTableData.rows = rows;
},
getRows: function() {
return workPackagesTableData.rows;
},
removeRow: function(row) {
var rows = workPackagesTableData.rows;

Loading…
Cancel
Save