basic styling for tag reference modal.

This commit is contained in:
Saman Bemel-Benrud
2012-12-20 19:05:03 -05:00
parent e72c21f256
commit 26c513a9f3
2 changed files with 23 additions and 14 deletions

View File

@@ -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;

View File

@@ -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'));
});
};