Skip to content

Commit

Permalink
blockly plugin: cleanup web if code. Load german translation if set l…
Browse files Browse the repository at this point in the history
…anguage is not found
  • Loading branch information
onkelandy committed Oct 25, 2023
1 parent 72761f0 commit 2bdebac
Showing 1 changed file with 21 additions and 26 deletions.
47 changes: 21 additions & 26 deletions blockly/webif/templates/blockly.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
{% extends "base_plugin.html" %}
{% block content %}

{% include "logics_blockly_toolbox.html" %}

{% block pluginstyles %}
<link rel="stylesheet" href="static/blockly/style.css">
<style>
li.L0, li.L1, li.L2, li.L3,
li.L5, li.L6, li.L7, li.L8
{ list-style-type: decimal !important }
</style>
{% endblock pluginstyles %}
{% block pluginscripts %}
<script src="static/blockly/blockly_compressed.js"></script>
<script src="static/blockly/blocks_compressed.js"></script>
<script src="static/blockly/python_compressed.js"></script>
<script src="static/blockly/de.js"></script>
<script src="static/blockly/{{ lang }}.js"></script>

<script type="text/javascript" src="static/shblocks/sh_items.js"></script>
<script type="text/javascript" src="static/shblocks/sh_logics.js"></script>
<script type="text/javascript" src="static/shblocks/sh_logic.js"></script>
<script type="text/javascript" src="static/shblocks/sh_notify.js"></script>
<script type="text/javascript" src="static/shblocks/sh_tools.js"></script>
<script type="text/javascript" src="static/shblocks/sh_time.js"></script>

<script src="static/js/logics_blockly_code.js"></script>
<script type="text/javascript" language="javascript">

function closeEditor() {
Expand All @@ -29,6 +42,10 @@
}

</script>
{% endblock pluginscripts %}
{% block content %}

{% include "logics_blockly_toolbox.html" %}

<table width="99%" height="91%">
<tr>
Expand Down Expand Up @@ -76,26 +93,4 @@ <h1>Blockly {{ _('Logik-Editor') }} {{ _('für SmartHomeNG') }}
<pre id="content_python" class="content"></pre>
<textarea id="content_xml" class="content" wrap="off"></textarea>


<!-- BLOCKLY Script Editor -->
<link rel="stylesheet" href="static/blockly/style.css">

<!-- BLOCKLY Script Editor -->
<script src="static/blockly/blockly_compressed.js"></script>
<script src="static/blockly/blocks_compressed.js"></script>
<script src="static/blockly/python_compressed.js"></script>

<script src="static/blockly/en.js"></script>
<script src="static/blockly/fr.js"></script>
<script src="static/blockly/pl.js"></script>
<script src="static/blockly/de.js"></script>
<script type="text/javascript" src="static/shblocks/sh_items.js"></script>
<script type="text/javascript" src="static/shblocks/sh_logics.js"></script>
<script type="text/javascript" src="static/shblocks/sh_logic.js"></script>
<script type="text/javascript" src="static/shblocks/sh_notify.js"></script>
<script type="text/javascript" src="static/shblocks/sh_tools.js"></script>
<script type="text/javascript" src="static/shblocks/sh_time.js"></script>

<script src="static/js/logics_blockly_code.js"></script>

{% endblock %}

0 comments on commit 2bdebac

Please sign in to comment.