Skip to content

Commit

Permalink
need to assign dialog to a variable #323
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaBurek committed Feb 14, 2022
1 parent 9a1ee26 commit 864f06a
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 102 deletions.
26 changes: 19 additions & 7 deletions webapp/metviewer/js/metviewer_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7876,13 +7876,13 @@ function initPage() {
if (currentTab === 'Roc' || currentTab === 'Rely' || currentTab === 'Ens_ss'
|| currentTab === 'Perf' || currentTab === "Hist" || currentTab === "Eclv"
|| currentTab === "Contour") {
$("#unavailableDiffCurveDialogForm").dialog("open");
unavailableDiffCurveDialogForm.dialog("open");
} else {
var allSeries = $("#listdt").jqGrid('getRowData');
if (allSeries.length > 1) {
addDiffCurveDialogForm.dialog("open");
} else {
$("#incorrectDiffCurveDialogForm").dialog("open");
incorrectDiffCurveDialogForm.dialog("open");
}
}
}
Expand Down Expand Up @@ -7974,7 +7974,7 @@ function initPage() {
buttonicon: "ui-icon-plus",
onClickButton: function () {
if (currentTab === 'Perf' || currentTab === "Taylor" || currentTab === "Contour") {
$("#unavailableLineDialogForm").dialog("open");
unavailableLineDialogForm.dialog("open");
} else {
addLineDialogForm.dialog("open");
}
Expand Down Expand Up @@ -8026,26 +8026,38 @@ function initPage() {
});
$("#listdt").setGridWidth($(window).width() - 20);

$("#unavailableDiffCurveDialogForm").dialog({
var unavailableDiffCurveDialogForm = $("#unavailableDiffCurveDialogForm").dialog({
autoOpen: false,
height: "auto",
width: "auto",
modal: true,
buttons: {
Ok: function () {
$(this).dialog("close");
unavailableDiffCurveDialogForm.dialog("close");
}
}
});

$("#incorrectDiffCurveDialogForm").dialog({
var unavailableLineDialogForm = $("#unavailableLineDialogForm").dialog({
autoOpen: false,
height: "auto",
width: "auto",
modal: true,
buttons: {
Ok: function () {
$(this).dialog("close");
unavailableLineDialogForm.dialog("close");
}
}
});

var incorrectDiffCurveDialogForm = $("#incorrectDiffCurveDialogForm").dialog({
autoOpen: false,
height: "auto",
width: "auto",
modal: true,
buttons: {
Ok: function () {
incorrectDiffCurveDialogForm.dialog("close");
}
}
});
Expand Down
Loading

0 comments on commit 864f06a

Please sign in to comment.