[FIX] cleanup image edition button on editor save
bzr revid: xmo@openerp.com-20131119125520-qpts34qbx1oofdc1
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
|
||||
// display button
|
||||
var $el = $(previousSelection = selected.$);
|
||||
var $btn = $('<button type="button" class="btn btn-primary" contenteditable="false">Edit</button>')
|
||||
var $btn = $('<button type="button" class="btn btn-primary image-edit-button" contenteditable="false">Edit</button>')
|
||||
.insertAfter($el)
|
||||
.click(function (e) {
|
||||
e.preventDefault();
|
||||
@@ -100,6 +100,11 @@
|
||||
left: $el.width() / 2 + position.left - $btn.outerWidth() / 2,
|
||||
});
|
||||
});
|
||||
editor.on('destroy', function (evt) {
|
||||
if (previousSelection) {
|
||||
$('.image-edit-button').remove();
|
||||
}
|
||||
});
|
||||
|
||||
//noinspection JSValidateTypes
|
||||
editor.addCommand('link', {
|
||||
|
||||
Reference in New Issue
Block a user