No default OK button on iD.ui.confirm

This allows the calling code to either keep the OK button or to override
with other buttons as needed.
This commit is contained in:
Bryan Housel
2015-01-08 22:56:39 -05:00
parent ed4929273d
commit e5d6c34efb
+11 -6
View File
@@ -15,12 +15,17 @@ iD.ui.confirm = function(selection) {
var buttonwrap = section.append('div')
.attr('class', 'modal-section buttons cf');
buttonwrap.append('button')
.attr('class', 'col2 action')
.on('click.confirm', function() {
modal.remove();
})
.text(t('confirm.okay'));
modal.okButton = function() {
buttonwrap
.append('button')
.attr('class', 'col2 action')
.on('click.confirm', function() {
modal.remove();
})
.text(t('confirm.okay'));
return modal;
};
return modal;
};