mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 13:38:26 +02:00
Add bicycle=dismount access option (closes #2726)
This commit is contained in:
@@ -36,6 +36,11 @@ en:
|
||||
description: Access permitted only to reach a destination
|
||||
# access=destination
|
||||
title: Destination
|
||||
dismount:
|
||||
# access=dismount
|
||||
description: Access permitted but rider must dismount
|
||||
# access=dismount
|
||||
title: Dismount
|
||||
'no':
|
||||
# access=no
|
||||
description: Access not permitted to the general public
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
"destination": {
|
||||
"title": "Destination",
|
||||
"description": "Access permitted only to reach a destination"
|
||||
},
|
||||
"dismount": {
|
||||
"title": "Dismount",
|
||||
"description": "Access permitted but rider must dismount"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,11 @@
|
||||
"destination": {
|
||||
"title": "Destination",
|
||||
"description": "Access permitted only to reach a destination"
|
||||
},
|
||||
"dismount": {
|
||||
"title": "Dismount",
|
||||
"description": "Access permitted but rider must dismount"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+4
@@ -624,6 +624,10 @@
|
||||
"destination": {
|
||||
"title": "Destination",
|
||||
"description": "Access permitted only to reach a destination"
|
||||
},
|
||||
"dismount": {
|
||||
"title": "Dismount",
|
||||
"description": "Access permitted but rider must dismount"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -56,6 +56,10 @@ iD.ui.preset.access = function(field) {
|
||||
options.push('designated');
|
||||
}
|
||||
|
||||
if (type === 'bicycle') {
|
||||
options.push('dismount');
|
||||
}
|
||||
|
||||
return options.map(function(option) {
|
||||
return {
|
||||
title: field.t('options.' + option + '.description'),
|
||||
|
||||
@@ -16,10 +16,17 @@ describe('iD.ui.preset.access', function() {
|
||||
expect(selection.selectAll('.preset-access-horse')[0].length).to.equal(1);
|
||||
});
|
||||
|
||||
it('does not include a "yes" or "designated" option for general access (#934), (#2213)', function() {
|
||||
it('does not include "yes", "designated", "dismount" options for general access (#934), (#2213)', function() {
|
||||
var access = iD.ui.preset.access(field);
|
||||
expect(_.pluck(access.options('access'), 'value')).not.to.include('yes');
|
||||
expect(_.pluck(access.options('access'), 'value')).not.to.include('designated');
|
||||
expect(_.pluck(access.options('access'), 'value')).not.to.include('dismount');
|
||||
});
|
||||
|
||||
it('does include a "dismount" option for bicycles (#2726)', function() {
|
||||
var access = iD.ui.preset.access(field);
|
||||
expect(_.pluck(access.options('bicycle'), 'value')).to.include('dismount');
|
||||
expect(_.pluck(access.options('foot'), 'value')).not.to.include('dismount');
|
||||
});
|
||||
|
||||
it('sets foot placeholder to "yes" for steps and pedestrian', function() {
|
||||
|
||||
Reference in New Issue
Block a user