Skip to content

Commit 745a44b

Browse files
committed
[UI] Add Pace loader as automatic loading indicator
1 parent e20ac51 commit 745a44b

File tree

13 files changed

+1047
-22
lines changed

13 files changed

+1047
-22
lines changed

Gruntfile.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ module.exports = function(grunt) {
4343
'frontend/express/public/javascripts/dom/dataTables/js/jquery.dataTables.js',
4444
'frontend/express/public/javascripts/dom/dataTables/js/ZeroClipboard.js',
4545
'frontend/express/public/javascripts/dom/dataTables/js/TableTools.js',
46+
'frontend/express/public/javascripts/dom/pace/pace.min.js'
4647
],
4748
dest: 'frontend/express/public/javascripts/min/countly.dom.concat.js'
4849
},
@@ -64,7 +65,7 @@ module.exports = function(grunt) {
6465
'frontend/express/public/javascripts/utils/jquery.amaran.min.js',
6566
'frontend/express/public/javascripts/utils/jquery.titlealert.js',
6667
'frontend/express/public/javascripts/utils/jquery.hoverIntent.minified.js',
67-
'frontend/express/public/javascripts/countly/countly.common.js',
68+
'frontend/express/public/javascripts/countly/countly.common.js'
6869
],
6970
dest: 'frontend/express/public/javascripts/min/countly.utils.concat.js'
7071
},
@@ -78,7 +79,7 @@ module.exports = function(grunt) {
7879
'frontend/express/public/javascripts/visualization/flot/jquery.flot.stack.js',
7980
'frontend/express/public/javascripts/visualization/gauge.min.js',
8081
'frontend/express/public/javascripts/visualization/d3/d3.min.js',
81-
'frontend/express/public/javascripts/visualization/rickshaw/rickshaw.min.js',
82+
'frontend/express/public/javascripts/visualization/rickshaw/rickshaw.min.js'
8283
],
8384
dest: 'frontend/express/public/javascripts/min/countly.visualization.concat.js'
8485
},
@@ -96,7 +97,7 @@ module.exports = function(grunt) {
9697
'frontend/express/public/javascripts/countly/countly.app.version.js',
9798
'frontend/express/public/javascripts/countly/countly.carrier.js',
9899
'frontend/express/public/javascripts/countly/countly.allapps.js',
99-
'frontend/express/public/javascripts/countly/countly.template.js',
100+
'frontend/express/public/javascripts/countly/countly.template.js'
100101
],
101102
dest: 'frontend/express/public/javascripts/min/countly.lib.concat.js'
102103
}
@@ -113,7 +114,7 @@ module.exports = function(grunt) {
113114
'frontend/express/public/javascripts/min/countly.dom.js': 'frontend/express/public/javascripts/min/countly.dom.concat.js',
114115
'frontend/express/public/javascripts/min/countly.utils.js': 'frontend/express/public/javascripts/min/countly.utils.concat.js',
115116
'frontend/express/public/javascripts/min/countly.visualization.js': 'frontend/express/public/javascripts/min/countly.visualization.concat.js',
116-
'frontend/express/public/javascripts/min/countly.lib.js': 'frontend/express/public/javascripts/min/countly.lib.concat.js',
117+
'frontend/express/public/javascripts/min/countly.lib.js': 'frontend/express/public/javascripts/min/countly.lib.concat.js'
117118
}
118119
}
119120
},
@@ -126,7 +127,8 @@ module.exports = function(grunt) {
126127
'frontend/express/public/stylesheets/amaranjs/amaran.min.css',
127128
'frontend/express/public/javascripts/dom/tipsy/tipsy.css',
128129
'frontend/express/public/javascripts/visualization/rickshaw/rickshaw.min.css',
129-
],
130+
'frontend/express/public/javascripts/dom/pace/pace-theme-flash.css'
131+
]
130132
}
131133
}
132134
},

frontend/express/public/javascripts/countly/countly.template.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var countlyView = Backbone.View.extend({
3131
afterRender: function() {},
3232
render:function () { //backbone.js view render function
3333
$("#content-top").html("");
34-
this.el.html('<div id="content-loader"></div>');
34+
this.el.html('');
3535

3636
if (countlyCommon.ACTIVE_APP_ID) {
3737
var self = this;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) 2013 HubSpot, Inc.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
.pace {
2+
-webkit-pointer-events: none;
3+
pointer-events: none;
4+
-webkit-user-select: none;
5+
-moz-user-select: none;
6+
user-select: none;
7+
}
8+
9+
.pace-inactive {
10+
display: none;
11+
}
12+
13+
.pace .pace-progress {
14+
background: #949494;
15+
position: fixed;
16+
z-index: 2000;
17+
top: 0;
18+
right: 100%;
19+
width: 100%;
20+
height: 2px;
21+
}
22+
23+
.pace .pace-progress-inner {
24+
display: block;
25+
position: absolute;
26+
right: 0px;
27+
width: 100px;
28+
height: 100%;
29+
box-shadow: 0 0 10px #949494, 0 0 5px #949494;
30+
opacity: 1.0;
31+
-webkit-transform: rotate(3deg) translate(0px, -4px);
32+
-moz-transform: rotate(3deg) translate(0px, -4px);
33+
-ms-transform: rotate(3deg) translate(0px, -4px);
34+
-o-transform: rotate(3deg) translate(0px, -4px);
35+
transform: rotate(3deg) translate(0px, -4px);
36+
}
37+
38+
.pace .pace-activity {
39+
display: block;
40+
position: fixed;
41+
z-index: 2000;
42+
top: 15px;
43+
right: 15px;
44+
width: 14px;
45+
height: 14px;
46+
border: solid 4px transparent;
47+
border-top-color: #2FA732;
48+
border-left-color: #2FA732;
49+
border-radius: 10px;
50+
-webkit-animation: pace-spinner 400ms linear infinite;
51+
-moz-animation: pace-spinner 400ms linear infinite;
52+
-ms-animation: pace-spinner 400ms linear infinite;
53+
-o-animation: pace-spinner 400ms linear infinite;
54+
animation: pace-spinner 400ms linear infinite;
55+
}
56+
57+
@-webkit-keyframes pace-spinner {
58+
0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
59+
100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
60+
}
61+
@-moz-keyframes pace-spinner {
62+
0% { -moz-transform: rotate(0deg); transform: rotate(0deg); }
63+
100% { -moz-transform: rotate(360deg); transform: rotate(360deg); }
64+
}
65+
@-o-keyframes pace-spinner {
66+
0% { -o-transform: rotate(0deg); transform: rotate(0deg); }
67+
100% { -o-transform: rotate(360deg); transform: rotate(360deg); }
68+
}
69+
@-ms-keyframes pace-spinner {
70+
0% { -ms-transform: rotate(0deg); transform: rotate(0deg); }
71+
100% { -ms-transform: rotate(360deg); transform: rotate(360deg); }
72+
}
73+
@keyframes pace-spinner {
74+
0% { transform: rotate(0deg); transform: rotate(0deg); }
75+
100% { transform: rotate(360deg); transform: rotate(360deg); }
76+
}

0 commit comments

Comments
 (0)