diff options
| author | chm@openerp.com <> | 2014-03-06 15:03:23 +0100 |
|---|---|---|
| committer | chm@openerp.com <> | 2014-03-06 15:03:23 +0100 |
| commit | 5f3f09329fed083dd3df604301329a5e4b3f44bc (patch) | |
| tree | 55ab5fa8dd61d6e1e0a4800d75eb494a7b01c4f0 /addons/website/static/src | |
| parent | 73446943f554bef9528e6892f5bf28484ce71eb7 (diff) | |
[IMP] website: snippet : website.snippet.animationRegistry.follow
bzr revid: chm@openerp.com-20140306140323-o2e77a66eu28bddu
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/website.snippets.animation.js | 8 | ||||
| -rw-r--r-- | addons/website/static/src/js/website.snippets.editor.js | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/addons/website/static/src/js/website.snippets.animation.js b/addons/website/static/src/js/website.snippets.animation.js index 2b6373ac226..933f4b8e6ed 100644 --- a/addons/website/static/src/js/website.snippets.animation.js +++ b/addons/website/static/src/js/website.snippets.animation.js @@ -5,7 +5,7 @@ if (!website.snippet) website.snippet = {}; website.snippet.readyAnimation = []; - website.snippet.start_animation = function ($target) { + website.snippet.start_animation = function (editable_mode, $target) { for (var k in website.snippet.animationRegistry) { var Animation = website.snippet.animationRegistry[k]; var selector = ""; @@ -24,7 +24,7 @@ !$snipped_id.parent("body").length && !$snipped_id.data("snippet-view")) { website.snippet.readyAnimation.push($snipped_id); - $snipped_id.data("snippet-view", new Animation($snipped_id)); + $snipped_id.data("snippet-view", new Animation($snipped_id, editable_mode)); } }); } @@ -49,9 +49,9 @@ $: function () { return this.$el.find.apply(this.$el, arguments); }, - init: function (dom) { + init: function (dom, editable_mode) { this.$el = this.$target = $(dom); - this.start(); + this.start(editable_mode); }, /* * start diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index f619dd10c03..b615f8d60e5 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -25,7 +25,7 @@ this.on('rte:ready', this, function () { self.snippets.$button.removeClass("hidden"); website.snippet.stop_animation(); - website.snippet.start_animation(); + website.snippet.start_animation(true); }); return this._super.apply(this, arguments); @@ -382,7 +382,7 @@ $("#oe_snippets").trigger('snippet-dropped', $target); // after rte - website.snippet.start_animation($target); + website.snippet.start_animation(true, $target); self.create_overlay($target); if ($target.data("snippet-editor")) { |
