Juice/templates/LixieClock.html

31 lines
2.9 KiB
HTML
Raw Permalink Normal View History

<div class="device {{ device.type }}" id="{{ device.id }}">
<div class="id editable"><span class="field_value">{{ device.id }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)">&#xe800;</span><span class="delete font-awesome" onclick="delete_device(this.parentElement.parentElement)">&#xe804;</span><span class="lock font-awesome" onclick="lock_device(this.parentElement.parentElement)">&#xe803;</span>{% else %}<span class="unlock font-awesome" onclick="unlock_device(this.parentElement.parentElement)">&#xf13e;</span>{% endif %}</div>
<div class="description editable"><span class="field_value">{{ device.description }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)">&#xe800;</span>{% endif %}</div>
<div class="location editable"><span class="field_value">{{ device.location }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)">&#xe800;</span>{% endif %}</div>
<div class="mqtt_root editable"><span class="field_value">{{ device.mqtt_root }}</span>{% if not device.locked %}<span class="edit font-awesome" onclick="edit_field(this.parentElement)">&#xe800;</span>{% endif %}</div>
<div class="lixie_controls">
<input type="radio" id="display_mode_time_{{ device.id }}" class="time" name="display_mode_{{ device.id }}" value="time" onchange="lixie_display_mode(this)"{% if device.display_mode == 'time' %} checked{% endif %}>
<label for="display_mode_time_{{ device.id }}">Time</label><br>
<div class='lixie_time_offset' style="display: {% if device.display_mode == 'time' %}block{% else %}none{% endif %}">
<label for="lixie_time_offset_{{ device.id }}">Time Zone Offset:</label>
<input type="number" id="lixie_time_offset_{{ device.id }}" class="time_offset" min="-12" max="12" value="{{ device.time_offset }}" onchange="lixie_clock(this)">
</div>
<input type="radio" id="display_mode_number_{{ device.id }}" class="number" name="display_mode_{{ device.id }}" value="number" onchange="lixie_display_mode(this)"{% if device.display_mode == 'number' %} checked{% endif %}>
<label for="display_mode_number_{{ device.id }}">Number</label><br>
<div class='lixie_number' style="display: {% if device.display_mode == 'number' %}block{% else %}none{% endif %}">
<label for="lixie_number_{{ device.id }}">Number:</label>
<input type="number" id="lixie_number_{{ device.id }}" class="number" min="0" max="9999" value="{{ device.display_number }}" onchange="lixie_clock(this)">
</div>
<label for="display_color_{{ device.id }}">Color:</label>
<input type="color" id="display_color_{{ device.id }}" class="color" value="{{ device.color|html_color }}" onchange="lixie_clock(this)">
</div>
<div class="sub_devices">
{% for sub_device in device.sub_devices %}
<div class="sub_device {{ sub_device.type }} {{ sub_device.id }}">
LixieDisplay
</div>
{% endfor %}
</div>
</div>