[FIX] web_editor: make sure gallery images are editable
When added for the first time, they were not editable until the page was saved.
This commit is contained in:
@@ -535,7 +535,6 @@ var RTE = Widget.extend({
|
||||
}
|
||||
if ($editable.length && (!this.$last || this.$last[0] !== $editable[0]) &&
|
||||
($target.closest('[contenteditable]').attr('contenteditable') || "").toLowerCase() !== 'false') {
|
||||
|
||||
$editable.summernote(this.config($editable));
|
||||
|
||||
$editable.data('NoteHistory', history);
|
||||
|
||||
@@ -208,7 +208,7 @@ options.registry.gallery = options.Class.extend({
|
||||
$slideshow = $(qweb.render('website.gallery.slideshow', params));
|
||||
this.replace($slideshow);
|
||||
this.$target.find(".item img").each(function (index) {
|
||||
$(this).attr('data-index', index).data('index', index);
|
||||
$(this).attr({'data-index': index, 'contenteditable': true});
|
||||
});
|
||||
this.$target.css("height", Math.round(window.innerHeight*0.7));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user