Merge pull request #794 from porjo/master

Fix #790 #791
This commit is contained in:
John Firebaugh
2013-02-16 09:22:36 -08:00
2 changed files with 13 additions and 7 deletions
+12 -6
View File
@@ -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;
};
+1 -1
View File
@@ -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'));