From 7c0da590e19e3f0b942c6442b2d50c9ab1ef65de Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 16 Oct 2013 12:45:45 +0200 Subject: [IMP] website: after save reload page with the same scrolling bzr revid: chm@openerp.com-20131016104545-e415ixicw2crci2w --- addons/website/static/src/js/website.editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/website/static/src/js/website.editor.js') diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 81fe087a59e..aef390027c5 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -307,7 +307,7 @@ }); }, cancel: function () { - window.location.href = window.location.href.replace(/unable_editor(=[^&]*)?|#.*/g, ''); + website.reload(); }, }); -- cgit v1.2.3 From 57c5f11aaeabd86f7bf9a94f33a06d01b82e3a60 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 16 Oct 2013 14:37:08 +0200 Subject: [FIX] don't use mutation events if unnecessary Mutation events are synchronous and one is triggered per observed alteration (they're not batched). When doing lots of modifications to the DOM tree, they will add a lot of overhead as (in this case) the event handler will run for *each* added node and it will run during (and slow down) node insertion rather than afterwards. bzr revid: xmo@openerp.com-20131016123708-lx389x0g6xs6zu10 --- addons/website/static/src/js/website.editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/website/static/src/js/website.editor.js') diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index aef390027c5..a1b8ffdb9ee 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -927,7 +927,7 @@ } - var Observer = window.MutationObserver || window.WebkitMutationObserver || window.JsMutationObserver; + website.Observer = window.MutationObserver || window.WebkitMutationObserver || window.JsMutationObserver; var OBSERVER_CONFIG = { childList: true, attributes: true, @@ -935,7 +935,7 @@ subtree: true, attributeOldValue: true, }; - var observer = new Observer(function (mutations) { + var observer = new website.Observer(function (mutations) { // NOTE: Webkit does not fire DOMAttrModified => webkit browsers // relying on JsMutationObserver shim (Chrome < 18, Safari < 6) // will not mark dirty on attribute changes (@class, img/@src, -- cgit v1.2.3 From 9949aa626c3decc26d9f776198838c2a63699adc Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 16 Oct 2013 15:34:32 +0200 Subject: [IMP] remove bidi plugin its isReadOnly() calls generates quite a bunch of timeline events bzr revid: xmo@openerp.com-20131016133432-4aq30rd8szbs2bef --- addons/website/static/src/js/website.editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/website/static/src/js/website.editor.js') diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index a1b8ffdb9ee..485ba48e35b 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -394,7 +394,7 @@ // - contextmenu & tabletools (disable contextual menu) // - bunch of unused plugins var plugins = [ - 'a11yhelp', 'basicstyles', 'bidi', 'blockquote', + 'a11yhelp', 'basicstyles', 'blockquote', 'clipboard', 'colorbutton', 'colordialog', 'dialogadvtab', 'elementspath', 'enterkey', 'entities', 'filebrowser', 'find', 'floatingspace','format', 'htmlwriter', 'iframe', -- cgit v1.2.3