diff options
author | Tayane Fernandes <tayane.rmf@gmail.com> | 2017-02-01 13:38:56 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 13:38:56 -0200 |
commit | c2f1626dbaaaed984c2b7298de5e45d00cbd1071 (patch) | |
tree | 0af1155918275f24c2e1521525fa5ae8cff5a6f6 /web-ui/app/js/dispatchers/right_pane_dispatcher.js | |
parent | 66787ad7b6e7dc777343f36519bcfa92e8bd0f1c (diff) | |
parent | 92089f9bb4cb11ad96bed75a6b7875ec7cabddc0 (diff) |
Merge pull request #954 from pixelated/spinner
Add spinner before loading an email or draft.
Diffstat (limited to 'web-ui/app/js/dispatchers/right_pane_dispatcher.js')
-rw-r--r-- | web-ui/app/js/dispatchers/right_pane_dispatcher.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/web-ui/app/js/dispatchers/right_pane_dispatcher.js b/web-ui/app/js/dispatchers/right_pane_dispatcher.js index 870bcd92..37b65920 100644 --- a/web-ui/app/js/dispatchers/right_pane_dispatcher.js +++ b/web-ui/app/js/dispatchers/right_pane_dispatcher.js @@ -24,10 +24,11 @@ define( 'mail_view/ui/draft_box', 'mail_view/ui/no_message_selected_pane', 'mail_view/ui/feedback_box', + 'mail_view/ui/spinner', 'page/events' ], - function(defineComponent, ComposeBox, MailView, ReplySection, DraftBox, NoMessageSelectedPane, FeedbackBox, events) { + function(defineComponent, ComposeBox, MailView, ReplySection, DraftBox, NoMessageSelectedPane, FeedbackBox, Spinner, events) { 'use strict'; return defineComponent(rightPaneDispatcher); @@ -67,8 +68,13 @@ define( FeedbackBox.attachTo(stage); }; + this.addSpinner = function(stage) { + Spinner.attachTo(stage); + }; + this.openMail = function(ev, data) { var stage = this.reset(this.attr.mailView); + this.addSpinner(stage); MailView.attachTo(stage, data); var replySectionContainer = this.createAndAttach(this.attr.replySection); @@ -89,6 +95,7 @@ define( this.openDraft = function (ev, data) { var stage = this.reset(this.attr.draftBox); + this.addSpinner(stage); DraftBox.attachTo(stage, { mailIdent: data.ident, currentTag: this.attr.currentTag }); }; |