From d1798dcb36299d80cad3ebcf5a0993e1a4253eb3 Mon Sep 17 00:00:00 2001
From: "chm@openerp.com" <>
Date: Tue, 11 Mar 2014 11:35:37 +0100
Subject: [PATCH 1/4] [FIX] website_crm: textarea don't keep value when they
are an error because the view use t-attf insead of value inside textarea tags
bzr revid: chm@openerp.com-20140311103537-mp6x2v015tyuimux
---
addons/website_crm/views/website_crm.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/website_crm/views/website_crm.xml b/addons/website_crm/views/website_crm.xml
index fa0489924ce..64ae477679a 100644
--- a/addons/website_crm/views/website_crm.xml
+++ b/addons/website_crm/views/website_crm.xml
@@ -32,7 +32,7 @@
From 09e5ec2345e392149eaadc6ad077c21308aa0337 Mon Sep 17 00:00:00 2001
From: Kersten Jeremy
Date: Tue, 11 Mar 2014 11:59:10 +0100
Subject: [PATCH 2/4] [TEST] Log for debug
bzr revid: jke@openerp.com-20140311105910-v1k3l0r8ga1lubp6
---
addons/web/static/src/js/testing.js | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/addons/web/static/src/js/testing.js b/addons/web/static/src/js/testing.js
index c4f5aeebd60..bcf7533e562 100644
--- a/addons/web/static/src/js/testing.js
+++ b/addons/web/static/src/js/testing.js
@@ -50,12 +50,17 @@ openerp.testing = {};
testing.current_module = null;
testing.templates = { };
testing.add_template = function (name) {
- var xhr = QWeb2.Engine.prototype.get_xhr();
- xhr.open('GET', name, false);
- xhr.send(null);
- (testing.templates[testing.current_module] =
- testing.templates[testing.current_module] || [])
- .push(xhr.responseXML);
+ try {
+ var xhr = QWeb2.Engine.prototype.get_xhr();
+ xhr.open('GET', name, false);
+ xhr.send(null);
+ (testing.templates[testing.current_module] =
+ testing.templates[testing.current_module] || [])
+ .push(xhr.responseXML);
+ }
+ catch(e) {
+ console.log(name + " ERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRROOOOR");
+ }
};
/**
* Function which does not do anything
From 849d0ad860c292c24a3033aefbeeed1eb4ff4867 Mon Sep 17 00:00:00 2001
From: Kersten Jeremy
Date: Tue, 11 Mar 2014 13:27:29 +0100
Subject: [PATCH 3/4] [TEST] Log for debug
bzr revid: jke@openerp.com-20140311122729-ullchqwem8725iw2
---
addons/web/static/src/js/testing.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/addons/web/static/src/js/testing.js b/addons/web/static/src/js/testing.js
index bcf7533e562..1b75e136dbb 100644
--- a/addons/web/static/src/js/testing.js
+++ b/addons/web/static/src/js/testing.js
@@ -51,7 +51,9 @@ openerp.testing = {};
testing.templates = { };
testing.add_template = function (name) {
try {
- var xhr = QWeb2.Engine.prototype.get_xhr();
+ console.log(name + " loading ...");
+ var xhr = window.QWeb2.Engine.prototype.get_xhr();
+ console.log(name + " loaded ...");
xhr.open('GET', name, false);
xhr.send(null);
(testing.templates[testing.current_module] =
From 3ceefde48942df95000a0b89698ee71a1187fecb Mon Sep 17 00:00:00 2001
From: "chm@openerp.com" <>
Date: Tue, 11 Mar 2014 14:08:52 +0100
Subject: [PATCH 4/4] [FIX] website editor: check if link and fa is editable
and display change button
bzr revid: chm@openerp.com-20140311130852-3ft0v1mc9ht1any6
---
addons/website/static/src/js/website.editor.js | 8 ++++----
1 file 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;