mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-30 21:45:01 +03:00
animate icon
This commit is contained in:
parent
5b93a0fad1
commit
c686385c00
|
@ -26,11 +26,15 @@
|
||||||
update: '.js-toolbar-comments-update',
|
update: '.js-toolbar-comments-update',
|
||||||
|
|
||||||
// Счетчик новых комментариев
|
// Счетчик новых комментариев
|
||||||
counter: '.js-toolbar-comments-count'
|
counter: '.js-toolbar-comments-count',
|
||||||
|
|
||||||
|
// Иконка
|
||||||
|
icon: '.ls-toolbar-comments-update .fa'
|
||||||
},
|
},
|
||||||
|
|
||||||
classes: {
|
classes: {
|
||||||
active: 'active'
|
active: 'active',
|
||||||
|
'fa-spin': 'fa-spin'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -80,10 +84,12 @@
|
||||||
*/
|
*/
|
||||||
update: function() {
|
update: function() {
|
||||||
this._addClass( this.elements.update, 'active' );
|
this._addClass( this.elements.update, 'active' );
|
||||||
|
this._addClass( this.elements.icon, 'fa-spin' );
|
||||||
|
|
||||||
this.options.comments.lsComments( 'load', false, false, function () {
|
this.options.comments.lsComments( 'load', false, false, function () {
|
||||||
this.updateCounter();
|
this.updateCounter();
|
||||||
this._removeClass( this.elements.update, 'active' );
|
this._removeClass( this.elements.update, 'active' );
|
||||||
|
this._removeClass( this.elements.icon, 'fa-spin' );
|
||||||
}.bind( this ));
|
}.bind( this ));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue