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

show/hide calculationmode

parent a8807309
...@@ -149,7 +149,9 @@ ...@@ -149,7 +149,9 @@
var properties = { var properties = {
"domain" : domainname, "domain" : domainname,
"lang": language, "lang": language,
"langdata": langData "langdata": langData,
calculationmode: true,
uncertainty: true
}; };
if (forcing.features.length > 0) properties["forcing"] = forcing; if (forcing.features.length > 0) properties["forcing"] = forcing;
......
...@@ -991,6 +991,9 @@ var STWkit; ...@@ -991,6 +991,9 @@ var STWkit;
_this.showuncertainty = true; _this.showuncertainty = true;
if (typeof options.uncertainty !== "undefined") if (typeof options.uncertainty !== "undefined")
_this.showuncertainty = options.uncertainty; _this.showuncertainty = options.uncertainty;
_this.showcalculationmode = true;
if (typeof options.calculationmode !== "undefined")
_this.showcalculationmode = options.calculationmode;
_this.cardMap = {}; _this.cardMap = {};
return _this; return _this;
} }
...@@ -1055,6 +1058,8 @@ var STWkit; ...@@ -1055,6 +1058,8 @@ var STWkit;
}; };
var fieldset = L.DomUtil.create('fieldset', '', startform); var fieldset = L.DomUtil.create('fieldset', '', startform);
var calculationRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset); 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>"); 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); var calculationMode = L.DomUtil.create('div', 'uk-form-select', calculationRowDiv);
calculationMode.setAttribute('data-uk-form-select', ''); 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 { ...@@ -1078,6 +1078,7 @@ module STWkit {
private name: string; private name: string;
private initials: string; private initials: string;
private showuncertainty: boolean; private showuncertainty: boolean;
private showcalculationmode: boolean;
constructor(options) { constructor(options) {
super(options); super(options);
...@@ -1101,6 +1102,8 @@ module STWkit { ...@@ -1101,6 +1102,8 @@ module STWkit {
} }
this.showuncertainty = true; this.showuncertainty = true;
if (typeof options.uncertainty !== "undefined") this.showuncertainty = options.uncertainty; if (typeof options.uncertainty !== "undefined") this.showuncertainty = options.uncertainty;
this.showcalculationmode = true;
if (typeof options.calculationmode !== "undefined") this.showcalculationmode = options.calculationmode;
this.cardMap = {}; this.cardMap = {};
...@@ -1171,6 +1174,7 @@ module STWkit { ...@@ -1171,6 +1174,7 @@ module STWkit {
}; };
var fieldset = <HTMLFieldSetElement>L.DomUtil.create('fieldset', '', startform); var fieldset = <HTMLFieldSetElement>L.DomUtil.create('fieldset', '', startform);
var calculationRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset); 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>"); 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); var calculationMode = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-select', calculationRowDiv);
calculationMode.setAttribute('data-uk-form-select',''); 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