mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 23:44:47 +02:00
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:
+11
-6
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user