diff --git a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html index d4674ef06dda04f3bbb575fd93ef9c723beb3fb2..9567efff3b2dc964626dc906188f6850c627616d 100755 --- a/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/barleynetblotchform.html @@ -206,7 +206,7 @@ var headingLine = "<tr><td style=\"font-weight: bold;\">{% trans "Time" %}</td>"; if(data.length > 0) { - var allKeys = data[0].keys; + var allKeys = JSON.parse(data[0]["keys"]); for(var i in allKeys) { headingLine +="<td style=\"font-weight: bold;\">" + paramDict[allKeys[i]] + "</td>"; @@ -217,14 +217,16 @@ var table = ["<table border=\"1\">",headingLine]; for(var row in data) { - if(data[row]["validTimeStart"] == null) + var aResult = data[i]; + var allValues = JSON.parse(aResult["allValues"]); + if(aResult["validTimeStart"] == null) { continue; } - var resultLine = "<tr><td>" + moment(data[row]["validTimeStart"]).format() + "</td>"; + var resultLine = "<tr><td>" + moment(aResult["validTimeStart"]).format() + "</td>"; for(var i in allKeys) { - var value = data[row].allValues[allKeys[i]]; + var value = allValues[allKeys[i]]; if(value != null && $.isNumeric(value)) { value = parseFloat(value).toFixed(2); @@ -232,7 +234,7 @@ resultLine +="<td>" + value + "</td>"; } resultLine +="<td style=\"background-color:"; - var st = data[row]["warningStatus"]; + var st = aResult["warningStatus"]; resultLine += st===0 ? "gray" : st===1 ? "blue" : st===2 ? "green" : st===3 ? "yellow" : "red"; resultLine +=";\">" + st + "</td>"; resultLine += "</tr>"; @@ -357,6 +359,10 @@ }; $(document).ready(function() { + if(settings.userIsIE) + { + alert("{% trans "WARNING: We suspect you are using Internet Explorer to view this site. VIPS is not designed to work with Internet Explorer, you may experience errors and missing features. Please use a different browser, like Microsoft Edge or Google Chrome." %}"); + } initWeatherStations(); initCrops(); initPreparations(); diff --git a/cerealblotchmodels/templates/cerealblotchmodels/septoriahumiditymodelform.html b/cerealblotchmodels/templates/cerealblotchmodels/septoriahumiditymodelform.html index 35ced989ca29f54093c41e3f67b0b0b4fd4e2726..0d9d68804effcb63a93aacbd0a5475493d24e205 100644 --- a/cerealblotchmodels/templates/cerealblotchmodels/septoriahumiditymodelform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/septoriahumiditymodelform.html @@ -201,7 +201,10 @@ var specialFormFields = ["organizationId_countryCode","weatherStationId"]; // Must be initialized after a few events $(document).ready(function() { - + if(settings.userIsIE) + { + alert("{% trans "WARNING: We suspect you are using Internet Explorer to view this site. VIPS is not designed to work with Internet Explorer, you may experience errors and missing features. Please use a different browser, like Microsoft Edge or Google Chrome." %}"); + } //initWeatherStations(); // Init form validation loadFormDefinition("{{ form_id }}","/static/cerealblotchmodels/formdefinitions/"); diff --git a/cerealblotchmodels/templates/cerealblotchmodels/wheatleafblotchform.html b/cerealblotchmodels/templates/cerealblotchmodels/wheatleafblotchform.html index 5840f6faf4e1d788560479a0d639996f3a7151d8..be177c97106a50fc62956d77069fcd6bfe32def0 100755 --- a/cerealblotchmodels/templates/cerealblotchmodels/wheatleafblotchform.html +++ b/cerealblotchmodels/templates/cerealblotchmodels/wheatleafblotchform.html @@ -32,10 +32,6 @@ {% block content %} <div class="singleBlockContainer"> <h1>{% trans "Wheat leaf blotch" %}</h1> - <div class="alert alert-danger" role="alert" id="oldIEWarning" style="display:none;"> - Du bruker en gammel versjon av Internet Explorer. Den nye bladflekksjukdomsmodellen fungerer med - de fleste moderne nettlesere, som Chrome, Firefox og Internet Explorer versjon 10 og nyere. - </div> <form role="form" id="{{ form_id }}"> <input type="hidden" name="wheatType" id="wheatType" value="-1"/> <div class="row"> @@ -282,7 +278,7 @@ var table = ["<table border=\"1\">",headingLine]; for(var i in data) { - console.info(data[i]); + //console.info(data[i]); var aResult = data[i]; var allValues = JSON.parse(aResult["allValues"]); if(aResult["validTimeStart"] == null)