-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnodes.html
37 lines (36 loc) · 1.75 KB
/
nodes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<ul class="nodes">
{% for node in nodes %}
<li class="node">
<label class="switch" style="float: left">
<input type="checkbox" {{ 'checked' if node.state else '' }}
id="switch-{{ node.id }}"
onclick="onNodeClick(this, event)" node-id="{{ node.id }}" />
<span class="slider round"></span>
</label>
<label for="switch-{{ node.id }}" class="label-for-switch">{{ node.title }}</label>
<div class="tools">
<button title="Tools" onclick="onToolClicked(this, event)" class="transparent toggle-tools">⚙️</button>
<button title="Delete node" onclick="deleteNode(event, {{ node.id }}, '{{ node.title }}')" class="transparent">🗑️</button>
<button title="Edit node" onclick="showPopupForm('node', event, {{ node.id }})" class="transparent">🖊️</button>
<button title="Edit events" onclick="showEventList({{ node.id }}, event)" class="transparent">📅</button>
{% if loop.index > 1 %}
<button title="Move node up" onclick="reorderNodes({{ node.sort_order }}, {{ node.sort_order }} - 1)" class="transparent">↑</button>
{% else %}
<button class="invisible">↑</button>
{% endif %}
{% if loop.index < nodes | length %}
<button title="Move node down" onclick="reorderNodes({{ node.sort_order }}, {{ node.sort_order }} + 1)" class="transparent">↓</button>
{% else %}
<button class="invisible">↓</button>
{% endif %}
<div>
</li>
{% endfor %}
</ul>
{% if nodes %}
<button class="button float-left" style="width:49%"
onclick="switchStateForAll('on')">🌞 All on</button>
<button class="button danger float-left" style="width:49%"
onclick="switchStateForAll('off')">🌑 All off</button>
<br style="clear: both"/>
{% endif %}