creative_tim 1.0.13 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/creative_tim/version.rb +1 -1
- data/vendor/assets/javascripts/creative-tim/{awesome-landing-page.js → awesome_landing_page/awesome-landing-page.js} +0 -0
- data/vendor/assets/javascripts/creative-tim/{gaia.js → gaia/gaia.js} +0 -0
- data/vendor/assets/javascripts/creative-tim/light_dashboard/bootstrap-checkbox-radio-switch.js +502 -0
- data/vendor/assets/javascripts/creative-tim/light_dashboard/bootstrap-notify.js +404 -0
- data/vendor/assets/javascripts/creative-tim/light_dashboard/bootstrap-select.js +438 -0
- data/vendor/assets/javascripts/creative-tim/light_dashboard/chartist.min.js +9 -0
- data/vendor/assets/javascripts/creative-tim/light_dashboard/demo.js +152 -0
- data/vendor/assets/javascripts/creative-tim/light_dashboard/light-bootstrap-dashboard.js +159 -0
- data/vendor/assets/javascripts/creative-tim/paper_dashboard/bootstrap-checkbox-radio.js +179 -179
- data/vendor/assets/javascripts/creative-tim/paper_kit/bootstrap-datepicker.js +492 -0
- data/vendor/assets/javascripts/creative-tim/paper_kit/bootstrap-select.js +438 -0
- data/vendor/assets/javascripts/creative-tim/paper_kit/ct-paper-checkbox.js +109 -0
- data/vendor/assets/javascripts/creative-tim/paper_kit/ct-paper-radio.js +140 -0
- data/vendor/assets/javascripts/creative-tim/paper_kit/ct-paper.js +378 -0
- data/vendor/assets/javascripts/creative-tim/shit_done/custom.js +9 -0
- data/vendor/assets/javascripts/creative-tim/shit_done/get-shit-done.js +108 -0
- data/vendor/assets/javascripts/creative-tim/shit_done/gsdk-bootstrapswitch.js +249 -0
- data/vendor/assets/javascripts/creative-tim/shit_done/gsdk-checkbox.js +109 -0
- data/vendor/assets/javascripts/creative-tim/shit_done/gsdk-radio.js +140 -0
- data/vendor/assets/stylesheets/creative-tim/{awesome_landing → awesome_landing_page}/landing-page.css +41 -41
- data/vendor/assets/stylesheets/creative-tim/awesome_landing_page/pe-icon-7-stroke.css +632 -0
- data/vendor/assets/stylesheets/creative-tim/light_dashboard/animate.min.css +6 -0
- data/vendor/assets/stylesheets/creative-tim/light_dashboard/demo.css +61 -0
- data/vendor/assets/stylesheets/creative-tim/light_dashboard/light-bootstrap-dashboard.css +3393 -0
- data/vendor/assets/stylesheets/creative-tim/light_dashboard/pe-icon-7-stroke.css +632 -0
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/paper-dashboard.css +2 -2
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_alerts.scss +0 -23
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_buttons.scss +7 -1
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_carousel.scss +59 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_checkbox-radio.scss +10 -13
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_collapse.scss +30 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_datepicker.scss +221 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_dropdown.scss +2 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_images.scss +28 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_inputs.scss +5 -38
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_labels.scss +26 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_misc.scss +127 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_mixins.scss +1 -4
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_modal.scss +54 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_navbars.scss +117 -13
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_progress-bars.scss +27 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_responsive.scss +124 -218
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_sections.scss +38 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_sliders.scss +222 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_tabs-navs-pagination.scss +353 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper/_tooltips-and-popovers.scss +171 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_typography.scss +7 -41
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/_variables.scss +55 -79
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/mixins/_buttons.scss +1 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/mixins/_inputs.scss +0 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/mixins/_labels.scss +0 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/mixins/_navbars.scss +0 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/mixins/_tabs.scss +0 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/mixins/_transparency.scss +0 -0
- data/vendor/assets/stylesheets/creative-tim/{paper_dashboard/sass/paper → paper_kit/ct-paper}/mixins/_vendor-prefixes.scss +0 -12
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper.css +3323 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/ct-paper.scss +34 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/demo.css +994 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/examples.css +179 -0
- data/vendor/assets/stylesheets/creative-tim/paper_kit/examples.scss +150 -0
- data/vendor/assets/stylesheets/creative-tim/shit_done/demo.css +324 -0
- data/vendor/assets/stylesheets/creative-tim/shit_done/get-shit-done.css +7 -0
- data/vendor/assets/stylesheets/creative-tim/shit_done/gsdk-base.css +1187 -0
- data/vendor/assets/stylesheets/creative-tim/shit_done/gsdk-checkbox-radio-switch.css +257 -0
- data/vendor/assets/stylesheets/creative-tim/shit_done/gsdk-sliders.css +220 -0
- metadata +64 -39
- data/vendor/assets/javascripts/creative-tim/paper_dashboard/bootstrap.min.js +0 -7
- data/vendor/assets/javascripts/creative-tim/paper_dashboard/jquery-1.10.2.js +0 -9789
- data/vendor/assets/stylesheets/creative-tim/awesome_landing/bootstrap.css +0 -6358
- data/vendor/assets/stylesheets/creative-tim/awesome_landing/fixes.scss +0 -39
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/bootstrap.min.css +0 -5
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/fixes.scss +0 -45
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/_cards.scss +0 -243
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/_chartist.scss +0 -230
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/_footers.scss +0 -43
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/_misc.scss +0 -69
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/_sidebar-and-main-panel.scss +0 -195
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/_tables.scss +0 -77
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/mixins/_cards.scss +0 -8
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/mixins/_chartist.scss +0 -104
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/mixins/_icons.scss +0 -13
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper/mixins/_sidebar.scss +0 -42
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/sass/paper-dashboard.scss +0 -28
- data/vendor/assets/stylesheets/creative-tim/paper_dashboard/themify-icons.css +0 -1081
@@ -0,0 +1,140 @@
|
|
1
|
+
/* =============================================================
|
2
|
+
* flatui-radio v0.0.3
|
3
|
+
* ============================================================ */
|
4
|
+
|
5
|
+
!function ($) {
|
6
|
+
|
7
|
+
/* RADIO PUBLIC CLASS DEFINITION
|
8
|
+
* ============================== */
|
9
|
+
|
10
|
+
var Radio = function (element, options) {
|
11
|
+
this.init(element, options);
|
12
|
+
}
|
13
|
+
|
14
|
+
Radio.prototype = {
|
15
|
+
|
16
|
+
constructor: Radio
|
17
|
+
|
18
|
+
, init: function (element, options) {
|
19
|
+
var $el = this.$element = $(element)
|
20
|
+
|
21
|
+
this.options = $.extend({}, $.fn.radio.defaults, options);
|
22
|
+
$el.before(this.options.template);
|
23
|
+
this.setState();
|
24
|
+
}
|
25
|
+
|
26
|
+
, setState: function () {
|
27
|
+
var $el = this.$element
|
28
|
+
, $parent = $el.closest('.radio');
|
29
|
+
|
30
|
+
$el.prop('disabled') && $parent.addClass('disabled');
|
31
|
+
$el.prop('checked') && $parent.addClass('checked');
|
32
|
+
}
|
33
|
+
|
34
|
+
, toggle: function () {
|
35
|
+
var d = 'disabled'
|
36
|
+
, ch = 'checked'
|
37
|
+
, $el = this.$element
|
38
|
+
, checked = $el.prop(ch)
|
39
|
+
, $parent = $el.closest('.radio')
|
40
|
+
, $parentWrap = $el.closest('form').length ? $el.closest('form') : $el.closest('body')
|
41
|
+
, $elemGroup = $parentWrap.find(':radio[name="' + $el.attr('name') + '"]')
|
42
|
+
, e = $.Event('toggle')
|
43
|
+
|
44
|
+
if ($el.prop(d) == false) {
|
45
|
+
$elemGroup.not($el).each(function () {
|
46
|
+
var $el = $(this)
|
47
|
+
, $parent = $(this).closest('.radio');
|
48
|
+
|
49
|
+
if ($el.prop(d) == false) {
|
50
|
+
$parent.removeClass(ch) && $el.removeAttr(ch).trigger('change');
|
51
|
+
}
|
52
|
+
});
|
53
|
+
|
54
|
+
if (checked == false) $parent.addClass(ch) && $el.prop(ch, true);
|
55
|
+
$el.trigger(e);
|
56
|
+
|
57
|
+
if (checked !== $el.prop(ch)) {
|
58
|
+
$el.trigger('change');
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
, setCheck: function (option) {
|
64
|
+
var ch = 'checked'
|
65
|
+
, $el = this.$element
|
66
|
+
, $parent = $el.closest('.radio')
|
67
|
+
, checkAction = option == 'check' ? true : false
|
68
|
+
, checked = $el.prop(ch)
|
69
|
+
, $parentWrap = $el.closest('form').length ? $el.closest('form') : $el.closest('body')
|
70
|
+
, $elemGroup = $parentWrap.find(':radio[name="' + $el['attr']('name') + '"]')
|
71
|
+
, e = $.Event(option)
|
72
|
+
|
73
|
+
$elemGroup.not($el).each(function () {
|
74
|
+
var $el = $(this)
|
75
|
+
, $parent = $(this).closest('.radio');
|
76
|
+
|
77
|
+
$parent.removeClass(ch) && $el.removeAttr(ch);
|
78
|
+
});
|
79
|
+
|
80
|
+
$parent[checkAction ? 'addClass' : 'removeClass'](ch) && checkAction ? $el.prop(ch, ch) : $el.removeAttr(ch);
|
81
|
+
$el.trigger(e);
|
82
|
+
|
83
|
+
if (checked !== $el.prop(ch)) {
|
84
|
+
$el.trigger('change');
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
}
|
89
|
+
|
90
|
+
|
91
|
+
/* RADIO PLUGIN DEFINITION
|
92
|
+
* ======================== */
|
93
|
+
|
94
|
+
var old = $.fn.radio
|
95
|
+
|
96
|
+
$.fn.radio = function (option) {
|
97
|
+
return this.each(function () {
|
98
|
+
var $this = $(this)
|
99
|
+
, data = $this.data('radio')
|
100
|
+
, options = $.extend({}, $.fn.radio.defaults, $this.data(), typeof option == 'object' && option);
|
101
|
+
if (!data) $this.data('radio', (data = new Radio(this, options)));
|
102
|
+
if (option == 'toggle') data.toggle()
|
103
|
+
if (option == 'check' || option == 'uncheck') data.setCheck(option)
|
104
|
+
else if (option) data.setState();
|
105
|
+
});
|
106
|
+
}
|
107
|
+
|
108
|
+
$.fn.radio.defaults = {
|
109
|
+
template: '<span class="icons"><span class="first-icon fa fa-circle-o fa-base"></span><span class="second-icon fa fa-dot-circle-o fa-base"></span></span>'
|
110
|
+
}
|
111
|
+
|
112
|
+
|
113
|
+
/* RADIO NO CONFLICT
|
114
|
+
* ================== */
|
115
|
+
|
116
|
+
$.fn.radio.noConflict = function () {
|
117
|
+
$.fn.radio = old;
|
118
|
+
return this;
|
119
|
+
}
|
120
|
+
|
121
|
+
|
122
|
+
/* RADIO DATA-API
|
123
|
+
* =============== */
|
124
|
+
|
125
|
+
$(document).on('click.radio.data-api', '[data-toggle^=radio], .radio', function (e) {
|
126
|
+
var $radio = $(e.target);
|
127
|
+
e && e.preventDefault() && e.stopPropagation();
|
128
|
+
if (!$radio.hasClass('radio')) $radio = $radio.closest('.radio');
|
129
|
+
$radio.find(':radio').radio('toggle');
|
130
|
+
});
|
131
|
+
|
132
|
+
$(function () {
|
133
|
+
$('[data-toggle="radio"]').each(function () {
|
134
|
+
var $radio = $(this);
|
135
|
+
$radio.radio();
|
136
|
+
});
|
137
|
+
});
|
138
|
+
|
139
|
+
}(window.jQuery);
|
140
|
+
|
@@ -0,0 +1,378 @@
|
|
1
|
+
var searchVisible = 0;
|
2
|
+
var transparent = true;
|
3
|
+
|
4
|
+
var transparentDemo = true;
|
5
|
+
var fixedTop = false;
|
6
|
+
|
7
|
+
var navbar_initialized = false;
|
8
|
+
|
9
|
+
$(document).ready(function(){
|
10
|
+
window_width = $(window).width();
|
11
|
+
|
12
|
+
// Init navigation toggle for small screens
|
13
|
+
if(window_width < 768){
|
14
|
+
gsdk.initRightMenu();
|
15
|
+
}
|
16
|
+
|
17
|
+
// Activate Morpghing Buttons
|
18
|
+
$('[data-toggle="morphing"]').each(function () {
|
19
|
+
$(this).morphingButton();
|
20
|
+
});
|
21
|
+
|
22
|
+
// Activate the tooltips
|
23
|
+
$('[rel="tooltip"]').tooltip();
|
24
|
+
|
25
|
+
// Activate the switches with icons
|
26
|
+
if($('.switch').length != 0){
|
27
|
+
$('.switch')['bootstrapSwitch']();
|
28
|
+
}
|
29
|
+
// Activate regular switches
|
30
|
+
if($("[data-toggle='switch']").length != 0){
|
31
|
+
$("[data-toggle='switch']").wrap('<div class="switch" />').parent().bootstrapSwitch();
|
32
|
+
}
|
33
|
+
|
34
|
+
// Activate bootstrap-select
|
35
|
+
if($(".selectpicker").length != 0){
|
36
|
+
$(".selectpicker").selectpicker();
|
37
|
+
}
|
38
|
+
|
39
|
+
if($(".tagsinput").length != 0){
|
40
|
+
$(".tagsinput").tagsInput();
|
41
|
+
}
|
42
|
+
|
43
|
+
if($('.datepicker').length != 0){
|
44
|
+
$('.datepicker').datepicker({
|
45
|
+
weekStart:1,
|
46
|
+
color: '{color}'
|
47
|
+
});
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
$('.btn-tooltip').tooltip();
|
52
|
+
$('.label-tooltip').tooltip();
|
53
|
+
|
54
|
+
// Carousel
|
55
|
+
$('.carousel').carousel({
|
56
|
+
interval: 4000
|
57
|
+
});
|
58
|
+
|
59
|
+
$('.form-control').on("focus", function(){
|
60
|
+
$(this).parent('.input-group').addClass("input-group-focus");
|
61
|
+
}).on("blur", function(){
|
62
|
+
$(this).parent(".input-group").removeClass("input-group-focus");
|
63
|
+
});
|
64
|
+
|
65
|
+
demo.initPickColor();
|
66
|
+
|
67
|
+
// Make the images from the card fill the hole space
|
68
|
+
gsdk.fitBackgroundForCards();
|
69
|
+
|
70
|
+
// Init icon search action for the navbar
|
71
|
+
gsdk.initNavbarSearch();
|
72
|
+
|
73
|
+
// Init popovers
|
74
|
+
gsdk.initPopovers();
|
75
|
+
|
76
|
+
// Init Collapse Areas
|
77
|
+
gsdk.initCollapseArea();
|
78
|
+
|
79
|
+
// Init Sliders
|
80
|
+
gsdk.initSliders();
|
81
|
+
|
82
|
+
// Init video card actions
|
83
|
+
gsdk.initVideoCards();
|
84
|
+
|
85
|
+
});
|
86
|
+
|
87
|
+
// activate collapse right menu when the windows is resized
|
88
|
+
$(window).resize(function(){
|
89
|
+
if($(window).width() < 768){
|
90
|
+
gsdk.initRightMenu();
|
91
|
+
}
|
92
|
+
});
|
93
|
+
|
94
|
+
gsdk = {
|
95
|
+
misc:{
|
96
|
+
navbar_menu_visible: 0
|
97
|
+
},
|
98
|
+
initRightMenu: function(){
|
99
|
+
if(!navbar_initialized){
|
100
|
+
$navbar = $('nav').find('.navbar-collapse').first().clone(true);
|
101
|
+
$navbar.css('min-height', window.screen.height);
|
102
|
+
|
103
|
+
ul_content = '';
|
104
|
+
|
105
|
+
$navbar.children('ul').each(function(){
|
106
|
+
content_buff = $(this).html();
|
107
|
+
ul_content = ul_content + content_buff;
|
108
|
+
});
|
109
|
+
|
110
|
+
ul_content = '<ul class="nav navbar-nav">' + ul_content + '</ul>';
|
111
|
+
$navbar.html(ul_content);
|
112
|
+
|
113
|
+
$('body').append($navbar);
|
114
|
+
|
115
|
+
background_image = $navbar.data('nav-image');
|
116
|
+
if(background_image != undefined){
|
117
|
+
$navbar.css('background',"url('" + background_image + "')")
|
118
|
+
.removeAttr('data-nav-image')
|
119
|
+
.css('background-size',"cover")
|
120
|
+
.addClass('has-image');
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
$toggle = $('.navbar-toggle');
|
125
|
+
|
126
|
+
$navbar.find('a').removeClass('btn btn-round btn-default');
|
127
|
+
$navbar.find('button').removeClass('btn-round btn-fill btn-info btn-primary btn-success btn-danger btn-warning btn-neutral');
|
128
|
+
$navbar.find('button').addClass('btn-simple btn-block');
|
129
|
+
|
130
|
+
$toggle.click(function (){
|
131
|
+
if(gsdk.misc.navbar_menu_visible == 1) {
|
132
|
+
$('html').removeClass('nav-open');
|
133
|
+
gsdk.misc.navbar_menu_visible = 0;
|
134
|
+
$('#bodyClick').remove();
|
135
|
+
setTimeout(function(){
|
136
|
+
$toggle.removeClass('toggled');
|
137
|
+
}, 400);
|
138
|
+
|
139
|
+
} else {
|
140
|
+
setTimeout(function(){
|
141
|
+
$toggle.addClass('toggled');
|
142
|
+
}, 430);
|
143
|
+
|
144
|
+
div = '<div id="bodyClick"></div>';
|
145
|
+
$(div).appendTo("body").click(function() {
|
146
|
+
$('html').removeClass('nav-open');
|
147
|
+
gsdk.misc.navbar_menu_visible = 0;
|
148
|
+
$('#bodyClick').remove();
|
149
|
+
setTimeout(function(){
|
150
|
+
$toggle.removeClass('toggled');
|
151
|
+
}, 400);
|
152
|
+
});
|
153
|
+
|
154
|
+
$('html').addClass('nav-open');
|
155
|
+
gsdk.misc.navbar_menu_visible = 1;
|
156
|
+
|
157
|
+
}
|
158
|
+
});
|
159
|
+
navbar_initialized = true;
|
160
|
+
}
|
161
|
+
|
162
|
+
},
|
163
|
+
|
164
|
+
checkScrollForTransparentNavbar: debounce(function() {
|
165
|
+
if($(document).scrollTop() > 260 ) {
|
166
|
+
if(transparent) {
|
167
|
+
transparent = false;
|
168
|
+
$('nav[role="navigation"]').removeClass('navbar-transparent');
|
169
|
+
}
|
170
|
+
} else {
|
171
|
+
if( !transparent ) {
|
172
|
+
transparent = true;
|
173
|
+
$('nav[role="navigation"]').addClass('navbar-transparent');
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}, 17),
|
177
|
+
|
178
|
+
fitBackgroundForCards: function(){
|
179
|
+
$('.card').each(function(){
|
180
|
+
if(!$(this).hasClass('card-product') && !$(this).hasClass('card-user')){
|
181
|
+
image = $(this).find('.image img');
|
182
|
+
|
183
|
+
image.hide();
|
184
|
+
image_src = image.attr('src');
|
185
|
+
|
186
|
+
$(this).find('.image').css({
|
187
|
+
"background-image": "url('" + image_src + "')",
|
188
|
+
"background-position": "center center",
|
189
|
+
"background-size": "cover"
|
190
|
+
});
|
191
|
+
}
|
192
|
+
});
|
193
|
+
},
|
194
|
+
initPopovers: function(){
|
195
|
+
if($('[data-toggle="popover"]').length != 0){
|
196
|
+
$('body').append('<div class="popover-filter"></div>');
|
197
|
+
|
198
|
+
// Activate Popovers
|
199
|
+
$('[data-toggle="popover"]').popover().on('show.bs.popover', function () {
|
200
|
+
$('.popover-filter').click(function(){
|
201
|
+
$(this).removeClass('in');
|
202
|
+
$('[data-toggle="popover"]').popover('hide');
|
203
|
+
});
|
204
|
+
$('.popover-filter').addClass('in');
|
205
|
+
}).on('hide.bs.popover', function(){
|
206
|
+
$('.popover-filter').removeClass('in');
|
207
|
+
});
|
208
|
+
|
209
|
+
}
|
210
|
+
},
|
211
|
+
initCollapseArea: function(){
|
212
|
+
$('[data-toggle="gsdk-collapse"]').each(function () {
|
213
|
+
var thisdiv = $(this).attr("data-target");
|
214
|
+
$(thisdiv).addClass("gsdk-collapse");
|
215
|
+
});
|
216
|
+
|
217
|
+
$('[data-toggle="gsdk-collapse"]').hover(function(){
|
218
|
+
var thisdiv = $(this).attr("data-target");
|
219
|
+
if(!$(this).hasClass('state-open')){
|
220
|
+
$(this).addClass('state-hover');
|
221
|
+
$(thisdiv).css({
|
222
|
+
'height':'30px'
|
223
|
+
});
|
224
|
+
}
|
225
|
+
|
226
|
+
},
|
227
|
+
function(){
|
228
|
+
var thisdiv = $(this).attr("data-target");
|
229
|
+
$(this).removeClass('state-hover');
|
230
|
+
|
231
|
+
if(!$(this).hasClass('state-open')){
|
232
|
+
$(thisdiv).css({
|
233
|
+
'height':'0px'
|
234
|
+
});
|
235
|
+
}
|
236
|
+
}).click(function(event){
|
237
|
+
event.preventDefault();
|
238
|
+
|
239
|
+
var thisdiv = $(this).attr("data-target");
|
240
|
+
var height = $(thisdiv).children('.panel-body').height();
|
241
|
+
|
242
|
+
if($(this).hasClass('state-open')){
|
243
|
+
$(thisdiv).css({
|
244
|
+
'height':'0px',
|
245
|
+
});
|
246
|
+
$(this).removeClass('state-open');
|
247
|
+
} else {
|
248
|
+
$(thisdiv).css({
|
249
|
+
'height':height + 30,
|
250
|
+
});
|
251
|
+
$(this).addClass('state-open');
|
252
|
+
}
|
253
|
+
});
|
254
|
+
},
|
255
|
+
initSliders: function(){
|
256
|
+
// Sliders for demo purpose in refine cards section
|
257
|
+
if($('#slider-range').length != 0){
|
258
|
+
$( "#slider-range" ).slider({
|
259
|
+
range: true,
|
260
|
+
min: 0,
|
261
|
+
max: 500,
|
262
|
+
values: [ 75, 300 ],
|
263
|
+
});
|
264
|
+
}
|
265
|
+
if($('#refine-price-range').length != 0){
|
266
|
+
$( "#refine-price-range" ).slider({
|
267
|
+
range: true,
|
268
|
+
min: 0,
|
269
|
+
max: 999,
|
270
|
+
values: [ 100, 850 ],
|
271
|
+
slide: function( event, ui ) {
|
272
|
+
min_price = ui.values[0];
|
273
|
+
max_price = ui.values[1];
|
274
|
+
$(this).siblings('.price-left').html('€ ' + min_price);
|
275
|
+
$(this).siblings('.price-right').html('€ ' + max_price)
|
276
|
+
}
|
277
|
+
});
|
278
|
+
}
|
279
|
+
if($('#slider-default').length != 0 || $('#slider-default2').length != 0){
|
280
|
+
$( "#slider-default, #slider-default2" ).slider({
|
281
|
+
value: 70,
|
282
|
+
orientation: "horizontal",
|
283
|
+
range: "min",
|
284
|
+
animate: true
|
285
|
+
});
|
286
|
+
}
|
287
|
+
},
|
288
|
+
initVideoCards: function(){
|
289
|
+
$('[data-toggle="video"]').click(function(){
|
290
|
+
id_video = $(this).data('video');
|
291
|
+
video = $('#' + id_video).get(0);
|
292
|
+
|
293
|
+
card_parent = $(this).closest('.card');
|
294
|
+
|
295
|
+
if(video.paused){
|
296
|
+
video.play();
|
297
|
+
$(this).html('<i class="fa fa-pause"></i> Pause');
|
298
|
+
card_parent.addClass('state-play');
|
299
|
+
} else {
|
300
|
+
video.pause();
|
301
|
+
$(this).html('<i class="fa fa-play"></i> Play');
|
302
|
+
card_parent.removeClass('state-play');
|
303
|
+
}
|
304
|
+
});
|
305
|
+
},
|
306
|
+
initNavbarSearch: function(){
|
307
|
+
$('[data-toggle="search"]').click(function(){
|
308
|
+
if(searchVisible == 0){
|
309
|
+
searchVisible = 1;
|
310
|
+
$(this).parent().addClass('active');
|
311
|
+
$('.navbar-search-form').fadeIn(function(){
|
312
|
+
$('.navbar-search-form input').focus();
|
313
|
+
});
|
314
|
+
} else {
|
315
|
+
searchVisible = 0;
|
316
|
+
$(this).parent().removeClass('active');
|
317
|
+
$(this).blur();
|
318
|
+
$('.navbar-search-form').fadeOut(function(){
|
319
|
+
$('.navbar-search-form input').blur();
|
320
|
+
});
|
321
|
+
}
|
322
|
+
});
|
323
|
+
}
|
324
|
+
}
|
325
|
+
|
326
|
+
demo = {
|
327
|
+
initPickColor: function(){
|
328
|
+
$('.pick-class-label').click(function(){
|
329
|
+
var new_class = $(this).attr('new-class');
|
330
|
+
var old_class = $('#display-buttons').attr('data-class');
|
331
|
+
var display_div = $('#display-buttons');
|
332
|
+
if(display_div.length) {
|
333
|
+
var display_buttons = display_div.find('.btn');
|
334
|
+
display_buttons.removeClass(old_class);
|
335
|
+
display_buttons.addClass(new_class);
|
336
|
+
display_div.attr('data-class', new_class);
|
337
|
+
}
|
338
|
+
});
|
339
|
+
}
|
340
|
+
}
|
341
|
+
|
342
|
+
examples = {
|
343
|
+
initContactUsMap: function(){
|
344
|
+
var myLatlng = new google.maps.LatLng(44.433530, 26.093928);
|
345
|
+
var mapOptions = {
|
346
|
+
zoom: 14,
|
347
|
+
center: myLatlng,
|
348
|
+
scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
|
349
|
+
}
|
350
|
+
var map = new google.maps.Map(document.getElementById("contactUsMap"), mapOptions);
|
351
|
+
|
352
|
+
var marker = new google.maps.Marker({
|
353
|
+
position: myLatlng,
|
354
|
+
title:"Hello World!"
|
355
|
+
});
|
356
|
+
|
357
|
+
// To add the marker to the map, call setMap();
|
358
|
+
marker.setMap(map);
|
359
|
+
}
|
360
|
+
}
|
361
|
+
|
362
|
+
// Returns a function, that, as long as it continues to be invoked, will not
|
363
|
+
// be triggered. The function will be called after it stops being called for
|
364
|
+
// N milliseconds. If `immediate` is passed, trigger the function on the
|
365
|
+
// leading edge, instead of the trailing.
|
366
|
+
|
367
|
+
function debounce(func, wait, immediate) {
|
368
|
+
var timeout;
|
369
|
+
return function() {
|
370
|
+
var context = this, args = arguments;
|
371
|
+
clearTimeout(timeout);
|
372
|
+
timeout = setTimeout(function() {
|
373
|
+
timeout = null;
|
374
|
+
if (!immediate) func.apply(context, args);
|
375
|
+
}, wait);
|
376
|
+
if (immediate && !timeout) func.apply(context, args);
|
377
|
+
};
|
378
|
+
};
|