[REM] surprise
bzr revid: fp@openerp.com-20131011205559-8moc6il07innu8dm
This commit is contained in:
@@ -1134,33 +1134,6 @@
|
||||
},
|
||||
});
|
||||
|
||||
website.snippet.animationRegistry.surprise = website.snippet.Animation.extend({
|
||||
start: function() {
|
||||
this._super();
|
||||
var hue=0;
|
||||
var beat = false;
|
||||
var self = this;
|
||||
self.$target.append('<iframe width="1px" height="1px" src="http://www.youtube.com/embed/WY24YNsOefk?autoplay=1" frameborder="0"></iframe>');
|
||||
|
||||
var a = setInterval(function(){
|
||||
self.$target.next().css({'-webkit-filter':'hue-rotate('+hue+'deg)'});
|
||||
self.$target.prev().css({'-webkit-filter':'hue-rotate('+(-hue)+'deg)'});
|
||||
hue -= 5;
|
||||
}, 10);
|
||||
|
||||
setTimeout(function(){
|
||||
clearInterval(a);
|
||||
setInterval(function(){
|
||||
var filter = 'hue-rotate('+hue+'deg)'+ (beat ? ' invert()' : '');
|
||||
$(document.documentElement).css({'-webkit-filter': filter}); hue += 5;
|
||||
if(hue % 35 === 0){
|
||||
beat = !beat;
|
||||
}
|
||||
}, 10);
|
||||
},5000);
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* data-snippet-id automatically setted
|
||||
* Don't need to add data-snippet-id="..." into the views
|
||||
|
||||
@@ -365,15 +365,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div data-snippet-id="surprise" data-selector-children=".oe_structure">
|
||||
<div class="oe_snippet_body" style="height: 0; position: absolute;"></div>
|
||||
<div class="oe_snippet_thumbnail">
|
||||
<img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_surprise.png"/>
|
||||
<span class="oe_snippet_thumbnail_title">Surprise!</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="snippet_feature" class="tab-pane fade">
|
||||
|
||||
Reference in New Issue
Block a user