switch icons to Font Awesome (for now)

This commit is contained in:
Norbert Renner 2016-10-01 12:30:30 +02:00
parent d53fb7723f
commit b108efae5c
8 changed files with 33 additions and 13 deletions

View file

@ -118,3 +118,5 @@ Copyright (c) 2015 Kyle Kemp, Rohit Kalkur, and contributors; [MIT License](http
Copyright (c) 2012 Makina Corpus, [MIT License](https://github.com/makinacorpus/Leaflet.RestoreView/blob/master/LICENSE) Copyright (c) 2012 Makina Corpus, [MIT License](https://github.com/makinacorpus/Leaflet.RestoreView/blob/master/LICENSE)
* [Leaflet.Locate](https://github.com/domoritz/leaflet-locatecontrol) * [Leaflet.Locate](https://github.com/domoritz/leaflet-locatecontrol)
Copyright (c) 2014 Dominik Moritz, [MIT License](https://github.com/domoritz/leaflet-locatecontrol/blob/gh-pages/LICENSE) Copyright (c) 2014 Dominik Moritz, [MIT License](https://github.com/domoritz/leaflet-locatecontrol/blob/gh-pages/LICENSE)
* [Font Awesome](http://fontawesome.io/license/)
by Dave Gandy; [SIL OFL 1.1](http://scripts.sil.org/OFL) (Font), MIT License (Code), CC BY 3.0 (Documentation)

View file

@ -22,7 +22,8 @@
"seiyria-bootstrap-slider": "~4.8.1", "seiyria-bootstrap-slider": "~4.8.1",
"url-search-params": "~0.5.0", "url-search-params": "~0.5.0",
"Leaflet.RestoreView": "makinacorpus/Leaflet.RestoreView#master", "Leaflet.RestoreView": "makinacorpus/Leaflet.RestoreView#master",
"leaflet.locatecontrol": "^0.52.0" "leaflet.locatecontrol": "^0.52.0",
"font-awesome": "^4.6.3"
}, },
"overrides": { "overrides": {
"leaflet": { "leaflet": {
@ -84,9 +85,16 @@
}, },
"Leaflet.RestoreView": { "Leaflet.RestoreView": {
"main": "leaflet.restoreview.js" "main": "leaflet.restoreview.js"
},
"font-awesome": {
"main": [
"css/font-awesome.css",
"fonts/*"
]
} }
}, },
"resolutions": { "resolutions": {
"leaflet.elevation": "master" "leaflet.elevation": "master",
"font-awesome": "^4.6.3"
} }
} }

View file

@ -243,12 +243,22 @@ textarea:focus {
margin-bottom: 0px; margin-bottom: 0px;
padding-left: 35px; padding-left: 35px;
} }
.alert span.glyphicon { .alert span.fa {
position: relative; position: relative;
left: -23px; left: -23px;
margin-right: -1em; margin-right: -1em;
} }
/* activated Font Awesome icon (for EasyButton add ' active' to icon class property) */
.fa.active {
/* use same color as leaflet-locatecontrol */
color: #2074B6;
}
.leaflet-bar .fa {
font-size: 16px;
}
/* /*
* DataTables * DataTables
*/ */

View file

@ -30,7 +30,7 @@ var paths = {
]), ]),
styles: mainBowerFiles('**/*.css').concat('css/*.css'), styles: mainBowerFiles('**/*.css').concat('css/*.css'),
images: mainBowerFiles('**/*.+(png|gif)'), images: mainBowerFiles('**/*.+(png|gif)'),
fonts: mainBowerFiles('**/fonts/**/*'), fonts: mainBowerFiles('**/font-awesome/fonts/*'),
dest: 'dist', dest: 'dist',
destName: 'brouter-web' destName: 'brouter-web'
}; };

View file

