|
|
|
@ -108,14 +108,6 @@ angular.module('openproject.workPackages.helpers') |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getIncludedColumnNames: function (columns, columnNames) { |
|
|
|
|
return columnNames.filter(function(columnName) { |
|
|
|
|
return columns.map(function(column) { |
|
|
|
|
return column.name; |
|
|
|
|
}).indexOf(columnName) !== -1; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getColumnIndexByName: function(columns, columnName) { |
|
|
|
|
return columns |
|
|
|
|
.map(function(column){ |
|
|
|
@ -134,12 +126,6 @@ angular.module('openproject.workPackages.helpers') |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
orderColumnsByNames: function(columns, columnNames) { |
|
|
|
|
columns.sort(function(a, b) { |
|
|
|
|
return columnNames.indexOf(a.name) > columnNames.indexOf(b.name) ? 1 : -1; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
mapIdentifiersToColumns: function(columns, columnNames) { |
|
|
|
|
return columnNames.map(function(columnName) { |
|
|
|
|
return WorkPackagesTableHelper.detectColumnByName(columns, columnName); |
|
|
|
|