Improve GPX related tooltips

This commit is contained in:
John Firebaugh
2013-10-15 13:02:38 -04:00
parent 5f77f1ab97
commit e20a9f6734
3 changed files with 16 additions and 7 deletions
+3 -1
View File
@@ -267,7 +267,9 @@ en:
cannot_zoom: "Cannot zoom out further in current mode."
gpx:
local_layer: "Local GPX file"
drag_drop: "Drag and drop a .gpx file on the page"
drag_drop: "Drag and drop a .gpx file on the page, or click the button to the right to browse"
zoom: "Zoom to GPX track"
browse: "Browse for a .gpx file"
help:
title: "Help"
help: |
+3 -1
View File
@@ -324,7 +324,9 @@
"cannot_zoom": "Cannot zoom out further in current mode.",
"gpx": {
"local_layer": "Local GPX file",
"drag_drop": "Drag and drop a .gpx file on the page"
"drag_drop": "Drag and drop a .gpx file on the page, or click the button to the right to browse",
"zoom": "Zoom to GPX track",
"browse": "Browse for a .gpx file"
},
"help": {
"title": "Help",
+10 -5
View File
@@ -238,12 +238,11 @@ iD.ui.Background = function(context) {
.append('li')
.classed('layer-toggle-gpx', true);
gpxLayerItem.call(bootstrap.tooltip()
.title(t('gpx.drag_drop'))
.placement('left'));
gpxLayerItem.append('button')
.attr('class', 'layer-extent')
.call(bootstrap.tooltip()
.title(t('gpx.zoom'))
.placement('left'))
.on('click', function() {
d3.event.preventDefault();
d3.event.stopPropagation();
@@ -254,6 +253,9 @@ iD.ui.Background = function(context) {
gpxLayerItem.append('button')
.attr('class', 'layer-browse')
.call(bootstrap.tooltip()
.title(t('gpx.browse'))
.placement('left'))
.on('click', function() {
d3.select(document.createElement('input'))
.attr('type', 'file')
@@ -265,7 +267,10 @@ iD.ui.Background = function(context) {
.append('span')
.attr('class', 'icon geocode');
label = gpxLayerItem.append('label');
label = gpxLayerItem.append('label')
.call(bootstrap.tooltip()
.title(t('gpx.drag_drop'))
.placement('left'));
label.append('input')
.attr('type', 'checkbox')