@ -53,8 +53,8 @@
<textarea type="text" name="profile" spellcheck="false" wrap="off" maxlength="100000" placeholder="... paste your custom routing profile here ..."></textarea> <textarea type="text" name="profile" spellcheck="false" wrap="off" maxlength="100000" placeholder="... paste your custom routing profile here ..."></textarea>
<div id="profile_message"></div> <div id="profile_message"></div>
<div id="profile_buttons"> <div id="profile_buttons">
<button id="upload" type="button" class="btn btn-default btn-xs" data-uploading-text="Uploading..."><span class="glyphicon glyphicon-upload"></span> Upload</button> <button id="upload" type="button" class="btn btn-default btn-xs" data-uploading-text="Uploading..."><span class="fa fa-upload"></span> Upload</button>
<button id="clear" type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-ban-circle"></span> Clear</button> <button id="clear" type="button" class="btn btn-default btn-xs"><span class="fa fa-trash-o"></span> Clear</button>
<a href="http://brouter.de/brouter/costfunctions.html" target="_blank" class="btn-xs">Help</a> <a href="http://brouter.de/brouter/costfunctions.html" target="_blank" class="btn-xs">Help</a>
</div> </div>
</form> </form>

View file

@ -117,8 +117,8 @@ BR.Map = {
layersControl = L.control.layers(baseLayers, overlays).addTo(map); layersControl = L.control.layers(baseLayers, overlays).addTo(map);
L.control.locate({ L.control.locate({
icon: 'glyphicon glyphicon-screenshot', icon: 'fa fa-location-arrow',
iconLoading: 'glyphicon glyphicon-refresh', iconLoading: 'fa fa-spinner fa-pulse',
}).addTo(map); }).addTo(map);
L.control.scale().addTo(map); L.control.scale().addTo(map);

View file

@ -12,7 +12,7 @@ BR.Message = L.Class.extend({
_show: function (msg, type) { _show: function (msg, type) {
var ele = L.DomUtil.get(this.id), var ele = L.DomUtil.get(this.id),
iconClass = (type === 'warning') ? 'glyphicon-warning-sign' : 'glyphicon-remove', iconClass = (type === 'warning') ? 'fa-exclamation-triangle' : 'fa-times-circle',
alertClass = (type === 'warning') ? 'alert-warning' : 'alert-danger'; alertClass = (type === 'warning') ? 'alert-warning' : 'alert-danger';
ele.innerHTML = ele.innerHTML =
@ -20,7 +20,7 @@ BR.Message = L.Class.extend({
+ ' <button type="button" class="close" data-dismiss="alert" aria-label="Close">' + ' <button type="button" class="close" data-dismiss="alert" aria-label="Close">'
+ ' <span aria-hidden="true">&times;</span>' + ' <span aria-hidden="true">&times;</span>'
+ ' </button>' + ' </button>'
+ ' <span class="glyphicon ' + iconClass + '" aria-hidden="true"/></span>' + ' <span class="fa ' + iconClass + '" aria-hidden="true"/></span>'
+ msg + msg
+ '</div>'; + '</div>';

View file

@ -48,7 +48,7 @@
drawButton = L.easyButton({ drawButton = L.easyButton({
states: [{ states: [{
stateName: 'deactivate-draw', stateName: 'deactivate-draw',
icon: 'glyphicon-ok', icon: 'fa-pencil active',
onClick: function (control) { onClick: function (control) {
routing.draw(false); routing.draw(false);
control.state('activate-draw'); control.state('activate-draw');
@ -56,7 +56,7 @@
title: 'Stop drawing route' title: 'Stop drawing route'
}, { }, {
stateName: 'activate-draw', stateName: 'activate-draw',
icon: 'glyphicon-road', icon: 'fa-pencil',
onClick: function (control) { onClick: function (control) {
routing.draw(true); routing.draw(true);
control.state('deactivate-draw'); control.state('deactivate-draw');
@ -66,7 +66,7 @@
}); });
deleteButton = L.easyButton( deleteButton = L.easyButton(
'glyphicon-trash', 'fa-trash-o',
function () { function () {
bootbox.confirm({ bootbox.confirm({
size: 'small', size: 'small',