[MERGE] forward port branch 9.0 up to ce51ad7e69

This commit is contained in:
Christophe Simonis
2018-02-08 16:43:44 +01:00
3 changed files with 19 additions and 12 deletions
+15 -9
View File
@@ -953,15 +953,21 @@ range.WrappedRange.prototype.deleteContents = function (towrite) {
return this;
}
var prevBP = dom.removeBetween(this.sc, this.so, this.ec, this.eo, towrite);
var r;
var image = this.isOnImg();
if (image) {
// If the range matches/is in an image, then the image is to be removed
// and the cursor moved to its previous position
var parentNode = image.parentNode;
var index = _.indexOf(parentNode.childNodes, image);
parentNode.removeChild(image);
r = new range.WrappedRange(parentNode, index, parentNode, index);
} else {
r = dom.removeBetween(this.sc, this.so, this.ec, this.eo, towrite);
}
$(dom.node(prevBP.sc)).trigger("click"); // trigger click to disable and reanable editor and image handler
return new range.WrappedRange(
prevBP.sc,
prevBP.so,
prevBP.ec,
prevBP.eo
);
$(dom.node(r.sc)).trigger("click"); // trigger click to disable and reanable editor and image handler
return new range.WrappedRange(r.sc, r.so, r.ec, r.eo);
};
range.WrappedRange.prototype.clean = function (mergeFilter, all) {
var node = dom.node(this.sc === this.ec ? this.sc : this.commonAncestor());
@@ -1310,7 +1316,7 @@ function summernote_keydown_clean (field) {
function remove_table_content(r) {
var ancestor = r.commonAncestor();
var nodes = dom.listBetween(r.sc, r.ec);
var nodes = dom.listBetween(r.sc, r.ec, r.so, r.eo);
if (dom.isText(r.sc)) {
r.sc.textContent = r.sc.textContent.slice(0, r.so);
}
@@ -73,9 +73,9 @@ var Translate = translate.Class.include({
dialog.appendTo($(document.body));
dialog.on('activate', this, function () {
if (dialog.$('input[name=do_not_show]').prop('checked')) {
local_storage.removeItem(nodialog);
} else {
local_storage.setItem(nodialog, true);
} else {
local_storage.removeItem(nodialog);
}
dialog.$el.modal('hide');
});
+2 -1
View File
@@ -37,7 +37,8 @@ Step 2: Configure the odoo instance with your zone
In the Odoo back end, go to the :guilabel:`Website Settings`: menu, then
activate the CDN support and copy/paste your zone URL in the
:guilabel:`CDN Base URL` field.
:guilabel:`CDN Base URL` field. This field is only visible and configurable if
you have developer mode activated.
.. image:: cdn/odoo_cdn_base_url.png
:class: img-responsive