From c9709e9207723d3d99f4a4013263607abdafc1f2 Mon Sep 17 00:00:00 2001 From: AndrewHain Date: Sun, 16 Feb 2014 11:36:41 +0000 Subject: [PATCH] remove addr:housename from presets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The [values](http://taginfo.openstreetmap.org/keys/addr%3Ahousename#values) of this rarely needed tag, which is prominent in the address presets, now have a lot of numbers and descriptive words in many different languages. Removing the preset means that new editors won’t fill this key with information useless to the key but can still add it through All tags if needed. A similar thing happened when Potlatch put the designation tag into presets. Goes towards #1427 and #2124. --- data/presets/fields/address.json | 2 -- js/id/ui/preset/address.js | 12 +----------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/data/presets/fields/address.json b/data/presets/fields/address.json index 213ea8ea5..9951d8280 100644 --- a/data/presets/fields/address.json +++ b/data/presets/fields/address.json @@ -1,7 +1,6 @@ { "type": "address", "keys": [ - "addr:housename", "addr:housenumber", "addr:street", "addr:city", @@ -12,7 +11,6 @@ "label": "Address", "strings": { "placeholders": { - "housename": "Housename", "number": "123", "street": "Street", "city": "City", diff --git a/js/id/ui/preset/address.js b/js/id/ui/preset/address.js index ae6352f8e..688dc40cd 100644 --- a/js/id/ui/preset/address.js +++ b/js/id/ui/preset/address.js @@ -1,6 +1,5 @@ iD.ui.preset.address = function(field, context) { var event = d3.dispatch('change'), - housename, housenumber, street, city, @@ -98,12 +97,6 @@ iD.ui.preset.address = function(field, context) { var enter = wrap.enter().append('div') .attr('class', 'preset-input-wrap'); - enter.append('input') - .property('type', 'text') - .attr('placeholder', field.t('placeholders.housename')) - .attr('class', 'addr-housename') - .attr('id', 'preset-input-' + field.id); - enter.append('input') .property('type', 'text') .attr('placeholder', field.t('placeholders.number')) @@ -126,7 +119,6 @@ iD.ui.preset.address = function(field, context) { // Update - housename = wrap.select('.addr-housename'); housenumber = wrap.select('.addr-number'); street = wrap.select('.addr-street'); city = wrap.select('.addr-city'); @@ -157,7 +149,6 @@ iD.ui.preset.address = function(field, context) { function change() { event.change({ - 'addr:housename': housename.value() || undefined, 'addr:housenumber': housenumber.value() || undefined, 'addr:street': street.value() || undefined, 'addr:city': city.value() || undefined, @@ -172,7 +163,6 @@ iD.ui.preset.address = function(field, context) { }; address.tags = function(tags) { - housename.value(tags['addr:housename'] || ''); housenumber.value(tags['addr:housenumber'] || ''); street.value(tags['addr:street'] || ''); city.value(tags['addr:city'] || ''); @@ -180,7 +170,7 @@ iD.ui.preset.address = function(field, context) { }; address.focus = function() { - housename.node().focus(); + housenumber.node().focus(); }; return d3.rebind(address, event, 'on');