add title option switches
This commit is contained in:
parent
f53a9209eb
commit
fe7897bd8b
|
|
@ -2,7 +2,7 @@
|
|||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>Schakelaars</h2>
|
||||
<h2 id="s_title_{{ count }}">Schakelaars</h2>
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="close-link"><i class="fa fa-close"></i></a>
|
||||
</li>
|
||||
|
|
@ -79,7 +79,11 @@ $(document).ready(function() {
|
|||
var updateSwitches_block_{{count}}=[];
|
||||
var updateDimmers_block_{{count}}=[];
|
||||
var updateSetpoints_block_{{count}}=[];
|
||||
|
||||
{% for k, v in blockArray[count]["switches"].iteritems() %}
|
||||
{% if v[2] %}
|
||||
$('#s_title_{{ count }}').html("{{ v[2] }}");
|
||||
{% endif %}
|
||||
{% if v[1] == "switch" %}
|
||||
$('input[id="switch_{{v[0]}}_block_{{count}}"]').on('switchChange.bootstrapSwitch', function(event, state) {
|
||||
changeSwitch(this, {{v[0]}});
|
||||
|
|
|
|||
Loading…
Reference in New Issue