diff --git a/build.js b/build.js index e05dd40e2..eae01db09 100644 --- a/build.js +++ b/build.js @@ -92,5 +92,5 @@ fs.writeFileSync('data/data.js', 'iD.data = ' + JSON.stringify({ var core = YAML.load(fs.readFileSync('data/core.yaml', 'utf8')); var presets = YAML.load(fs.readFileSync('data/presets.yaml', 'utf8')); var en = _.merge(core, presets); -var out = 'locale.en = ' + JSON.stringify(en.en, null, 4) + ';\n'; +var out = 'locale.en = ' + JSON.stringify(en.en, null, 4) + ';'; fs.writeFileSync('data/locales.js', fs.readFileSync('data/locales.js', 'utf8').replace(/locale.en =[^;]*;/, out)); diff --git a/css/app.css b/css/app.css index 56f1c1e9f..058788af9 100644 --- a/css/app.css +++ b/css/app.css @@ -649,11 +649,22 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;} position: relative; } +.inspector-wrap .message div.fl, .inspector-wrap .message button.fl { height: 100%; border-radius: 0; border-right: 1px solid #CCC; width: 12.5%; + text-align: center; + overflow: hidden; +} + +.inspector-wrap .message div.fl .icon{ + margin-top: 18px; +} +.inspector-wrap .message div.fl.line .icon{ + margin-left: -25px; + margin-top: -23px; } .inspector-wrap .message button.fr { @@ -882,8 +893,7 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;} } .inspector-body .name { - height: 110px; - border-bottom: 1px solid #ccc; + padding-bottom: 0; } .name input.major { @@ -1199,7 +1209,12 @@ div.combobox { border-radius: 0; } -.tag-row:hover input.value { +.tag-row button.tag-help { + left: -20px +} + +.tag-row:hover input.value, +.tag-row:hover input.key { border-radius: 0; } @@ -1207,6 +1222,9 @@ div.combobox { opacity: 1; } +/* Adding form fields to tag editor */ + + .inspector-inner .add-tag { height: 30px; border-top: 0; diff --git a/data/core.yaml b/data/core.yaml index 742a06c90..4f27422ed 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -139,7 +139,7 @@ en: okay: Okay view_on_osm: View on OSM name: Name - editing: Edit details + editing_feature: "Editing {feature}" additional: Additional tags choose: Select feature type results: "{n} results for {search}" diff --git a/data/locales.js b/data/locales.js index 6958b09ef..c8f52c157 100644 --- a/data/locales.js +++ b/data/locales.js @@ -175,7 +175,7 @@ locale.en = { "okay": "Okay", "view_on_osm": "View on OSM", "name": "Name", - "editing": "Edit details", + "editing_feature": "Editing {feature}", "additional": "Additional tags", "choose": "Select feature type", "results": "{n} results for {search}", diff --git a/data/presets/presets.json b/data/presets/presets.json index fed256cf0..fa7c41333 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -971,7 +971,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" @@ -1007,7 +1008,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" @@ -1043,7 +1045,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" @@ -1097,7 +1100,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" @@ -1147,7 +1151,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" diff --git a/data/presets/presets/highway/motorway.json b/data/presets/presets/highway/motorway.json index 66db9b33d..0e857cd50 100644 --- a/data/presets/presets/highway/motorway.json +++ b/data/presets/presets/highway/motorway.json @@ -5,7 +5,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" diff --git a/data/presets/presets/highway/primary.json b/data/presets/presets/highway/primary.json index 09bb751c1..4f11e28e0 100644 --- a/data/presets/presets/highway/primary.json +++ b/data/presets/presets/highway/primary.json @@ -5,7 +5,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" diff --git a/data/presets/presets/highway/secondary.json b/data/presets/presets/highway/secondary.json index 44d3de1a3..5c53066ab 100644 --- a/data/presets/presets/highway/secondary.json +++ b/data/presets/presets/highway/secondary.json @@ -5,7 +5,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" diff --git a/data/presets/presets/highway/tertiary.json b/data/presets/presets/highway/tertiary.json index 832d295d7..e4046b844 100644 --- a/data/presets/presets/highway/tertiary.json +++ b/data/presets/presets/highway/tertiary.json @@ -5,7 +5,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" diff --git a/data/presets/presets/highway/trunk.json b/data/presets/presets/highway/trunk.json index 62aa1f0f3..88237fe81 100644 --- a/data/presets/presets/highway/trunk.json +++ b/data/presets/presets/highway/trunk.json @@ -5,7 +5,8 @@ "structure", "access", "maxspeed", - "surface" + "surface", + "ref" ], "geometry": [ "line" diff --git a/img/source/line-presets.svg b/img/source/line-presets.svg index 20ddcafec..677f502e7 100644 --- a/img/source/line-presets.svg +++ b/img/source/line-presets.svg @@ -18,6 +18,18 @@ sodipodi:docname="line-presets.svg"> + + + + @@ -60,26 +72,6 @@ y1="155" x2="610" y2="126.40627" /> - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -198,6 +327,22 @@ orientation="-0.35112353,0.93632914" position="22.917454,41.594048" id="guide24387" /> + + + + @@ -216,13 +361,6 @@ inkscape:groupmode="layer" id="layer1" transform="translate(400,-12.362183)"> - + inkscape:label="#g7086" + transform="translate(-250,0)"> + width="50" + height="50" + x="175" + y="37.362183" /> + style="color:#000000;fill:#989898;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#b5b5b5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> - - - + inkscape:label="#g26365" + transform="translate(-300,0)"> + style="color:#000000;fill:none;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + id="g24211" + style="fill:#989898;fill-opacity:1"> + id="g24213" + style="fill:#989898;fill-opacity:1"> + id="path24215" + inkscape:connector-curvature="0" /> + transform="translate(3,1)" + style="fill:#989898;fill-opacity:1"> + transform="translate(0,-1)" + style="fill:#989898;fill-opacity:1"> + inkscape:label="#g7302" + transform="translate(-350,0)"> + width="50" + height="50" + x="395" + y="37.362183" /> + style="color:#000000;fill:#60d4de;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + style="color:#000000;fill:#60d4de;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + inkscape:label="#g7349" + transform="translate(-450,0)"> + width="50" + height="50" + x="615" + y="37.362183" /> + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#989898;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> - @@ -647,7 +766,7 @@ style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" sodipodi:type="arc" /> + transform="translate(-390,0)"> + style="color:#000000;fill:none;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + inkscape:label="#g26461" + transform="translate(-550,0)"> + width="50" + height="50" + x="835" + y="37.362183" /> + inkscape:label="#g26475" + transform="translate(-600,0)"> + width="50" + height="50" + x="945" + y="37.362183" /> + inkscape:label="#g7315" + transform="translate(-400,0)"> + style="color:#000000;fill:none;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + y="78.362183" /> + style="color:#000000;fill:none;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> @@ -1177,7 +1299,7 @@ id="g26598" transform="translate(0,150)"> + inkscape:label="#g5483" + transform="translate(-50,0)"> + width="50" + height="50" + x="-265" + y="37.362183" /> @@ -1281,7 +1404,7 @@ id="g26826" transform="translate(110,0)"> + inkscape:label="#g5500" + transform="translate(-100,0)"> + style="color:#000000;fill:none;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> @@ -1383,10 +1507,11 @@ id="g26763" transform="translate(220,0)"> + id="path26765" + inkscape:connector-curvature="0" /> + + inkscape:label="#g5517" + transform="translate(-150,0)"> + width="50" + height="50" + x="-45" + y="37.362183" /> @@ -1464,10 +1597,11 @@ transform="translate(330,0)" id="g26934"> + id="path26936" + inkscape:connector-curvature="0" /> + inkscape:label="#g5530" + transform="translate(-200,0)"> + style="color:#000000;fill:none;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> @@ -1533,10 +1668,11 @@ sodipodi:type="arc" /> + id="path27005" + inkscape:connector-curvature="0" /> + transform="translate(230,0)"> + style="color:#000000;fill:none;stroke:none;stroke-width:0.99999988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + style="color:#000000;fill:#444444;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> - + transform="translate(-370,0)"> + style="color:#000000;fill:#b5b5b5;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + id="highway-path" + transform="translate(-90,0)"> + width="50" + height="50" + x="615" + y="37.362183" /> @@ -1829,5 +1955,2787 @@ inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccc" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/js/id/presets.js b/js/id/presets.js index 152a080f9..0f43ddf31 100644 --- a/js/id/presets.js +++ b/js/id/presets.js @@ -5,7 +5,7 @@ iD.presets = function(context) { var other = iD.presets.Preset('other', { tags: {}, - geometry: ['point', 'vertex', 'line'] + geometry: ['point', 'vertex', 'line', 'area'] }), otherarea = iD.presets.Preset('other/area', { tags: { area: 'yes' }, diff --git a/js/id/ui/preset_grid.js b/js/id/ui/preset_grid.js index 8d1f75f8a..03d501813 100644 --- a/js/id/ui/preset_grid.js +++ b/js/id/ui/preset_grid.js @@ -233,6 +233,8 @@ iD.ui.PresetGrid = function(context, entity) { show_more .style('display', (selection.data()[0].length > limit) ? 'block' : 'none'); + selection.selectAll('.preset-inspect').remove(); + var entries = selection .selectAll('div.grid-entry-wrap') .data(function(d) { return d.slice(0, limit); }, name); diff --git a/js/id/ui/tag_editor.js b/js/id/ui/tag_editor.js index 847d99bc2..ccf903ab9 100644 --- a/js/id/ui/tag_editor.js +++ b/js/id/ui/tag_editor.js @@ -37,9 +37,14 @@ iD.ui.TagEditor = function(context, entity) { .append('span') .attr('class', 'icon back'); + messagewrap.append('div') + .attr('class', 'preset-reset fl ' + geometry) + .append('span') + .attr('class', 'icon' + (preset ? ' feature-' + (preset.icon || 'marker-stroked') : '')); + messagewrap.append('h3') .attr('class', 'inspector-inner fl') - .text(t('inspector.editing')); + .text(t('inspector.editing_feature', { feature: preset.name() })); messagewrap.append('button') .attr('class', 'preset-close fr') @@ -50,24 +55,8 @@ iD.ui.TagEditor = function(context, entity) { var editorwrap = selection.append('div') .attr('class', 'tag-wrap inspector-body fillL2 inspector-body-' + entity.geometry(context.graph())); - var headerwrap = editorwrap.append('div').attr('class','col12 head'); - - var typebutton = headerwrap.append('div') - .attr('class','grid-button-wrap col4') - .append('div') - .attr('class','col12 grid-entry'); - - typebutton.append('div') - .attr('class', 'icon' + (preset ? ' feature-' + (preset.icon || 'marker-stroked') : '')); - - typebutton.node().focus(); - - var namewrap = headerwrap.append('div') - .attr('class', 'name fillL inspector-inner col8'); - - typebutton.append('span') - .attr('class','label') - .text(preset.name()); + var namewrap = editorwrap.append('div') + .attr('class', 'name fillL inspector-inner col12'); namewrap.append('h4') .text(t('inspector.name')); diff --git a/js/id/ui/taglist.js b/js/id/ui/taglist.js index 408ecbbe3..81042d679 100644 --- a/js/id/ui/taglist.js +++ b/js/id/ui/taglist.js @@ -86,6 +86,14 @@ iD.ui.Taglist = function(context, entity) { row.each(bindTypeahead); + var removeBtn = row.append('button') + .attr('tabindex', -1) + .attr('class','remove minor') + .on('click', removeTag); + + removeBtn.append('span') + .attr('class', 'icon delete'); + function findLocal(docs) { var locale = iD.detect().locale.toLowerCase(), localized;