Files
Pond-Level-Sensor/html_templates/Scaling.html
2018-08-10 15:08:29 -05:00

299 lines
12 KiB
HTML

<div class="row row-flex">
<div class="col-xs-12">
<h1>Level</h1>
</div>
<div class="col-md-6 box-me entry-top-level" id="setrawmax">
<div class="pad15">
<h2>Raw Max (mA)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.setrawmax'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.setrawmax"].channelId %>"
data-techname="<%=channels["pondlevel.setrawmax"].techName %>"
data-name="<%= channels["pondlevel.setrawmax"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.setrawmax"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.setrawmax"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
<div class="col-md-6 box-me entry-top-level" id="setrawmin">
<div class="pad15">
<h2>Raw Min (mA)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.setrawmin'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.setrawmin"].channelId %>"
data-techname="<%=channels["pondlevel.setrawmin"].techName %>"
data-name="<%= channels["pondlevel.setrawmin"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.setrawmin"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.setrawmin"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
<div class="col-md-6 box-me entry-top-level" id="seteumax">
<div class="pad15">
<h2>EU Max (Ft.)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.seteumax'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.seteumax"].channelId %>"
data-techname="<%=channels["pondlevel.seteumax"].techName %>"
data-name="<%= channels["pondlevel.seteumax"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.seteumax"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.seteumax"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
<div class="col-md-6 box-me entry-top-level" id="seteumin">
<div class="pad15">
<h2>EU Min (Ft.)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.seteumin'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.seteumin"].channelId %>"
data-techname="<%=channels["pondlevel.seteumin"].techName %>"
data-name="<%= channels["pondlevel.seteumin"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.seteumin"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.seteumin"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
<div class="col-md-6 box-me entry-top-level" id="setleveloffset">
<div class="pad15">
<h2>Level Offset (Ft.)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.setleveloffset'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.setleveloffset"].channelId %>"
data-techname="<%=channels["pondlevel.setleveloffset"].techName %>"
data-name="<%= channels["pondlevel.setleveloffset"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.setleveloffset"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.setleveloffset"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
</div>
<div class="row row-flex">
<div class="col-xs-12">
<h1>Pressure</h1>
</div>
<div class="col-md-6 box-me entry-top-level" id="setpsirawmax">
<div class="pad15">
<h2>Raw Max (V)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.setpsirawmax'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.setpsirawmax"].channelId %>"
data-techname="<%=channels["pondlevel.setpsirawmax"].techName %>"
data-name="<%= channels["pondlevel.setpsirawmax"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.setpsirawmax"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.setpsirawmax"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
<div class="col-md-6 box-me entry-top-level" id="setpsirawmin">
<div class="pad15">
<h2>Raw Min (V)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.setpsirawmin'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.setpsirawmin"].channelId %>"
data-techname="<%=channels["pondlevel.setpsirawmin"].techName %>"
data-name="<%= channels["pondlevel.setpsirawmin"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.setpsirawmin"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.setpsirawmin"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
<div class="col-md-6 box-me entry-top-level" id="setpsieumax">
<div class="pad15">
<h2>EU Max (PSI)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.setpsieumax'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.setpsieumax"].channelId %>"
data-techname="<%=channels["pondlevel.setpsieumax"].techName %>"
data-name="<%= channels["pondlevel.setpsieumax"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.setpsieumax"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.setpsieumax"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
<div class="col-md-6 box-me entry-top-level" id="seteumin">
<div class="pad15">
<h2>EU Min (PSI)</h2>
<form class="form-inline">
<div class="form-group">
<input class="form-control val_box"
type="number"
step="any"
value="<%=channels['pondlevel.setpsieumin'].value %>">
</div>
<a href="#"
data-confirm-message="Are you sure you want to do this?"
data-refreshpause="1"
data-command=""
data-staticsend=25.0
data-channelId="<%= channels["pondlevel.setpsieumin"].channelId %>"
data-techname="<%=channels["pondlevel.setpsieumin"].techName %>"
data-name="<%= channels["pondlevel.setpsieumin"].name%>"
data-nodechannelcurrentId="<%= channels["pondlevel.setpsieumin"].nodechannelcurrentId %>"
id="<%= channels["pondlevel.setpsieumin"].channelId %>"
class="btn btn-large btn-theme animated setstatic material-icons">send</a>
</form>
</div>
</div>
</div>
<style>
.box-me {
position: relative;
padding: 0.5em;
padding-bottom: 1.5em;
border: 1px solid #eee;
/*margin: 1em 0;*/
}
.box-me .gauge-box {
margin-top: -0.25em;
}
.pad15 {
margin: 15px 15px;
}
.box-me h2 {
text-transform: uppercase;
font-size: 14px;
color: #666;
font-weight: 400;
letter-spacing: 1px;
z-index: 100;
}
.row-flex {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
flex-wrap: wrap;
}
.row-flex > [class*='col-'] {
display: flex;
flex-direction: column;
}
</style>
<script>
$('.val_box').each(function(topLevel){
$(this).change(function(){
var id = "#" + $(this).closest(".entry-top-level").attr('id');
if (id !== "#undefined"){
var val = $(id).find('.val_box').val();
var tag = $(id).find('.setstatic').attr('data-staticsend', val);
console.log($(id).find('.setstatic').attr('data-staticsend'));
}
});
});
</script>