summaryrefslogtreecommitdiff
path: root/addons/website/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2014-02-25 14:12:28 +0100
committerXavier Morel <xmo@openerp.com>2014-02-25 14:12:28 +0100
commit750b9f405cd2f330242c290e5ea302a01de16d89 (patch)
tree0be145facde550ed7440bf3669da8b3c48ac4b4f /addons/website/static/src
parent4572ea9ef3bd0d2b46359ed8483613d3ffe9aec3 (diff)
[FIX] tags edition breakage in website_event_track
* remove some nodes from the $editables set, ``li`` really does not like being widgetified. Remove a few others just in case * split fa outside of li to make it safely (ish) editable * simplify upcast function for icons cke widget bzr revid: xmo@openerp.com-20140225131228-2m75itgi4zbj5xfh
Diffstat (limited to 'addons/website/static/src')
-rw-r--r--addons/website/static/src/js/website.editor.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index dc82c0c17b9..f782f2ff83a 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -66,8 +66,10 @@
// only enable editors manually
CKEDITOR.disableAutoInline = true;
// EDIT ALL THE THINGS
- CKEDITOR.dtd.$editable = $.extend(
- {}, CKEDITOR.dtd.$block, CKEDITOR.dtd.$inline);
+ CKEDITOR.dtd.$editable = _.omit(
+ $.extend({}, CKEDITOR.dtd.$block, CKEDITOR.dtd.$inline),
+ // well maybe not *all* the things
+ 'ul', 'ol', 'li', 'table', 'tr', 'th', 'td');
// Disable removal of empty elements on CKEDITOR activation. Empty
// elements are used for e.g. support of FontAwesome icons
CKEDITOR.dtd.$removeEmpty = {};
@@ -377,8 +379,7 @@
});
},
upcast: function (el) {
- return el.attributes['class']
- && (/\bfa\b/.test(el.attributes['class']));
+ return el.hasClass('fa');
}
});
}
@@ -650,6 +651,7 @@
if (previous && previous === this) { return; }
var selected = new CKEDITOR.dom.element(this);
+ // FIXME: fa nodes may not be editable widgets (?)
if (!is_editable_node(selected) && !selected.hasClass('fa')) {
return;
}