From 26c513a9f3898dde2d2072a9306ffdfd5d6f504c Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Thu, 20 Dec 2012 19:05:03 -0500 Subject: [PATCH] basic styling for tag reference modal. --- css/app.css | 6 ++++++ js/id/ui/tag_reference.js | 31 +++++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/css/app.css b/css/app.css index 45a5bc4da..4a9b5a8f1 100644 --- a/css/app.css +++ b/css/app.css @@ -47,6 +47,12 @@ h4 { padding-bottom: 10px; } +h5 { + font-size: 12px; + font-weight: bold; + padding-bottom: 10px; +} + :focus { outline-color: transparent; outline-style: none; diff --git a/js/id/ui/tag_reference.js b/js/id/ui/tag_reference.js index 4c2997a14..be76b0373 100644 --- a/js/id/ui/tag_reference.js +++ b/js/id/ui/tag_reference.js @@ -3,32 +3,35 @@ iD.tagReference = function(selection) { function g(x) { return function(d) { return d[x]; }; } var selection = d3.select(this); var header = selection.append('div') - .attr('class','modal-section') - .append('h2'); - header.append('span').attr('class','icon big icon-pre-text big-inspect'); - header.append('span').text(g('title')); - - var icon_row = selection.append('div'); + .attr('class','modal-section') + .append('h2'); + header.append('span').attr('class','icon big icon-pre-text big-inspect'); + header.append('span').text(g('title')); + var icon_row = selection.append('div') + .attr('class','modal-section'); var icons = icon_row.selectAll('span.icon') .data(g('types')) .enter() .append('span') .attr('title', function(d) { return 'used with ' + d; - }) - .attr('class', function(d) { - return 'icon big icon-pre-text big-' + d; }); - selection + // .attr('class', function(d) { + // // return 'icon icon-pre-text ' + d; + // }); + icon_row + .append('h5') + .text('Description') + icon_row + .append('p') + .text(g('description')); + icon_row .append('a') .attr('href', function(d) { return 'http://wiki.openstreetmap.org/wiki/' + d.title; }) .text(function(d) { - return '→ ' + d.title + ' on wiki.osm.org'; + return d.title + ' on wiki.osm.org'; }); - selection - .append('p') - .text(g('description')); }); }; \ No newline at end of file