Skip to content

Commit

Permalink
Declare variables before use
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpalmer committed May 4, 2020
1 parent d9261d6 commit 55ba6a4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions html/gui/js/report_builder/ReportCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ XDMoD.ReportCreator = Ext.extend(Ext.form.FormPanel, {
thumbnailChartLayoutPreview;
}, this, {single: true});

// Declare variable before they are used, but cannot be defined here
// due to circular references.
var btnSaveReport;
var btnSaveReportAs;

this.dirtyConfig = function (field, nv, ov) {
CCR.xdmod.reporting.dirtyState = true;
self.needsSave = true;
Expand Down Expand Up @@ -1042,7 +1047,7 @@ XDMoD.ReportCreator = Ext.extend(Ext.form.FormPanel, {
p.expandGeneralInfo = false;
});

var btnSaveReport = new Ext.Button({
btnSaveReport = new Ext.Button({
iconCls: 'btn_save',
text: 'Save',
disabled: true,
Expand All @@ -1056,7 +1061,7 @@ XDMoD.ReportCreator = Ext.extend(Ext.form.FormPanel, {
}
});

var btnSaveReportAs = new Ext.Button({
btnSaveReportAs = new Ext.Button({
iconCls: 'btn_save',
text: 'Save As',
tooltip: 'Create and save a copy of this report.',
Expand Down

0 comments on commit 55ba6a4

Please sign in to comment.