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

help links updated

parent 822699b5
......@@ -176,7 +176,8 @@
this.container = STWkit.DomUtil.create('div', +self.name+'-control');
this.accordionDiv = STWkit.DomUtil.create('div', 'uk-accordion', this.container);
var locationoptions = {};
var initials = '';
var initials = 'fo';
var type = 'object';
locationoptions['single'] = false;
locationoptions['multiple'] = false;
locationoptions['line'] = false;
......@@ -184,11 +185,14 @@
locationoptions['polygon']['show'] = true;
// locationoptions['polygon']['name'] = 'Area';
locationoptions['circle'] = true;
locationoptions['type'] = type;
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);
this.cardMap[locationid].show();
var periodoptions = {};
periodoptions['type'] = type;
periodoptions['initials'] = initials;
// periodoptions['forwardbackward'] = false;
var periodid = 'periodCard';
this.cardMap[periodid] = new STWkit.PeriodCard(periodid, 'Simulation period', this.accordionDiv, this.lang, map, this.domain, this.forcingmodel, periodoptions);
......
......@@ -118,6 +118,7 @@ var STWkit;
if (key == 13)
e.preventDefault();
};
var type = (options && options.hasOwnProperty('type')) ? options.type : '';
var initials = (options && options.hasOwnProperty('initials')) ? options.initials : '';
var showsingle = (options && options.hasOwnProperty('single')) ? options.single : true;
var showmultiple = (options && options.hasOwnProperty('multiple')) ? options.multiple : false;
......@@ -127,7 +128,7 @@ var STWkit;
var showcircle = (options && options.hasOwnProperty('circle')) ? options.circle : false;
var typeLabelGrid = L.DomUtil.create('div', 'uk-grid uk-margin-top', self.locationForm);
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/#oil-" + initials + "-type' target='_blank'>here</a>");
_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 + '1';
typeDiv.setAttribute('data-uk-button-radio', '');
......@@ -165,7 +166,7 @@ var STWkit;
self.positions = [];
var positionLabelGrid = L.DomUtil.create('div', 'uk-grid uk-margin-top', self.locationForm);
var positionlabelDiv = L.DomUtil.create('div', 'uk-width-1-1', positionLabelGrid);
_super.prototype.addLabelDiv.call(_this, positionlabelDiv, "Position", "See more information <a style='color:#faa732;' href='help/classic/#oil-" + initials + "-position' target='_blank'>here</a>");
_super.prototype.addLabelDiv.call(_this, positionlabelDiv, "Position", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-position' target='_blank'>here</a>");
var positionDiv = L.DomUtil.create('div', '', self.locationForm);
positionDiv.id = 'guide' + initials + '2';
var positionButtonGrid = L.DomUtil.create('div', 'uk-grid uk-grid-small', positionDiv);
......@@ -418,6 +419,7 @@ var STWkit;
var self = _this;
self.domain = domain;
self.forcingmodel = forcingmodel;
var type = (options && options.hasOwnProperty('type')) ? options.type : '';
var initials = (options && options.hasOwnProperty('initials')) ? options.initials : '';
var showforwardbackward = (options && options.hasOwnProperty('forwardbackward')) ? options.forwardbackward : true;
var form = L.DomUtil.create('form', 'uk-form uk-form-stacked', periodDiv);
......@@ -439,10 +441,10 @@ var STWkit;
self.maxDate = moment.utc().startOf('hour').add(240, 'hours');
var fieldset = L.DomUtil.create('fieldset', '', form);
var availableRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
_super.prototype.addLabelDiv.call(_this, availableRowDiv, "Selected period (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#object-" + initials + "-period' target='_blank'>here</a>");
_super.prototype.addLabelDiv.call(_this, availableRowDiv, "Selected period (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-period' target='_blank'>here</a>");
var availableDiv = L.DomUtil.create('div', '', availableRowDiv);
var startRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
_super.prototype.addLabelDiv.call(_this, startRowDiv, "Start date (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#object-" + initials + "-start' target='_blank'>here</a>");
_super.prototype.addLabelDiv.call(_this, startRowDiv, "Start date (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-start' target='_blank'>here</a>");
var startDiv = L.DomUtil.create('div', 'uk-form-controls uk-form-icon uk-width-1-1', startRowDiv);
var startIcon = L.DomUtil.create('span', 'uk-icon-calendar', startDiv);
self.startDateInput = L.DomUtil.create('input', 'uk-width-1-2', startDiv);
......@@ -451,7 +453,7 @@ var STWkit;
self.startTimeInput = L.DomUtil.create('input', 'uk-width-1-2', startDiv);
self.startTimeInput.type = 'text';
var durationRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
_super.prototype.addLabelDiv.call(_this, durationRowDiv, "Duration", "See more information <a style='color:#faa732;' href='help/classic/#object-" + initials + "-duration' target='_blank'>here</a>");
_super.prototype.addLabelDiv.call(_this, durationRowDiv, "Duration", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-duration' target='_blank'>here</a>");
var durationDiv = L.DomUtil.create('div', 'uk-form-controls uk-form-icon uk-width-1-1', durationRowDiv);
durationDiv.id = 'guide' + initials + '4';
var durationIcon = L.DomUtil.create('span', 'uk-icon-clock-o', durationDiv);
......@@ -465,7 +467,7 @@ var STWkit;
var directionRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
if (!showforwardbackward)
directionRowDiv.style.display = 'none';
_super.prototype.addLabelDiv.call(_this, directionRowDiv, "Forward / Backward", "See more information <a style='color:#faa732;' href='help/classic/#oil-" + initials + "-direction' target='_blank'>here</a>");
_super.prototype.addLabelDiv.call(_this, directionRowDiv, "Forward / Backward", "See more information <a style='color:#faa732;' href='help/classic/#" + type + "-" + initials + "-direction' target='_blank'>here</a>");
var directionDiv = L.DomUtil.create('div', 'uk-margin-bottom', directionRowDiv);
directionDiv.setAttribute('data-uk-button-radio', '');
var directionButtonGrid = L.DomUtil.create('div', 'uk-grid uk-grid-small', directionDiv);
......@@ -813,7 +815,7 @@ var STWkit;
};
var fieldset = L.DomUtil.create('fieldset', '', startform);
var calculationRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
addLabelDiv(calculationRowDiv, "Calculation mode", "See more information <a style='color:#faa732;' href='help/classic/#object-" + 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);
calculationMode.setAttribute('data-uk-form-select', '');
var selectedMode = L.DomUtil.create('span', '', calculationMode);
......@@ -823,7 +825,7 @@ var STWkit;
addOption(self.selectCalculationMode, 'Detailed', 'Detailed / slower');
self.selectCalculationMode.selectedIndex = 1;
var uncertaintyRowDiv = L.DomUtil.create('div', 'uk-form-row', fieldset);
addLabelDiv(uncertaintyRowDiv, "Uncertainty", "See more information <a style='color:#faa732;' href='help/classic/#object-" + this.initials + "-uncertainty' target='_blank'>here</a>");
addLabelDiv(uncertaintyRowDiv, "Uncertainty", "See more information <a style='color:#faa732;' href='help/classic/#" + this.type + "-" + this.initials + "-uncertainty' target='_blank'>here</a>");
var uncertaintyLabel = L.DomUtil.create('label', '', uncertaintyRowDiv);
uncertaintyLabel.style.display = 'block';
self.uncertaintyInput = L.DomUtil.create('input', '', uncertaintyLabel);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -144,6 +144,7 @@ module STWkit {
var key = e.charCode || e.keyCode || 0;
if (key == 13) e.preventDefault();
};
var type = (options && options.hasOwnProperty('type'))?options.type:'';
var initials = (options && options.hasOwnProperty('initials'))?options.initials:'';
var showsingle = (options && options.hasOwnProperty('single'))?options.single:true;
var showmultiple = (options && options.hasOwnProperty('multiple'))?options.multiple:false;
......@@ -153,7 +154,7 @@ module STWkit {
var showcircle = (options && options.hasOwnProperty('circle'))?options.circle:false;
var typeLabelGrid = <HTMLDivElement>L.DomUtil.create('div', 'uk-grid uk-margin-top', self.locationForm);
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/#oil-"+initials+"-type' target='_blank'>here</a>");
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+'1';
typeDiv.setAttribute('data-uk-button-radio', '');
......@@ -189,7 +190,7 @@ module STWkit {
var positionLabelGrid = <HTMLDivElement>L.DomUtil.create('div', 'uk-grid uk-margin-top', self.locationForm);
var positionlabelDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-width-1-1', positionLabelGrid);
super.addLabelDiv(positionlabelDiv, "Position", "See more information <a style='color:#faa732;' href='help/classic/#oil-"+initials+"-position' target='_blank'>here</a>");
super.addLabelDiv(positionlabelDiv, "Position", "See more information <a style='color:#faa732;' href='help/classic/#"+type+"-"+initials+"-position' target='_blank'>here</a>");
var positionDiv: any = <HTMLDivElement>L.DomUtil.create('div', '', self.locationForm);
positionDiv.id = 'guide'+initials+'2';
var positionButtonGrid = <HTMLDivElement>L.DomUtil.create('div', 'uk-grid uk-grid-small', positionDiv);
......@@ -472,6 +473,7 @@ module STWkit {
self.domain = domain;
self.forcingmodel = forcingmodel;
var type = (options && options.hasOwnProperty('type'))?options.type:'';
var initials = (options && options.hasOwnProperty('initials'))?options.initials:'';
var showforwardbackward = (options && options.hasOwnProperty('forwardbackward'))?options.forwardbackward:true;
var form = <HTMLFormElement>L.DomUtil.create('form', 'uk-form uk-form-stacked', periodDiv);
......@@ -492,10 +494,10 @@ module STWkit {
self.maxDate = moment.utc().startOf('hour').add(240, 'hours');
var fieldset = <HTMLFieldSetElement>L.DomUtil.create('fieldset', '', form);
var availableRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
super.addLabelDiv(availableRowDiv, "Selected period (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#object-"+initials+"-period' target='_blank'>here</a>");
super.addLabelDiv(availableRowDiv, "Selected period (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#"+type+"-"+initials+"-period' target='_blank'>here</a>");
var availableDiv = <HTMLDivElement>L.DomUtil.create('div', '', availableRowDiv);
var startRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
super.addLabelDiv(startRowDiv, "Start date (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#object-"+initials+"-start' target='_blank'>here</a>");
super.addLabelDiv(startRowDiv, "Start date (UTC)", "See more information <a style='color:#faa732;' href='help/classic/#"+type+"-"+initials+"-start' target='_blank'>here</a>");
var startDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-controls uk-form-icon uk-width-1-1', startRowDiv);
var startIcon = <HTMLSpanElement>L.DomUtil.create('span', 'uk-icon-calendar', startDiv);
self.startDateInput = <HTMLInputElement>L.DomUtil.create('input', 'uk-width-1-2', startDiv);
......@@ -504,7 +506,7 @@ module STWkit {
self.startTimeInput = <HTMLInputElement>L.DomUtil.create('input', 'uk-width-1-2', startDiv);
self.startTimeInput.type = 'text';
var durationRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
super.addLabelDiv(durationRowDiv, "Duration", "See more information <a style='color:#faa732;' href='help/classic/#object-"+initials+"-duration' target='_blank'>here</a>");
super.addLabelDiv(durationRowDiv, "Duration", "See more information <a style='color:#faa732;' href='help/classic/#"+type+"-"+initials+"-duration' target='_blank'>here</a>");
var durationDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-controls uk-form-icon uk-width-1-1', durationRowDiv);
durationDiv.id = 'guide'+initials+'4';
var durationIcon = <HTMLSpanElement>L.DomUtil.create('span', 'uk-icon-clock-o', durationDiv);
......@@ -517,7 +519,7 @@ module STWkit {
hoursSpan.textContent = " hours";
var directionRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
if (!showforwardbackward) directionRowDiv.style.display = 'none';
super.addLabelDiv(directionRowDiv, "Forward / Backward", "See more information <a style='color:#faa732;' href='help/classic/#oil-"+initials+"-direction' target='_blank'>here</a>");
super.addLabelDiv(directionRowDiv, "Forward / Backward", "See more information <a style='color:#faa732;' href='help/classic/#"+type+"-"+initials+"-direction' target='_blank'>here</a>");
var directionDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-margin-bottom', directionRowDiv);
directionDiv.setAttribute('data-uk-button-radio', '');
var directionButtonGrid = <HTMLDivElement>L.DomUtil.create('div', 'uk-grid uk-grid-small', directionDiv);
......@@ -904,7 +906,7 @@ module STWkit {
};
var fieldset = <HTMLFieldSetElement>L.DomUtil.create('fieldset', '', startform);
var calculationRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
addLabelDiv(calculationRowDiv, "Calculation mode", "See more information <a style='color:#faa732;' href='help/classic/#object-"+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);
calculationMode.setAttribute('data-uk-form-select','');
var selectedMode = <HTMLSpanElement>L.DomUtil.create('span', '', calculationMode);
......@@ -914,7 +916,7 @@ module STWkit {
addOption(self.selectCalculationMode,'Detailed', 'Detailed / slower');
self.selectCalculationMode.selectedIndex = 1;
var uncertaintyRowDiv = <HTMLDivElement>L.DomUtil.create('div', 'uk-form-row', fieldset);
addLabelDiv(uncertaintyRowDiv, "Uncertainty", "See more information <a style='color:#faa732;' href='help/classic/#object-"+this.initials+"-uncertainty' target='_blank'>here</a>");
addLabelDiv(uncertaintyRowDiv, "Uncertainty", "See more information <a style='color:#faa732;' href='help/classic/#"+this.type+"-"+this.initials+"-uncertainty' target='_blank'>here</a>");
var uncertaintyLabel = <HTMLLabelElement>L.DomUtil.create('label', '', uncertaintyRowDiv);
uncertaintyLabel.style.display = 'block';
self.uncertaintyInput = <HTMLInputElement>L.DomUtil.create('input', '', uncertaintyLabel);
......
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