Commit 7b20f26d authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

show/hide calculationmode

parent a8807309
......@@ -149,7 +149,9 @@
var properties = {
"domain" : domainname,
"lang": language,
"langdata": langData
"langdata": langData,
calculationmode: true,
uncertainty: true
};
if (forcing.features.length > 0) properties["forcing"] = forcing;
......
......@@ -991,6 +991,9 @@ var STWkit;
_this.showuncertainty = true;
if (typeof options.uncertainty !== "undefined")
_this.showuncertainty = options.uncertainty;
_this.showcalculationmode = true;
if (typeof options.calculationmode !== "undefined")
_this.showcalculationmode = options.calculationmode;
_this.cardMap = {};
return _this;
}
......@@ -1055,6 +1058,8 @@ var STWkit;
};
var fieldset = L.DomUtil.create('fieldset', '', startform);
var calculationRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
if (!this.showcalculationmode)
calculationRowDiv.style.display = 'none';
addLabelDiv(calculationRowDiv, "Calculation mode", "See more information <a style='color:#faa732;' href='help/classic/#" + this.type + "-" + this.initials + "-calculationmode' target='_blank'>here</a>");
var calculationMode = L.DomUtil.create('div', 'uk-form-select', calculationRowDiv);
calculationMode.setAttribute('data-uk-form-select', '');
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1078,6 +1078,7 @@ module STWkit {
private name: string;
private initials: string;
private showuncertainty: boolean;
private showcalculationmode: boolean;
constructor(options) {
super(options);
......@@ -1101,6 +1102,8 @@ module STWkit {
}
this.showuncertainty = true;
if (typeof options.uncertainty !== "undefined") this.showuncertainty = options.uncertainty;
this.showcalculationmode = true;
if (typeof options.calculationmode !== "undefined") this.showcalculationmode = options.calculationmode;
this.cardMap = {};
......@@ -1171,6 +1174,7 @@ module STWkit {
};
var fieldset = <HTMLFieldSetElement>L.DomUtil.create('fieldset', '', startform);
var calculationRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
if (!this.showcalculationmode) calculationRowDiv.style.display = 'none';
addLabelDiv(calculationRowDiv, "Calculation mode", "See more information <a style='color:#faa732;' href='help/classic/#"+this.type+"-"+this.initials+"-calculationmode' target='_blank'>here</a>");
var calculationMode = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-select', calculationRowDiv);
calculationMode.setAttribute('data-uk-form-select','');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment