[FIX] website: prevent animations in edit mode

bzr revid: dle@openerp.com-20140321150800-q8p8hn8a7aozcya4
This commit is contained in:
Denis Ledoux 2014-03-21 16:08:00 +01:00
parent 9fa1b047ba
commit 30853afd18
1 changed files with 2 additions and 15 deletions

View File

@ -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');