From 9f28de6582ac24853e121e19ef8c3e4f2931bdcc Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Fri, 1 Aug 2014 13:54:15 +0200 Subject: [PATCH] Use TimezoneService date time formatting --- .../helpers/components/work-packages-helper.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/angular/helpers/components/work-packages-helper.js b/app/assets/javascripts/angular/helpers/components/work-packages-helper.js index d9ab6be007..40281032e5 100644 --- a/app/assets/javascripts/angular/helpers/components/work-packages-helper.js +++ b/app/assets/javascripts/angular/helpers/components/work-packages-helper.js @@ -28,7 +28,7 @@ angular.module('openproject.workPackages.helpers') -.factory('WorkPackagesHelper', ['dateFilter', 'currencyFilter', 'CustomFieldHelper', function(dateFilter, currencyFilter, CustomFieldHelper) { +.factory('WorkPackagesHelper', ['TimezoneService', 'currencyFilter', 'CustomFieldHelper', function(TimezoneService, currencyFilter, CustomFieldHelper) { var WorkPackagesHelper = { getRowObjectContent: function(object, option) { var content; @@ -97,15 +97,20 @@ angular.module('openproject.workPackages.helpers') formatValue: function(value, dataType) { switch(dataType) { case 'datetime': - return value ? dateFilter(WorkPackagesHelper.parseDateTime(value), 'medium') : ''; + var dateTime; + if (value) { + dateTime = TimezoneService.formattedDate(value) + " " + TimezoneService.formattedTime(value); + } + return dateTime || ''; case 'date': - return value ? dateFilter(WorkPackagesHelper.parseDateTime(value), 'mediumDate') : ''; + return value ? TimezoneService.formattedDate(value) : ''; case 'currency': return currencyFilter(value, 'EUR '); default: return value; } }, + formatWorkPackageProperty: function(value, propertyName) { var mappings = { dueDate: 'date',