From 30853afd185ba305be87940351bd69198a036a12 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 21 Mar 2014 16:08:00 +0100 Subject: [FIX] website: prevent animations in edit mode bzr revid: dle@openerp.com-20140321150800-q8p8hn8a7aozcya4 --- addons/website/static/src/js/website.snippets.editor.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'addons/website/static/src/js/website.snippets.editor.js') diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index 0607691ccaa..d9ef69d8218 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -19,23 +19,11 @@ edit: function () { var self = this; $("body").off('click'); - website.snippet.stop_animation(); window.snippets = this.snippets = new website.snippet.BuildingBlock(this); this.snippets.appendTo(this.$el); this.on('rte:ready', this, function () { self.snippets.$button.removeClass("hidden"); - website.snippet.start_animation(); - $(website.snippet.readyAnimation).each(function() { - var animation = $(this).data("snippet-view"); - if (animation) { - animation.$target.on('focus', '*', function(){ - animation.stop(); - }); - animation.$target.on('blur', '*', function(){ - animation.start(); - }); - } - }); + website.snippet.stop_animation(); }); return this._super.apply(this, arguments); @@ -392,8 +380,6 @@ if(action === 'insert'){ $target = $toInsert; - website.snippet.start_animation(); - self.create_overlay($target); if ($target.data("snippet-editor")) { $target.data("snippet-editor").drop_and_build_snippet($target); @@ -1315,6 +1301,7 @@ start : function () { var self = this; this._super(); + this.$target.carousel({interval: false}); this.id = this.$target.attr("id"); this.$inner = this.$target.find('.carousel-inner'); this.$indicators = this.$target.find('.carousel-indicators'); -- cgit v1.2.3