From 58f1b5ad021f7149317f69bcbfab890bf43d3a83 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Oct 2013 13:00:15 +0200 Subject: [IMP] prevent default on triple-click interrupt bzr revid: xmo@openerp.com-20131022110015-iewvo1x0jdogswus --- addons/website/static/src/js/website.editor.js | 1 + 1 file changed, 1 insertion(+) (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 c1f05d9b661..59b8ec4fe0f 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -350,6 +350,7 @@ // The detail attribute indicates the number of times a mouse button has been pressed // we just want the triple click if (e.detail !== 3) { return; } + e.preventDefault(); // Get closest block-level element to the triple-clicked // element (using ckeditor's block list because why not) -- cgit v1.2.3 From 3655f43e42475da4be76c5d2f51facfdd8274b52 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Oct 2013 17:11:44 +0200 Subject: [IMP] warnings and shit bzr revid: xmo@openerp.com-20131022151144-tblwba9rf77iuidl --- addons/website/static/src/js/website.editor.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 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 59b8ec4fe0f..8b3a73a06a3 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -56,7 +56,7 @@ //noinspection JSValidateTypes editor.addCommand('link', { - exec: function (editor, data) { + exec: function (editor) { link_dialog(editor); return true; }, @@ -65,7 +65,7 @@ }); //noinspection JSValidateTypes editor.addCommand('image', { - exec: function (editor, data) { + exec: function (editor) { image_dialog(editor); return true; }, @@ -219,7 +219,7 @@ var view_id = $(event.currentTarget).data('view-id'); openerp.jsonRpc('/website/customize_template_toggle', 'call', { 'view_id': view_id - }).then( function(result) { + }).then( function() { window.location.reload(); }); }); @@ -253,7 +253,6 @@ ); }, edit: function () { - var self = this; this.$buttons.edit.prop('disabled', true); this.$('#website-top-view').hide(); this.$('#website-top-edit').show(); @@ -423,7 +422,7 @@ return true; }, - start_edition: function ($elements) { + start_edition: function () { var self = this; // create a single editor for the whole page var root = document.getElementById('wrapwrap'); @@ -484,7 +483,7 @@ .filter(function () { var $this = $(this); // keep view sections and fields which are *not* in - // view sections for toplevel editables + // view sections for top-level editables return $this.data('oe-model') === 'ir.ui.view' || !$this.closest('[data-oe-model = "ir.ui.view"]').length; }); @@ -855,7 +854,7 @@ this.preview_image(); }, - file_selection: function (e) { + file_selection: function () { this.$('button.filepicker').removeClass('btn-danger btn-success'); var self = this; -- cgit v1.2.3 From 7dd1934585ed85b925def0a686df04aa3990c5f5 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 23 Oct 2013 11:11:52 +0200 Subject: [FIX] option typo: unable_editor -> enable_editor bzr revid: fme@openerp.com-20131023091152-h0hxw47hzfor2al8 --- 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 8b3a73a06a3..2249de2a24d 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -177,7 +177,7 @@ var editor = new website.EditorBar(); var $body = $(document.body); editor.prependTo($body).then(function () { - if (location.search.indexOf("unable_editor") >= 0) { + if (location.search.indexOf("enable_editor") >= 0) { editor.edit(); } }); -- cgit v1.2.3