Skip to content

Commit 13084de

Browse files
committed
style(angularjs): close #52 - Beautify waiting appearance for buttons with uiWaitOn
1 parent 75faf01 commit 13084de

File tree

6 files changed

+106
-10
lines changed

6 files changed

+106
-10
lines changed

src/main/resources/static/apps/admin/assets/css/style.css

Lines changed: 54 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/static/apps/admin/assets/css/style.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/static/apps/admin/assets/css/style.scss

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,21 @@ md-backdrop.md-dialog-backdrop {
626626
}
627627

628628
/* angularjs component styles */
629+
@-webkit-keyframes sk-bouncedelay {
630+
0%, 80%, 100% { -webkit-transform: scale(0) }
631+
40% { -webkit-transform: scale(1.0) }
632+
}
633+
634+
@keyframes sk-bouncedelay {
635+
0%, 80%, 100% {
636+
-webkit-transform: scale(0);
637+
transform: scale(0);
638+
} 40% {
639+
-webkit-transform: scale(1.0);
640+
transform: scale(1.0);
641+
}
642+
}
643+
629644
.btn[ui-wait-on] {
630645
position: relative;
631646

@@ -635,23 +650,53 @@ md-backdrop.md-dialog-backdrop {
635650
top: 0;
636651
left: 0;
637652
line-height: 32px;
653+
654+
& > div {
655+
width: 1rem;
656+
height: 1rem;
657+
background-color: #ffffff;
658+
margin: 0 0.2rem;
659+
660+
border-radius: 100%;
661+
display: inline-block;
662+
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
663+
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
664+
}
665+
666+
.bounce1 {
667+
-webkit-animation-delay: -0.32s;
668+
animation-delay: -0.32s;
669+
}
670+
671+
.bounce2 {
672+
-webkit-animation-delay: -0.16s;
673+
animation-delay: -0.16s;
674+
}
638675
}
639676

640677
&.btn-xs {
641678
.in-process {
642-
line-height: 20px;
679+
line-height: 18px;
680+
& > div {
681+
width: 0.5rem;
682+
height: 0.5rem;
683+
}
643684
}
644685
}
645686

646687
&.btn-sm {
647688
.in-process {
648-
line-height: 28px;
689+
line-height: 30px;
690+
& > div {
691+
width: 0.75rem;
692+
height: 0.75rem;
693+
}
649694
}
650695
}
651696

652697
&.btn-lg {
653698
.in-process {
654-
line-height: 42px;
699+
line-height: 46px;
655700
}
656701
}
657702
}

src/main/resources/static/apps/admin/lib/directives/ui-wait-on.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ angular.module('app')
99
scope.$watch(attr.uiWaitOn, function (value) {
1010
elem.attr('disabled', value);
1111
if (value) {
12-
elem.prepend('<span class="in-process"><i class="fa fa-spin fa-spinner"></i></span>');
12+
elem.prepend('<span class="in-process"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></span>');
1313
angular.forEach(children, function(child) {
1414
angular.element(child).css('visibility', 'hidden');
1515
});

src/main/resources/static/assets/css/common.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/static/assets/css/common.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ img {
213213
.logo {
214214
width: 50%;
215215
margin-bottom: 2rem;
216-
font-size: 3rem;
216+
font-size: 5rem;
217217
}
218218

219219
.title {

0 commit comments

Comments
 (0)