diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-01-21 16:56:00 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-01-23 12:14:15 +0100 |
| commit | 5a2fc7b15ca4f7bf4c9a8bcba3485b87c7a22f3b (patch) | |
| tree | 4f22f5c8ac0d252a1d2cd225fe9a89cb62018cb7 /addons/website/static/src/js/website.snippets.editor.js | |
| parent | c27930ccb67792f519a9bb3df667366a66cb8695 (diff) | |
[IMP] website editor: the snippet overlay fadeout on keypress and fadein on mousemove
Diffstat (limited to 'addons/website/static/src/js/website.snippets.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.snippets.editor.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index 63ecd24bd51..bc426476a62 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -140,6 +140,17 @@ self.cover_target(self.$active_snipped_id.data("snippet-editor").$overlay, self.$active_snipped_id); } }); + + $(document).on('keydown', function () { + if (self.$active_snipped_id && self.$active_snipped_id.data("snippet-editor")) { + self.$active_snipped_id.data("snippet-editor").$overlay.addClass('o_keypress'); + } + }); + $(document).on('mousemove', function () { + if (self.$active_snipped_id && self.$active_snipped_id.data("snippet-editor")) { + self.$active_snipped_id.data("snippet-editor").$overlay.removeClass('o_keypress'); + } + }); }, show_blocks: function () { |
