mapInitialized: false,
doActionOpts: {
- onException: function(r, e) { KronolithCore.debug('onException', e); },
+ onException: this.onAjaxException.bind(this),
onFailure: function(t, o) { KronolithCore.debug('onFailure', t); },
evalJS: false,
evalJSON: true
}
},
+ /* Extend AJAX exception handling. */
+ onAjaxException: function(parentfunc, r, e)
+ {
+ /* Make sure loading images are closed. */
+ this.loading--;
+ if (!this.loading) {
+ $('kronolithLoading').hide();
+ }
+ this._closeRedBox();
+ this.showNotifications([ { type: 'horde.error', message: Kronolith.text.ajax_error } ]);
+ KronolithCore.debug('onException', e);
+ }
+
toggleCalendar: function(elm)
{
elm.toggleClassName('on');
/* Gettext strings used in core javascript files. */
$code['text'] = array(
+ 'ajax_error' => _("Error when communicating with the server."),
'ajax_timeout' => _("There has been no contact with the calendar server for several minutes. The server may be temporarily unavailable or network problems may be interrupting your session. You will not see any updates until the connection is restored."),
'ajax_recover' => _("The connection to the calendar server has been restored."),
'alarm' => _("Alarm:"),