From f762f57d1cb57f8f837c73e1f7dc22d7488059ac Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Sat, 23 Jun 2018 13:22:16 +0530 Subject: [PATCH] Add turbolinks - Load scripts in the head with `defer` instead of at the end of the body - Disable turbolinks for application shortcuts and manual download Signed-off-by: Joseph Nuthalapati Reviewed-by: James Valleroy --- debian/control | 1 + plinth/modules/help/templates/help_index.html | 9 +++++++++ plinth/templates/base.html | 17 +++++++++-------- plinth/templates/index.html | 4 ++-- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/debian/control b/debian/control index fc8e11424..6a780fed7 100644 --- a/debian/control +++ b/debian/control @@ -63,6 +63,7 @@ Depends: ${python3:Depends} , libjs-jquery , libjs-modernizr , network-manager + , node-turbolinks , ppp , pppoe , python3-apt diff --git a/plinth/modules/help/templates/help_index.html b/plinth/modules/help/templates/help_index.html index 3f4861252..16ef9560b 100644 --- a/plinth/modules/help/templates/help_index.html +++ b/plinth/modules/help/templates/help_index.html @@ -94,3 +94,12 @@ {% endif %} {% endblock %} + +{% block page_js %} + +{% endblock %} diff --git a/plinth/templates/base.html b/plinth/templates/base.html index 568e7b53b..c651aff41 100644 --- a/plinth/templates/base.html +++ b/plinth/templates/base.html @@ -70,6 +70,15 @@ + + + + + + + + + {% block app_head %}{% endblock %} {% block page_head %}{% endblock %} @@ -244,14 +253,6 @@ - - - - - - - - {% block app_js %}{% endblock %} {% block page_js %}{% endblock %} diff --git a/plinth/templates/index.html b/plinth/templates/index.html index 695eaddc1..d229dca43 100644 --- a/plinth/templates/index.html +++ b/plinth/templates/index.html @@ -82,9 +82,9 @@ {% if user.is_authenticated or not shortcut.login_required %}
{% if selected_id == shortcut.id %} - + {% else %} - + {% endif %}