this.startLoading(calendar, start + end);
this.storeCache($H(), calendar);
this.doAction('listEvents',
- { start: start,
- end: end,
- cal: calendar,
- view: view },
+ {
+ start: start,
+ end: end,
+ cal: calendar,
+ sig: start + end,
+ view: view
+ },
this.loadEventsCallback.bind(this));
}, this);
end = viewDates[1].dateString();
$('kronolithTaskSave').disable();
- this.startLoading('tasklists|tasks/' + target, start + end);
+ this.startLoading('tasklists|tasks/' + target, start + end + this.tasktype);
this.loading++;
$('kronolithLoading').show();
this.doAction('saveTask',
$H($('kronolithTaskForm').serialize({ hash: true }))
.merge({
- sig: this.tasktype,
+ sig: start + end + this.tasktype,
view: this.view,
view_start: start,
view_end: end
cal = el.retrieve('calendar'),
viewDates = this.viewDates(this.date, this.view),
start = viewDates[0].toString('yyyyMMdd'),
- end = viewDates[1].toString('yyyyMMdd');
+ end = viewDates[1].toString('yyyyMMdd'),
+ sig = start + end + (Math.random() + '').slice(2);
drop.insert(el);
- this.startLoading(cal, start + end);
+ this.startLoading(cal, sig);
this.doAction('updateEvent',
- { cal: cal,
- id: eventid,
- view: this.view,
- view_start: start,
- view_end: end,
- att: $H({ offDays: diff }).toJSON() },
+ {
+ cal: cal,
+ id: eventid,
+ view: this.view,
+ sig: sig,
+ view_start: start,
+ view_end: end,
+ att: $H({ offDays: diff }).toJSON()
+ },
function(r) {
// Check if this is the still the result of the most
// current request.
dates = this.viewDates(date, this.view),
start = dates[0].dateString(),
end = dates[1].dateString(),
+ sig = start + end + (Math.random() + '').slice(2),
attributes;
div.removeClassName('kronolithSelected');
this.setEventText(drag.innerDiv, event.value);
}
drag.destroy();
- this.startLoading(event.value.calendar, start + end);
+ this.startLoading(event.value.calendar, sig);
if (!Object.isUndefined(event.value.offsetTop)) {
attributes = $H({ offDays: event.value.offsetDays,
offMins: event.value.offsetTop / step * 10 });
}
this.doAction(
'updateEvent',
- { cal: event.value.calendar,
- id: event.key,
- view: this.view,
- view_start: start,
- view_end: end,
- att: attributes.toJSON()
+ {
+ cal: event.value.calendar,
+ id: event.key,
+ view: this.view,
+ sig: sig,
+ view_start: start,
+ view_end: end,
+ att: attributes.toJSON()
},
function(r) {
// Check if this is the still the result of the most current
view: this.view,
view_start: start,
view_end: end,
+ sig: start + end,
as_new: asnew ? 1 : 0
}),
function(r) {
$('kronolithQuickinsert').fade({ duration: this.effectDur });
this.startLoading(cal, start + end);
this.doAction('quickSaveEvent',
- $H({ text: text,
- cal: cal,
- view: this.view,
- view_start: start,
- view_end: end
+ $H({
+ text: text,
+ cal: cal,
+ view: this.view,
+ sig: start + end,
+ view_start: start,
+ view_end: end
}),
function(r) {
this.loadEventsCallback(r);
{
$start = new Horde_Date($this->_vars->start);
$end = new Horde_Date($this->_vars->end);
- $result = new stdClass;
- $result->cal = $this->_vars->cal;
- $result->view = $this->_vars->view;
- $result->sig = $start->dateString() . $end->dateString();
+ $result = $this->_signedResponse($this->_vars->cal);
if (!($kronolith_driver = $this->_getDriver($this->_vars->cal))) {
return $result;
}
/**
* Creates a result object with the signature of the current request.
*
- * @param string $signature A signature.
+ * @param string $calendar A calendar id.
*
* @return object The result object.
*/
- protected function _signedResponse($signature)
+ protected function _signedResponse($calendar)
{
$result = new stdClass;
- $result->cal = $signature;
+ $result->cal = $calendar;
$result->view = $this->_vars->view;
- $start = new Horde_Date($this->_vars->view_start);
- $end = new Horde_Date($this->_vars->view_end);
- $result->sig = $start->dateString() . $end->dateString();
+ $result->sig = $this->_vars->sig;
return $result;
}