mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-15 02:02:56 +00:00
Improve road features form, localize options
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"title": " ",
|
||||
"type": "radio",
|
||||
"options": [
|
||||
"bridge",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -382,7 +382,7 @@ locale.en = {
|
||||
}
|
||||
},
|
||||
"roadtype": {
|
||||
"label": "Road Type",
|
||||
"label": "Features",
|
||||
"options": {
|
||||
"bridge": "Bridge",
|
||||
"tunnel": "Tunnel",
|
||||
|
||||
Reference in New Issue
Block a user