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,612 @@
|
|
1
|
+
/**
|
2
|
+
* Bootstrap Dorpdown Wrapper.
|
3
|
+
*
|
4
|
+
* @author Htmlstream
|
5
|
+
* @version 1.0
|
6
|
+
*
|
7
|
+
*/
|
8
|
+
;(function($){
|
9
|
+
'use strict';
|
10
|
+
|
11
|
+
/**
|
12
|
+
* Helper function for detect support of touch events.
|
13
|
+
*
|
14
|
+
* @return Boolean
|
15
|
+
*/
|
16
|
+
function touchEvents(){
|
17
|
+
if('ontouchstart' in window) {
|
18
|
+
return true;
|
19
|
+
}
|
20
|
+
return false;
|
21
|
+
}
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Helper function for moving viewport to specified element.
|
25
|
+
*
|
26
|
+
* @param jQuery element
|
27
|
+
*
|
28
|
+
* @return undefined
|
29
|
+
*/
|
30
|
+
function focusElement(element){
|
31
|
+
if(!element || !element.length) return;
|
32
|
+
|
33
|
+
var header = element.closest('.u-header').filter('[class*="u-header--side"]'),
|
34
|
+
container = header.find('.u-header__sections-container'),
|
35
|
+
offset = element.offset().top + container.scrollTop(),
|
36
|
+
breakpoint = $(window).height() / 2;
|
37
|
+
|
38
|
+
if(header.length && offset > breakpoint) {
|
39
|
+
|
40
|
+
container.stop().animate({
|
41
|
+
scrollTop: offset - breakpoint
|
42
|
+
});
|
43
|
+
|
44
|
+
}
|
45
|
+
|
46
|
+
}
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Adds class if element doesn't fit into the screen.
|
50
|
+
*
|
51
|
+
* @param jQuery element
|
52
|
+
*
|
53
|
+
* @return undefined
|
54
|
+
*/
|
55
|
+
function smartPosition(element) {
|
56
|
+
if(!element || !element.length) return;
|
57
|
+
|
58
|
+
element.removeClass('u-dropdown--reverse-position').show();
|
59
|
+
|
60
|
+
var breakpoint = $(window).width(),
|
61
|
+
offset = element.offset().left + element.outerWidth();
|
62
|
+
|
63
|
+
element.hide();
|
64
|
+
|
65
|
+
if(offset > breakpoint) {
|
66
|
+
element.addClass('u-dropdown--reverse-position');
|
67
|
+
}
|
68
|
+
|
69
|
+
// need RTL implementation
|
70
|
+
}
|
71
|
+
|
72
|
+
$.HSCore.components.HSDropdown = {
|
73
|
+
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Base configuration of the wrapper.
|
77
|
+
*
|
78
|
+
* @var Object _baseConfig
|
79
|
+
*/
|
80
|
+
_baseConfig: {
|
81
|
+
event: 'click', // 'click', 'hover'
|
82
|
+
appear: 'show-hide' // 'show-hide', 'slide', 'fade', 'slideRight'
|
83
|
+
},
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Initialization of HSDropdown wrapper.
|
87
|
+
*
|
88
|
+
* @param String collection (optional)
|
89
|
+
*
|
90
|
+
* @return jQuery - collection of initialized items.
|
91
|
+
*/
|
92
|
+
init: function(collection) {
|
93
|
+
if(!collection && !collection.length) return;
|
94
|
+
|
95
|
+
var self = this;
|
96
|
+
|
97
|
+
return collection.each(function(i, el){
|
98
|
+
|
99
|
+
var $this = $(el),
|
100
|
+
config = $.extend(true, {}, self._baseConfig, $this.data());
|
101
|
+
|
102
|
+
if($this.data('HSDropdown')) return;
|
103
|
+
|
104
|
+
$this.data(
|
105
|
+
'HSDropdown',
|
106
|
+
self._makeDropdownObject($this, config)
|
107
|
+
);
|
108
|
+
|
109
|
+
});
|
110
|
+
},
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Returns Dropdown Object
|
114
|
+
*
|
115
|
+
* @param jQuery element
|
116
|
+
* @param Object config
|
117
|
+
*
|
118
|
+
* @return OnHoverDropdown|OnClickDropdown
|
119
|
+
*/
|
120
|
+
_makeDropdownObject: function(element, config) {
|
121
|
+
|
122
|
+
switch(config['event']) {
|
123
|
+
|
124
|
+
case 'hover' :
|
125
|
+
return new OnHoverDropdown(
|
126
|
+
element,
|
127
|
+
config,
|
128
|
+
this._makeDropdownEffect(element, config)
|
129
|
+
);
|
130
|
+
break;
|
131
|
+
|
132
|
+
default:
|
133
|
+
return new OnClickDropdown(
|
134
|
+
element,
|
135
|
+
config,
|
136
|
+
this._makeDropdownEffect(element, config)
|
137
|
+
);
|
138
|
+
|
139
|
+
}
|
140
|
+
|
141
|
+
},
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Returns dropdown effect object.
|
145
|
+
*
|
146
|
+
* @param jQuery element
|
147
|
+
* @param Object config
|
148
|
+
*
|
149
|
+
* @return SlideDownDropdownEffect|ShowHideDropdownEffect|FadeToggleDropdownEffect
|
150
|
+
*/
|
151
|
+
_makeDropdownEffect: function(element, config) {
|
152
|
+
|
153
|
+
switch(config['appear']) {
|
154
|
+
|
155
|
+
case 'slide':
|
156
|
+
return new SlideDownDropdownEffect(element);
|
157
|
+
break;
|
158
|
+
|
159
|
+
case 'slideRight':
|
160
|
+
return new SlideRightDropdownEffect(element);
|
161
|
+
break;
|
162
|
+
|
163
|
+
case 'fade':
|
164
|
+
return new FadeToggleDropdownEffect(element);
|
165
|
+
break;
|
166
|
+
|
167
|
+
|
168
|
+
default:
|
169
|
+
return new ShowHideDropdownEffect(element);
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
};
|
176
|
+
|
177
|
+
|
178
|
+
/**
|
179
|
+
* Constructor function for dropdown elements which will be appear by hover event.
|
180
|
+
*
|
181
|
+
* @param jQuery element
|
182
|
+
* @param Object config
|
183
|
+
* @param Object effect
|
184
|
+
*/
|
185
|
+
function OnHoverDropdown(element, config, effect) {
|
186
|
+
this.element = element;
|
187
|
+
this.config = config;
|
188
|
+
this.effect = effect;
|
189
|
+
|
190
|
+
if(touchEvents()) {
|
191
|
+
this.initTabletBehavior();
|
192
|
+
}
|
193
|
+
else {
|
194
|
+
this.init();
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
/**
|
199
|
+
* Initialization of OnHoverDropdown object.
|
200
|
+
*
|
201
|
+
* @return OnHoverDropdown
|
202
|
+
*/
|
203
|
+
OnHoverDropdown.prototype.init = function() {
|
204
|
+
var self = this;
|
205
|
+
|
206
|
+
this.element
|
207
|
+
.on('mouseenter.HSDropdown', function(e){
|
208
|
+
if(self.mouseLeaveTimeOutId) clearTimeout(self.mouseLeaveTimeOutId);
|
209
|
+
self.effect.show();
|
210
|
+
e.preventDefault();
|
211
|
+
})
|
212
|
+
.on('mouseleave.HSDropdown', function(e){
|
213
|
+
self.mouseLeaveTimeOutId = setTimeout(function(){
|
214
|
+
self.effect.hide();
|
215
|
+
}, 100);
|
216
|
+
e.preventDefault();
|
217
|
+
})
|
218
|
+
.on('click.HSDropdown', function(e){
|
219
|
+
e.stopPropagation();
|
220
|
+
})
|
221
|
+
.siblings('.dropdown-menu')
|
222
|
+
.on('mouseenter.HSDropdown', function(e){
|
223
|
+
if(self.mouseLeaveTimeOutId) clearTimeout(self.mouseLeaveTimeOutId);
|
224
|
+
e.preventDefault();
|
225
|
+
})
|
226
|
+
.on('mouseleave.HSDropdown', function(e){
|
227
|
+
self.mouseLeaveTimeOutId = setTimeout(function(){
|
228
|
+
self.effect.hide();
|
229
|
+
}, 100);
|
230
|
+
e.preventDefault();
|
231
|
+
});
|
232
|
+
|
233
|
+
return this;
|
234
|
+
}
|
235
|
+
|
236
|
+
/**
|
237
|
+
* Initialization tablet behavior of OnHoverDropdown object.
|
238
|
+
*
|
239
|
+
* @return OnHoverDropdown
|
240
|
+
*/
|
241
|
+
OnHoverDropdown.prototype.initTabletBehavior = function(){
|
242
|
+
|
243
|
+
var self = this;
|
244
|
+
|
245
|
+
this.element.on('click.HSDropdown', function(e){
|
246
|
+
if(!self.element.data('showed')) {
|
247
|
+
self.element.data('showed', true);
|
248
|
+
self.effect.show();
|
249
|
+
}
|
250
|
+
else {
|
251
|
+
self.element.data('showed', false);
|
252
|
+
self.effect.hide();
|
253
|
+
}
|
254
|
+
e.preventDefault();
|
255
|
+
e.stopPropagation();
|
256
|
+
});
|
257
|
+
|
258
|
+
$(document).on('click.HSDropdown', function(e){
|
259
|
+
if(!$(e.target).closest(self.element.parent()).length) {
|
260
|
+
self.element.data('showed', false);
|
261
|
+
self.effect.hide();
|
262
|
+
}
|
263
|
+
});
|
264
|
+
|
265
|
+
return this;
|
266
|
+
}
|
267
|
+
|
268
|
+
/**
|
269
|
+
* Destroy OnHoverDropdown object.
|
270
|
+
*
|
271
|
+
* @return OnHoverDropdown
|
272
|
+
*/
|
273
|
+
OnHoverDropdown.prototype.destroy = function() {
|
274
|
+
var self = this;
|
275
|
+
|
276
|
+
this.element
|
277
|
+
.off('.HSDropdown')
|
278
|
+
.siblings('.dropdown-menu')
|
279
|
+
.off('.HSDropdown');
|
280
|
+
|
281
|
+
$(document).off('.HSDropdown');
|
282
|
+
|
283
|
+
return this;
|
284
|
+
}
|
285
|
+
|
286
|
+
/**
|
287
|
+
* Constructor function for dropdown elements which will be appear by click event.
|
288
|
+
*
|
289
|
+
* @param jQuery element
|
290
|
+
* @param Object config
|
291
|
+
* @param Object effect
|
292
|
+
*/
|
293
|
+
function OnClickDropdown(element, config, effect) {
|
294
|
+
|
295
|
+
this.element = element;
|
296
|
+
this.config = config;
|
297
|
+
this.effect = effect;
|
298
|
+
|
299
|
+
this.init();
|
300
|
+
|
301
|
+
}
|
302
|
+
|
303
|
+
/**
|
304
|
+
*
|
305
|
+
*
|
306
|
+
* @param
|
307
|
+
*
|
308
|
+
* @return OnClickDropdown
|
309
|
+
*/
|
310
|
+
OnClickDropdown.prototype.init = function() {
|
311
|
+
var self = this;
|
312
|
+
|
313
|
+
this.element.on('click.HSDropdown', function(e){
|
314
|
+
|
315
|
+
var opened = $('[data-toggle="dropdown"]').not(self.element)
|
316
|
+
|
317
|
+
if(opened.length) {
|
318
|
+
opened.data('HSDropdown').effect.hide();
|
319
|
+
opened.data('HSDropdown').element.data('showed', false);
|
320
|
+
}
|
321
|
+
|
322
|
+
|
323
|
+
if(!self.element.data('showed')) {
|
324
|
+
self.element.data('showed', true);
|
325
|
+
self.effect.show();
|
326
|
+
}
|
327
|
+
else {
|
328
|
+
self.element.data('showed', false);
|
329
|
+
self.effect.hide();
|
330
|
+
}
|
331
|
+
e.preventDefault();
|
332
|
+
e.stopPropagation();
|
333
|
+
});
|
334
|
+
|
335
|
+
$(document).on('click.HSDropdown', function(e){
|
336
|
+
if(!$(e.target).closest(self.element.parent()).length) {
|
337
|
+
self.element.data('showed', false);
|
338
|
+
self.effect.hide();
|
339
|
+
}
|
340
|
+
});
|
341
|
+
|
342
|
+
return this;
|
343
|
+
}
|
344
|
+
|
345
|
+
/**
|
346
|
+
*
|
347
|
+
*
|
348
|
+
* @param
|
349
|
+
*
|
350
|
+
* @return OnClickDropdown
|
351
|
+
*/
|
352
|
+
OnClickDropdown.prototype.destroy = function() {
|
353
|
+
|
354
|
+
this.element
|
355
|
+
.off('.HSDropdown');
|
356
|
+
|
357
|
+
$(document).off('.HSDropdown');
|
358
|
+
|
359
|
+
return this;
|
360
|
+
}
|
361
|
+
|
362
|
+
/**
|
363
|
+
* Constructor function for making dropdown effect object.
|
364
|
+
*
|
365
|
+
* @param jQuery element
|
366
|
+
*/
|
367
|
+
function ShowHideDropdownEffect(element) {
|
368
|
+
this.element = element;
|
369
|
+
this.dropdown = this.element.siblings('.dropdown-menu');
|
370
|
+
}
|
371
|
+
|
372
|
+
/**
|
373
|
+
* Shows dropdown element.
|
374
|
+
*
|
375
|
+
* @return ShowHideDropdownEffect
|
376
|
+
*/
|
377
|
+
ShowHideDropdownEffect.prototype.show = function() {
|
378
|
+
var inlineNavbar = this.element.closest('[class*="u-navbar--inline-submenu"]');
|
379
|
+
|
380
|
+
if(!this.dropdown.length) return this;
|
381
|
+
|
382
|
+
this.element.parent().addClass('show');
|
383
|
+
|
384
|
+
if(inlineNavbar.length) {
|
385
|
+
inlineNavbar.removeClass('u-navbar--overflow');
|
386
|
+
|
387
|
+
var ddOffset = this.dropdown.offset().left;
|
388
|
+
|
389
|
+
if(ddOffset < 0) inlineNavbar.addClass('u-navbar--overflow');
|
390
|
+
}
|
391
|
+
|
392
|
+
focusElement(this.element);
|
393
|
+
|
394
|
+
return this;
|
395
|
+
}
|
396
|
+
|
397
|
+
/**
|
398
|
+
* Hides dropdown element.
|
399
|
+
*
|
400
|
+
* @return ShowHideDropdownEffect
|
401
|
+
*/
|
402
|
+
ShowHideDropdownEffect.prototype.hide = function() {
|
403
|
+
this.element.parent().removeClass('show');
|
404
|
+
|
405
|
+
return this;
|
406
|
+
}
|
407
|
+
|
408
|
+
/**
|
409
|
+
* Constructor function for making dropdown effect object.
|
410
|
+
*
|
411
|
+
* @param jQuery element
|
412
|
+
*/
|
413
|
+
function FadeToggleDropdownEffect(element) {
|
414
|
+
this.element = element;
|
415
|
+
|
416
|
+
this.dropdown = this.element.siblings('.dropdown-menu');
|
417
|
+
}
|
418
|
+
|
419
|
+
/**
|
420
|
+
* Shows dropdown element.
|
421
|
+
*
|
422
|
+
* @return FadeToggleDropdownEffect
|
423
|
+
*/
|
424
|
+
FadeToggleDropdownEffect.prototype.show = function() {
|
425
|
+
var self = this,
|
426
|
+
inlineNavbar = this.element.closest('[class*="u-navbar--inline-submenu"]');
|
427
|
+
|
428
|
+
if(!this.dropdown.length) return this;
|
429
|
+
|
430
|
+
if(inlineNavbar.length) {
|
431
|
+
inlineNavbar.removeClass('u-navbar--overflow');
|
432
|
+
|
433
|
+
this.dropdown.show();
|
434
|
+
var ddOffset = this.dropdown.offset().left;
|
435
|
+
this.dropdown.hide();
|
436
|
+
|
437
|
+
if(ddOffset < 0) inlineNavbar.addClass('u-navbar--overflow');
|
438
|
+
}
|
439
|
+
|
440
|
+
this.dropdown.stop().fadeIn({
|
441
|
+
easing: self.element.data('appear-easing') ? self.element.data('appear-easing') : 'linear',
|
442
|
+
duration: isFinite(self.element.data('appear-speed')) ? self.element.data('appear-speed') : 350,
|
443
|
+
complete: function() {
|
444
|
+
focusElement(self.element);
|
445
|
+
}
|
446
|
+
});
|
447
|
+
|
448
|
+
return this;
|
449
|
+
}
|
450
|
+
|
451
|
+
/**
|
452
|
+
* Hides dropdown element.
|
453
|
+
*
|
454
|
+
* @return FadeToggleDropdownEffect
|
455
|
+
*/
|
456
|
+
FadeToggleDropdownEffect.prototype.hide = function() {
|
457
|
+
var self = this;
|
458
|
+
|
459
|
+
this.dropdown.stop().fadeOut({
|
460
|
+
easing: self.element.data('appear-easing') ? self.element.data('appear-easing') : 'linear',
|
461
|
+
duration: isFinite(self.element.data('appear-speed')) ? self.element.data('appear-speed') : 350
|
462
|
+
});
|
463
|
+
|
464
|
+
return this;
|
465
|
+
}
|
466
|
+
|
467
|
+
/**
|
468
|
+
* Constructor function for making dropdown effect object.
|
469
|
+
*
|
470
|
+
* @param jQuery element
|
471
|
+
*/
|
472
|
+
function SlideDownDropdownEffect(element) {
|
473
|
+
this.element = element;
|
474
|
+
this.dropdown = this.element.siblings('.dropdown-menu');
|
475
|
+
}
|
476
|
+
|
477
|
+
/**
|
478
|
+
* Shows dropdown element.
|
479
|
+
*
|
480
|
+
* @return SlideDownDropdownEffect
|
481
|
+
*/
|
482
|
+
SlideDownDropdownEffect.prototype.show = function() {
|
483
|
+
var self = this,
|
484
|
+
inlineNavbar = this.element.closest('[class*="u-navbar--inline-submenu"]');
|
485
|
+
|
486
|
+
if(!this.dropdown.length) return this;
|
487
|
+
|
488
|
+
if(inlineNavbar.length) {
|
489
|
+
inlineNavbar.removeClass('u-navbar--overflow');
|
490
|
+
|
491
|
+
this.dropdown.show();
|
492
|
+
var ddOffset = this.dropdown.offset().left;
|
493
|
+
this.dropdown.hide();
|
494
|
+
|
495
|
+
if(ddOffset < 0) inlineNavbar.addClass('u-navbar--overflow');
|
496
|
+
}
|
497
|
+
|
498
|
+
smartPosition(this.dropdown);
|
499
|
+
|
500
|
+
this.dropdown.stop().slideDown({
|
501
|
+
easing: self.element.data('appear-easing') ? self.element.data('appear-easing') : 'linear',
|
502
|
+
duration: isFinite(self.element.data('appear-speed')) ? self.element.data('appear-speed') : 350,
|
503
|
+
complete: function() {
|
504
|
+
focusElement(self.element);
|
505
|
+
}
|
506
|
+
});
|
507
|
+
|
508
|
+
return this;
|
509
|
+
}
|
510
|
+
|
511
|
+
/**
|
512
|
+
* Hides dropdown element.
|
513
|
+
*
|
514
|
+
* @return SlideDownDropdownEffect
|
515
|
+
*/
|
516
|
+
SlideDownDropdownEffect.prototype.hide = function() {
|
517
|
+
var self = this;
|
518
|
+
|
519
|
+
this.dropdown.stop().slideUp({
|
520
|
+
easing: self.element.data('appear-easing') ? self.element.data('appear-easing') : 'linear',
|
521
|
+
duration: isFinite(self.element.data('appear-speed')) ? self.element.data('appear-speed') : 350
|
522
|
+
});
|
523
|
+
|
524
|
+
return this;
|
525
|
+
}
|
526
|
+
|
527
|
+
/**
|
528
|
+
* Constructor function for making dropdown effect object.
|
529
|
+
*
|
530
|
+
* @param jQuery element
|
531
|
+
*/
|
532
|
+
function SlideRightDropdownEffect(element) {
|
533
|
+
this.element = element;
|
534
|
+
this.dropdown = this.element.siblings('.dropdown-menu');
|
535
|
+
this.w = $(window);
|
536
|
+
|
537
|
+
this.toggleable = this.element.closest('[class*="navbar-toggleable-"]');
|
538
|
+
|
539
|
+
if(this.toggleable.hasClass('navbar-toggleable-lg')) {
|
540
|
+
this.breakpoint = 1200;
|
541
|
+
}
|
542
|
+
else if(this.toggleable.hasClass('navbar-toggleable-md')) {
|
543
|
+
this.breakpoint = 992;
|
544
|
+
}
|
545
|
+
else if(this.toggleable.hasClass('navbar-toggleable-sm')) {
|
546
|
+
this.breakpoint = 768;
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
550
|
+
/**
|
551
|
+
* Shows dropdown element.
|
552
|
+
*
|
553
|
+
* @return SlideRightDropdownEffect
|
554
|
+
*/
|
555
|
+
SlideRightDropdownEffect.prototype.show = function() {
|
556
|
+
var self = this;
|
557
|
+
|
558
|
+
this.dropdown.css('width', 'auto')
|
559
|
+
.data('initial-width', this.dropdown.outerWidth())
|
560
|
+
.css({
|
561
|
+
'width': 0,
|
562
|
+
'min-width': 'initial'
|
563
|
+
});
|
564
|
+
|
565
|
+
if(this.breakpoint && this.w.width() > this.breakpoint) {
|
566
|
+
this.dropdown.show().stop().animate({
|
567
|
+
width: self.dropdown.data('initial-width')
|
568
|
+
}, {
|
569
|
+
easing: self.element.data('appear-easing') ? self.element.data('appear-easing') : 'linear',
|
570
|
+
duration: isFinite(self.element.data('appear-speed')) ? self.element.data('appear-speed') : 350
|
571
|
+
});
|
572
|
+
}
|
573
|
+
else{
|
574
|
+
this.dropdown.css('width', 'auto').stop().slideDown({
|
575
|
+
easing: self.element.data('appear-easing') ? self.element.data('appear-easing') : 'linear',
|
576
|
+
duration: isFinite(self.element.data('appear-speed')) ? self.element.data('appear-speed') : 350
|
577
|
+
});
|
578
|
+
}
|
579
|
+
|
580
|
+
return this;
|
581
|
+
}
|
582
|
+
|
583
|
+
/**
|
584
|
+
* Hides dropdown element.
|
585
|
+
*
|
586
|
+
* @return SlideRightDropdownEffect
|
587
|
+
*/
|
588
|
+
SlideRightDropdownEffect.prototype.hide = function() {
|
589
|
+
var self = this;
|
590
|
+
|
591
|
+
if(this.breakpoint && this.w.width() > this.breakpoint) {
|
592
|
+
this.dropdown.stop().animate({
|
593
|
+
width: 0
|
594
|
+
}, {
|
595
|
+
easing: self.element.data('appear-easing') ? self.element.data('appear-easing') : 'linear',
|
596
|
+
duration: isFinite(self.element.data('appear-speed')) ? self.element.data('appear-speed') : 350,
|
597
|
+
complete: function() {
|
598
|
+
$(this).hide();
|
599
|
+
}
|
600
|
+
});
|
601
|
+
}
|
602
|
+
else{
|
603
|
+
this.dropdown.stop().slideUp({
|
604
|
+
easing: self.element.data('appear-easing') ? self.element.data('appear-easing') : 'linear',
|
605
|
+
duration: isFinite(self.element.data('appear-speed')) ? self.element.data('appear-speed') : 350
|
606
|
+
});
|
607
|
+
}
|
608
|
+
|
609
|
+
return this;
|
610
|
+
}
|
611
|
+
|
612
|
+
})(jQuery);
|