|
@@ -538,8 +538,25 @@ function ExportStartExport()
|
|
|
oParams.query = $('#export-form :input[name=query]').val();
|
|
|
}
|
|
|
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', oParams, function(data) {
|
|
|
- ExportRun(data);
|
|
|
- }, 'json');
|
|
|
+ if (data == null)
|
|
|
+ {
|
|
|
+ ExportError('Export failed (no data provided), please contact your administrator');
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ExportRun(data);
|
|
|
+ }
|
|
|
+ }, 'json')
|
|
|
+ .fail(function() {
|
|
|
+ ExportError('Export failed, please contact your administrator');
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+function ExportError(sMessage)
|
|
|
+{
|
|
|
+ $('.export-message').html(sMessage);
|
|
|
+ $('.export-progress-bar').hide();
|
|
|
+ $('#export-btn').hide();
|
|
|
}
|
|
|
|
|
|
function ExportRun(data)
|