Skip to content

Commit

Permalink
TASK: show loading indicator while loading
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaip committed Jan 26, 2017
1 parent daa00b9 commit 1b2d3d5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
3 changes: 3 additions & 0 deletions Resources/Private/Translations/en/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
<trans-unit id="js.sendTo" xml:space="preserve">
<source>Send newsletter to: </source>
</trans-unit>
<trans-unit id="js.loading" xml:space="preserve">
<source>Loading...</source>
</trans-unit>
</body>
</file>
</xliff>
4 changes: 4 additions & 0 deletions Resources/Private/Translations/ru/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
<source>Send newsletter to: </source>
<target>Отправить рассылку группе: </target>
</trans-unit>
<trans-unit id="js.loading" xml:space="preserve">
<source>Loading...</source>
<target>Загрузка...</target>
</trans-unit>
</body>
</file>
</xliff>
32 changes: 18 additions & 14 deletions Resources/Public/JavaScript/Inspector/Views/NewsletterView.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<div class="neos-inspector-field">
<div>
{{#if view.selectContent}}
{{view view._select}}
{{#if view.subscription}}
{{#if view.selectContent}}
{{view view._select}}
{{else}}
<div style="padding: 12px 0">
{{view._sendTo}} {{view.subscription.label}}
</div>
{{/if}}
<button {{action "send" target="view"}} {{bindAttr disabled="view.sendingDisabled"}}>
{{view._buttonLabel}}
</button>
{{#if view.errorMessage}}
<div style="color: #ff460d; padding: 12px 0">
<i class="icon-warning-sign"></i>
{{view._errorMessage}}
</div>
{{/if}}
{{else}}
<div style="padding: 12px 0">
{{view._sendTo}} {{view.subscription.label}}
</div>
{{/if}}
<button {{action "send" target="view"}} {{bindAttr disabled="view.sendingDisabled"}}>
{{view._buttonLabel}}
</button>
{{#if view.errorMessage}}
<div style="color: #ff460d; padding: 12px 0">
<i class="icon-warning-sign"></i>
{{view._errorMessage}}
</div>
{{view._loadingLabel}}
{{/if}}
</div>
</div>
3 changes: 3 additions & 0 deletions Resources/Public/JavaScript/Inspector/Views/NewsletterView.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ define([
_sendTo: function () {
return I18n.translate('Psmb.Newsletter:Main:js.sendTo', 'Send newsletter to: ');
}.property(),
_loadingLabel: function () {
return I18n.translate('Psmb.Newsletter:Main:js.loading', 'Loading...');
}.property(),
init: function () {
var subscriptionsEndpoint = '/newsletter/getSubscriptions';

Expand Down

0 comments on commit 1b2d3d5

Please sign in to comment.