Commit 4e871785 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

made validate on location public

parent 68b327ec
......@@ -156,14 +156,6 @@ var STWkit;
self.circleButton.onclick = function () { self.geometryType = "circle"; self.control.setType(self.geometryType); };
self.polygonButton.disabled = false;
self.hasPosition = false;
function validate() {
if (!self.hasPosition)
return;
self.status = true;
AccordionCard.enableNext(self.nextButton, true);
(self.oncallback && self.oncallback());
}
;
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-oo-position' target='_blank'>here</a>");
......@@ -253,7 +245,7 @@ var STWkit;
}
self.control.showTable();
self.hasPosition = true;
validate();
self.validate();
}
}
});
......@@ -333,6 +325,14 @@ var STWkit;
LocationCard.prototype.show = function () {
_super.prototype.show.call(this);
};
LocationCard.prototype.validate = function () {
if (!this.hasPosition)
return;
this.status = true;
AccordionCard.enableNext(this.nextButton, true);
(this.oncallback && this.oncallback());
};
;
LocationCard.prototype.hide = function () {
_super.prototype.hide.call(this);
};
......
This diff is collapsed.
......@@ -178,12 +178,7 @@ module STWkit {
self.polygonButton.disabled = false;
self.hasPosition = false;
function validate() {
if (!self.hasPosition) return;
self.status = true;
AccordionCard.enableNext(self.nextButton, true);
(self.oncallback && self.oncallback());
};
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);
......@@ -276,7 +271,7 @@ module STWkit {
}
self.control.showTable();
self.hasPosition = true;
validate();
self.validate();
}
}
});
......@@ -361,6 +356,13 @@ module STWkit {
super.show();
}
public validate() {
if (!this.hasPosition) return;
this.status = true;
AccordionCard.enableNext(this.nextButton, true);
(this.oncallback && this.oncallback());
};
public hide() {
super.hide();
}
......
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