mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 09:42:56 +00:00
Use "none" as cycleway field placeholder
Ensure "no" is not saved to OSM
This commit is contained in:
@@ -259,8 +259,8 @@ en:
|
||||
lane:
|
||||
description: A bike lane separated from auto traffic by a painted line
|
||||
title: Standard bike lane
|
||||
# no=yes
|
||||
'no':
|
||||
# none=yes
|
||||
none:
|
||||
description: No bike lane
|
||||
title: None
|
||||
# opposite=yes
|
||||
@@ -284,7 +284,7 @@ en:
|
||||
description: A bike lane separated from traffic by a physical barrier
|
||||
title: Bike track
|
||||
# cycleway field placeholder
|
||||
placeholder: 'lane, shared lane'
|
||||
placeholder: none
|
||||
types:
|
||||
cycleway: Both sides
|
||||
'cycleway:left': Left side
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
},
|
||||
"type": "cycleway",
|
||||
"label": "Bike Lanes",
|
||||
"placeholder": "lane, shared lane",
|
||||
"placeholder": "none",
|
||||
"strings": {
|
||||
"types": {
|
||||
"cycleway": "Both sides",
|
||||
@@ -340,7 +340,7 @@
|
||||
"cycleway:right": "Right side"
|
||||
},
|
||||
"options": {
|
||||
"no": {
|
||||
"none": {
|
||||
"title": "None",
|
||||
"description": "No bike lane"
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"reference": {"key": "cycleway"},
|
||||
"type": "cycleway",
|
||||
"label": "Bike Lanes",
|
||||
"placeholder": "lane, shared lane",
|
||||
"placeholder": "none",
|
||||
"strings": {
|
||||
"types": {
|
||||
"cycleway": "Both sides",
|
||||
@@ -11,7 +11,7 @@
|
||||
"cycleway:right": "Right side"
|
||||
},
|
||||
"options": {
|
||||
"no": {
|
||||
"none": {
|
||||
"title": "None",
|
||||
"description": "No bike lane"
|
||||
},
|
||||
|
||||
4
dist/locales/en.json
vendored
4
dist/locales/en.json
vendored
@@ -788,14 +788,14 @@
|
||||
},
|
||||
"cycleway": {
|
||||
"label": "Bike Lanes",
|
||||
"placeholder": "lane, shared lane",
|
||||
"placeholder": "none",
|
||||
"types": {
|
||||
"cycleway": "Both sides",
|
||||
"cycleway:left": "Left side",
|
||||
"cycleway:right": "Right side"
|
||||
},
|
||||
"options": {
|
||||
"no": {
|
||||
"none": {
|
||||
"title": "None",
|
||||
"description": "No bike lane"
|
||||
},
|
||||
|
||||
@@ -45,11 +45,14 @@ iD.ui.preset.cycleway = function(field) {
|
||||
function change(d) {
|
||||
var tag = {};
|
||||
tag[d] = d3.select(this).value() || undefined;
|
||||
if (tag[d] === 'none') {
|
||||
tag[d] = undefined;
|
||||
}
|
||||
event.change(tag);
|
||||
}
|
||||
|
||||
cycleway.options = function() {
|
||||
var options = ['no', 'lane', 'shared_lane', 'track', 'share_busway', 'opposite_lane', 'opposite'];
|
||||
var options = ['none', 'lane', 'shared_lane', 'track', 'share_busway', 'opposite_lane', 'opposite'];
|
||||
|
||||
return options.map(function(option) {
|
||||
return {
|
||||
@@ -65,16 +68,6 @@ iD.ui.preset.cycleway = function(field) {
|
||||
.attr('placeholder', function() {
|
||||
return tags.cycleway ? tags.cycleway : field.placeholder();
|
||||
});
|
||||
|
||||
items.selectAll('#preset-input-cycleway-cycleway')
|
||||
.attr('placeholder', 'no');
|
||||
|
||||
// Remove "no" values
|
||||
_.forEach(tags, function (value, key) {
|
||||
if (key.indexOf('cycleway') === 0 && value === 'no') {
|
||||
delete tags[key];
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
cycleway.focus = function() {
|
||||
|
||||
Reference in New Issue
Block a user