Synchronized recent changes from git.kolab.org repository (v3.1.16)

This commit is contained in:
Thomas Bruederli 2015-03-12 22:17:51 +01:00
parent c5f3fb18d5
commit 845da36786
3 changed files with 12 additions and 7 deletions

View file

@ -2754,12 +2754,16 @@ function rcube_calendar_ui(settings)
base_date.setYear(minical.data('year'));
base_date.setHours(12);
base_date.setDate(base_date.getDate() - ((base_date.getDay() + 6) % 7) + datepicker_settings.firstDay);
var day_off = base_date.getDay() - datepicker_settings.firstDay;
var base_kw = iso8601Week(base_date);
var target_kw = parseInt(cell.html());
var diff = (target_kw - base_kw) * 7 * DAY_MS;
var base_kw = iso8601Week(base_date),
target_kw = parseInt(cell.html()),
wdiff = target_kw - base_kw;
if (wdiff > 10) // year jump
base_date.setYear(base_date.getFullYear() - 1);
else if (wdiff < -10)
base_date.setYear(base_date.getFullYear() + 1);
// select monday of the chosen calendar week
var date = new Date(base_date.getTime() - day_off * DAY_MS + diff);
var day_off = base_date.getDay() - datepicker_settings.firstDay,
date = new Date(base_date.getTime() - day_off * DAY_MS + wdiff * 7 * DAY_MS);
fc.fullCalendar('gotoDate', date).fullCalendar('setDate', date).fullCalendar('changeView', 'agendaWeek');
minical.datepicker('setDate', date);
}

View file

@ -26,11 +26,12 @@
"require": {
"php": ">=5.3.0",
"roundcube/plugin-installer": ">=0.1.3",
"kolab/libcalendaring": ">=1.0.0"
"kolab/libcalendaring": "~1.0"
},
"extra": {
"roundcube": {
"min-version": "1.0.0",
"max-version": "1.9.9",
"sql-dir": "drivers/database/SQL"
}
}

View file

@ -558,7 +558,7 @@ class kolab_driver extends calendar_driver
return false;
if ($event['_savemode'] != 'new') {
if (!$fromcalendar->storage->move($event['id'], $storage->get_realname()))
if (!$fromcalendar->storage->move($event['id'], $storage->storage))
return false;
$fromcalendar = $storage;