fixed .5 hours entered in infolog (PM tab) is displayed after saving as 30 days, caused by automatic transformation to minutes and not recognising that display_format does NOT support minutes

This commit is contained in:
Ralf Becker 2014-05-26 13:44:24 +00:00
parent 28b45639be
commit 086501bc30

View File

@ -444,11 +444,11 @@ var et2_date_duration = et2_date.extend(
// Figure out best unit for display
var _unit = this.options.display_format == "d" ? "d" : "h";
if (this.options.data_format.indexOf('m') > -1 && _value && _value < 60)
if (this.options.display_format.indexOf('m') > -1 && _value && _value < 60)
{
_unit = 'm';
}
else if (this.options.data_format.indexOf('d') > -1 && _value >= 60*this.options.hours_per_day)
else if (this.options.display_format.indexOf('d') > -1 && _value >= 60*this.options.hours_per_day)
{
_unit = 'd';
}