From e20a9f673404b0e748b49d37a5074d5d0bb27e3e Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 15 Oct 2013 13:02:38 -0400 Subject: [PATCH] Improve GPX related tooltips --- data/core.yaml | 4 +++- dist/locales/en.json | 4 +++- js/id/ui/background.js | 15 ++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index fa2ec2bae..342a9d86d 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -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: | diff --git a/dist/locales/en.json b/dist/locales/en.json index 03f542bca..726a8ff6e 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -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", diff --git a/js/id/ui/background.js b/js/id/ui/background.js index e2db27c87..68b539bbb 100644 --- a/js/id/ui/background.js +++ b/js/id/ui/background.js @@ -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')