Upgrade to latest bootstrap

This commit is contained in:
Gautier Pelloux-Prayer 2019-05-19 13:46:52 +02:00
parent 018db9ae9b
commit f1a20413b0
5 changed files with 190 additions and 174 deletions

View file

@ -65,11 +65,6 @@ table.dataTable {
/* align with leaflet-control */
padding: 0.5rem 10px;
}
.navbar-brand {
float: right;
margin-left: 1rem;
margin-right: 0;
}
.nav-link .fa {
margin-right: 0.2em;
}
@ -262,7 +257,7 @@ https://css-tricks.com/svg-line-animation-works/
background: none;
outline: none;
/* bootstrap .btn-default */
/* bootstrap .btn-secondary */
background-image: linear-gradient(to bottom, #fff 0, #e0e0e0 100%);
background-repeat: repeat-x;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15),
@ -270,15 +265,25 @@ https://css-tricks.com/svg-line-animation-works/
border: 1px solid #adadad;
}
/* activated Font Awesome icon and Bootstrap button
(for EasyButton add ' active' to icon class property) */
.fa.active,
.btn.active,
.btn.active:hover,
.btn.active:focus {
/* activated Font Awesome icon (for EasyButton add ' active' to icon class property) */
.fa.active {
/* use same color as leaflet-locatecontrol */
color: #2074b6;
}
/* Bootstrap button */
.btn-secondary:not(:disabled):not(.disabled).active,
.btn-secondary.active,
.btn-secondary:hover,
.btn-outline-secondary:not(:disabled):not(.disabled).active,
.btn-outline-secondary:hover {
/* use same color as leaflet-locatecontrol */
color: #2074b6;
background-color: #e6e6e6;
}
button.btn {
box-shadow: none !important;
}
.leaflet-bar button {
/* override button for horizontal fa center in Firefox */

View file

@ -15,30 +15,28 @@
<!-- endinject -->
</head>
<body class="flexcolumn">
<nav class="navbar navbar-full navbar-dark bg-inverse">
<div class="navbar-header">
<a
class="navbar-brand"
href="#"
data-toggle="modal"
data-target="#about"
>BRouter-Web <sup class="version">0.10.2</sup></a
>
<button
class="navbar-toggler hidden-md-up"
type="button"
data-toggle="collapse"
data-target="#collapsingNavbar"
aria-controls="collapsingNavbar"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="fa fa-bars"></span>
</button>
</div>
<div class="collapse navbar-toggleable-sm" id="collapsingNavbar">
<div class="nav navbar-nav">
<form class="nav-item form-inline">
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#collapsingNavbar"
aria-controls="collapsingNavbar"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="fa fa-bars"></span>
</button>
<a
class="navbar-brand order-md-last"
href="#"
data-toggle="modal"
data-target="#about"
>BRouter-Web <sup class="version">0.10.2</sup></a
>
<div class="collapse navbar-collapse" id="collapsingNavbar">
<div class="navbar-nav">
<form class="form-inline">
<div class="form-group">
<select
class="selectpicker show-tick"
@ -53,8 +51,8 @@
id="profile"
>
<option data-i18n="navbar.profile.custom"
>Custom</option
>
>Custom
</option>
</optgroup>
<optgroup
label="Alternative"
@ -66,23 +64,23 @@
data-i18n="navbar.alternative.original"
value="0"
selected
>Original</option
>
>Original
</option>
<option
data-i18n="navbar.alternative.first"
value="1"
>1st alternative</option
>
>1st alternative
</option>
<option
data-i18n="navbar.alternative.second"
value="2"
>2nd alternative</option
>
>2nd alternative
</option>
<option
data-i18n="navbar.alternative.third"
value="3"
>3rd alternative</option
>
>3rd alternative
</option>
</optgroup>
</select>
</div>
@ -113,6 +111,7 @@
data-toggle="dropdown"
href="#"
role="button"
id="navbarLoadDropdown"
aria-haspopup="true"
aria-expanded="false"
>
@ -123,7 +122,10 @@
</span>
<span data-i18n="navbar.load.title">Load</span>
</a>
<div class="dropdown-menu">
<div
class="dropdown-menu"
aria-labelledby="navbarLoadDropdown"
>
<a
class="dropdown-item"
data-i18n="navbar.load.nogos"
@ -163,6 +165,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="credits">Credits</h4>
<button
type="button"
class="close"
@ -171,7 +174,6 @@
>
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" data-i18n="credits">Credits</h4>
</div>
<div class="modal-body">
<dl>
@ -227,6 +229,9 @@
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="layers.customize">
Customize layers
</h4>
<button
type="button"
class="close"
@ -235,9 +240,6 @@
>
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" data-i18n="layers.customize">
Customize layers
</h4>
</div>
<div class="modal-body">
<input
@ -301,6 +303,9 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="about.title">
About
</h4>
<button
type="button"
class="close"
@ -309,9 +314,6 @@
>
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" data-i18n="about.title">
About
</h4>
</div>
<div class="modal-body">
<p data-i18n="[html]about.description">
@ -433,6 +435,9 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="loadNogos.title">
Load no-go areas
</h4>
<button
type="button"
class="close"
@ -441,9 +446,6 @@
>
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" data-i18n="loadNogos.title">
Load no-go areas
</h4>
</div>
<div class="modal-body">
<p id="nogoError" style="display: none;"></p>
@ -557,6 +559,9 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" data-i18n="export.title">
Export route
</h4>
<button
type="button"
class="close"
@ -565,9 +570,6 @@
>
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" data-i18n="export.title">
Export route
</h4>
</div>
<div class="modal-body">
<form name="export">
@ -585,80 +587,85 @@
/>
</div>
</div>
<fieldset id="export-format" class="form-group row">
<legend
class="col-form-legend col-sm-2"
data-i18n="export.format"
>
Format
</legend>
<div class="col-sm-10">
<div class="form-check">
<label class="form-check-label">
<input
class="form-check-input"
id="format-gpx"
type="radio"
name="format"
value="gpx"
checked
/>
<span data-i18n="export.format_gpx"
>GPX</span
<fieldset id="export-format" class="form-group">
<div class="row">
<legend
class="col-form-label col-sm-2"
data-i18n="export.format"
>
Format
</legend>
<div class="col-sm-10">
<div class="form-check">
<label class="form-check-label">
<input
class="form-check-input"
id="format-gpx"
type="radio"
name="format"
value="gpx"
checked
/>
<span
data-i18n="export.format_gpx"
>GPX</span
>
</label>
</div>
<div class="form-check">
<label
class="form-check-label"
for="format-kml"
>
</label>
</div>
<div class="form-check">
<label
class="form-check-label"
for="format-kml"
>
<input
class="form-check-input"
id="format-kml"
type="radio"
name="format"
value="kml"
/>
<span data-i18n="export.format_kml"
>KML</span
<input
class="form-check-input"
id="format-kml"
type="radio"
name="format"
value="kml"
/>
<span
data-i18n="export.format_kml"
>KML</span
>
</label>
</div>
<div class="form-check">
<label
class="form-check-label"
for="format-geojson"
>
</label>
</div>
<div class="form-check">
<label
class="form-check-label"
for="format-geojson"
>
<input
class="form-check-input"
id="format-geojson"
type="radio"
name="format"
value="geojson"
/>
<span
data-i18n="export.format_geojson"
>GeoJSON</span
<input
class="form-check-input"
id="format-geojson"
type="radio"
name="format"
value="geojson"
/>
<span
data-i18n="export.format_geojson"
>GeoJSON</span
>
</label>
</div>
<div class="form-check">
<label
class="form-check-label"
for="format-csv"
>
</label>
</div>
<div class="form-check">
<label
class="form-check-label"
for="format-csv"
>
<input
class="form-check-input"
id="format-csv"
type="radio"
name="format"
value="csv"
/>
<span data-i18n="export.format_csv"
>CSV</span
>
</label>
<input
class="form-check-input"
id="format-csv"
type="radio"
name="format"
value="csv"
/>
<span
data-i18n="export.format_csv"
>CSV</span
>
</label>
</div>
</div>
</div>
</fieldset>
@ -697,10 +704,10 @@
title="Layers"
>
<!--
https://github.com/feathericons/feather/blob/0dc2bf5c9d01759e47485d9498aefc02cac1d845/icons/layers.svg
MIT License: https://github.com/feathericons/feather/blob/master/LICENSE
modifications: line gap -0.5, stroke-width +0.2
-->
https://github.com/feathericons/feather/blob/0dc2bf5c9d01759e47485d9498aefc02cac1d845/icons/layers.svg
MIT License: https://github.com/feathericons/feather/blob/master/LICENSE
modifications: line gap -0.5, stroke-width +0.2
-->
<svg
class="fa"
width="1em"
@ -780,7 +787,7 @@
<button
type="button"
id="expand_tree_button"
class="btn btn-sm"
class="btn btn-light btn-sm"
data-i18n="[title]sidebar.layers.expand"
title="Expand all"
>
@ -791,7 +798,7 @@
<button
type="button"
id="collapse_tree_button"
class="btn btn-sm"
class="btn btn-light btn-sm"
data-i18n="[title]sidebar.layers.collapse"
title="Collapse all"
>
@ -806,7 +813,7 @@
<button
type="button"
id="optional_layers_button"
class="btn btn-sm"
class="btn btn-light btn-sm"
data-i18n="[title]sidebar.layers.optional"
title="Add or remove optional layers"
>
@ -819,7 +826,7 @@
<button
type="button"
id="custom_layers_button"
class="btn btn-sm"
class="btn btn-light btn-sm"
data-i18n="[title]sidebar.layers.customize"
title="Add or remove custom layers"
>
@ -858,7 +865,7 @@
<button
id="upload"
type="button"
class="btn btn-sm"
class="btn btn-primary btn-sm"
data-uploading-text="Uploading…"
>
<span class="fa fa-cloud-upload"></span>
@ -869,7 +876,7 @@
<button
id="clear"
type="button"
class="btn btn-sm"
class="btn btn-secondary btn-sm"
>
<span class="fa fa-eraser"></span>
<span data-i18n="sidebar.profile.clear"
@ -879,7 +886,7 @@
<a
href="http://brouter.de/brouter/costfunctions.html"
target="_blank"
class="btn btn-sm btn-info pull-right"
class="btn btn-info btn-sm pull-right"
><span class="fa fa-question"></span>
<span data-i18n="sidebar.profile.help"
>Help</span
@ -932,7 +939,7 @@
<ul id="stats">
<li>
<div
class="text-muted small hidden-sm-down"
class="text-muted small d-none d-sm-block"
data-i18n="footer.distance"
>
Distance
@ -948,7 +955,7 @@
</li>
<li hidden>
<div
class="text-muted small hidden-sm-down"
class="text-muted small d-none d-sm-block"
data-i18n="footer.travel-time"
>
Travel time
@ -963,7 +970,7 @@
</p>
</li>
<li hidden>
<div class="text-muted small hidden-sm-down">
<div class="text-muted small d-none d-sm-block">
<span data-i18n="footer.total-energy"
>Total Energy</span
>
@ -988,7 +995,7 @@
</p>
</li>
<li>
<div class="text-muted small hidden-sm-down">
<div class="text-muted small d-none d-sm-block">
<span data-i18n="footer.ascend">Ascend</span> |
<span data-i18n="footer.plain-ascend"
>Plain ascend</span
@ -1010,7 +1017,7 @@
</p>
</li>
<li>
<div class="text-muted small hidden-sm-down">
<div class="text-muted small d-none d-sm-block">
<span data-i18n="footer.cost">Cost</span> |
<span data-i18n="footer.mean-cost-factor"
>Mean cost factor</span
@ -1024,7 +1031,7 @@
</ul>
<button
class="btn btn-secondary btn-sm"
class="btn btn-outline-secondary btn-sm"
type="button"
data-toggle="collapse"
data-target="#elevation-chart"

View file

@ -23,7 +23,7 @@ BR.Message = L.Class.extend({
ele.innerHTML =
'<div class="alert ' +
alertClass +
' alert-dismissible fade in" role="alert">' +
' alert-dismissible fade show" role="alert">' +
' <button type="button" class="close" data-dismiss="alert" aria-label="Close">' +
' <span aria-hidden="true">&times;</span>' +
' </button>' +

View file

@ -26,9 +26,9 @@
"@mapbox/polyline": "^0.2.0",
"@turf/turf": "^5.1.6",
"async": "~0.9.2",
"bootbox": "~4.4.0",
"bootstrap": "4.0.0-alpha.5",
"bootstrap-select": "hugdx/bootstrap-select#patch-1",
"bootbox": "~5.1.3",
"bootstrap": "4.3.1",
"bootstrap-select": "1.13.0",
"codemirror": "^5.35.0",
"d3": "~3.5.5",
"datatables": "~1.10.16",
@ -141,6 +141,11 @@
"lib/**"
]
},
"bootbox": {
"main": [
"src/bootbox.all.js"
]
},
"bootstrap": {
"main": [
"dist/js/bootstrap.js",

View file

@ -1561,24 +1561,23 @@ bl@~0.9.4:
dependencies:
readable-stream "~1.0.26"
bootbox@~4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/bootbox/-/bootbox-4.4.0.tgz#ff7f898fb87d4527e547feb64158f88450d1a0c9"
integrity sha1-/3+Jj7h9RSflR/62QVj4hFDRoMk=
bootstrap-select@hugdx/bootstrap-select#patch-1:
version "1.11.2"
resolved "https://codeload.github.com/hugdx/bootstrap-select/tar.gz/6556cfeadd7bc6653e04c3377c7918fc7e8dc627"
bootbox@~5.1.3:
version "5.1.3"
resolved "https://registry.yarnpkg.com/bootbox/-/bootbox-5.1.3.tgz#700b4b2619077402a86d163210671a15425eb4cd"
integrity sha512-bXNPIkFv3Dcgcdg9jj32F8RBWhRyF8hKDtZ8LY15Bk5WQ1+JzpPCi1qh5rwqI4Jjl/8AWLB44z/H7dFJz4Ql2A==
dependencies:
jquery ">=1.8"
bootstrap ">=3.0.0"
jquery ">=1.9.1"
bootstrap@4.0.0-alpha.5:
version "4.0.0-alpha.5"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.0.0-alpha.5.tgz#a126b648c3bd2f52b8fad4bbc5e2d0ad2abf7064"
integrity sha1-oSa2SMO9L1K4+tS7xeLQrSq/cGQ=
dependencies:
jquery "1.9.1 - 3"
tether "^1.3.7"
bootstrap-select@1.13.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/bootstrap-select/-/bootstrap-select-1.13.0.tgz#f31d0a23fc6070fd5b17b841bf1ca115ce54775b"
integrity sha1-8x0KI/xgcP1bF7hBvxyhFc5Ud1s=
bootstrap@4.3.1, bootstrap@>=3.0.0:
version "4.3.1"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.3.1.tgz#280ca8f610504d99d7b6b4bfc4b68cec601704ac"
integrity sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==
brace-expansion@^1.0.0, brace-expansion@^1.1.7:
version "1.1.11"
@ -3509,16 +3508,16 @@ jquery-i18next@^1.2.1:
resolved "https://registry.yarnpkg.com/jquery-i18next/-/jquery-i18next-1.2.1.tgz#3e4ac5e46632fac21640529f1aa7b68e54f227e8"
integrity sha512-UNcw3rgxoKjGEg4w23FEn2h3OlPJU7rPzsgDuXDBZktIzeiVbJohs9Cv9hj8oP8KNfBRKOoErL/OVxg2FaAR4g==
"jquery@1.9.1 - 3", jquery@>=1.7, jquery@>=1.8, jquery@>=1.9.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==
jquery@3.4.1:
version "3.4.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2"
integrity sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==
jquery@>=1.7, jquery@>=1.9.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.3.1.tgz#958ce29e81c9790f31be7792df5d4d95fc57fbca"
integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg==
js-yaml@^3.13.1:
version "3.13.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
@ -5450,7 +5449,7 @@ ternary-stream@^2.0.1:
merge-stream "^1.0.0"
through2 "^2.0.1"
tether@1.4.5, tether@^1.3.7:
tether@1.4.5:
version "1.4.5"
resolved "https://registry.yarnpkg.com/tether/-/tether-1.4.5.tgz#8efd7b35572767ba502259ba9b1cc167fcf6f2c1"
integrity sha512-fysT1Gug2wbRi7a6waeu39yVDwiNtvwj5m9eRD+qZDSHKNghLo6KqP/U3yM2ap6TNUL2skjXGJaJJTJqoC31vw==