From fd8ffae9195e33ac4dc6f7d7366f8cceeb564ab2 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 14 Mar 2013 18:14:27 -0400 Subject: [PATCH] show buttons to add universal fields --- data/core.yaml | 1 + js/id/ui/preset.js | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 85ded3438..aa6d8e679 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -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 diff --git a/js/id/ui/preset.js b/js/id/ui/preset.js index 93f4de679..c46715bbc 100644 --- a/js/id/ui/preset.js +++ b/js/id/ui/preset.js @@ -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; };