Make all WM elements inherit from common templates

This commit is contained in:
2022-09-01 19:59:27 +01:00
parent 553d4fd33f
commit 0ccde2af1b
11 changed files with 248 additions and 212 deletions

View File

@@ -1,28 +1,19 @@
<div id="drilldown-widget">
<div id="drilldown-widget-{{ unique }}" class="grid-stack-item" gs-w="5" gs-h="15">
<div class="grid-stack-item-content">
<div class="panel">
<p class="panel-heading" style="padding: .2em; line-height: .5em;">
<i class="fa-solid fa-arrows-up-down-left-right has-text-grey-light ui-move"></i>
<i
class="fa-solid fa-xmark has-text-grey-light ui-close"
onclick='grid.removeWidget("drilldown-widget-{{ unique }}"); grid.compact();'></i>
Drilldown
</p>
<div class="panel-block is-active">
<div class="control">
{% include 'window-content/drilldown.html' %}
</div>
</div>
</div>
</div>
</div>
</div>
{% extends 'wm/widget.html' %}
<script>
var widget_event = new Event('load-widget');
document.dispatchEvent(widget_event);
// because we remove the element the JS runs in
// so we need to run it again here
{% block widget_options %}
gs-w="5" gs-h="15"
{% endblock %}
{% block heading %}
Drilldown
{% endblock %}
{% block panel_content %}
{% include 'window-content/drilldown.html' %}
{% endblock %}
{% block custom_script_end %}
initTabs("{{ unique }}");
</script>
{% endblock %}