kopia lustrzana https://github.com/hholzgra/maposmatic/
upgrade Bootstrap from version 4.6 to 5.0
rodzic
04bea06e5a
commit
996d17e8dd
|
@ -172,9 +172,9 @@ def all(request):
|
|||
if daemon_running and gis_lag_ok and waymarked_lag_ok:
|
||||
platform_status = 'check'
|
||||
elif daemon_running and gis_lastupdate and not (gis_lag_ok and waymarked_lag_ok):
|
||||
platform_status = 'warning'
|
||||
platform_status = 'triangle-exclamation'
|
||||
else:
|
||||
platform_status = 'times'
|
||||
platform_status = 'hourglas-clock'
|
||||
|
||||
return {
|
||||
'DEBUG': www.settings.DEBUG,
|
||||
|
|
|
@ -5,18 +5,19 @@
|
|||
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
|
||||
<div class="container">
|
||||
|
||||
<a
|
||||
rel="popover"
|
||||
data-animation="false"
|
||||
data-html="true"
|
||||
data-original-title="{% trans "Platform status" %}"
|
||||
data-placement="bottom"
|
||||
data-content='<p class="text-{{queues_overall_state}}">{% trans "Rendering queue(s): " %}<i class="pull-right fas fa-{{queues_overall_symbol}}"></i></p>
|
||||
<a tabindex="0"
|
||||
class="navbar-brand"
|
||||
data-bs-toggle="popover"
|
||||
data-bs-trigger="focus"
|
||||
title="{% trans "Platform status" %}"
|
||||
data-bs-html=true
|
||||
data-bs-content='<p class="text-{{queues_overall_state}}">{% trans "Rendering queue(s): " %}<i class="pull-right fas fa-{{queues_overall_symbol}}"></i></p>
|
||||
<p class="text-{% if gis_lag_ok %}success{% else %}{% if gis_lastupdate %}warning{% else %}danger{% endif %}{% endif %}">{% trans "GIS database: " %}<i class="pull-right fas fa-{% if gis_lag_ok %}check{% else %}{% if gis_lastupdate %}hourglass-half{% else %}times{% endif %}{% endif %}"></i></p>
|
||||
<p class="text-{% if waymarked_lag_ok %}success{% else %}{% if waymarked_lastupdate %}warning{% else %}danger{% endif %}{% endif %}">{% trans "WayMarked database: " %}<i class="pull-right fas fa-{% if waymarked_lag_ok %}check{% else %}{% if waymarked_lastupdate %}hourglass-half{% else %}times{% endif %}{% endif %}"></i></p>'
|
||||
class="navbar-brand popovered" href="#"><i class="fas fa-{{ platform_status }}"></i> {{BRAND_NAME}}</a>
|
||||
><i class="fas fa-{{ platform_status }}"></i> {{BRAND_NAME}}</a>
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar-collapse" aria-expanded="false" aria-label="{% trans "Toggle navigation" %}">
|
||||
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-target="#navbar" aria-controls="navbar-collapse" aria-expanded="false" aria-label="{% trans "Toggle navigation" %}">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
|
@ -27,7 +28,7 @@
|
|||
<li class="nav-item {% block menu-maps %}{% endblock %}"><a class="nav-link" href="{% url "maps" %}"><i class="fas fa-list"></i> {% trans "Maps" %}</a></li>
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button"><i class="fas fa-comment"></i> {% trans "About" %} <b class="caret"></b></a>
|
||||
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button"><i class="fas fa-comment"></i> {% trans "About" %} <b class="caret"></b></a>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{% url "about" %}"><i class="fas fa-comment"></i> {% trans "About Maposmatic" %}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
@ -48,7 +49,7 @@
|
|||
{% endif %}
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">
|
||||
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
|
||||
<span class="{{LANGUAGE_CODE|language_flag}}"> </span> {{ LANGUAGES|getitem:LANGUAGE_CODE }} <b class="caret"></b>
|
||||
</a>
|
||||
<div class="dropdown-menu bg-light">
|
||||
|
|
|
@ -45,21 +45,9 @@
|
|||
|
||||
<script src="/media/node_modules/jquery/dist/jquery.js"></script>
|
||||
|
||||
<script src="/media/node_modules/popper.js/dist/umd/popper.js"></script>
|
||||
<script src="/media/node_modules/bootstrap/dist/js/bootstrap.js"></script>
|
||||
<script src="/media/node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>
|
||||
<link rel="stylesheet" href="/media/node_modules/bootstrap/dist/css/bootstrap.css" />
|
||||
|
||||
<!--
|
||||
<link rel="stylesheet" href="/media/node_modules/mdbootstrap/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/media/node_modules/mdbootstrap/css/mdb.min.css">
|
||||
<link rel="stylesheet" href="/media/node_modules/mdbootstrap/css/style.css">
|
||||
|
||||
<script type="text/javascript" src="/media/node_modules/mdbootstrap/js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/media/node_modules/mdbootstrap/js/popper.min.js"></script>
|
||||
<script type="text/javascript" src="/media/node_modules/mdbootstrap/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/media/node_modules/mdbootstrap/js/mdb.min.js"></script>
|
||||
-->
|
||||
|
||||
<script src="/media/node_modules/leaflet/dist/leaflet.js"></script>
|
||||
<link rel="stylesheet" href="/media/node_modules/leaflet/dist/leaflet.css" />
|
||||
|
||||
|
@ -147,9 +135,6 @@
|
|||
// Set focus to the search field
|
||||
$('#id_query').focus();
|
||||
|
||||
$('.tooltipped').tooltip();
|
||||
$('.popovered').popover({ trigger: 'hover' });
|
||||
|
||||
function set_map_bounds(map, array, closest) {
|
||||
try {
|
||||
map.fitBounds([[array[0][0],array[0][1]],[array[1][0],array[1][1]]]);
|
||||
|
@ -234,7 +219,10 @@
|
|||
create_map(elt);
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
|
||||
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
||||
return new bootstrap.Popover(popoverTriggerEl)
|
||||
});
|
||||
{% block extrajs %}{% endblock %}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
{% load l10n %}
|
||||
{% load extratags %}
|
||||
|
||||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
|
||||
<div id="carousel-example-generic" class="carousel slide" data-bs-ride="carousel">
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
|
||||
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
|
||||
</ol>
|
||||
<div class="carousel-indicators">
|
||||
<button type="button" data-bs-target="#carousel-example-generic" data-bs-slide-to="0" aria-label="Plain Layout" class="active" aria-current="true"></button>
|
||||
<button type="button" data-bs-target="#carousel-example-generic" data-bs-slide-to="1" aria-label="Index Layout"></button>
|
||||
<button type="button" data-bs-target="#carousel-example-generic" data-bs-slide-to="2" aria-label="Multi Page Layout"></button>
|
||||
</div>
|
||||
|
||||
<!-- Wrapper for slides -->
|
||||
<div class="carousel-inner">
|
||||
|
@ -42,13 +42,13 @@
|
|||
</div>
|
||||
|
||||
<!-- Controls -->
|
||||
<a class="carousel-control-prev" href="#carousel-example-generic" role="button" data-slide="prev">
|
||||
<button class="carousel-control-prev" type="button" data-bs-target="#carousel-example-generic" data-bs-silde="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="sr-only">{% trans "Previous" %}</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#carousel-example-generic" role="button" data-slide="next">
|
||||
<span class="visually-hidden">{% trans "Previous" %}</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" type="button" data-bs-target="#carousel-example-generic" data-bs-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="sr-only">{% trans "Next" %}</span>
|
||||
</a>
|
||||
<span class="visually-hidden">{% trans "Next" %}</span>
|
||||
</button>
|
||||
|
||||
</div> <!-- Carousel -->
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
{% block menu-home %}active{% endblock %}
|
||||
|
||||
{% block page %}
|
||||
<div class="jumbotron">
|
||||
<div class="alert alert-secondary">
|
||||
<h1>{% trans "Welcome to" %} {{BRAND_NAME}}</h1>
|
||||
|
||||
<div class="row">
|
||||
|
@ -105,7 +105,4 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block extrajs %}
|
||||
$('.carousel').carousel({
|
||||
interval: 7000
|
||||
});
|
||||
{% endblock %}
|
||||
|
|
|
@ -50,39 +50,11 @@
|
|||
|
||||
|
||||
{% if map.is_waiting %}
|
||||
<a class="btn btn-large disabled tooltipped"
|
||||
data-placement="right"
|
||||
data-original-title="{% with map.submission_time|timesince as date %}
|
||||
{% blocktrans %}Pending, submitted {{ date }} ago{% endblocktrans %}
|
||||
{% endwith %}">
|
||||
<i class="fas fa-hourglas"></i> {% trans "Pending..." %}
|
||||
</a>
|
||||
|
||||
{% ifequal nonce map.nonce %}
|
||||
<div style="height: 2em"></div>
|
||||
<form method="post" action="{% url "cancel" %}">
|
||||
<input type="hidden" name="id" value="{{ map.id }}" />
|
||||
<input type="hidden" name="nonce" value="{{ map.nonce }}" />
|
||||
<button type="submit" class="btn btn-large btn-danger tooltipped"
|
||||
data-placement="right"
|
||||
data-original-title="
|
||||
{% blocktrans with map.current_position_in_queue as pos %}Cancel this queued request (position {{ pos }} in the queue){% endblocktrans %}">
|
||||
{% blocktrans %}<i class="fas fa-times"></i> Cancel{% endblocktrans %}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{% endifequal %}
|
||||
<i class="fas fa-hourglass"></i> {% trans "Pending..." %}
|
||||
{% endif %}
|
||||
|
||||
{% if map.is_rendering %}
|
||||
<a class="btn btn-large disabled tooltipped"
|
||||
data-placement="right"
|
||||
data-original-title="
|
||||
{% with map.startofrendering_time|timesince:map.endofrendering_time as date %}
|
||||
{% blocktrans %}Rendering is in progress, started {{ date }} ago{% endblocktrans %}
|
||||
{% endwith %}">
|
||||
<i class="fas fa-redo"></i> {% trans "Rendering..." %} {{ status }}
|
||||
</a>
|
||||
<i class="fas fa-pen-to-square"></i> {% trans "Rendering..." %} {{ status }}
|
||||
{% endif %}
|
||||
|
||||
{% if not map.needs_waiting %}
|
||||
|
@ -155,6 +127,19 @@
|
|||
|
||||
{% if map.needs_waiting %}
|
||||
<span class="refresh-time pull-right">{% blocktrans %}Updating in <span>{{ refresh }}</span>s...{% endblocktrans %}</span>
|
||||
{% if map.is_waiting %}
|
||||
{% ifequal nonce map.nonce %}
|
||||
<div style="height: 2em"></div>
|
||||
<form method="post" action="{% url "cancel" %}">
|
||||
<input type="hidden" name="id" value="{{ map.id }}" />
|
||||
<input type="hidden" name="nonce" value="{{ map.nonce }}" />
|
||||
<button type="submit" class="btn btn-large btn-danger tooltipped"
|
||||
data-placement="right"
|
||||
data-original-title="{% blocktrans with map.current_position_in_queue as pos %}Cancel this queued request (position {{ pos }} in the queue){% endblocktrans %}">{% blocktrans %}<i class="fas fa-times"></i> Cancel{% endblocktrans %}
|
||||
</button>
|
||||
</form>
|
||||
{% endifequal %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
|
|
@ -156,25 +156,20 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
{% if map.is_done_ok and map.has_output_files %}
|
||||
<div class="btn-group">
|
||||
{% with map.output_files.maps.pdf as file %}
|
||||
<a href="{{ file.0 }}" class="btn btn-primary">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-primary dropdown-toggle" type="button" id="download_{{ map.id }}" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fas fa-download"></i> {% trans "Download" %}
|
||||
</a>
|
||||
{% endwith %}
|
||||
<button class="btn btn-primary dropdown-toggle tooltipped"
|
||||
data-toggle="dropdown"
|
||||
data-original-title="{% trans "Download other formats and map indeces" %}">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<ul class="dropdown-menu" aria-labelledby="download_{{ map.id ]}">
|
||||
{% for format,file in map.output_files.maps.items %}
|
||||
<li><a href="{{ file.0 }}" title="{{ file.1 }}">{{ format|upper }} {% trans "map" %} ({{ file.2|filesizeformat }})</a></li>
|
||||
<li><a class="dropdown-item" href="{{ file.0 }}" title="{{ file.1 }}">{{ format|upper }} {% trans "map" %} ({{ file.2|filesizeformat }})</a></li>
|
||||
{% endfor %}
|
||||
|
||||
{% if map.output_files.indeces|length %}
|
||||
<li class="divider"></li>
|
||||
{% for format,file in map.output_files.indeces.items %}<li><a href="{{ file.0 }}" title="{{ file.1 }}">{{ format|upper }} {% trans "index" %}</a></li>{% endfor %}
|
||||
{% for format,file in map.output_files.indeces.items %}
|
||||
<li><a class="dropdown-item" href="{{ file.0 }}" title="{{ file.1 }}">{{ format|upper }} {% trans "index" %}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -200,7 +195,7 @@
|
|||
<div class="col-6">
|
||||
<form class="form-horizontal pull-right" method="post" action="{% url "recreate" %}">
|
||||
<input type="hidden" name="id" value="{{ map.id }}" />
|
||||
<button class="btn btn-secondary tooltipped"
|
||||
<button class="btn btn-primary tooltipped"
|
||||
data-original-title="{% trans "Recreate map" %}"
|
||||
type="submit" {% if map.needs_waiting or not map.can_recreate %}disabled="disabled"{% endif %}>
|
||||
<i class="fas fa-redo"></i> {% trans "Recreate" %}
|
||||
|
|
|
@ -162,14 +162,14 @@ $('#error-modal').modal('show')
|
|||
<div class="tab" style="display: block" id="wizard-step-location">
|
||||
|
||||
<ul class="nav nav-tabs" id="locTabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="step-location-bbox-tab" data-toggle="tab" href="#step-location-bbox" role="tab" aria-controls="home" aria-selected="true"><i class="fas fa-globe-africa"></i> {% trans "Geographic area" %}</a>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="step-location-bbox-tab" data-bs-toggle="tab" data-bs-target="#step-location-bbox" type="button" role="tab" aria-controls="bt-step-location-bbox" aria-selected="true"><i class="fas fa-globe-africa"></i> {% trans "Geographic area" %}</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="step-location-admin-tab" data-toggle="tab" href="#step-location-admin" role="tab" aria-controls="admin" aria-selected="false"><i class="fas fa-search-location"></i> {% trans "City search" %}</a>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="step-location-admin-tab" data-bs-toggle="tab" data-bs-target="#step-location-admin" type="button" role="tab" aria-controls="bt-step-location-bbox" aria-selected="false"><i class="fas fa-search-location"></i> {% trans "City search" %}</button>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="step-location-gpx-tab" data-toggle="tab" href="#step-location-gpx" role="tab" aria-controls="gpx" aria-selected="false"><i class="fas fa-upload"></i> {% trans "File upload" %}</a>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="step-location-file-tab" data-bs-toggle="tab" data-bs-target="#step-location-file" type="button" role="tab" aria-controls="bt-step-location-file" aria-selected="false"><i class="fas fa-upload"></i> {% trans "File upload" %}</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -177,7 +177,6 @@ $('#error-modal').modal('show')
|
|||
<div class="tab-pane active" id="step-location-bbox" role="tabpanel">
|
||||
{{ form.bbox }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="step-location-admin" role="tabpanel">
|
||||
<div style="position: relative;">
|
||||
{{ form.administrative_city }}
|
||||
|
@ -193,7 +192,7 @@ $('#error-modal').modal('show')
|
|||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="step-location-gpx" role="tabpanel">
|
||||
<div class="tab-pane" id="step-location-file" role="tabpanel">
|
||||
<div class="col-lg-12">
|
||||
<fieldset id="track-file">
|
||||
<legend><i class="fas fa-file-upload"></i> {% trans "Upload files" %}</legend>
|
||||
|
@ -424,15 +423,15 @@ $('#error-modal').modal('show')
|
|||
<fieldset>
|
||||
<legend>{% trans "Locale" %}</legend>
|
||||
<div class="dropdown">
|
||||
<button id="map_language_button" type="button" class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
<button id="map_language_button" type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown" aria-expand="false">
|
||||
{{ form.map_language.value }}
|
||||
</button>
|
||||
<input type="hidden" name="{{ form.map_language.name }}" id="{{ form.map_language.name }}"/>
|
||||
<div id="maplang_choices" role="menu" class="dropdown-menu bg-light" style="height: 400px; overflow-y: auto;">
|
||||
<ul id="maplang_choices" class="dropdown-menu bg-light" style="height: 400px; overflow-y: auto;" area-labeledby="map_language_button">
|
||||
{% for choice in form.map_language.field.choices %}
|
||||
<a class="dropdown-item" href="#" data-langcode="{{choice.0}}" onclick="$('#map_language_button').html($(this).html()); $('#{{ form.map_language.name }}').val('{{choice.0}}');">{{choice.1}} ({{choice.0|locale_base}})</a>
|
||||
<li><a class="dropdown-item" href="#" data-langcode="{{choice.0}}" onclick="$('#map_language_button').html($(this).html()); $('#{{ form.map_language.name }}').val('{{choice.0}}');">{{choice.1}} ({{choice.0|locale_base}})</a></li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@ function wizardmap(elt) {
|
|||
strokeWidth: 2
|
||||
};
|
||||
var countryquery = null;
|
||||
var locationFilter = new L.LocationFilter({
|
||||
locationFilter = new L.LocationFilter({
|
||||
enableButton: {
|
||||
enableText: '{% trans "Select area" %}',
|
||||
disableText: '{% trans "Remove selection" %}'
|
||||
|
|
Plik diff jest za duży
Load Diff
|
@ -15,10 +15,9 @@
|
|||
},
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.12.0",
|
||||
"@fortawesome/fontawesome-free": "^6.2.1",
|
||||
"@mapbox/leaflet-omnivore": "^0.3.4",
|
||||
"bootstrap": "^4.3.1",
|
||||
"bootstrap-material-design": "^4.1.3",
|
||||
"bootstrap": "^5.0.2",
|
||||
"fastsearch": "^1.11.1",
|
||||
"fastselect": "^0.7.3",
|
||||
"flag-icons": "^6.6.6",
|
||||
|
@ -33,8 +32,6 @@
|
|||
"leaflet.locatecontrol": "^0.66.2",
|
||||
"leaflet.locationfilter": "git+https://github.com/marcoqu/leaflet-locationfilter.git",
|
||||
"leaflet.restoreview": "git+https://github.com/makinacorpus/Leaflet.RestoreView.git",
|
||||
"mdbootstrap": "^4.20.0",
|
||||
"minimist": "^1.2.6",
|
||||
"popper.js": "^1.15.0"
|
||||
"minimist": "^1.2.7"
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue