show buttons to add universal fields

This commit is contained in:
Ansis Brammanis
2013-03-14 18:14:27 -04:00
parent bbe5a7aa25
commit fd8ffae919
2 changed files with 3 additions and 8 deletions

View File

@@ -144,6 +144,7 @@ en:
results: "{n} results for {search}"
reference: View on OpenStreetMap Wiki →
back_tooltip: Change feature type
show_additional: Show additional forms
background:
title: Background
description: Background settings

View File

@@ -45,13 +45,13 @@ iD.ui.preset = function(context) {
wraplabel.append('span')
.attr('class', 'deemphasize')
.text('Add additional forms');
.text(t('inspector.show_additional'));
formbuttonwrap = wrap.append('div')
.attr('class', 'col9 preset-input');
formbuttonwrap.selectAll('button')
.data(preset.additional)
.data(context.presets().universal())
.enter()
.append('button')
.attr('class', 'preset-add-field')
@@ -115,12 +115,6 @@ iD.ui.preset = function(context) {
}
});
context.presets().universal().forEach(function(p) {
if (haveKey(p.key) || _.any(p.keys, haveKey)) {
draw(formwrap, [p]);
}
});
event.setTags(tags);
return presets;
};