add title option switches

This commit is contained in:
Squandor 2017-01-02 08:43:50 +01:00
parent f53a9209eb
commit fe7897bd8b
1 changed files with 5 additions and 1 deletions

View File

@ -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]}});