Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Commit c5e883b

Browse files
committed
Added CSS3 animation on Remote Validation
1 parent 41372db commit c5e883b

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

style.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,19 @@ textarea.ng-valid.ng-dirty {
2828
/* error display font italic, text-danger is red in BS */
2929
.validation.text-danger {
3030
font-style: italic;
31+
}
32+
33+
.glyphicon.spinning {
34+
animation: spin 1s infinite linear;
35+
-webkit-animation: spin2 1s infinite linear;
36+
}
37+
38+
@keyframes spin {
39+
from { transform: scale(1) rotate(0deg);}
40+
to { transform: scale(1) rotate(360deg);}
41+
}
42+
43+
@-webkit-keyframes spin2 {
44+
from { -webkit-transform: rotate(0deg);}
45+
to { -webkit-transform: rotate(360deg);}
3146
}

templates/testingFormDirective.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ <h4><strong>{{ 'ERRORS' | translate }}!</strong></h4>
2020
<div class="form-group">
2121
<label for="input1">{{ 'INPUT1' | translate }}</label>
2222
<input type="text" class="form-control" name="input1" placeholder="alpha|min_len:2|remote:customRemoteValidationCall|required" validation="alpha|min_len:2|remote:customRemoteValidationCall|required" ng-model="input1" />
23+
<div ng-if="form1.input1.$processing">
24+
<span class="glyphicon glyphicon-cog spinning"></span>
25+
</div>
2326
</div>
2427
<div class="form-group">
2528
<label for="input2">{{ 'INPUT2' | translate }}</label>

templates/testingFormService.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ <h4><strong>{{ 'ERRORS' | translate }}!</strong></h4>
2525
<div class="form-group">
2626
<label for="input1">{{ 'INPUT1' | translate }}</label>
2727
<input type="text" class="form-control" name="input1" placeholder="alpha|min_len:2|remote:customRemoteValidationCall|required" ng-model="input1" />
28+
<div ng-if="form1.input1.$processing">
29+
<span class="glyphicon glyphicon-cog spinning"></span>
30+
</div>
2831
</div>
2932
<div class="form-group">
3033
<label for="input2">{{ 'INPUT2' | translate }}</label>

0 commit comments

Comments
 (0)