Skip to content
Snippets Groups Projects
Commit bcf5effd authored by hjank's avatar hjank
Browse files

+ in fillParameterSelection(): added check for coordinates as condition for map display

parent 2264ac45
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ function checkInformation() {
var selectedContextInfo = $("#selectContextInfos").select2("data");
var selectedOperator = $("#selectOperator").select2("data");
var contextInfoInArray = contextList.getItem(selectedContextInfo.id);
var contextInfoInArray;
// check selection bar "Kontextinformationen"
......@@ -25,6 +25,7 @@ function checkInformation() {
missing_content += " - Kontextinformation\n";
} else {
// update JSON structure
contextInfoInArray = contextList.getItem(selectedContextInfo.id);
selectedInfo.id = selectedContextInfo.id;
selectedInfo.name = contextInfoInArray.name;
selectedInfo.text = translate_contextInformation(contextInfoInArray.name);
......
......@@ -414,6 +414,8 @@ function fillInputField(ciValue) {
* */
function fillParameterSelection(cp) {
var coordIdentRegex = /CP_.*(LONGITUDE|LONGITUDE)/;
// clear selection bar
cleanSection("#selectParameter");
cleanSection("#selectParameter2");
......@@ -479,7 +481,8 @@ function fillParameterSelection(cp) {
$("#divParameterSelection1").css("display", "block");
break;
// type float needs one/two input fields and a specific label
// type float or integer each need an input field and a specific label
case "INTEGER":
case "FLOAT":
if ( $("#divParameterInput1").css("display") == "table-cell" ) {
$("#divParameterInput2").css("display", "table-cell");
......@@ -488,8 +491,10 @@ function fillParameterSelection(cp) {
setMinMaxDefault(possibleValues[0], $("#inputContextParameter2"));
// display google maps
$("#divMaps").css("display", "block");
resizeMap();
if (coordIdentRegex.test(parameterOriginal)) {
$("#divMaps").css("display", "block");
resizeMap();
}
} else {
$("#divParameterInput1").css("display", "table-cell");
......@@ -499,20 +504,6 @@ function fillParameterSelection(cp) {
}
break;
// type integer needs one/two input fields and a specific label
case "INTEGER":
if ( $("#divParameterInput1").css("display") == "table-cell" ) {
$("#divParameterInput2").css("display", "table-cell");
$("#divParameterInput2").children("label").html(parameterTranslation);
$("#divParameterInput2").children("label").attr("origin", parameterOriginal);
} else {
$("#divParameterInput1").css("display", "table-cell");
$("#divParameterInput1").children("label").html(parameterTranslation);
$("#divParameterInput1").children("label").attr("origin", parameterOriginal);
}
break;
// type string needs an input field and a specific label
case "STRING":
$("#divParameterString").css("display", "block");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment