From 90308b3a75d799931a0123360588c76114b4c299 Mon Sep 17 00:00:00 2001 From: Ian B Date: Sat, 16 Feb 2013 14:58:20 +0100 Subject: [PATCH 1/2] Fix missing OK button on confirm modal (#791) --- js/id/ui/confirm.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/js/id/ui/confirm.js b/js/id/ui/confirm.js index 177bb94f0..1de510c5c 100644 --- a/js/id/ui/confirm.js +++ b/js/id/ui/confirm.js @@ -1,17 +1,23 @@ iD.ui.confirm = function(selection) { var modal = iD.ui.modal(selection); modal.select('.modal').classed('modal-alert', true); - modal.select('.content') + var section = modal.select('.content') .attr('class','modal-section fillD') - .append('div') + + var description = section.append('div') .attr('class', 'description'); - var nochanges = modal.select('.content') - .append('button') - .attr('class','action centered') + + var buttonwrap = section.append('div') + .attr('class', 'buttons cf'); + + var okbutton = buttonwrap.append('button') + .attr('class', 'action centered') .on('click.confirm', function() { modal.remove(); }); - nochanges.append('span').attr('class','label').text('Okay'); + + okbutton.append('span').attr('class','icon apply icon-pre-text'); + okbutton.append('span').attr('class','label').text('Okay'); return modal; }; From 74cfb750bb70b6eb6de527521707e25166f3c8a7 Mon Sep 17 00:00:00 2001 From: Ian B Date: Sat, 16 Feb 2013 15:06:57 +0100 Subject: [PATCH 2/2] Fix save error causing modal to break (#790) --- js/id/ui/save.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/id/ui/save.js b/js/id/ui/save.js index 5e05183b2..f5f14365d 100644 --- a/js/id/ui/save.js +++ b/js/id/ui/save.js @@ -41,7 +41,7 @@ iD.ui.Save = function(context) { history.reset(); map.flush().redraw(); if (err) { - var desc = iD.ui.confirm() + var desc = iD.ui.confirm(context.container()) .select('.description'); desc.append('h2') .text(t('save.error'));