mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-31 19:19:43 +01:00
Fix some layout / formatting problems with 12h times
This commit is contained in:
parent
b136d22c3a
commit
955466d156
@ -2454,7 +2454,7 @@ app.classes.calendar = AppJS.extend(
|
||||
var range = '';
|
||||
|
||||
var datefmt = egw.preference('dateformat');
|
||||
var timefmt = egw.preference('timeformat') == 12 ? 'h:i a' : 'H:i';
|
||||
var timefmt = egw.preference('timeformat') === '12' ? 'h:i a' : 'H:i';
|
||||
|
||||
var month_before_day = datefmt[0].toLowerCase() == 'm' ||
|
||||
datefmt[2].toLowerCase() == 'm' && datefmt[4] == 'd';
|
||||
|
@ -433,7 +433,7 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||
if (event['end_m'] > 24*60)
|
||||
{
|
||||
timespan = jQuery.datepicker.formatTime(
|
||||
egw.preference("timeformat") === 12 ? "h:mmtt" : "HH:mm",
|
||||
egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm",
|
||||
{
|
||||
hour: event.start_m / 60,
|
||||
minute: event.start_m % 60,
|
||||
@ -442,7 +442,7 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||
},
|
||||
{"ampm": (egw.preference("timeformat") === "12")}
|
||||
).trim()+' - '+jQuery.datepicker.formatTime(
|
||||
egw.preference("timeformat") === 12 ? "h:mmtt" : "HH:mm",
|
||||
egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm",
|
||||
{
|
||||
hour: event.end_m / 60,
|
||||
minute: event.end_m % 60,
|
||||
@ -464,7 +464,7 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
|
||||
duration = Math.floor(duration/60) + this.egw().lang('h')+(duration%60 ? duration%60 : '');
|
||||
|
||||
timespan = jQuery.datepicker.formatTime(
|
||||
egw.preference("timeformat") === 12 ? "h:mmtt" : "HH:mm",
|
||||
egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm",
|
||||
{
|
||||
hour: event.start_m / 60,
|
||||
minute: event.start_m % 60,
|
||||
|
@ -1414,14 +1414,14 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
|
||||
var time = this._get_time_from_position(position.left, position.top);
|
||||
element.dropEnd = time;
|
||||
var formatted_time = jQuery.datepicker.formatTime(
|
||||
egw.preference("timeformat") == 12 ? "h:mmtt" : "HH:mm",
|
||||
egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm",
|
||||
{
|
||||
hour: time.getUTCHours(),
|
||||
minute: time.getUTCMinutes(),
|
||||
seconds: 0,
|
||||
timezone: 0
|
||||
},
|
||||
{"ampm": (egw.preference("timeformat") == "12")}
|
||||
{"ampm": (egw.preference("timeformat") === "12")}
|
||||
);
|
||||
|
||||
element.innerHTML = '<div class="calendar_d-n-d_timeCounter"><span class="calendar_timeDemo" >'+formatted_time+'</span></div>';
|
||||
|
@ -339,7 +339,7 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
|
||||
else
|
||||
{
|
||||
time = jQuery.datepicker.formatTime(
|
||||
egw.preference("timeformat") == 12 ? "h:mmtt" : "HH:mm",
|
||||
egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm",
|
||||
{
|
||||
hour: element.dropEnd.attr('data-hour'),
|
||||
minute: element.dropEnd.attr('data-minute'),
|
||||
@ -606,14 +606,14 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
|
||||
html += '<div class="calendar_calTimeRow" style="height: '+this.rowHeight+'px;">';
|
||||
// show time for full hours, always for 45min interval and at least on every 3 row
|
||||
var time = jQuery.datepicker.formatTime(
|
||||
egw.preference("timeformat") == 12 ? "h:mmtt" : "HH:mm",
|
||||
egw.preference("timeformat") === "12" ? "h:mmtt" : "HH:mm",
|
||||
{
|
||||
hour: t / 60,
|
||||
minute: t % 60,
|
||||
seconds: 0,
|
||||
timezone: 0
|
||||
},
|
||||
{"ampm": (egw.preference("timeformat") == "12")}
|
||||
{"ampm": (egw.preference("timeformat") === "12")}
|
||||
);
|
||||
if(t <= wd_start && t + granularity > wd_start)
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
|
||||
top: 0px;
|
||||
/* bottom: 0px; does NOT work in IE, IE needs height: 100%! */
|
||||
height: 100%;
|
||||
left: 45px;
|
||||
left: 58px;
|
||||
right: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@ -301,7 +301,7 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
|
||||
.calendar_calGridHeader > div {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
margin-left: 42px;
|
||||
margin-left: 55px;
|
||||
width: initial;
|
||||
white-space: nowrap;
|
||||
border-left: 1px solid silver;
|
||||
|
Loading…
Reference in New Issue
Block a user