diff options
Diffstat (limited to 'modules/luci-base/ucode/template')
-rw-r--r-- | modules/luci-base/ucode/template/error500.ut | 2 | ||||
-rw-r--r-- | modules/luci-base/ucode/template/footer.ut | 4 | ||||
-rw-r--r-- | modules/luci-base/ucode/template/header.ut | 6 | ||||
-rw-r--r-- | modules/luci-base/ucode/template/sysauth.ut | 4 | ||||
-rw-r--r-- | modules/luci-base/ucode/template/view.ut | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/modules/luci-base/ucode/template/error500.ut b/modules/luci-base/ucode/template/error500.ut index 39a0eec678..e0d4d48ab7 100644 --- a/modules/luci-base/ucode/template/error500.ut +++ b/modules/luci-base/ucode/template/error500.ut @@ -4,7 +4,7 @@ -#} <!--]]>--><!--'>--><!--">--> -<style type="text/css"> +<style> body { line-height: 1.5; font-size: 14px; diff --git a/modules/luci-base/ucode/template/footer.ut b/modules/luci-base/ucode/template/footer.ut index d0978594f8..0ab06ae0b9 100644 --- a/modules/luci-base/ucode/template/footer.ut +++ b/modules/luci-base/ucode/template/footer.ut @@ -5,7 +5,7 @@ {% const rollback = dispatcher.rollback_pending() %} {% if (rollback || trigger_apply || trigger_revert): %} - <script type="text/javascript"> + <script> document.addEventListener("luci-loaded", function() { {% if (trigger_apply): %} L.ui.changes.apply(true); @@ -19,7 +19,7 @@ {% endif %} {% if (media_error): %} - <script type="text/javascript"> + <script> L.require('ui').then(function(ui) { ui.showIndicator('media_error', _('Theme fallback'), function(ev) { ui.showModal(_('Error loading theme'), [ diff --git a/modules/luci-base/ucode/template/header.ut b/modules/luci-base/ucode/template/header.ut index 7dc3742a9d..81cb411dda 100644 --- a/modules/luci-base/ucode/template/header.ut +++ b/modules/luci-base/ucode/template/header.ut @@ -7,9 +7,9 @@ include(`themes/${theme}/header`); -%} -<script type="text/javascript" src="{{ resource }}/promis.min.js"></script> -<script type="text/javascript" src="{{ resource }}/luci.js"></script> -<script type="text/javascript"> +<script src="{{ resource }}/promis.min.js"></script> +<script src="{{ resource }}/luci.js"></script> +<script> L = new LuCI({{ replace(`${ { media : media, resource : resource, diff --git a/modules/luci-base/ucode/template/sysauth.ut b/modules/luci-base/ucode/template/sysauth.ut index 3c580949bb..7fe6e9d57d 100644 --- a/modules/luci-base/ucode/template/sysauth.ut +++ b/modules/luci-base/ucode/template/sysauth.ut @@ -52,7 +52,7 @@ )); %} -<script type="text/javascript">//<![CDATA[ +<script> var input = document.getElementsByName('luci_password')[0]; if (input) @@ -69,6 +69,6 @@ setTimeout(function() { img.src = '' }, 5000); }); } -//]]></script> +</script> {% include('footer') %} diff --git a/modules/luci-base/ucode/template/view.ut b/modules/luci-base/ucode/template/view.ut index 11ac824290..a8562844ba 100644 --- a/modules/luci-base/ucode/template/view.ut +++ b/modules/luci-base/ucode/template/view.ut @@ -2,7 +2,7 @@ <div id="view"> <div class="spinning">{{ _('Loading view…') }}</div> - <script type="text/javascript"> + <script> L.require('ui').then(function(ui) { ui.instantiateView('{{ view }}'); }); |