mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 19:01:52 +08:00
PERFORMANCE: disables jquery animations during testing
This commit is contained in:
parent
18c27883e9
commit
59d4123316
|
@ -416,18 +416,14 @@ export default createWidget('post-menu', {
|
|||
const $heart = $(`[data-post-id=${attrs.id}] .toggle-like .d-icon`);
|
||||
$heart.closest('button').addClass('has-like');
|
||||
|
||||
if (!Ember.testing) {
|
||||
const scale = [1.0, 1.5];
|
||||
return new Ember.RSVP.Promise(resolve => {
|
||||
animateHeart($heart, scale[0], scale[1], () => {
|
||||
animateHeart($heart, scale[1], scale[0], () => {
|
||||
this.sendWidgetAction('toggleLike').then(() => resolve());
|
||||
});
|
||||
const scale = [1.0, 1.5];
|
||||
return new Ember.RSVP.Promise(resolve => {
|
||||
animateHeart($heart, scale[0], scale[1], () => {
|
||||
animateHeart($heart, scale[1], scale[0], () => {
|
||||
this.sendWidgetAction('toggleLike').then(() => resolve());
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.sendWidgetAction('toggleLike');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
refreshLikes() {
|
||||
|
|
|
@ -169,4 +169,7 @@ Object.keys(requirejs.entries).forEach(function(entry) {
|
|||
}
|
||||
});
|
||||
|
||||
// forces 0 as duration for all jquery animations
|
||||
jQuery.fx.off = true;
|
||||
|
||||
resetSite();
|
||||
|
|
Loading…
Reference in New Issue
Block a user