update html files

add tare button in settings menu
This commit is contained in:
nightflyer88 2020-09-27 13:18:46 +02:00
parent 97a86ec26d
commit d1ad6b6c42
3 changed files with 36 additions and 4 deletions

View File

@ -868,7 +868,7 @@
</div> </div>
</div> </div>
<div style="color:#808080; text-align:center; font-size:12px;">(c) 2019 M. Lehmann - Version: <span id="cgscaleVersion">--</span></div> <div style="color:#808080; text-align:center; font-size:12px;">(c) 2020 M. Lehmann - Version: <span id="cgscaleVersion">--</span></div>
<script> <script>
setTranslation("en"); setTranslation("en");
drawExpert("-","-","-"); drawExpert("-","-","-");

View File

@ -519,7 +519,7 @@
</table> </table>
</div> </div>
<div style="color:#808080; text-align:center; font-size:12px; padding-top:30px;">(c) 2019 M. Lehmann - Version: <span id="cgscaleVersion">--</span></div> <div style="color:#808080; text-align:center; font-size:12px; padding-top:30px;">(c) 2020 M. Lehmann - Version: <span id="cgscaleVersion">--</span></div>
<script> <script>
setTranslation("en"); setTranslation("en");
getHead(); getHead();

View File

@ -163,7 +163,7 @@
transition: top 0.25s; transition: top 0.25s;
} }
.tab-content { .tab-content {
height: 2260px; height: 2300px;
width: 100%; width: 100%;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
@ -216,6 +216,17 @@
background-color: #1E90FF; background-color: #1E90FF;
color: white; color: white;
} }
.tareButton {
background-color: white;
color: black;
border: 2px solid #778899;
}
.tareButton:hover {
background-color: #778899;
color: white;
}
.saveButton { .saveButton {
background-color: white; background-color: white;
@ -439,6 +450,7 @@
var languages = { var languages = {
"en":{ "en":{
"settingsLabel":"Settings", "settingsLabel":"Settings",
"tareBtn":"Tare",
"saveBtn":"Save", "saveBtn":"Save",
"tabGeneral":"General", "tabGeneral":"General",
"wifiHeading":"WiFi", "wifiHeading":"WiFi",
@ -495,6 +507,7 @@
}, },
"de":{ "de":{
"settingsLabel":"Einstellungen", "settingsLabel":"Einstellungen",
"tareBtn":"Tare",
"saveBtn":"Speichern", "saveBtn":"Speichern",
"tabGeneral":"Allgemein", "tabGeneral":"Allgemein",
"wifiHeading":"WiFi", "wifiHeading":"WiFi",
@ -749,6 +762,22 @@
element.value = value; element.value = value;
} }
function tare(){
document.getElementById("lc1").innerHTML = "TARE";
document.getElementById("lc2").innerHTML = "TARE";
if(CG_trans_visible == true){
document.getElementById("lc3").innerHTML = "TARE";
}
var request = new XMLHttpRequest();
request.onreadystatechange = function(){
if(this.readyState == 4 && this.status == 404){
alert("Tare failed !");
}
}
request.open("GET", "tare", true);
request.send();
}
function drawBattery(value){ function drawBattery(value){
document.getElementById("batValue").innerHTML = value; document.getElementById("batValue").innerHTML = value;
@ -997,6 +1026,9 @@
<small id="lc2Label"></small><small id="lc2">-</small> <small id="lc2Label"></small><small id="lc2">-</small>
<small id="lc3Label"></small><small id="lc3">-</small> <small id="lc3Label"></small><small id="lc3">-</small>
</div> </div>
<div style="margin-top:10px;">
<button type="button" class="button tareButton" onclick="tare()" id="tareBtn"></button>
</div>
<div style="margin-top:50px;"> <div style="margin-top:50px;">
<big id="cal1Label"></big> <big id="cal1Label"></big>
<input type="text" id="calFactorLoadcell1"> <input type="text" id="calFactorLoadcell1">
@ -1050,7 +1082,7 @@
</div> </div>
</div> </div>
<div style="color:#808080; text-align:center; font-size:12px;">(c) 2019 M. Lehmann - Version: <span id="cgscaleVersion">--</span></div> <div style="color:#808080; text-align:center; font-size:12px;">(c) 2020 M. Lehmann - Version: <span id="cgscaleVersion">--</span></div>
<script> <script>
setTranslation("en"); setTranslation("en");
getHead(); getHead();