This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLoading.html
61 lines (46 loc) · 1.53 KB
/
Loading.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<link rel="stylesheet" href="Loading.css" />
<script>
require(['jquery', 'EasyWebApp'], function ($, EWA) {
EWA.component(function () {
var VM = this, fallback;
var Load_Cover = this.$_View.children('div').on(
'transitionend webkitTransitionEnd', hide
)[0];
function hide() {
if (! VM.count) Load_Cover.style.display = 'none';
if (fallback != null) clearTimeout( fallback );
}
var duration = parseFloat(
$( Load_Cover ).css('transition-duration')
);
$( document ).on('ajaxSend', function () {
if (! VM.count) Load_Cover.style.display = '';
VM.count++ ;
}).on('ajaxSuccess', function () {
if ((VM.count > 0) && (--VM.count === 0))
fallback = $.wait(duration, hide);
});
return {count: 0};
});
});
</script>
<div class="loading ${view.count ? 'active' : ''}">
<div class="loader">
<div class="ball-spin-fade-loader">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="ball-scale-multiple">
<div></div>
<div></div>
<div></div>
</div>
<div class="loading_content">loading...</div>
</div>
</div>