*: Remove use of Turbolinks library

See #1841 for discussion on why Turbolinks needs to be removed.

Closes: #1841.
Closes: #1804.

Tests performed:

- There are no more references to 'turbolinks' in source code other than .po(t)
  files and the manual.

- When loading a page, turbolinks.js is no longer loaded.

- The following links don't have data-turbolinks attribute and work well when
  clicked.a
  - Gitweb repository links
  - Download manual links (en, es)
  - Ikiwiki wiki links
  - Sharing app web share links
  - TT-RSS mobile app link
  - 'Launch web client' button
  - 'Launch' button in web section of clients table
  - Active and regular front page shortcut

- Roundcube does not have a link to /roundcube in description.

- turblinks not present in /static/jslicense.html . LibreJs accepts all scripts.

Reported-by: Veiko Aasa <veiko17@disroot.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2020-06-01 18:43:55 -07:00 committed by Veiko Aasa
parent eb88c60389
commit ac103d7132
No known key found for this signature in database
GPG Key ID: 478539CAE680674E
15 changed files with 10 additions and 67 deletions

1
debian/control vendored
View File

@ -85,7 +85,6 @@ Depends:
lsof, lsof,
netcat-openbsd, netcat-openbsd,
network-manager, network-manager,
node-turbolinks,
ppp, ppp,
pppoe, pppoe,
python3-apt, python3-apt,

View File

@ -70,7 +70,6 @@
<span class="repo-label">{{ repo.name }}<span> <span class="repo-label">{{ repo.name }}<span>
{% else %} {% else %}
<a class="repo-label" href="/gitweb/{{ repo.name }}.git" <a class="repo-label" href="/gitweb/{{ repo.name }}.git"
data-turbolinks="false"
title="{% blocktrans %}Go to repository {{ repo.name }}{% endblocktrans %}"> title="{% blocktrans %}Go to repository {{ repo.name }}{% endblocktrans %}">
{{ repo.name }} {{ repo.name }}
</a> </a>

View File

@ -1,28 +0,0 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
/**
* @licstart The following is the entire license notice for the JavaScript
* code in this page.
*
* This file is part of FreedomBox.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @licend The above is the entire license notice for the JavaScript code
* in this page.
*/
(function($) {
let downloadManualButton = $('a[href="/plinth/help/manual-download/"]');
downloadManualButton.attr("data-turbolinks", "false");
})(jQuery);

View File

@ -26,7 +26,3 @@
</a> </a>
{{ content|safe }} {{ content|safe }}
{% endblock %} {% endblock %}
{% block page_js %}
<script type="text/javascript" src="{% static 'help/help.js' %}"></script>
{% endblock %}

View File

@ -36,7 +36,6 @@
</a> </a>
<a class="wiki-label" href="/ikiwiki/{{ site.0 }}" <a class="wiki-label" href="/ikiwiki/{{ site.0 }}"
data-turbolinks="false"
title="{% blocktrans with site=site.1 %}Go to site {{ site }}{% endblocktrans %}"> title="{% blocktrans with site=site.1 %}Go to site {{ site }}{% endblocktrans %}">
{{ site.1 }} {{ site.1 }}
</a> </a>

View File

@ -23,8 +23,7 @@ _description = [
'full functionality you expect from an email client, including ' 'full functionality you expect from an email client, including '
'MIME support, address book, folder manipulation, message ' 'MIME support, address book, folder manipulation, message '
'searching and spell checking.'), 'searching and spell checking.'),
_('You can access Roundcube from <a href="/roundcube" data-turbolinks=' _('You can use it by providing the username and password of the email '
'"false">/roundcube</a>. Provide the username and password of the email '
'account you wish to access followed by the domain name of the ' 'account you wish to access followed by the domain name of the '
'IMAP server for your email provider, like <code>imap.example.com' 'IMAP server for your email provider, like <code>imap.example.com'
'</code>. For IMAP over SSL (recommended), fill the server field ' '</code>. For IMAP over SSL (recommended), fill the server field '

View File

@ -18,10 +18,8 @@ managed_packages = ['shaarli']
_description = [ _description = [
_('Shaarli allows you to save and share bookmarks.'), _('Shaarli allows you to save and share bookmarks.'),
_('When enabled, Shaarli will be available from <a href="/shaarli" ' _('Note that Shaarli only supports a single user account, which you will '
'data-turbolinks="false">/shaarli</a> path on the web server. Note that ' 'need to setup on the initial visit.'),
'Shaarli only supports a single user account, which you will need to '
'setup on the initial visit.'),
] ]
app = None app = None

View File

@ -48,8 +48,7 @@
<td class="share-name">{{ share.name }}</td> <td class="share-name">{{ share.name }}</td>
<td class="share-path">{{ share.path }}</td> <td class="share-path">{{ share.path }}</td>
<td class="share-url"> <td class="share-url">
<a href="{{ share.url }}" title="{{ share.url}}" <a href="{{ share.url }}" title="{{ share.url}}">
data-turbolinks="false">
{{ share.url }} {{ share.url }}
</a> </a>
</td> </td>

View File

@ -35,8 +35,7 @@ _description = [
box_name=_(cfg.box_name), users_url=reverse_lazy('users:index')), box_name=_(cfg.box_name), users_url=reverse_lazy('users:index')),
format_lazy( format_lazy(
_('When using a mobile or desktop application for Tiny Tiny RSS, use ' _('When using a mobile or desktop application for Tiny Tiny RSS, use '
'the URL <a href="/tt-rss-app/" data-turbolinks="false">' 'the URL <a href="/tt-rss-app/">/tt-rss-app</a> for connecting.'))
'/tt-rss-app</a> for connecting.'))
] ]
app = None app = None

