Commit c3c05c78 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

show/hide outlet type

parent 99b06e7e
......@@ -171,6 +171,7 @@
// locationoptions['polygon']['name'] = 'Area';
locationoptions['circle'] = false;
locationoptions['type'] = type;
// locationoptions['outlettype'] = false;
locationoptions['initials'] = initials;
var locationid = 'locationCard';
this.cardMap[locationid] = new STWkit.LocationCard(locationid, 'Specify location', this.accordionDiv, this.lang, this.langData, map, this.forcing, locationoptions);
......@@ -184,7 +185,7 @@
var oiltypeoptions = {};
oiltypeoptions['type'] = type;
oiltypeoptions['initials'] = initials;
oiltypeoptions['stateofoil'] = false;
// oiltypeoptions['stateofoil'] = false;
var oiltypeid = 'oiltypeCard';
this.cardMap[oiltypeid] = new STWkit.OilTypeCard(oiltypeid, 'Type of oil', this.accordionDiv, this.lang, map, oiltypeoptions);
......
......@@ -126,13 +126,17 @@ var STWkit;
var namepolygon = (options && options.hasOwnProperty('polygon') && options.polygon.hasOwnProperty('name')) ? options.polygon.name : 'Polygon';
var showline = (options && options.hasOwnProperty('line')) ? options.line : true;
var showcircle = (options && options.hasOwnProperty('circle')) ? options.circle : false;
var typeLabelGrid = L.DomUtil.create('div', 'uk-grid uk-margin-top', self.locationForm);
var showoutlettype = (options && options.hasOwnProperty('outlettype')) ? options.outlettype : true;
var outlettypeDiv = L.DomUtil.create('div', '', self.locationForm);
if (!showoutlettype)
outlettypeDiv.style.display = 'none';
var typeLabelGrid = L.DomUtil.create('div', 'uk-grid uk-margin-top', outlettypeDiv);
var objectlabelDiv = L.DomUtil.create('div', 'uk-width-1-2', typeLabelGrid);
_super.prototype.addLabelDiv.call(_this, objectlabelDiv, "Outlet type", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-type' target='_blank'>here</a>");
var typeDiv = L.DomUtil.create('div', '', self.locationForm);
typeDiv.id = 'guide' + initials + 'type';
typeDiv.setAttribute('data-uk-button-radio', '');
var typeButtonGrid = L.DomUtil.create('div', 'uk-grid uk-grid-small', typeDiv);
var typeButtonDiv = L.DomUtil.create('div', '', outlettypeDiv);
typeButtonDiv.id = 'guide' + initials + 'type';
typeButtonDiv.setAttribute('data-uk-button-radio', '');
var typeButtonGrid = L.DomUtil.create('div', 'uk-grid uk-grid-small', typeButtonDiv);
var objectbuttonsDiv = L.DomUtil.create('div', 'uk-width-1-2', typeButtonGrid);
var objectButtonGroup = L.DomUtil.create('div', 'uk-button-group', objectbuttonsDiv);
self.pointButton = L.DomUtil.create('button', 'uk-button uk-button-small', objectButtonGroup);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -152,13 +152,16 @@ module STWkit {
var namepolygon = (options && options.hasOwnProperty('polygon') && options.polygon.hasOwnProperty('name'))?options.polygon.name:'Polygon';
var showline = (options && options.hasOwnProperty('line'))?options.line:true;
var showcircle = (options && options.hasOwnProperty('circle'))?options.circle:false;
var typeLabelGrid = <HTMLDivElement>L.DomUtil.create('div', 'uk-grid uk-margin-top', self.locationForm);
var showoutlettype = (options && options.hasOwnProperty('outlettype'))?options.outlettype:true;
var outlettypeDiv = <HTMLDivElement>L.DomUtil.create('div', '', self.locationForm);
if (!showoutlettype) outlettypeDiv.style.display = 'none';
var typeLabelGrid = <HTMLDivElement>L.DomUtil.create('div', 'uk-grid uk-margin-top', outlettypeDiv);
var objectlabelDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-width-1-2', typeLabelGrid);
super.addLabelDiv(objectlabelDiv, "Outlet type", "See more information <a style='color:#faa732;' href='help/classic/#"+type+"-"+initials+"-type' target='_blank'>here</a>");
var typeDiv = <HTMLDivElement>L.DomUtil.create('div', '', self.locationForm);
typeDiv.id = 'guide'+initials+'type';
typeDiv.setAttribute('data-uk-button-radio', '');
var typeButtonGrid = <HTMLDivElement>L.DomUtil.create('div', 'uk-grid uk-grid-small', typeDiv);
var typeButtonDiv = <HTMLDivElement>L.DomUtil.create('div', '', outlettypeDiv);
typeButtonDiv.id = 'guide'+initials+'type';
typeButtonDiv.setAttribute('data-uk-button-radio', '');
var typeButtonGrid = <HTMLDivElement>L.DomUtil.create('div', 'uk-grid uk-grid-small', typeButtonDiv);
var objectbuttonsDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-width-1-2', typeButtonGrid);
var objectButtonGroup = <HTMLDivElement>L.DomUtil.create('div', 'uk-button-group', objectbuttonsDiv);
self.pointButton = <HTMLButtonElement>L.DomUtil.create('button', 'uk-button uk-button-small', objectButtonGroup);
......
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