jekyll-theme-glueckkanja 0.8.3 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/_sass/font-awesome/scss/_icons.scss +91 -0
- data/_sass/font-awesome/scss/_rotated-flipped.scss +3 -2
- data/_sass/font-awesome/scss/_variables.scss +93 -1
- data/_sass/font-awesome/scss/brands.scss +1 -4
- data/_sass/font-awesome/scss/fontawesome.scss +0 -4
- data/_sass/font-awesome/scss/regular.scss +1 -4
- data/_sass/font-awesome/scss/solid.scss +1 -4
- data/_sass/font-awesome/scss/v4-shims.scss +0 -4
- data/assets/favicons/de.svg +5 -0
- data/assets/favicons/gk-logo-white.png +0 -0
- data/assets/favicons/us.svg +10 -0
- data/assets/img/cbp-sprite.png +0 -0
- data/assets/js/components/_hs.dropdown.js +612 -0
- data/assets/js/components/gmap/hs.map.js +347 -0
- data/assets/js/components/hs.ajax-autocomplete.js +103 -0
- data/assets/js/components/hs.autocomplete-local-search.js +113 -0
- data/assets/js/components/hs.autocomplete.js +125 -0
- data/assets/js/components/hs.bg-video.js +70 -0
- data/assets/js/components/hs.carousel-materialize.js +75 -0
- data/assets/js/components/hs.carousel-owl.js +89 -0
- data/assets/js/components/hs.carousel-swiper.js +123 -0
- data/assets/js/components/hs.carousel.js +283 -0
- data/assets/js/components/hs.chart-pie.js +220 -0
- data/assets/js/components/hs.chart.js +155 -0
- data/assets/js/components/hs.count-qty.js +92 -0
- data/assets/js/components/hs.countdown.js +359 -0
- data/assets/js/components/hs.counter.js +220 -0
- data/assets/js/components/hs.cubeportfolio.js +163 -0
- data/assets/js/components/hs.datepicker.js +149 -0
- data/assets/js/components/hs.dropdown.js +522 -0
- data/assets/js/components/hs.file-attachement.js +135 -0
- data/assets/js/components/hs.flickr.js +180 -0
- data/assets/js/components/hs.go-to.js +121 -0
- data/assets/js/components/hs.header-fullscreen.js +397 -0
- data/assets/js/components/hs.header-side.js +1096 -0
- data/assets/js/components/hs.header.js +2128 -0
- data/assets/js/components/hs.instagram.js +94 -0
- data/assets/js/components/hs.map.pin.js +82 -0
- data/assets/js/components/hs.map.svg.js +80 -0
- data/assets/js/components/hs.markup-copy.js +102 -0
- data/assets/js/components/hs.masked-input.js +74 -0
- data/assets/js/components/hs.modal-event.js +134 -0
- data/assets/js/components/hs.modal-window.js +422 -0
- data/assets/js/components/hs.navigation.js +690 -0
- data/assets/js/components/hs.nl-form.js +70 -0
- data/assets/js/components/hs.onscroll-animation.js +190 -0
- data/assets/js/components/hs.popup.js +310 -0
- data/assets/js/components/hs.progress-bar.js +353 -0
- data/assets/js/components/hs.rating.js +153 -0
- data/assets/js/components/hs.scroll-nav.js +373 -0
- data/assets/js/components/hs.scrollbar.js +102 -0
- data/assets/js/components/hs.select.js +91 -0
- data/assets/js/components/hs.slider.js +99 -0
- data/assets/js/components/hs.smart-menu.js +233 -0
- data/assets/js/components/hs.step-form-old.js +94 -0
- data/assets/js/components/hs.step-form.js +93 -0
- data/assets/js/components/hs.sticky-block.js +418 -0
- data/assets/js/components/hs.tabs.js +186 -0
- data/assets/js/components/hs.twitter.js +111 -0
- data/assets/js/components/hs.validation.js +111 -0
- data/assets/js/components/hs.video-audio.js +70 -0
- data/assets/js/components/text-animation/hs.text-slideshow.js +348 -0
- data/assets/js/helpers/hs.bg-video.js +23 -0
- data/assets/js/helpers/hs.chart.js +66 -0
- data/assets/js/helpers/hs.compressed-form.js +55 -0
- data/assets/js/helpers/hs.file-attachments.js +39 -0
- data/assets/js/helpers/hs.focus-state.js +37 -0
- data/assets/js/helpers/hs.hamburgers.js +69 -0
- data/assets/js/helpers/hs.height-calc.js +31 -0
- data/assets/js/helpers/hs.hover-blocks.js +43 -0
- data/assets/js/helpers/hs.modal-markup.js +89 -0
- data/assets/js/helpers/hs.navigation-splitted.js +169 -0
- data/assets/js/helpers/hs.not-empty-state.js +34 -0
- data/assets/js/helpers/hs.rating.js +45 -0
- data/assets/js/helpers/hs.selecter.js +14 -0
- data/assets/js/helpers/hs.shortcode-filter.js +39 -0
- data/assets/js/hs.core.js +250 -0
- data/assets/js/hs.popup.js +155 -0
- data/assets/js/vendor/jquery.cubeportfolio.js +6054 -0
- data/assets/js/vendor/jquery.fancybox.js +4936 -0
- data/assets/nav/pixel-trans.png +0 -0
- data/assets/nav/pixel-trans@2x.png +0 -0
- metadata +75 -1
@@ -0,0 +1,359 @@
|
|
1
|
+
/**
|
2
|
+
* Countdown wrapper.
|
3
|
+
*
|
4
|
+
* @author Htmlstream
|
5
|
+
* @version 1.0
|
6
|
+
* @requires Countdown (v2.2.0, http://hilios.github.io/jQuery.countdown), circles.js (v0.0.6)
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
;(function ($) {
|
10
|
+
'use strict';
|
11
|
+
|
12
|
+
$.HSCore.components.HSCountdown = {
|
13
|
+
|
14
|
+
/**
|
15
|
+
*
|
16
|
+
*
|
17
|
+
* @var Object _baseConfig
|
18
|
+
*/
|
19
|
+
_baseConfig: {
|
20
|
+
yearsElSelector: '.years',
|
21
|
+
monthElSelector: '.month',
|
22
|
+
daysElSelector: '.days',
|
23
|
+
hoursElSelector: '.hours',
|
24
|
+
minutesElSelector: '.minutes',
|
25
|
+
secondsElSelector: '.seconds',
|
26
|
+
// circles
|
27
|
+
circles: false,
|
28
|
+
wrpClass: 'wrpClass',
|
29
|
+
textClass: 'textClass',
|
30
|
+
valueStrokeClass: 'valueStrokeClass',
|
31
|
+
maxValueStrokeClass: 'maxValueStrokeClass',
|
32
|
+
styleWrapper: 'styleWrapper',
|
33
|
+
styleText: 'styleText'
|
34
|
+
},
|
35
|
+
|
36
|
+
/**
|
37
|
+
*
|
38
|
+
*
|
39
|
+
* @var jQuery pageCollection
|
40
|
+
*/
|
41
|
+
pageCollection: $(),
|
42
|
+
|
43
|
+
/**
|
44
|
+
*
|
45
|
+
*
|
46
|
+
* @var
|
47
|
+
*/
|
48
|
+
_circlesIds: [0],
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Initialization of Countdown wrapper.
|
52
|
+
*
|
53
|
+
* @param String selector (optional)
|
54
|
+
* @param Object config (optional)
|
55
|
+
*
|
56
|
+
* @return jQuery pageCollection - collection of initialized items.
|
57
|
+
*/
|
58
|
+
init: function (selector, config) {
|
59
|
+
|
60
|
+
this.collection = selector && $(selector).length ? $(selector) : $();
|
61
|
+
if (!$(selector).length) return;
|
62
|
+
|
63
|
+
this.config = config && $.isPlainObject(config) ?
|
64
|
+
$.extend({}, this._baseConfig, config) : this._baseConfig;
|
65
|
+
|
66
|
+
this.config.itemSelector = selector;
|
67
|
+
|
68
|
+
this.initCountdowns();
|
69
|
+
|
70
|
+
return this.pageCollection;
|
71
|
+
|
72
|
+
},
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Initialization of each Countdown of the page.
|
76
|
+
*
|
77
|
+
* @return undefined
|
78
|
+
*/
|
79
|
+
initCountdowns: function () {
|
80
|
+
|
81
|
+
var self = this;
|
82
|
+
|
83
|
+
this.collection.each(function (i, el) {
|
84
|
+
|
85
|
+
var $this = $(el),
|
86
|
+
|
87
|
+
options = {
|
88
|
+
endDate: $this.data('end-date') ? new Date($this.data('end-date')) : new Date(),
|
89
|
+
startDate: $this.data('start-date') ? new Date($this.data('start-date')) : new Date(),
|
90
|
+
yearsEl: $this.find(self.config['yearsElSelector']),
|
91
|
+
yearsFormat: $this.data('years-format'),
|
92
|
+
monthEl: $this.find(self.config['monthElSelector']),
|
93
|
+
monthFormat: $this.data('month-format'),
|
94
|
+
daysEl: $this.find(self.config['daysElSelector']),
|
95
|
+
daysFormat: $this.data('days-format'),
|
96
|
+
hoursEl: $this.find(self.config['hoursElSelector']),
|
97
|
+
hoursFormat: $this.data('hours-format'),
|
98
|
+
minutesEl: $this.find(self.config['minutesElSelector']),
|
99
|
+
minutesFormat: $this.data('minutes-format'),
|
100
|
+
secondsEl: $this.find(self.config['secondsElSelector']),
|
101
|
+
secondsFormat: $this.data('seconds-format')
|
102
|
+
};
|
103
|
+
|
104
|
+
if (self.config['circles'] && $this.data('start-date')) self._initPiesImplementation($this, options);
|
105
|
+
else self._initBaseImplementation($this, options);
|
106
|
+
|
107
|
+
self.pageCollection = self.pageCollection.add($this);
|
108
|
+
|
109
|
+
});
|
110
|
+
|
111
|
+
},
|
112
|
+
|
113
|
+
/**
|
114
|
+
*
|
115
|
+
* @param jQuery container
|
116
|
+
* @param Object options
|
117
|
+
*
|
118
|
+
* @return undefined
|
119
|
+
*/
|
120
|
+
_initBaseImplementation: function (container, options) {
|
121
|
+
|
122
|
+
container.countdown(options.endDate, function (e) {
|
123
|
+
|
124
|
+
if (options.yearsEl.length) {
|
125
|
+
options.yearsEl.text(e.strftime(options.yearsFormat));
|
126
|
+
}
|
127
|
+
|
128
|
+
if (options.monthEl.length) {
|
129
|
+
options.monthEl.text(e.strftime(options.monthFormat));
|
130
|
+
}
|
131
|
+
|
132
|
+
if (options.daysEl.length) {
|
133
|
+
options.daysEl.text(e.strftime(options.daysFormat));
|
134
|
+
}
|
135
|
+
|
136
|
+
if (options.hoursEl.length) {
|
137
|
+
options.hoursEl.text(e.strftime(options.hoursFormat));
|
138
|
+
}
|
139
|
+
|
140
|
+
if (options.minutesEl.length) {
|
141
|
+
options.minutesEl.text(e.strftime(options.minutesFormat));
|
142
|
+
}
|
143
|
+
|
144
|
+
if (options.secondsEl.length) {
|
145
|
+
options.secondsEl.text(e.strftime(options.secondsFormat));
|
146
|
+
}
|
147
|
+
|
148
|
+
});
|
149
|
+
|
150
|
+
},
|
151
|
+
|
152
|
+
/**
|
153
|
+
*
|
154
|
+
* @param jQuery container
|
155
|
+
* @param Object options
|
156
|
+
*
|
157
|
+
* @return undefined
|
158
|
+
*/
|
159
|
+
_initPiesImplementation: function (container, options) {
|
160
|
+
|
161
|
+
var self = this,
|
162
|
+
id,
|
163
|
+
oneDay = 24 * 60 * 60 * 1000;
|
164
|
+
|
165
|
+
// prepare elements
|
166
|
+
|
167
|
+
if (options.yearsEl.length) {
|
168
|
+
|
169
|
+
self._preparePieItem(options.yearsEl, {
|
170
|
+
maxValue: (options.endDate.getFullYear() - options.startDate.getFullYear()),
|
171
|
+
radius: container.data('circles-radius'),
|
172
|
+
width: container.data('circles-stroke-width'),
|
173
|
+
'fg-color': container.data('circles-fg-color'),
|
174
|
+
'bg-color': container.data('circles-bg-color'),
|
175
|
+
'additional-text': container.data('circles-additional-text'),
|
176
|
+
'font-size': container.data('circles-font-size')
|
177
|
+
});
|
178
|
+
|
179
|
+
}
|
180
|
+
|
181
|
+
if (options.monthEl.length) {
|
182
|
+
|
183
|
+
self._preparePieItem(options.monthEl, {
|
184
|
+
maxValue: Math.round(Math.abs((options.endDate.getTime() - options.startDate.getTime()) / (oneDay))) / 12,
|
185
|
+
radius: container.data('circles-radius'),
|
186
|
+
width: container.data('circles-stroke-width'),
|
187
|
+
'fg-color': container.data('circles-fg-color'),
|
188
|
+
'bg-color': container.data('circles-bg-color'),
|
189
|
+
'additional-text': container.data('circles-additional-text'),
|
190
|
+
'font-size': container.data('circles-font-size')
|
191
|
+
});
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
if (options.daysEl.length) {
|
196
|
+
|
197
|
+
self._preparePieItem(options.daysEl, {
|
198
|
+
maxValue: self._getDaysMaxValByFormat(options.daysFormat, options.startDate, options.endDate),
|
199
|
+
radius: container.data('circles-radius'),
|
200
|
+
width: container.data('circles-stroke-width'),
|
201
|
+
'fg-color': container.data('circles-fg-color'),
|
202
|
+
'bg-color': container.data('circles-bg-color'),
|
203
|
+
'additional-text': container.data('circles-additional-text'),
|
204
|
+
'font-size': container.data('circles-font-size')
|
205
|
+
});
|
206
|
+
|
207
|
+
}
|
208
|
+
|
209
|
+
if (options.hoursEl.length) {
|
210
|
+
|
211
|
+
self._preparePieItem(options.hoursEl, {
|
212
|
+
maxValue: 60,
|
213
|
+
radius: container.data('circles-radius'),
|
214
|
+
width: container.data('circles-stroke-width'),
|
215
|
+
'fg-color': container.data('circles-fg-color'),
|
216
|
+
'bg-color': container.data('circles-bg-color'),
|
217
|
+
'additional-text': container.data('circles-additional-text'),
|
218
|
+
'font-size': container.data('circles-font-size')
|
219
|
+
});
|
220
|
+
|
221
|
+
}
|
222
|
+
|
223
|
+
if (options.minutesEl.length) {
|
224
|
+
|
225
|
+
self._preparePieItem(options.minutesEl, {
|
226
|
+
maxValue: 60,
|
227
|
+
radius: container.data('circles-radius'),
|
228
|
+
width: container.data('circles-stroke-width'),
|
229
|
+
'fg-color': container.data('circles-fg-color'),
|
230
|
+
'bg-color': container.data('circles-bg-color'),
|
231
|
+
'additional-text': container.data('circles-additional-text'),
|
232
|
+
'font-size': container.data('circles-font-size')
|
233
|
+
});
|
234
|
+
|
235
|
+
}
|
236
|
+
|
237
|
+
if (options.secondsEl.length) {
|
238
|
+
|
239
|
+
self._preparePieItem(options.secondsEl, {
|
240
|
+
maxValue: 60,
|
241
|
+
radius: container.data('circles-radius'),
|
242
|
+
width: container.data('circles-stroke-width'),
|
243
|
+
'fg-color': container.data('circles-fg-color'),
|
244
|
+
'bg-color': container.data('circles-bg-color'),
|
245
|
+
'additional-text': container.data('circles-additional-text'),
|
246
|
+
'font-size': container.data('circles-font-size')
|
247
|
+
});
|
248
|
+
|
249
|
+
}
|
250
|
+
|
251
|
+
// init countdown
|
252
|
+
container.countdown(options.endDate, function (e) {
|
253
|
+
|
254
|
+
// years
|
255
|
+
if (options.yearsEl.length) {
|
256
|
+
options.yearsEl.data('circle').update(e.strftime(options.yearsFormat));
|
257
|
+
}
|
258
|
+
|
259
|
+
// months
|
260
|
+
if (options.monthEl.length) {
|
261
|
+
|
262
|
+
options.monthEl.data('circle').update(e.strftime(options.monthFormat));
|
263
|
+
}
|
264
|
+
|
265
|
+
// days
|
266
|
+
if (options.daysEl.length) {
|
267
|
+
options.daysEl.data('circle').update(e.strftime(options.daysFormat));
|
268
|
+
}
|
269
|
+
|
270
|
+
// hours
|
271
|
+
if (options.hoursEl.length) {
|
272
|
+
options.hoursEl.data('circle').update(e.strftime(options.hoursFormat));
|
273
|
+
}
|
274
|
+
|
275
|
+
// minutes
|
276
|
+
if (options.minutesEl.length) {
|
277
|
+
options.minutesEl.data('circle').update(e.strftime(options.minutesFormat));
|
278
|
+
}
|
279
|
+
|
280
|
+
// seconds
|
281
|
+
if (options.secondsEl.length) {
|
282
|
+
options.secondsEl.data('circle').update(e.strftime(options.secondsFormat));
|
283
|
+
}
|
284
|
+
|
285
|
+
});
|
286
|
+
|
287
|
+
},
|
288
|
+
|
289
|
+
/**
|
290
|
+
*
|
291
|
+
* @param jQuery el
|
292
|
+
* @param Object options
|
293
|
+
*
|
294
|
+
* @return undefined
|
295
|
+
*/
|
296
|
+
_preparePieItem: function (el, options) {
|
297
|
+
|
298
|
+
var self = this,
|
299
|
+
id = self._circlesIds[self._circlesIds.length - 1] + 1;
|
300
|
+
self._circlesIds.push(id);
|
301
|
+
|
302
|
+
el.attr('id', 'hs-countdown-element-' + id);
|
303
|
+
|
304
|
+
el.data('circle', Circles.create({
|
305
|
+
id: 'hs-countdown-element-' + id,
|
306
|
+
radius: options['radius'] || 80,
|
307
|
+
value: 0,
|
308
|
+
maxValue: options['maxValue'] || 100,
|
309
|
+
width: options['width'] || 10,
|
310
|
+
text: function (value) {
|
311
|
+
return value + (options['additional-text'] || '');
|
312
|
+
},
|
313
|
+
colors: [options['bg-color'] || '#eeeeee', options['fg-color'] || '#72c02c'],
|
314
|
+
duration: 0,
|
315
|
+
wrpClass: self.config['wrpClass'],
|
316
|
+
textClass: self.config['textClass'],
|
317
|
+
valueStrokeClass: self.config['valueStrokeClass'],
|
318
|
+
maxValueStrokeClass: self.config['maxValueStrokeClass'],
|
319
|
+
styleWrapper: self.config['styleWrapper'],
|
320
|
+
styleText: self.config['styleText']
|
321
|
+
}));
|
322
|
+
|
323
|
+
if (options['font-size']) {
|
324
|
+
el.find('.' + self.config['textClass']).css('font-size', options['font-size'] + 'px');
|
325
|
+
}
|
326
|
+
|
327
|
+
},
|
328
|
+
|
329
|
+
/**
|
330
|
+
*
|
331
|
+
* @param String format
|
332
|
+
* @param Date startDate
|
333
|
+
* @param Date endDate
|
334
|
+
*
|
335
|
+
* @return Number
|
336
|
+
*/
|
337
|
+
_getDaysMaxValByFormat: function (format, startDate, endDate) {
|
338
|
+
|
339
|
+
var oneDay = 24 * 60 * 60 * 1000;
|
340
|
+
|
341
|
+
switch (format) {
|
342
|
+
|
343
|
+
case '%D':
|
344
|
+
|
345
|
+
return Math.round(Math.abs((endDate.getTime() - startDate.getTime()) / (oneDay)));
|
346
|
+
|
347
|
+
break;
|
348
|
+
|
349
|
+
default:
|
350
|
+
|
351
|
+
return 31;
|
352
|
+
|
353
|
+
}
|
354
|
+
|
355
|
+
}
|
356
|
+
|
357
|
+
}
|
358
|
+
|
359
|
+
})(jQuery);
|
@@ -0,0 +1,220 @@
|
|
1
|
+
/**
|
2
|
+
* Counter wrapper.
|
3
|
+
*
|
4
|
+
* @author Htmlstream
|
5
|
+
* @version 1.0
|
6
|
+
* @requires appear.js (v1.0.3)
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
;(function($){
|
10
|
+
'use strict';
|
11
|
+
|
12
|
+
$.HSCore.components.HSCounter = {
|
13
|
+
|
14
|
+
/**
|
15
|
+
*
|
16
|
+
*
|
17
|
+
* @var Object _baseConfig
|
18
|
+
*/
|
19
|
+
_baseConfig : {
|
20
|
+
bounds: -100,
|
21
|
+
debounce: 10,
|
22
|
+
time: 6000,
|
23
|
+
fps: 60,
|
24
|
+
commaSeparated: false
|
25
|
+
},
|
26
|
+
|
27
|
+
/**
|
28
|
+
*
|
29
|
+
*
|
30
|
+
* @var jQuery _pageCollection
|
31
|
+
*/
|
32
|
+
_pageCollection : $(),
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Initialization of Counter wrapper.
|
36
|
+
*
|
37
|
+
* @param String selector (optional)
|
38
|
+
* @param Object config (optional)
|
39
|
+
*
|
40
|
+
* @return jQuery pageCollection - collection of initialized items.
|
41
|
+
*/
|
42
|
+
init: function(selector, config){
|
43
|
+
|
44
|
+
this.collection = $(selector) && $(selector).length ? $(selector) : $();
|
45
|
+
if(!this.collection.length) return;
|
46
|
+
|
47
|
+
this.config = config && $.isPlainObject(config) ? $.extend({}, this._baseConfig, config) : this._baseConfig;
|
48
|
+
this.config.itemSelector = selector;
|
49
|
+
|
50
|
+
this.initCounters();
|
51
|
+
|
52
|
+
},
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Initialization of each Counter of the page.
|
56
|
+
*
|
57
|
+
* @return undefined
|
58
|
+
*/
|
59
|
+
initCounters: function() {
|
60
|
+
|
61
|
+
var self = this;
|
62
|
+
|
63
|
+
appear({
|
64
|
+
|
65
|
+
bounds: self.config['bounds'],
|
66
|
+
debounce: self.config['debounce'],
|
67
|
+
|
68
|
+
init: function() {
|
69
|
+
|
70
|
+
self.collection.each(function(i, el) {
|
71
|
+
|
72
|
+
var $item = $(el),
|
73
|
+
value = parseInt($item.text(), 10);
|
74
|
+
|
75
|
+
$item.text('0').data('value', value);
|
76
|
+
|
77
|
+
self._pageCollection = self._pageCollection.add($item);
|
78
|
+
|
79
|
+
});
|
80
|
+
|
81
|
+
},
|
82
|
+
|
83
|
+
elements: function() {
|
84
|
+
return document.querySelectorAll(self.config['itemSelector']);
|
85
|
+
},
|
86
|
+
|
87
|
+
appear: function(el) {
|
88
|
+
|
89
|
+
var $item = $(el),
|
90
|
+
counter = 1,
|
91
|
+
endValue = $item.data('value'),
|
92
|
+
iterationValue = parseInt(endValue / ((self.config['time'] / self.config['fps'])), 10),
|
93
|
+
isCommaSeparated = $item.data('comma-separated'),
|
94
|
+
isReduced = $item.data('reduce-thousands-to');
|
95
|
+
|
96
|
+
if(iterationValue == 0) iterationValue = 1;
|
97
|
+
|
98
|
+
$item.data('intervalId', setInterval(function(){
|
99
|
+
|
100
|
+
if(isCommaSeparated){
|
101
|
+
|
102
|
+
$item.text(self.getCommaSeparatedValue(counter+= iterationValue));
|
103
|
+
|
104
|
+
}
|
105
|
+
else if(isReduced) {
|
106
|
+
$item.text(self.getCommaReducedValue(counter+= iterationValue, isReduced));
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
|
110
|
+
$item.text(counter+= iterationValue);
|
111
|
+
}
|
112
|
+
|
113
|
+
if(counter > endValue) {
|
114
|
+
|
115
|
+
clearInterval($item.data('intervalId'));
|
116
|
+
if(isCommaSeparated) {
|
117
|
+
$item.text(self.getCommaSeparatedValue(endValue));
|
118
|
+
}
|
119
|
+
else if(isReduced) {
|
120
|
+
$item.text(self.getCommaReducedValue(endValue, isReduced));
|
121
|
+
}
|
122
|
+
else {
|
123
|
+
$item.text(endValue);
|
124
|
+
}
|
125
|
+
|
126
|
+
return;
|
127
|
+
|
128
|
+
}
|
129
|
+
|
130
|
+
}, self.config['time'] / self.config['fps']));
|
131
|
+
|
132
|
+
}
|
133
|
+
|
134
|
+
});
|
135
|
+
|
136
|
+
},
|
137
|
+
|
138
|
+
/**
|
139
|
+
*
|
140
|
+
*
|
141
|
+
* @param Number value
|
142
|
+
*
|
143
|
+
* @return String
|
144
|
+
*/
|
145
|
+
getCommaReducedValue: function(value, additionalText) {
|
146
|
+
|
147
|
+
return parseInt(value / 1000, 10) + additionalText;
|
148
|
+
|
149
|
+
},
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Returns comma separated value.
|
153
|
+
*
|
154
|
+
* @param Number value
|
155
|
+
*
|
156
|
+
* @return String
|
157
|
+
*/
|
158
|
+
getCommaSeparatedValue: function(value) {
|
159
|
+
|
160
|
+
value = new String(value);
|
161
|
+
|
162
|
+
switch(value.length) {
|
163
|
+
|
164
|
+
case 4:
|
165
|
+
|
166
|
+
return value.substr(0, 1) + ',' + value.substr(1);
|
167
|
+
|
168
|
+
break;
|
169
|
+
|
170
|
+
case 5:
|
171
|
+
|
172
|
+
return value.substr(0, 2) + ',' + value.substr(2);
|
173
|
+
|
174
|
+
break;
|
175
|
+
|
176
|
+
case 6:
|
177
|
+
|
178
|
+
return value.substr(0, 3) + ',' + value.substr(3);
|
179
|
+
|
180
|
+
break;
|
181
|
+
case 7:
|
182
|
+
|
183
|
+
value = value.substr(0, 1) + ',' + value.substr(1);
|
184
|
+
return value.substr(0, 5) + ',' + value.substr(5);
|
185
|
+
|
186
|
+
break;
|
187
|
+
|
188
|
+
case 8:
|
189
|
+
|
190
|
+
value = value.substr(0, 2) + ',' + value.substr(2);
|
191
|
+
return value.substr(0, 6) + ',' + value.substr(6);
|
192
|
+
|
193
|
+
break;
|
194
|
+
|
195
|
+
case 9:
|
196
|
+
|
197
|
+
value = value.substr(0, 3) + ',' + value.substr(3);
|
198
|
+
return value.substr(0, 7) + ',' + value.substr(7);
|
199
|
+
|
200
|
+
break;
|
201
|
+
|
202
|
+
case 10:
|
203
|
+
|
204
|
+
value = value.substr(0, 1) + ',' + value.substr(1);
|
205
|
+
value = value.substr(0, 5) + ',' + value.substr(5);
|
206
|
+
return value.substr(0, 9) + ',' + value.substr(9);
|
207
|
+
|
208
|
+
break;
|
209
|
+
|
210
|
+
default:
|
211
|
+
|
212
|
+
return value;
|
213
|
+
|
214
|
+
}
|
215
|
+
|
216
|
+
}
|
217
|
+
|
218
|
+
};
|
219
|
+
|
220
|
+
})(jQuery);
|