mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-01 03:29:05 +01:00
fix not working date_format!="m" (the default) in NM by reflecting it into DOM
also adding it to all properties used by the r/o widget This needs to be done by a lot more r/o widgets, if they assign their default values in the constructor!
This commit is contained in:
parent
5366974b75
commit
83cfb34c3c
@ -72,8 +72,8 @@ export function formatDuration(value : number | string, options : formatOptions)
|
|||||||
case 'h':
|
case 'h':
|
||||||
value *= 60;
|
value *= 60;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's': // round to full minutes, unless this would give 0, use 1 digit instead
|
||||||
value /= 60.0;
|
value = value < 30 ? Math.round(value / 6.0)/10.0 : Math.round(value / 60.0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,6 +164,7 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
|||||||
* Units to read/store the data. 'd' = days (float), 'h' = hours (float), 'm' = minutes (int), 's' = seconds (int).
|
* Units to read/store the data. 'd' = days (float), 'h' = hours (float), 'm' = minutes (int), 's' = seconds (int).
|
||||||
*/
|
*/
|
||||||
data_format: {
|
data_format: {
|
||||||
|
reflect: true,
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -174,6 +175,7 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
|||||||
* Default is 'dh' = days or hours with selectbox.
|
* Default is 'dh' = days or hours with selectbox.
|
||||||
*/
|
*/
|
||||||
display_format: {
|
display_format: {
|
||||||
|
reflect: true,
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -202,7 +204,10 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
|||||||
* Number of hours in a day, used for converting between hours and (working) days.
|
* Number of hours in a day, used for converting between hours and (working) days.
|
||||||
* Default 8
|
* Default 8
|
||||||
*/
|
*/
|
||||||
hours_per_day: {type: Number},
|
hours_per_day: {
|
||||||
|
reflect: true,
|
||||||
|
type: Number
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0 or empty
|
* 0 or empty
|
||||||
@ -210,7 +215,10 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
|||||||
* Should the widget differ between 0 and empty, which get then returned as NULL
|
* Should the widget differ between 0 and empty, which get then returned as NULL
|
||||||
* Default false, empty is considered as 0
|
* Default false, empty is considered as 0
|
||||||
*/
|
*/
|
||||||
empty_not_0: {type: Boolean},
|
empty_not_0: {
|
||||||
|
reflect: true,
|
||||||
|
type: Boolean
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Short labels
|
* Short labels
|
||||||
@ -218,6 +226,7 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
|||||||
* use d/h/m instead of day/hour/minute
|
* use d/h/m instead of day/hour/minute
|
||||||
*/
|
*/
|
||||||
short_labels: {
|
short_labels: {
|
||||||
|
reflect: true,
|
||||||
type: Boolean
|
type: Boolean
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user