From 50dd5063a55f12fcd798df8867c94b670d8442f5 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 5 Dec 2012 17:20:18 -0500 Subject: [PATCH] Add confirm --- js/id/ui/confirm.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 js/id/ui/confirm.js diff --git a/js/id/ui/confirm.js b/js/id/ui/confirm.js new file mode 100644 index 000000000..b0ea340d9 --- /dev/null +++ b/js/id/ui/confirm.js @@ -0,0 +1,14 @@ +iD.confirm = function(message) { + var modal = iD.modal(); + modal.select('.modal').classed('modal-alert', true); + modal.select('.content') + .append('p').attr('class', 'description'); + modal.select('.content') + .append('button') + .text('OK') + .on('click', function() { + modal.remove(); + }); + + return modal; +};