View File

@ -24,7 +24,6 @@
maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
--> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="turbolinks-cache-control" content="no-preview">
<!-- R2D2, you know better than to trust a strange computer! --> <!-- R2D2, you know better than to trust a strange computer! -->
<meta name="robots" content="noindex, nofollow, noarchive" /> <meta name="robots" content="noindex, nofollow, noarchive" />
@ -56,8 +55,6 @@
<link rel="stylesheet" href="{% static '/javascript/bootstrap/css/bootstrap.min.css' %}"/> <link rel="stylesheet" href="{% static '/javascript/bootstrap/css/bootstrap.min.css' %}"/>
<link rel="stylesheet" href="{% static '/javascript/fork-awesome/css/fork-awesome.css' %}"/> <link rel="stylesheet" href="{% static '/javascript/fork-awesome/css/fork-awesome.css' %}"/>
<link rel="stylesheet" href="{% static 'theme/css/main.css' %}"/> <link rel="stylesheet" href="{% static 'theme/css/main.css' %}"/>
<!-- Local link to system Turbolinks JS -->
<script type="text/javascript" src="{% static '/javascript/turbolinks/turbolinks.js' %}" defer></script>
<!-- Local link to system Modernizr (includes HTML5 Shiv) --> <!-- Local link to system Modernizr (includes HTML5 Shiv) -->
<script type="text/javascript" src="{% static '/javascript/modernizr/modernizr.min.js' %}" defer></script> <script type="text/javascript" src="{% static '/javascript/modernizr/modernizr.min.js' %}" defer></script>
<!-- Local link to system jQuery --> <!-- Local link to system jQuery -->

View File

@ -9,10 +9,10 @@
{% with client_platforms=clients|clients_get_platforms %} {% with client_platforms=clients|clients_get_platforms %}
{% if client_platforms.web|length == 1 %} {% if client_platforms.web|length == 1 %}
<a target='_blank' rel="noopener noreferrer" <a target='_blank' rel="noopener noreferrer"
class="btn btn-primary" role="button" data-turbolinks="false" class="btn btn-primary" role="button"
{% if not enabled %} disabled="disabled" {% if not enabled %} disabled="disabled"
{% else %} href="{{ client_platforms.web.0.url }}" {% else %} href="{{ client_platforms.web.0.url }}"
{% endif %} data-turbolinks="false"> {% endif %}>
{% trans "Launch web client" %} {% trans "Launch web client" %}
<span class="fa fa-external-link"></span> <span class="fa fa-external-link"></span>
</a> </a>

View File

@ -21,7 +21,7 @@
<td>{{ client.name }}</td> <td>{{ client.name }}</td>
<td> <td>
<a target="_blank" rel="noopener noreferrer" <a target="_blank" rel="noopener noreferrer"
class="btn btn-default" role="button" data-turbolinks="false" class="btn btn-default" role="button"
{% if not enabled %} disabled="disabled" {% if not enabled %} disabled="disabled"
{% else %} href="{{ platform.url }}" {% else %} href="{{ platform.url }}"
{% endif %}> {% endif %}>

View File

@ -65,9 +65,9 @@
{% if user.is_authenticated or not shortcut.login_required %} {% if user.is_authenticated or not shortcut.login_required %}
<div class="card thumbnail"> <div class="card thumbnail">
{% if selected_shortcut.component_id == shortcut.component_id %} {% if selected_shortcut.component_id == shortcut.component_id %}
<a href="{{ shortcut.url }}" class="nav-link active" data-turbolinks="false"> <a href="{{ shortcut.url }}" class="nav-link active">
{% else %} {% else %}
<a href="{{ shortcut.url }}" class="nav-link" data-turbolinks="false"> <a href="{{ shortcut.url }}" class="nav-link">
{% endif %} {% endif %}
<div class="card-title"> <div class="card-title">
{{ shortcut.name }} {{ shortcut.name }}

View File

@ -37,15 +37,6 @@
<td><a href="https://salsa.debian.org/js-team/modernizr.git"> <td><a href="https://salsa.debian.org/js-team/modernizr.git">
modernizr</a></td> modernizr</a></td>
</tr> </tr>
<tr>
<td><a href="/javascript/turbolinks/turbolinks.js">
turbolinks.js</a></td>
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
<td>
<a href="https://salsa.debian.org/js-team/node-turbolinks.git">
node-turbolinks</a>
</td>
</tr>
<tr> <tr>
<td><a href="/plinth/static/jsxc/jsxc-plinth.js">jsxc-plinth.js</a></td> <td><a href="/plinth/static/jsxc/jsxc-plinth.js">jsxc-plinth.js</a></td>
<td> <td>

View File

@ -480,11 +480,6 @@ a.menu_link_active {
background-image: url('../img/system-background.svg'); background-image: url('../img/system-background.svg');
} }
.turbolinks-progress-bar {
height: 3px;
background-color: white;
}
.names-table { .names-table {
table-layout: fixed; table-layout: fixed;
overflow-wrap: break-word; overflow-wrap: break-word;