[MERGE] forward port branch 10.0 up to b058f70941
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user