mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 15:05:32 +00:00
Replace all matches, not just the first one..
This commit is contained in:
@@ -32,7 +32,7 @@ iD.ui.preset.typeCombo = function(field) {
|
||||
function options(opts) {
|
||||
combobox.data(opts.map(function(d) {
|
||||
var o = {};
|
||||
o.title = o.value = d.replace('_', ' ');
|
||||
o.title = o.value = d.replace(/_+/g, ' ');
|
||||
return o;
|
||||
}));
|
||||
|
||||
@@ -44,7 +44,7 @@ iD.ui.preset.typeCombo = function(field) {
|
||||
}
|
||||
|
||||
function change() {
|
||||
var value = input.value().replace(' ', '_');
|
||||
var value = input.value().replace(/\s+/g, '_');
|
||||
if (field.type === 'typeCombo' && !value) value = 'yes';
|
||||
|
||||
var t = {};
|
||||
|
||||
Reference in New Issue
Block a user