From 0d890ab76e69406dd9bfeeea6802eee14588c591 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 8 Sep 2014 15:54:38 +0200 Subject: [ADD] Compress uploaded image by default Added an opt-out option available from the button's dropdown --- addons/website/static/src/js/website.editor.js | 4 ++++ 1 file changed, 4 insertions(+) (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 ab6abed522b..50c939a0803 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -1387,6 +1387,10 @@ 'click button.filepicker': function () { this.$('input[type=file]').click(); }, + 'click .js_disable_optimization': function () { + this.$('input[name="disable_optimization"]').val('1'); + this.$('button.filepicker').click(); + }, 'change input[type=file]': 'file_selection', 'submit form': 'form_submit', 'change input.url': "change_input", -- cgit v1.2.3 From 895015355569e412e8ce0df6b4923683803b5a42 Mon Sep 17 00:00:00 2001 From: Ajay Patel Date: Fri, 5 Sep 2014 15:17:58 +0530 Subject: [FIX] website: prevent t-field on selection fields This quick fix avoids a buggy behaviour in version 8.0 that could confuse users. A future version should implement properly selection fields in t-field. (closes #2490) (cherry picked from commit fe3cac30e4c5c132da1de02576d4aa325979ccd9) --- addons/website/static/src/js/website.editor.js | 2 ++ 1 file changed, 2 insertions(+) (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 50c939a0803..ee6368ea5aa 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -750,6 +750,7 @@ var def = $.Deferred(); var editor = this.editor = CKEDITOR.inline(root, self._config()); editor.on('instanceReady', function () { + $("[data-oe-type=selection]").attr("contenteditable",false); editor.setReadOnly(false); // ckeditor set root to editable, disable it (only inner // sections are editable) @@ -819,6 +820,7 @@ fetch_editables: function (root) { return $(root).find('[data-oe-model]') + .not('[data-oe-type = "selection"]') .not('link, script') .not('.oe_snippet_editor') .filter(function () { -- cgit v1.2.3 From 77c41cc5cb64a951789d251b445f05e42cf1b997 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 25 Sep 2014 15:32:25 +0200 Subject: [FIX] website: 'Display Editor Bar on Website' group stopped working at commit a2ef044c477 The Edit button never appeared anymore for these users. The idea was that they should see an edit button with limited editing capabilities depending on their other access rights. For example, someone with only Sales Manager access and 'Display Editor Bar on Website' would be able to edit online quotes from the website_quote module, but not change the actual website pages or menus, for instance. --- addons/website/static/src/js/website.editor.js | 10 +--------- 1 file changed, 1 insertion(+), 9 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 ee6368ea5aa..82888c5d8a3 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -308,7 +308,6 @@ this.$('#website-top-edit').hide(); this.$('#website-top-view').show(); - this.$buttons.edit.show(); var $edit_button = this.$buttons.edit .prop('disabled', website.no_editor); @@ -822,14 +821,7 @@ return $(root).find('[data-oe-model]') .not('[data-oe-type = "selection"]') .not('link, script') - .not('.oe_snippet_editor') - .filter(function () { - var $this = $(this); - // keep view sections and fields which are *not* in - // view sections for top-level editables - return $this.data('oe-model') === 'ir.ui.view' - || !$this.closest('[data-oe-model = "ir.ui.view"]').length; - }); + .not('.oe_snippet_editor'); }, _current_editor: function () { -- cgit v1.2.3