if (DimpCore.is_ie6) {
this._resizeIE6();
}
+ },
+
+ /* Extend AJAX exception handling. */
+ onAjaxException: function(parentfunc, r, e)
+ {
+ /* Make sure loading images are closed. */
+ this.loadingImg('msg', false);
+ this.loadingImg('viewport', false);
+ DimpCore.showNotifications([ { type: 'horde.error', message: DIMP.text.ajax_error } ]);
+ parentfunc(r, e);
}
};
DimpCore.contextOnClick = DimpCore.contextOnClick.wrap(DimpBase.contextOnClick.bind(DimpBase));
DimpCore.contextOnShow = DimpCore.contextOnShow.wrap(DimpBase.contextOnShow.bind(DimpBase));
+/* Extend AJAX exception handling. */
+DimpCore.doActionOpts.onException = DimpCore.doActionOpts.onException.wrap(DimpBase.onAjaxException.bind(DimpBase));
+
/* Initialize onload handler. */
document.observe('dom:loaded', DimpBase.onDomLoad.bind(DimpBase));
/* Gettext strings used in core javascript files. */
$code['text'] = array(
+ 'ajax_error' => _("Error when communicating with the server."),
'ajax_recover' => _("The connection to the server has been restored."),
'ajax_timeout' => _("There has been no contact with the 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."),
'badaddr' => _("Invalid Address"),