Improve road features form, localize options

This commit is contained in:
John Firebaugh
2013-03-12 17:38:08 -07:00
parent 2b1b9a9f0b
commit 76ab27ae4c
3 changed files with 4 additions and 6 deletions

View File

@@ -1,5 +1,4 @@
{
"title": " ",
"type": "radio",
"options": [
"bridge",

View File

@@ -1,23 +1,22 @@
iD.ui.preset.radio = function(form) {
var event = d3.dispatch('change', 'close'),
buttons,
input;
buttons;
function radio(selection) {
selection.classed('preset-radio', true);
buttons = selection.selectAll('button')
.data(form.options)
.enter()
.append('button')
.text(function(d) { return d; })
.text(function(d) { return form.t('options.' + d, {default: d}); })
.on('click', function() {
buttons.classed('active', false);
d3.select(this).classed('active', true);
change();
});
selection.append('button')
.on('click', function() {
buttons.classed('active', false);

View File

@@ -382,7 +382,7 @@ locale.en = {
}
},
"roadtype": {
"label": "Road Type",
"label": "Features",
"options": {
"bridge": "Bridge",
"tunnel": "Tunnel",