From 2703ce59431ded7051ecd47749d478852348c513 Mon Sep 17 00:00:00 2001 From: Aaron Lidman Date: Tue, 26 Nov 2013 11:34:19 -0800 Subject: [PATCH] Attempting to add a tooltip to commit warnings --- dist/locales/en.json | 3 ++- js/id/ui/commit.js | 4 ++++ js/id/validate.js | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dist/locales/en.json b/dist/locales/en.json index 73a2534a9..805785c9d 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -316,7 +316,8 @@ "untagged_area": "Untagged area", "many_deletions": "You're deleting {n} objects. Are you sure you want to do this? This will delete them from the map that everyone else sees on openstreetmap.org.", "tag_suggests_area": "The tag {tag} suggests line should be area, but it is not an area", - "deprecated_tags": "Deprecated tags: {tags}" + "deprecated_tags": "Deprecated tags: {tags}", + "untagged_tooltip": "Add tags to describe what type of {geometry} this is." }, "zoom": { "in": "Zoom In", diff --git a/js/id/ui/commit.js b/js/id/ui/commit.js index 80f043319..809df002e 100644 --- a/js/id/ui/commit.js +++ b/js/id/ui/commit.js @@ -173,6 +173,10 @@ iD.ui.Commit = function(context) { .transition() .style('opacity', 1); + li.call(bootstrap.tooltip() + .title('wtf') + .placement('right')); + function mouseover(d) { if (d.entity) { context.surface().selectAll( diff --git a/js/id/validate.js b/js/id/validate.js index 19bb18917..47dda09f5 100644 --- a/js/id/validate.js +++ b/js/id/validate.js @@ -28,6 +28,7 @@ iD.validate = function(changes, graph) { if ((geometry === 'point' || geometry === 'line' || geometry === 'area') && !change.isUsed(graph)) { warnings.push({ message: t('validations.untagged_' + geometry), + tooltip: t('validations.untagged_tooltip', {geometry: geometry}), entity: change }); }