[FIX]website: stop animation on focus (clean fix)

bzr revid: dle@openerp.com-20140228163112-hru06zno1sl919uq
This commit is contained in:
Denis Ledoux
2014-02-28 17:31:12 +01:00
parent c55af162d5
commit 2d903bcbb8
@@ -25,8 +25,17 @@
this.on('rte:ready', this, function () {
self.snippets.$button.removeClass("hidden");
website.snippet.start_animation();
// force to unactive slider cycling
setInterval(function () {$(".carousel").carousel("pause");},3000);
$(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();
});
}
});
});
return this._super.apply(this, arguments);