[IMP] cancellation of RTE
* rename Cancel to Discard for clarity (user test) * add intermediate dialog in case of mis-click, use 'danger' button style to clearly indicate this is a destructive operation bzr revid: xmo@openerp.com-20131203111323-9mx7aazfpsybe718
This commit is contained in:
@@ -555,7 +555,20 @@
|
||||
});
|
||||
},
|
||||
cancel: function () {
|
||||
website.reload();
|
||||
new $.Deferred(function (d) {
|
||||
var $dialog = $(openerp.qweb.render('website.editor.discard')).appendTo(document.body);
|
||||
$dialog.on('click', '.btn-danger', function () {
|
||||
d.resolve();
|
||||
}).on('hidden.bs.modal', function () {
|
||||
d.reject();
|
||||
});
|
||||
d.always(function () {
|
||||
$dialog.remove();
|
||||
});
|
||||
$dialog.modal('show');
|
||||
}).then(function () {
|
||||
website.reload();
|
||||
})
|
||||
},
|
||||
new_page: function (ev) {
|
||||
ev.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user