Skip to content
Snippets Groups Projects
Commit 6aaf80d7 authored by Bhabesh Bhabani Mukhopadhyay's avatar Bhabesh Bhabani Mukhopadhyay
Browse files

Merge branch 'eplevikler' into epleviklerNewFeatures

parents 6f6581eb 8d511911
No related branches found
No related tags found
No related merge requests found
...@@ -46,10 +46,31 @@ ...@@ -46,10 +46,31 @@
{% endblock %} {% endblock %}
{% block customCSS %} {% block customCSS %}
<style> <style>
/* Over ride datatable property to maintain default color */
.navbar-default { .navbar-default {
background-color: #fff; background-color: #fff;
border-color:#fff; border-color:#fff;
} }
/* Text align center - used in datatable */
.colCenter {text-align: center;}
/* Data table odd stripe color */
.table-striped>tbody>tr:nth-child(odd)>td,
.table-striped>tbody>tr:nth-child(odd)>th {
background-color: #ebf1d4 /* Choose your own color here */
}
/* Data table even stripe color */
.table-striped>tbody>tr:nth-child(even)>td,
.table-striped>tbody>tr:nth-child(even)>th {
background-color: #e4ddd6 /* Choose your own color here */
}
body {
font-family: 'Source Sans Pro', sans-serif;
}
</style> </style>
{% endblock %} {% endblock %}
{% block customJS %} {% block customJS %}
...@@ -487,57 +508,66 @@ ...@@ -487,57 +508,66 @@
"render" : function(data, type, full, meta) "render" : function(data, type, full, meta)
{ {
return data return data
} },
"sClass" : "colCenter",
"bSortable" : false
}, },
{ {
"mData" : "time19", "mData" : "time19",
"render" : function(data, type, full, meta) "render" :function(data, type, full, meta)
{ {
return data return data
}, },
"sClass" : "colCenter",
"bSortable" : false "bSortable" : false
}, },
{ {
"mData" : "time20", "mData" : "time20",
"render" : function(data, type, full, meta) "render" :function(data, type, full, meta)
{ {
return data return data
}, },
"sClass" : "colCenter",
"bSortable" : false "bSortable" : false
}, },
{ {
"mData" : "time21", "mData" : "time21",
"render" : function(data, type, full, meta) "render" :function(data, type, full, meta)
{ {
return data return data
}, },
"sClass" : "colCenter",
"bSortable" : false "bSortable" : false
}, },
{ {
"mData" : "time22", "mData" : "time22",
"render" : function(data, type, full, meta) "render" :function(data, type, full, meta)
{ {
return data return data
}, },
"sClass" : "colCenter",
"bSortable" : false "bSortable" : false
}, },
{ {
"mData" : "time23", "mData" : "time23",
"render" : function(data, type, full, meta) "render" :function(data, type, full, meta)
{ {
return data return data
}, },
"sClass" : "colCenter",
"bSortable" : false "bSortable" : false
} , } ,
{ {
"mData" : "rainFall", "mData" : "rainFall",
"render" : function(data, type, full, meta) "render" :function(data, type, full, meta)
{ {
return data return data
}, },
"sClass" : "colCenter",
"bSortable" : false "bSortable" : false
} }
], ],
destroy : true destroy : true
}); });
...@@ -551,6 +581,8 @@ ...@@ -551,6 +581,8 @@
} }
/* Fetch hourly data through ajax call */ /* Fetch hourly data through ajax call */
function getAjaxHourlyData(jsonParamUrlDataHourly,idJsonParam, flagActivate) function getAjaxHourlyData(jsonParamUrlDataHourly,idJsonParam, flagActivate)
{ {
...@@ -577,9 +609,10 @@ ...@@ -577,9 +609,10 @@
$('#idTableWeather').show(); $('#idTableWeather').show();
$('#idDivHeatSum').show(); $('#idDivHeatSum').show();
resultData = data; $('#divIdErrorWeatherStation').hide();
resultData = data;
setConvertHourlyData(resultData, flagActivate); setConvertHourlyData(resultData, flagActivate);
if($.trim(idJsonParam.pas)) if($.trim(idJsonParam.pas))
{ {
...@@ -591,9 +624,12 @@ ...@@ -591,9 +624,12 @@
funDtPickerHeatSum(); funDtPickerHeatSum();
} }
} }
else{ else{
$('#idDivHeatSum').hide(); $('#idDivHeatSum').hide();
$('#divIdErrorWeatherStation').show();
$('#idTableWeather').hide();
} }
}, },
error : function(xhr, status, error) error : function(xhr, status, error)
...@@ -674,9 +710,13 @@ ...@@ -674,9 +710,13 @@
<div class="col-md-12" > <div class="col-md-12" >
<h1>{% trans "Calculate the risk of attack by the coddling moth" %}</h1> <h1>{% trans "Calculate the risk of attack by the coddling moth" %}</h1>
</div> </div>
<div class="clearfix"></div>
<div class="container-fluid">
<div class="container-fluid"> <div class="row">
<div class="col-sm-10">
<div id='divIdErrorWeatherStation' class="alert alert-danger .alert-dismissable" style="display: none;" ><span class=".glyphicon .glyphicon-minus-sign"></span> No records available from selected weather station !!</div>
</div>
</div>
<div class="row "> <div class="row ">
<div class="col-sm-4"> <div class="col-sm-4">
<select name="weatherStationName" id="weatherStationId" class="form-control"> <select name="weatherStationName" id="weatherStationId" class="form-control">
...@@ -747,16 +787,17 @@ ...@@ -747,16 +787,17 @@
<div class="container-fluid" id="idDivHeatSum" style="display: none;"> <div class="container-fluid" id="idDivHeatSum" style="display: none;">
<div class="row "> <div class="row ">
<label class="control-label">{% trans "Heat sum" %}</label> <h3>{% trans "Heat sum" %}</h3>
<form class="form-inline"> <form class="form-inline">
<div class="form-group form-inline"> <div class="form-group form-inline">
<label for="nameTxtDateInput">{% trans "Calculate heat sum from date" %}:</label> <label for="nameTxtDateInput">{% trans "Calculate heat sum from date" %}:</label>
<input id="idTxtDateInput" name="nameTxtDateInput" class="form-control" type="date" placeholder="yyyy-mm-dd" onkeydown="return false" value="2020-01-01"/> <input id="idTxtDateInput" name="nameTxtDateInput" class="form-control" type="date" placeholder="yyyy-mm-dd" onkeydown="return false" value="2020-01-01" style="line-height: inherit;"/>
</div> </div>
<!-- button type="submit" class="btn btn-default">Submit</button --> <!-- button type="submit" class="btn btn-default">Submit</button -->
</form> </form>
</div> </div>
<div><br></div>
<div class="row alert alert-warning"> <div class="row alert alert-warning">
{% trans "Heat sum, with a base temperature of 10 degrees Celcius, calculated for " %} <b><span id='idSpanWeatherStationName'>-</span></b> {% trans "weather station for the period starting with" %} <b><span id="idSpanStartDate">-</span></b> {% trans "and ending with" %} <b><span id="idSpanEndDate">--</span></b> (<b><span id="idSpanDateDifference">-</span></b> {% trans "days" %}) {% trans "is" %} : <span class="label label-primary" id="idDivResultNonNegative"></span> {% trans "day degrees" %} {% trans "Heat sum, with a base temperature of 10 degrees Celcius, calculated for " %} <b><span id='idSpanWeatherStationName'>-</span></b> {% trans "weather station for the period starting with" %} <b><span id="idSpanStartDate">-</span></b> {% trans "and ending with" %} <b><span id="idSpanEndDate">--</span></b> (<b><span id="idSpanDateDifference">-</span></b> {% trans "days" %}) {% trans "is" %} : <span class="label label-primary" id="idDivResultNonNegative"></span> {% trans "day degrees" %}
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment