Commit 99b06e7e authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

show/hide stateofoil

parent 7b20f26d
......@@ -184,6 +184,7 @@
var oiltypeoptions = {};
oiltypeoptions['type'] = type;
oiltypeoptions['initials'] = initials;
oiltypeoptions['stateofoil'] = false;
var oiltypeid = 'oiltypeCard';
this.cardMap[oiltypeid] = new STWkit.OilTypeCard(oiltypeid, 'Type of oil', this.accordionDiv, this.lang, map, oiltypeoptions);
......
......@@ -751,6 +751,7 @@ var STWkit;
};
var type = (options && options.hasOwnProperty('type')) ? options.type : '';
_this.initials = (options && options.hasOwnProperty('initials')) ? options.initials : '';
_this.showstateofoil = (options && options.hasOwnProperty('stateofoil')) ? options.stateofoil : true;
var fieldset = L.DomUtil.create('fieldset', '', form);
var oiltypeRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
oiltypeRowDiv.id = 'guide' + _this.initials + 'class';
......@@ -833,6 +834,8 @@ var STWkit;
addOption(self.selectOilSpecific, 'MARINE DIESEL (IKU)', 'Marine diesel (IKU)');
addOption(self.selectOilSpecific, 'IFO 380 FU SHAN HAI', 'Ifo 380 Fu Shan Hai');
var oilstateRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
if (!_this.showstateofoil)
oilstateRowDiv.style.display = 'none';
_super.prototype.addLabelDiv.call(_this, oilstateRowDiv, "State of oil", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + _this.initials + "-oilstate' target='_blank'>here</a>");
var oilstateDiv = L.DomUtil.create('div', 'uk-margin-bottom', oilstateRowDiv);
oilstateDiv.setAttribute('data-uk-button-radio', '');
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -801,6 +801,7 @@ module STWkit {
public selectOilSpecific: HTMLSelectElement;
private forward: boolean;
private initials: string;
private showstateofoil: boolean;
constructor(id, title, parentDiv, lang, map, options?) {
var oiltypeDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-width-1-1 uk-margin-top', parentDiv);
......@@ -820,6 +821,7 @@ module STWkit {
var type = (options && options.hasOwnProperty('type'))?options.type:'';
this.initials = (options && options.hasOwnProperty('initials'))?options.initials:'';
this.showstateofoil = (options && options.hasOwnProperty('stateofoil'))?options.stateofoil:true;
var fieldset = <HTMLFieldSetElement>L.DomUtil.create('fieldset', '', form);
var oiltypeRowDiv: any = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
......@@ -907,6 +909,7 @@ module STWkit {
addOption(self.selectOilSpecific, 'IFO 380 FU SHAN HAI', 'Ifo 380 Fu Shan Hai');
var oilstateRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
if (!this.showstateofoil) oilstateRowDiv.style.display = 'none';
super.addLabelDiv(oilstateRowDiv, "State of oil", "See more information <a style='color:#faa732;' href='help/classic/#"+type+"-"+this.initials+"-oilstate' target='_blank'>here</a>");
var oilstateDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-margin-bottom', oilstateRowDiv);
oilstateDiv.setAttribute('data-uk-button-radio', '');
......
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