[MERGE] forward port branch 10.0 up to b058f70941

This commit is contained in:
Christophe Simonis
2019-08-21 11:25:05 +02:00
2 changed files with 6 additions and 4 deletions
@@ -2121,13 +2121,15 @@ $.summernote.pluginEvents.applyFont = function (event, editor, layoutInfo, color
}
// apply font: foreColor, backColor, size (the color can be use a class text-... or bg-...)
var node, font, $font, fonts = [], className;
var node, ancestors, font, $font, fonts = [], className;
if (color || bgcolor || size) {
for (var i=0; i<nodes.length; i++) {
node = nodes[i];
font = dom.ancestor(node, dom.isFont);
if (!font) {
ancestors = dom.listAncestor(node, dom.isFont);
font = ancestors.slice(-1)[0];
// add font if node is not inside a font or inside an anchor firstly
if (!dom.isFont(font) || ancestors.filter(dom.isAnchor).length) {
if (node.textContent.match(/^[ ]|[ ]$/)) {
node.textContent = node.textContent.replace(/^[ ]|[ ]$/g, '\u00A0');
}
+1 -1
View File
@@ -965,7 +965,7 @@ class IrModelAccess(models.Model):
else:
msg_tail = _("Please contact your system administrator if you think this is an error.") + "\n\n(" + _("Document model") + ": %s)"
msg_params = (model,)
msg_tail += ' - ({} {}, {} {})'.format(_('Operation:'), mode, _('User:'), self._uid)
msg_tail += u' - ({} {}, {} {})'.format(_('Operation:'), mode, _('User:'), self._uid)
_logger.info('Access Denied by ACLs for operation: %s, uid: %s, model: %s', mode, self._uid, model)
msg = '%s %s' % (msg_heads[mode], msg_tail)
raise AccessError(msg % msg_params)