From 476f09e58486ec79a0a9d9758ee5f38b95d10362 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 16 Sep 2011 18:43:12 +0200 Subject: [PATCH] Fix freebusy dialog; scale f/b grid with dialog size --- plugins/calendar/calendar_base.js | 2 +- plugins/calendar/calendar_ui.js | 7 +++++-- plugins/calendar/skins/default/calendar.css | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/calendar/calendar_base.js b/plugins/calendar/calendar_base.js index 5fc25364..eec2dbe5 100644 --- a/plugins/calendar/calendar_base.js +++ b/plugins/calendar/calendar_base.js @@ -65,7 +65,7 @@ function rcube_calendar(settings) event_ids.push(alarm.id); html = '

' + Q(alarm.title) + '

'; - html += '
' + Q(alarm.location) + '
'; + html += '
' + Q(alarm.location || '') + '
'; html += '
' + Q(this.event_date_text(alarm)) + '
'; adismiss = $('').html(rcmail.gettext('dismiss','calendar')).click(function(){ diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js index 06380573..917c2cce 100644 --- a/plugins/calendar/calendar_ui.js +++ b/plugins/calendar/calendar_ui.js @@ -835,6 +835,9 @@ function rcube_calendar_ui(settings) $("#edit-attendees-table").css('visibility','visible'); $dialog.dialog("destroy").hide(); }, + resizeStop: function() { + render_freebusy_overlay(); + }, buttons: buttons, minWidth: 640, width: 850 @@ -966,7 +969,7 @@ function rcube_calendar_ui(settings) // iterate through slots to determine position and size of the overlay table.children('thead').find('td').each(function(i, cell){ - slotend = slotstart + slotsize - 60; + slotend = slotstart + slotsize - 1; // event starts in this slot: compute left if (eventstart >= slotstart && eventstart <= slotend) { fraction = 1 - (slotend - eventstart) / slotsize; @@ -2464,7 +2467,7 @@ function rcube_calendar_ui(settings) $('#shedule-find-prev').button().click(function(){ freebusy_find_slot(-1); }); $('#shedule-find-next').button().click(function(){ freebusy_find_slot(1); }); - $('#schedule-freebusy-wokinghours').click(function(){ + $('#schedule-freebusy-workinghours').click(function(){ freebusy_ui.workinhoursonly = this.checked; $('#workinghourscss').remove(); if (this.checked) diff --git a/plugins/calendar/skins/default/calendar.css b/plugins/calendar/skins/default/calendar.css index 0bbd630d..895fd997 100644 --- a/plugins/calendar/skins/default/calendar.css +++ b/plugins/calendar/skins/default/calendar.css @@ -788,6 +788,7 @@ td.topalign { #schedule-freebusy-times { border-collapse: collapse; + width: 100%; } #schedule-freebusy-times td {