From e96e9aa73af9dde6dab2a12da0a9635d6d7a3d8e Mon Sep 17 00:00:00 2001 From: Gislene Pereira Date: Mon, 14 Mar 2016 16:05:06 -0300 Subject: Adding logo loading event to Saving Draft; + Adding timeout to 0.6 secs before stopping the spinning; + Removing unnecessary defaultAttr. Issue #238 --- web-ui/app/js/page/pix_logo.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web-ui/app') diff --git a/web-ui/app/js/page/pix_logo.js b/web-ui/app/js/page/pix_logo.js index c03fe4ec..c5c709d6 100644 --- a/web-ui/app/js/page/pix_logo.js +++ b/web-ui/app/js/page/pix_logo.js @@ -26,21 +26,21 @@ define( return defineComponent(pixLogo); function pixLogo() { - this.defaultAttrs({ - 'pixLogo': '#pix-logo' - }); - this.spinLogo = function (ev, data) { - this.$node.parents().eq(1).find('.logo-part-animation-off').attr('class', 'logo-part-animation-on'); + $('.logo-part-animation-off').attr('class', 'logo-part-animation-on'); }; this.stopSpinningLogo = function (ev, data) { - this.$node.parents().eq(1).find('.logo-part-animation-on').attr('class', 'logo-part-animation-off'); + setTimeout(function(){ + $('.logo-part-animation-on').attr('class', 'logo-part-animation-off'); + }, 600); }; this.after('initialize', function () { this.on(document, events.ui.tag.select, this.spinLogo); this.on(document, events.mails.available, this.stopSpinningLogo); + this.on(document, events.mail.saveDraft, this.spinLogo); + this.on(document, events.mail.draftSaved, this.stopSpinningLogo); }); } } -- cgit v1.2.3