Skip to content

Commit

Permalink
Merge pull request #26 from jtpalmer/report-builder-fix
Browse files Browse the repository at this point in the history
Prevent errors when previewing a report
  • Loading branch information
jtpalmer authored Jan 17, 2017
2 parents 9e4a548 + b0a37ec commit ee14545
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions html/gui/js/report_builder/ReportCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,22 @@ XDMoD.ReportCreator = Ext.extend(Ext.form.FormPanel, {
};

var previewReport = function () {
if (self.getReportID().length == 0) {
CCR.xdmod.ui.reportGeneratorMessage(
'Report Editor',
'You must save this report before you can preview it.'
);
return;
}

if (self.isDirty()) {
CCR.xdmod.ui.reportGeneratorMessage(
'Report Editor',
'You have made changes to this report which you must save before previewing.'
);
return;
}

if (self.reportCharts.reportStore.data.length == 0) {
CCR.xdmod.ui.reportGeneratorMessage(
'Report Editor',
Expand Down

0 comments on commit ee14545

Please sign in to comment.