summaryrefslogtreecommitdiff
path: root/addons/website/static
diff options
context:
space:
mode:
authorchm@openerp.com <>2014-03-11 14:08:52 +0100
committerchm@openerp.com <>2014-03-11 14:08:52 +0100
commit3ceefde48942df95000a0b89698ee71a1187fecb (patch)
tree3ca040705856dcde278ccac6caaaf8af79d77996 /addons/website/static
parent849d0ad860c292c24a3033aefbeeed1eb4ff4867 (diff)
[FIX] website editor: check if link and fa is editable and display change button
bzr revid: chm@openerp.com-20140311130852-3ft0v1mc9ht1any6
Diffstat (limited to 'addons/website/static')
-rw-r--r--addons/website/static/src/js/website.editor.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index f874a5ca5ae..a5cf89b3a4e 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -54,7 +54,7 @@
* is editable but its attributes should not be considered editable
*/
function is_editable_node(element) {
- return (element.data('oe-model') !== 'ir.ui.view'
+ return !(element.data('oe-model') === 'ir.ui.view'
|| element.data('cke-realelement')
|| (is_editing_host(element) && element.getAttribute('attributeEditable') !== 'true')
|| element.isReadOnly());
@@ -630,11 +630,11 @@
var $link_button = this.make_hover_button(_t("Change"), function () {
var sel = new CKEDITOR.dom.element(previous);
editor.getSelection().selectElement(sel);
- if (previous.tagName.toUpperCase() === 'A') {
- link_dialog(editor);
- } else if(sel.hasClass('fa')) {
+ if(sel.hasClass('fa')) {
new website.editor.FontIconsDialog(editor, previous)
.appendTo(document.body);
+ } else if (previous.tagName.toUpperCase() === 'A') {
+ link_dialog(editor);
}
$link_button.hide();
previous = null;