[FIX] website editor: check if link and fa is editable and display change button

bzr revid: chm@openerp.com-20140311130852-3ft0v1mc9ht1any6
This commit is contained in:
chm@openerp.com 2014-03-11 14:08:52 +01:00
parent 849d0ad860
commit 3ceefde489
1 changed files with 4 additions and 4 deletions

View File

@ -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;