From 638456f81889af3623770eeadaed1c6c9d61c5a4 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 21 Mar 2013 15:21:27 -0400 Subject: [PATCH 1/9] fix opera path halos fixes #1101 --- css/map.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/map.css b/css/map.css index fa5bba2ac..02989ea77 100644 --- a/css/map.css +++ b/css/map.css @@ -793,7 +793,7 @@ text.pointlabel { } /* Opera doesn't support dominant-baseline. See #715 */ -.opera .linelabel-halo, +.opera .linelabel-halo .textpath, .opera .linelabel .textpath { baseline-shift: -33%; dominant-baseline: auto; From 86afa0856d192865b54a2a4d01f80f36e7dbb00d Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 21 Mar 2013 13:09:49 -0700 Subject: [PATCH 2/9] Really fix bridleway preset --- data/presets/presets/highway/bridleway.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data/presets/presets/highway/bridleway.json b/data/presets/presets/highway/bridleway.json index 302fb0c35..cf14cce65 100644 --- a/data/presets/presets/highway/bridleway.json +++ b/data/presets/presets/highway/bridleway.json @@ -9,11 +9,14 @@ "line" ], "tags": { - "highway": "steps" + "highway": "bridleway" }, "terms": [ - "stairs", - "staircase" + "bridleway", + "equestrian trail", + "horse riding path", + "bridle road", + "horse trail" ], - "name": "Steps" + "name": "Bridle Path" } From c04a5350a167a61754cd0ddc7c592621b5d34937 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 21 Mar 2013 13:10:33 -0700 Subject: [PATCH 3/9] Use bike icon for bike shop --- data/locales.js | 27 ++++++++++++++++++++++++-- data/presets.yaml | 21 ++++++++++++++++++-- data/presets/presets.json | 13 ++++++++----- data/presets/presets/shop/bicycle.json | 2 +- 4 files changed, 53 insertions(+), 10 deletions(-) diff --git a/data/locales.js b/data/locales.js index 765fd3ae9..d27ebccc0 100644 --- a/data/locales.js +++ b/data/locales.js @@ -360,6 +360,9 @@ locale.en = { "oneway": { "label": "One Way" }, + "oneway_yes": { + "label": "One Way" + }, "opening_hours": { "label": "Hours" }, @@ -683,8 +686,8 @@ locale.en = { "terms": "" }, "highway/bridleway": { - "name": "Steps", - "terms": "stairs,staircase" + "name": "Bridle Path", + "terms": "bridleway,equestrian trail,horse riding path,bridle road,horse trail" }, "highway/bus_stop": { "name": "Bus Stop", @@ -706,6 +709,10 @@ locale.en = { "name": "Motorway", "terms": "" }, + "highway/motorway_link": { + "name": "Motorway Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/path": { "name": "Path", "terms": "" @@ -714,6 +721,10 @@ locale.en = { "name": "Primary Road", "terms": "" }, + "highway/primary_link": { + "name": "Primary Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/residential": { "name": "Residential Road", "terms": "" @@ -722,6 +733,10 @@ locale.en = { "name": "Secondary Road", "terms": "" }, + "highway/secondary_link": { + "name": "Secondary Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/service": { "name": "Service Road", "terms": "" @@ -734,6 +749,10 @@ locale.en = { "name": "Tertiary Road", "terms": "" }, + "highway/tertiary_link": { + "name": "Tertiary Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/track": { "name": "Track", "terms": "" @@ -746,6 +765,10 @@ locale.en = { "name": "Trunk Road", "terms": "" }, + "highway/trunk_link": { + "name": "Trunk Link", + "terms": "ramp,on ramp,off ramp" + }, "highway/turning_circle": { "name": "Turning Circle", "terms": "" diff --git a/data/presets.yaml b/data/presets.yaml index 5ceacc1d4..c7e9f78f9 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -86,6 +86,8 @@ en: label: Type oneway: label: One Way + oneway_yes: + label: One Way opening_hours: label: Hours operator: @@ -324,8 +326,8 @@ en: name: Highway terms: "" highway/bridleway: - name: Bridleway - terms: "bridle path,bridleway,equestrian trail,horse riding path,bridle road,horse trail" + name: Bridle Path + terms: "bridleway,equestrian trail,horse riding path,bridle road,horse trail" highway/bus_stop: name: Bus Stop terms: "" @@ -341,18 +343,27 @@ en: highway/motorway: name: Motorway terms: "" + highway/motorway_link: + name: Motorway Link + terms: "ramp,on ramp,off ramp" highway/path: name: Path terms: "" highway/primary: name: Primary Road terms: "" + highway/primary_link: + name: Primary Link + terms: "ramp,on ramp,off ramp" highway/residential: name: Residential Road terms: "" highway/secondary: name: Secondary Road terms: "" + highway/secondary_link: + name: Secondary Link + terms: "ramp,on ramp,off ramp" highway/service: name: Service Road terms: "" @@ -362,6 +373,9 @@ en: highway/tertiary: name: Tertiary Road terms: "" + highway/tertiary_link: + name: Tertiary Link + terms: "ramp,on ramp,off ramp" highway/track: name: Track terms: "" @@ -371,6 +385,9 @@ en: highway/trunk: name: Trunk Road terms: "" + highway/trunk_link: + name: Trunk Link + terms: "ramp,on ramp,off ramp" highway/turning_circle: name: Turning Circle terms: "" diff --git a/data/presets/presets.json b/data/presets/presets.json index bf9e6177c..c1e6f5246 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1069,13 +1069,16 @@ "line" ], "tags": { - "highway": "steps" + "highway": "bridleway" }, "terms": [ - "stairs", - "staircase" + "bridleway", + "equestrian trail", + "horse riding path", + "bridle road", + "horse trail" ], - "name": "Steps" + "name": "Bridle Path" }, "highway/bus_stop": { "icon": "bus", @@ -2712,7 +2715,7 @@ "name": "Beverage Store" }, "shop/bicycle": { - "icon": "shop", + "icon": "bicycle", "fields": [ "address", "opening_hours" diff --git a/data/presets/presets/shop/bicycle.json b/data/presets/presets/shop/bicycle.json index 941432d10..12bad05b7 100644 --- a/data/presets/presets/shop/bicycle.json +++ b/data/presets/presets/shop/bicycle.json @@ -1,5 +1,5 @@ { - "icon": "shop", + "icon": "bicycle", "fields": [ "address", "opening_hours" From 22f43b810bc28edfdf2fa24649187dbce916ce2e Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 21 Mar 2013 16:16:07 -0400 Subject: [PATCH 4/9] fix number input --- js/id/ui/preset/input.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/id/ui/preset/input.js b/js/id/ui/preset/input.js index fbdc0a147..4ac69f450 100644 --- a/js/id/ui/preset/input.js +++ b/js/id/ui/preset/input.js @@ -19,6 +19,7 @@ iD.ui.preset.url = function(field) { var num = elem.value ? parseInt(elem.value, 10) : 0; if (!isNaN(num)) elem.value = num + x; + change(); } if (field.type == 'number') { From 88ae05f5b4b49d70509a6ed14c31c2829c3f6f9f Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 21 Mar 2013 16:19:37 -0400 Subject: [PATCH 5/9] add 'modified' class to fields with changed values --- data/presets/fields.json | 2 +- data/presets/fields/structure.json | 2 +- js/id/ui/preset.js | 8 ++++++++ js/id/ui/preset/radio.js | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/data/presets/fields.json b/data/presets/fields.json index 6bd523bfd..42489382c 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -327,7 +327,7 @@ }, "structure": { "type": "radio", - "options": [ + "keys": [ "bridge", "tunnel", "embankment", diff --git a/data/presets/fields/structure.json b/data/presets/fields/structure.json index 8ea1b28ea..7c65c5390 100644 --- a/data/presets/fields/structure.json +++ b/data/presets/fields/structure.json @@ -1,6 +1,6 @@ { "type": "radio", - "options": [ + "keys": [ "bridge", "tunnel", "embankment", diff --git a/js/id/ui/preset.js b/js/id/ui/preset.js index c0105206b..99ccc564a 100644 --- a/js/id/ui/preset.js +++ b/js/id/ui/preset.js @@ -114,6 +114,14 @@ iD.ui.preset = function(context) { } }); + formwrap.selectAll('div.preset-field') + .classed('modified', function(d) { + var original = context.graph().base().entities[entity.id]; + return _.any(d.keys || [d.key], function(key) { + return original ? tags[key] !== original.tags[key] : tags[key]; + }); + }); + event.setTags(tags); return presets; }; diff --git a/js/id/ui/preset/radio.js b/js/id/ui/preset/radio.js index 9e8eb97ac..24036a375 100644 --- a/js/id/ui/preset/radio.js +++ b/js/id/ui/preset/radio.js @@ -9,7 +9,7 @@ iD.ui.preset.radio = function(field) { var buttonwrap = selection.append('div').attr('class','radio-wrap'); buttons = buttonwrap.selectAll('button') - .data(field.options) + .data(field.keys || field.options) .enter() .append('button') .text(function(d) { return field.t('options.' + d, { 'default': d }); }) From 871961d0779c53d92d5abe266f321830ab36a3ff Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Thu, 21 Mar 2013 16:51:16 -0400 Subject: [PATCH 6/9] remove position:relative from view on osm div this was blocking all preset input fields --- css/app.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/app.css b/css/app.css index 57e7f2217..d1348a0f7 100644 --- a/css/app.css +++ b/css/app.css @@ -975,6 +975,10 @@ button.preset-add-field { padding: 0 10px; } +.view-on-osm { + padding: 20px; +} + /* preset form numbers */ input[type=number] { From d0081dcc72cfb4fa8e5cd0f946ac625b28f4ba44 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 21 Mar 2013 13:40:49 -0700 Subject: [PATCH 7/9] Preset names use title case --- data/presets/presets/railway/abandoned.json | 2 +- data/presets/presets/railway/disused.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/presets/presets/railway/abandoned.json b/data/presets/presets/railway/abandoned.json index 7f5fca123..898a96195 100644 --- a/data/presets/presets/railway/abandoned.json +++ b/data/presets/presets/railway/abandoned.json @@ -10,5 +10,5 @@ "structure" ], "terms": [], - "name": "Abandoned railway" + "name": "Abandoned Railway" } diff --git a/data/presets/presets/railway/disused.json b/data/presets/presets/railway/disused.json index 70577f2d1..748bba069 100644 --- a/data/presets/presets/railway/disused.json +++ b/data/presets/presets/railway/disused.json @@ -10,5 +10,5 @@ "structure" ], "terms": [], - "name": "Disused railway" + "name": "Disused Railway" } From 36da7fee4ed84dc7b06ce48d1ccd20ea7058715b Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 21 Mar 2013 13:42:08 -0700 Subject: [PATCH 8/9] Improve line defaults and categories --- data/locales.js | 8 +++- data/presets.yaml | 7 +++- data/presets/categories.json | 42 ++++++++++++++++++- data/presets/defaults.json | 9 ++-- data/presets/presets.json | 26 ++++++++++-- data/presets/presets/highway/path.json | 2 +- data/presets/presets/highway/road.json | 18 ++++++++ .../presets/presets/highway/unclassified.json | 2 +- 8 files changed, 97 insertions(+), 17 deletions(-) create mode 100644 data/presets/presets/highway/road.json diff --git a/data/locales.js b/data/locales.js index d27ebccc0..9e159756e 100644 --- a/data/locales.js +++ b/data/locales.js @@ -729,6 +729,10 @@ locale.en = { "name": "Residential Road", "terms": "" }, + "highway/road": { + "name": "Unknown Road", + "terms": "" + }, "highway/secondary": { "name": "Secondary Road", "terms": "" @@ -1086,11 +1090,11 @@ locale.en = { "terms": "" }, "railway/abandoned": { - "name": "Abandoned railway", + "name": "Abandoned Railway", "terms": "" }, "railway/disused": { - "name": "Disused railway", + "name": "Disused Railway", "terms": "" }, "railway/level_crossing": { diff --git a/data/presets.yaml b/data/presets.yaml index c7e9f78f9..8c4a42d36 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -358,6 +358,9 @@ en: highway/residential: name: Residential Road terms: "" + highway/road: + name: Unknown Road + terms: "" highway/secondary: name: Secondary Road terms: "" @@ -626,10 +629,10 @@ en: name: Railway terms: "" railway/abandoned: - name: Abandoned railway + name: Abandoned Railway terms: "" railway/disused: - name: Disused railway + name: Disused Railway terms: "" railway/level_crossing: name: Level Crossing diff --git a/data/presets/categories.json b/data/presets/categories.json index a47833d08..069f96bbf 100644 --- a/data/presets/categories.json +++ b/data/presets/categories.json @@ -1,6 +1,5 @@ [{ "geometry": "line", - "icon": "highway", "id": "Road", "icon": "category-roads", "members": [ @@ -11,7 +10,46 @@ "highway/secondary", "highway/tertiary", "highway/unclassified", + "highway/motorway_link", + "highway/trunk_link", + "highway/primary_link", + "highway/secondary_link", + "highway/tertiary_link", "highway/service", - "highway/track" + "highway/track", + "highway/road" + ] +}, { + "geometry": "line", + "id": "Rail", + "icon": "railway-rail", + "members": [ + "railway/rail", + "railway/subway", + "railway/tram", + "railway/monorail", + "railway/disused", + "railway/abandoned" + ] +}, { + "geometry": "line", + "id": "Path", + "icon": "highway-path", + "members": [ + "highway/footway", + "highway/cycleway", + "highway/bridleway", + "highway/path", + "highway/steps" + ] +}, { + "geometry": "line", + "id": "Water", + "icon": "waterway-river", + "members": [ + "waterway/river", + "waterway/stream", + "waterway/canal", + "waterway/ditch" ] }] diff --git a/data/presets/defaults.json b/data/presets/defaults.json index e43aa7a6e..72bc337e4 100644 --- a/data/presets/defaults.json +++ b/data/presets/defaults.json @@ -15,11 +15,10 @@ ], "line": [ "Road", - "highway/footway", - "highway/cycleway", - "railway/rail", - "waterway/river", - "waterway/stream", + "Rail", + "Path", + "Water", + "power/line", "other" ], "point": [ diff --git a/data/presets/presets.json b/data/presets/presets.json index c1e6f5246..0bd1d3777 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -1213,7 +1213,7 @@ "name": "Motorway Link" }, "highway/path": { - "icon": "highway-footway", + "icon": "highway-path", "fields": [ "oneway", "structure", @@ -1290,6 +1290,24 @@ "terms": [], "name": "Residential Road" }, + "highway/road": { + "icon": "highway-road", + "fields": [ + "oneway", + "structure", + "access", + "maxspeed", + "surface" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "road" + }, + "terms": [], + "name": "Unknown Road" + }, "highway/secondary": { "icon": "highway-secondary", "fields": [ @@ -1497,7 +1515,7 @@ "name": "Turning Circle" }, "highway/unclassified": { - "icon": "highway", + "icon": "highway-unclassified", "fields": [ "oneway", "structure", @@ -2529,7 +2547,7 @@ "structure" ], "terms": [], - "name": "Abandoned railway" + "name": "Abandoned Railway" }, "railway/disused": { "icon": "railway-disused", @@ -2543,7 +2561,7 @@ "structure" ], "terms": [], - "name": "Disused railway" + "name": "Disused Railway" }, "railway/level_crossing": { "icon": "cross", diff --git a/data/presets/presets/highway/path.json b/data/presets/presets/highway/path.json index 7b877201d..b85f98373 100644 --- a/data/presets/presets/highway/path.json +++ b/data/presets/presets/highway/path.json @@ -1,5 +1,5 @@ { - "icon": "highway-footway", + "icon": "highway-path", "fields": [ "oneway", "structure", diff --git a/data/presets/presets/highway/road.json b/data/presets/presets/highway/road.json new file mode 100644 index 000000000..bb74b6d0f --- /dev/null +++ b/data/presets/presets/highway/road.json @@ -0,0 +1,18 @@ +{ + "icon": "highway-road", + "fields": [ + "oneway", + "structure", + "access", + "maxspeed", + "surface" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "road" + }, + "terms": [], + "name": "Unknown Road" +} \ No newline at end of file diff --git a/data/presets/presets/highway/unclassified.json b/data/presets/presets/highway/unclassified.json index f6491fcd2..b8dc36200 100644 --- a/data/presets/presets/highway/unclassified.json +++ b/data/presets/presets/highway/unclassified.json @@ -1,5 +1,5 @@ { - "icon": "highway", + "icon": "highway-unclassified", "fields": [ "oneway", "structure", From 992df47cac802debe57715e7a709cd8fac4f5684 Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Thu, 21 Mar 2013 17:02:22 -0400 Subject: [PATCH 9/9] big commit modal cleanup. --- css/app.css | 183 ++++++++++++++-------------------------- data/core.yaml | 1 + data/locales.js | 1 + js/id/ui/commit.js | 44 +++++----- js/id/ui/confirm.js | 10 +-- js/id/ui/modal.js | 8 +- js/id/ui/preset_grid.js | 6 +- js/id/ui/restore.js | 2 +- js/id/ui/success.js | 23 +++-- js/id/ui/tag_editor.js | 2 +- 10 files changed, 105 insertions(+), 175 deletions(-) diff --git a/css/app.css b/css/app.css index d1348a0f7..8a625152c 100644 --- a/css/app.css +++ b/css/app.css @@ -70,12 +70,12 @@ h2:last-child, h4:last-child { margin-bottom: 0;} h3 { - font-size: 18px; + font-size: 16px; line-height: 1.3333; font-weight: bold; margin-bottom: 10px; text-overflow: ellipsis; - white-space: nowrap + white-space: nowrap; } h4 { @@ -134,6 +134,7 @@ a:hover { textarea { resize: vertical; + font:normal 12px/20px 'Helvetica Neue', Arial, sans-serif; } textarea, @@ -285,9 +286,6 @@ form.hide { } .pad1 {padding: 10px;} -.pad2 {padding: 20px;} -.margin1 {margin: 10px;} -.margin2 {margin: 20px;} .loading { background: url(../img/loader_bg.gif); @@ -443,12 +441,6 @@ button.save.has-count .count::before { border-right: 6px solid rgba(255,255,255,.5); } -button.close { - position: absolute; - top: 10px; - right: 10px; -} - button[disabled] { cursor:auto; background: rgba(255,255,255,.5); @@ -580,6 +572,37 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;} border-radius: 0; } + +/* Header for modals / panes +------------------------------------------------------- */ + +.header { + border-bottom: 1px solid #ccc; + z-index: 2; + position: relative; +} + +.header h3 { + margin-bottom: 0; +} + +.modal > button, +.header button { + height: 100%; + border-radius: 0; + border-left: 1px solid #CCC; + width: 40px; + text-align: center; + overflow: hidden; + position: absolute; + right: 0; +} + +.modal > button { + height: 61px; + z-index: 3; +} + /* Inspector ------------------------------------------------------- */ @@ -616,24 +639,13 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;} position: relative; } -.inspector-wrap .message { - height: 60px; - border-bottom: 1px solid #ccc; - z-index: 100; - position: relative; -} - -.inspector-wrap .message button { - height: 100%; - border-radius: 0; +.inspector-wrap .header button.preset-reset { border-right: 1px solid #CCC; - width: 60px; - text-align: center; - overflow: hidden; position: relative; + width: 60px; } -.inspector-wrap .message button > div { +.inspector-wrap .header button.preset-reset > div { height: 100%; padding: 20px 0; -webkit-transition: opacity 200ms; @@ -641,38 +653,26 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;} transition: opacity 200ms; } -.inspector-wrap .message button .col12:last-child { +.inspector-wrap .header button.preset-reset .col12:last-child { position: absolute; width: 100%; padding: 20px 0; opacity: 0; } -.inspector-wrap .message button:hover .col12:first-child { +.inspector-wrap .header button:hover .col12:first-child { opacity: 0; } -.inspector-wrap .message button:hover .col12:last-child { +.inspector-wrap .header button:hover .col12:last-child { opacity: 1; } -.inspector-wrap .message button.line > div { +.inspector-wrap .header button.line > div { padding: 0; } -.inspector-wrap .message button.fr { - border-left: 1px solid #CCC; - width: 40px; -} - -.inspector-wrap .message h3 { - display: block; - font-size: 16px; - line-height: 20px; - overflow: hidden; -} - -.pane:last-child .message h3 { +.pane:last-child .header h3 { position: absolute; left: 60px; right: 40px; @@ -1639,11 +1639,9 @@ div.typeahead a:first-child { .modal { display: inline-block; position:absolute; - width: 50%; left: 0; right: 0; margin: auto; - max-width: 600px; top: 80px; z-index: 3; } @@ -1652,27 +1650,10 @@ div.typeahead a:first-child { margin-bottom: 10px; } -.modal .content { - margin-bottom: 40px; -} - .modal .description { text-align: center; } -.modal button.close-modal { - float:right; - position: absolute; - right:5px; - top:5px; - opacity: .5; -} - -.modal button.close-modal:hover { - background-color: transparent; - opacity: 1; -} - .shaded { z-index: 2; position: absolute; @@ -1680,6 +1661,7 @@ div.typeahead a:first-child { width: 100%; overflow: auto; } + .shaded:before { content:''; background:rgba(0,0,0,0.5); @@ -1689,29 +1671,7 @@ div.typeahead a:first-child { .modal-section { padding: 20px; -} - -.modal-section:first-child { - border-radius: 4px 4px 0 0; -} - -.modal-section:last-child { - border-radius: 0 0 4px 4px; -} - -.modal-section:only-of-type { - border-radius: 4px; -} - -.modal-section .buttons { - padding-top: 10px; - width: 100%; -} - -.modal-section img.wiki-image { - max-width: 100%; - max-height: 300px; - display: block; + border-bottom: 1px solid #CCC; } .modal-flash .content { @@ -1752,6 +1712,7 @@ div.typeahead a:first-child { .commit-modal .commit-info { margin-top: 10px; + padding-bottom: 20px; } .commit-modal .user-info img { @@ -1775,66 +1736,46 @@ div.typeahead a:first-child { .commit-modal .changeset-list { overflow: auto; border:1px solid #ccc; + border-radius: 4px; background:#fff; max-height: 160px; } +.commit-modal .warning-section .changeset-list { + border-radius: 4px 0 0 4px; +} + .commit-modal .warning-section .changeset-list button { float: right; + position: absolute; + right: 0; + top: 0; + bottom: 0; + border-radius: 0; + height: 100%; + width: 30px; } -.commit-section.modal-section { - padding-bottom: 0; -} - -.commit-section.modal-section:last-child { padding-bottom: 20px;} - .commit-modal .changeset-list li { position: relative; border-top:1px solid #ccc; padding:5px 10px; } -.modal-section { - padding: 20px; -} - -.modal-section img.wiki-image { - max-width: 100%; - max-height: 300px; - display: block; -} - -.modal-flash .content { - box-shadow: none; - border-radius: 4px; - background: #111; - color: #eee; -} - -.modal-flash .close-modal { - display:none; -} - .changeset-list li span.count { font-size:10px; color:#555; } .changeset-list li span.count:before { content: '('; } + .changeset-list li span.count:after { content: ')'; } .changeset-list li:first-child { border-top: 0;} -.commit-modal .changeset-comment { - height: 60px; - width:100%; - /* firefox uses monospace in textareas */ - font:normal 12px/20px 'Helvetica Neue', Arial, sans-serif; -} - /* Success ------------------------------------------------------- */ + a.success-action { display:inline-block; padding:10px; @@ -2098,10 +2039,10 @@ a.success-action { ------------------------------------------------------- */ @media only screen and (max-width: 840px) { - span.label {display: none;} + #bar span.label {display: none;} + #bar .icon.icon-pre-text { margin-right: 0px;} /* override hide for save button */ - .icon.icon-pre-text { margin-right: 0px;} - .save .label, .apply .label, .cancel .label { display: block;} + #bar .save .label { display: block;} } @media only screen and (max-height: 840px) { diff --git a/data/core.yaml b/data/core.yaml index ff65d5278..efe40d55f 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -114,6 +114,7 @@ en: commit: title: Save Changes description_placeholder: Brief description of your contributions + message_label: Commit message upload_explanation: "The changes you upload as {user} will be visible on all maps that use OpenStreetMap data." save: Save cancel: Cancel diff --git a/data/locales.js b/data/locales.js index 9e159756e..159850ab2 100644 --- a/data/locales.js +++ b/data/locales.js @@ -146,6 +146,7 @@ locale.en = { "commit": { "title": "Save Changes", "description_placeholder": "Brief description of your contributions", + "message_label": "Commit message", "upload_explanation": "The changes you upload as {user} will be visible on all maps that use OpenStreetMap data.", "save": "Save", "cancel": "Cancel", diff --git a/js/id/ui/commit.js b/js/id/ui/commit.js index efdc1c190..770bb67f3 100644 --- a/js/id/ui/commit.js +++ b/js/id/ui/commit.js @@ -28,22 +28,30 @@ iD.ui.Commit = function(context) { var changes = selection.datum(), connection = changes.connection, user = connection.user(), - header = selection.append('div').attr('class', 'header modal-section fillL'), + header = selection.append('div').attr('class', 'header modal-section'), body = selection.append('div').attr('class', 'body'); - header.append('h2') + header.append('h3') .text(t('commit.title')); + // Comment Section var commentSection = body.append('div') - .attr('class', 'modal-section fillD'); + .attr('class', 'modal-section preset-field'); - var commentField = commentSection.append('textarea') - .attr('class', 'changeset-comment') - .attr('placeholder', t('commit.description_placeholder')) - .property('value', context.storage('comment') || ''); + commentSection.append('h4') + .attr('for','input-commit-note') + .text(t('commit.message_label')); + + var commentField = commentSection + .append('textarea') + .attr('placeholder', t('commit.description_placeholder')) + .property('value', context.storage('comment') || ''); commentField.node().select(); + // Save Section + var saveSection = body.append('div').attr('class','modal-section cf'); + var userLink = d3.select(document.createElement('div')); if (user.image_url) { @@ -58,18 +66,14 @@ iD.ui.Commit = function(context) { .attr('href', connection.url() + '/user/' + user.display_name) .attr('target', '_blank'); - commentSection.append('p') + saveSection.append('p') .attr('class', 'commit-info') .html(t('commit.upload_explanation', {user: userLink.html()})); // Confirm / Cancel Buttons - var buttonWrap = commentSection.append('div') - .attr('class', 'buttons cf') - .append('div') - .attr('class', 'button-wrap joined col4'); - var saveButton = buttonWrap.append('button') - .attr('class', 'save action col6 button') + var saveButton = saveSection.append('button') + .attr('class', 'action col3 button') .on('click.save', function() { var comment = commentField.node().value; localStorage.comment = comment; @@ -82,21 +86,11 @@ iD.ui.Commit = function(context) { .attr('class', 'label') .text(t('commit.save')); - var cancelButton = buttonWrap.append('button') - .attr('class', 'cancel col6 button') - .on('click.cancel', function() { - event.cancel(); - }); - - cancelButton.append('span') - .attr('class', 'label') - .text(t('commit.cancel')); - var warnings = body.selectAll('div.warning-section') .data(iD.validate(changes, context.graph())) .enter() .append('div') - .attr('class', 'modal-section warning-section fillL'); + .attr('class', 'modal-section warning-section fillL2'); warnings.append('h3') .text(t('commit.warnings')); diff --git a/js/id/ui/confirm.js b/js/id/ui/confirm.js index 6851e739f..5ff8f72f8 100644 --- a/js/id/ui/confirm.js +++ b/js/id/ui/confirm.js @@ -5,7 +5,7 @@ iD.ui.confirm = function(selection) { .classed('modal-alert', true); var section = modal.select('.content') - .attr('class', 'modal-section fillD'); + .attr('class', 'modal-section'); var description = section.append('div') .attr('class', 'description'); @@ -17,13 +17,7 @@ iD.ui.confirm = function(selection) { .attr('class', 'col2 action centered') .on('click.confirm', function() { modal.remove(); - }); - - okbutton.append('span') - .attr('class', 'icon apply icon-pre-text'); - - okbutton.append('span') - .attr('class', 'label') + }) .text('Okay'); return modal; diff --git a/js/id/ui/modal.js b/js/id/ui/modal.js index 539c89de8..5da396a2b 100644 --- a/js/id/ui/modal.js +++ b/js/id/ui/modal.js @@ -21,13 +21,15 @@ iD.ui.modal = function(selection, blocking) { }); var modal = shaded.append('div') - .attr('class', 'modal'); + .attr('class', 'modal fillL col6'); modal.append('button') - .attr('class', 'icon remove') + .attr('class', 'close') .on('click', function() { if (!blocking) shaded.remove(); - }); + }) + .append('div') + .attr('class','icon close'); modal.append('div') .attr('class', 'content'); diff --git a/js/id/ui/preset_grid.js b/js/id/ui/preset_grid.js index 1ed641149..004de7510 100644 --- a/js/id/ui/preset_grid.js +++ b/js/id/ui/preset_grid.js @@ -12,7 +12,7 @@ iD.ui.PresetGrid = function(context, entity) { presets = context.presets().matchGeometry(entity, context.graph()); var messagewrap = selection.append('div') - .attr('class', 'message fillL'); + .attr('class', 'header fillL cf'); var message = messagewrap.append('h3') .attr('class', 'inspector-inner fl') @@ -20,13 +20,13 @@ iD.ui.PresetGrid = function(context, entity) { if (preset) { messagewrap.append('button') - .attr('class', 'tooltip-bottom preset-choose fr') + .attr('class', 'preset-choose') .on('click', event.choose) .append('span') .attr('class', 'icon forward'); } else { messagewrap.append('button') - .attr('class', 'tooltip-bottom preset-close fr') + .attr('class', 'close') .on('click', event.close) .append('span') .attr('class', 'icon close'); diff --git a/js/id/ui/restore.js b/js/id/ui/restore.js index 0c3d0a617..e5d272004 100644 --- a/js/id/ui/restore.js +++ b/js/id/ui/restore.js @@ -16,7 +16,7 @@ iD.ui.Restore = function(context) { .text(t('restore.description')); var buttonWrap = introModal.append('div') - .attr('class', 'modal-section fillD cf col12'); + .attr('class', 'modal-section cf col12'); var buttons = buttonWrap .append('div') diff --git a/js/id/ui/success.js b/js/id/ui/success.js index 4d4799ffd..fd3f14c0b 100644 --- a/js/id/ui/success.js +++ b/js/id/ui/success.js @@ -3,12 +3,10 @@ iD.ui.Success = function(connection) { function success(selection) { var changeset = selection.datum(), - header = selection.append('div').attr('class', 'header fillL modal-section'), + header = selection.append('div').attr('class', 'header modal-section'), body = selection.append('div').attr('class', 'body'); - var section = body.append('div').attr('class','modal-section fillD'); - - header.append('h2').text(t('just_edited')); + header.append('h3').text(t('just_edited')); var m = ''; if (changeset.comment) { @@ -18,7 +16,9 @@ iD.ui.Success = function(connection) { var message = (m || 'Edited OSM!') + connection.changesetUrl(changeset.id); - header.append('a') + var links = body.append('div').attr('class','modal-section'); + + links.append('a') .attr('href', function() { return connection.changesetUrl(changeset.id); }) @@ -26,7 +26,7 @@ iD.ui.Success = function(connection) { .attr('class', 'success-action') .text(t('view_on_osm')); - header.append('a') + links.append('a') .attr('target', '_blank') .attr('href', function() { return 'https://twitter.com/intent/tweet?source=webclient&text=' + @@ -35,17 +35,14 @@ iD.ui.Success = function(connection) { .attr('class', 'success-action') .text('Tweet'); - var buttonwrap = section.append('div') - .attr('class', 'buttons cf'); + var section = body.append('div').attr('class','modal-section cf'); - var okbutton = buttonwrap.append('button') + section.append('button') .attr('class', 'action col2') .on('click.save', function() { event.cancel(); - }); - - okbutton.append('span').attr('class','icon apply icon-pre-text'); - okbutton.append('span').attr('class','label').text('Okay'); + }) + .append('span').attr('class','label').text('Okay'); } return d3.rebind(success, event, 'on'); diff --git a/js/id/ui/tag_editor.js b/js/id/ui/tag_editor.js index 79ebedf9b..a97cb3afe 100644 --- a/js/id/ui/tag_editor.js +++ b/js/id/ui/tag_editor.js @@ -27,7 +27,7 @@ iD.ui.TagEditor = function(context, entity) { selection.html(''); var messagewrap = selection.append('div') - .attr('class', 'message fillL'); + .attr('class', 'header fillL cf'); var back = messagewrap.append('button') .attr('class', 'preset-reset fl ' + geometry)