iasd-bootstrap-sass 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +2 -0
- data/lib/iasd-bootstrap-sass/version.rb +5 -0
- data/lib/iasd-bootstrap-sass.rb +52 -0
- data/stylesheets/_iasd-base.scss +358 -0
- data/stylesheets/_iasd-dropdown-nav.scss +212 -0
- data/stylesheets/_iasd-footer.scss +206 -0
- data/stylesheets/_iasd-global-nav.scss +591 -0
- data/stylesheets/_iasd-header.scss +227 -0
- data/stylesheets/_iasd-main-nav.scss +396 -0
- data/stylesheets/_iasd-mixins.scss +54 -0
- data/stylesheets/_iasd-plugins.scss +76 -0
- data/stylesheets/_iasd-templates.scss +3540 -0
- data/stylesheets/_iasd-type.scss +25 -0
- data/stylesheets/_iasd-variables.scss +654 -0
- data/stylesheets/_iasd-widgets.scss +2243 -0
- data/stylesheets/_owl-carousel.scss +311 -0
- data/stylesheets/_progression-player.scss +1133 -0
- data/stylesheets/iasd-bootstrap.scss +70 -0
- data/stylesheets/iasd-print.scss +73 -0
- data/templates/project/fonts/futurastd-book-webfont.eot +0 -0
- data/templates/project/fonts/futurastd-book-webfont.svg +243 -0
- data/templates/project/fonts/futurastd-book-webfont.ttf +0 -0
- data/templates/project/fonts/futurastd-book-webfont.woff +0 -0
- data/templates/project/fonts/futurastd-light-webfont.eot +0 -0
- data/templates/project/fonts/futurastd-light-webfont.svg +243 -0
- data/templates/project/fonts/futurastd-light-webfont.ttf +0 -0
- data/templates/project/fonts/futurastd-light-webfont.woff +0 -0
- data/templates/project/fonts/futurastd-medium-webfont.eot +0 -0
- data/templates/project/fonts/futurastd-medium-webfont.svg +243 -0
- data/templates/project/fonts/futurastd-medium-webfont.ttf +0 -0
- data/templates/project/fonts/futurastd-medium-webfont.woff +0 -0
- data/templates/project/img/default_avatar.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-114x114.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-120x120.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-144x144.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-152x152.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-57x57.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-60x60.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-72x72.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-76x76.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon-precomposed.png +0 -0
- data/templates/project/img/favicons/apple-touch-icon.png +0 -0
- data/templates/project/img/favicons/favicon-160x160.png +0 -0
- data/templates/project/img/favicons/favicon-16x16.png +0 -0
- data/templates/project/img/favicons/favicon-196x196.png +0 -0
- data/templates/project/img/favicons/favicon-32x32.png +0 -0
- data/templates/project/img/favicons/favicon-96x96.png +0 -0
- data/templates/project/img/favicons/favicon.ico +0 -0
- data/templates/project/img/favicons/mstile-144x144.png +0 -0
- data/templates/project/img/favicons/mstile-150x150.png +0 -0
- data/templates/project/img/favicons/mstile-310x150.png +0 -0
- data/templates/project/img/favicons/mstile-310x310.png +0 -0
- data/templates/project/img/favicons/mstile-70x70.png +0 -0
- data/templates/project/img/global_nav/map/region_01.png +0 -0
- data/templates/project/img/global_nav/map/region_02.png +0 -0
- data/templates/project/img/global_nav/map/region_03.png +0 -0
- data/templates/project/img/global_nav/map/region_04.png +0 -0
- data/templates/project/img/global_nav/map/region_05.png +0 -0
- data/templates/project/img/global_nav/map/region_06.png +0 -0
- data/templates/project/img/global_nav/map/region_07.png +0 -0
- data/templates/project/img/global_nav/map/region_08.png +0 -0
- data/templates/project/img/global_nav/map/region_09.png +0 -0
- data/templates/project/img/global_nav/map/region_10.png +0 -0
- data/templates/project/img/global_nav/map/region_11.png +0 -0
- data/templates/project/img/global_nav/map/region_12.png +0 -0
- data/templates/project/img/global_nav/map/region_13.png +0 -0
- data/templates/project/img/global_nav/map/region_14.png +0 -0
- data/templates/project/img/global_nav/map/region_15.png +0 -0
- data/templates/project/img/global_nav/map/region_16.png +0 -0
- data/templates/project/img/global_nav/map/region_17.png +0 -0
- data/templates/project/img/global_nav/more_menu_mark.png +0 -0
- data/templates/project/img/global_nav/tutorial_arrow.png +0 -0
- data/templates/project/img/global_nav/tutorial_arrow@2x.png +0 -0
- data/templates/project/img/headers/destaque-pedidos-de-oracao.png +0 -0
- data/templates/project/img/headers/institutional.png +0 -0
- data/templates/project/img/institutional/div.png +0 -0
- data/templates/project/img/institutional/download-badge.png +0 -0
- data/templates/project/img/institutional/sprite_bandeiras.svg +76 -0
- data/templates/project/img/institutional/sprite_icones.svg +1389 -0
- data/templates/project/img/institutional/video-play.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_404.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_404@2x.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_dsa_home.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_dsa_home@2x.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_footer.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_footer@2x.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_header.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_header@2x.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_header_symbol.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_header_symbol@2x.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_header_vertical.png +0 -0
- data/templates/project/img/logos_es_ES/iasd_header_vertical@2x.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_404.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_404@2x.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_dsa_home.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_dsa_home@2x.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_footer.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_footer@2x.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_header.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_header@2x.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_header_symbol.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_header_symbol@2x.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_header_vertical.png +0 -0
- data/templates/project/img/logos_pt_BR/iasd_header_vertical@2x.png +0 -0
- data/templates/project/img/plugins/loader.gif +0 -0
- data/templates/project/img/widgets/background_find_church.png +0 -0
- data/templates/project/img/widgets/gallery_frame.png +0 -0
- data/templates/project/img/widgets/gallery_frame@2x.png +0 -0
- data/templates/project/img/widgets/loader.gif +0 -0
- data/templates/project/img/widgets/new_issue.png +0 -0
- data/templates/project/img/widgets/new_issue@2x.png +0 -0
- data/templates/project/img/widgets/no_image_124x124.png +0 -0
- data/templates/project/img/widgets/no_image_132x85.png +0 -0
- data/templates/project/img/widgets/no_image_140x90.png +0 -0
- data/templates/project/img/widgets/no_image_145x190.png +0 -0
- data/templates/project/img/widgets/no_image_150x100.png +0 -0
- data/templates/project/img/widgets/no_image_180x235.png +0 -0
- data/templates/project/img/widgets/no_image_1920x600.png +0 -0
- data/templates/project/img/widgets/no_image_220x220.png +0 -0
- data/templates/project/img/widgets/no_image_290x186.png +0 -0
- data/templates/project/img/widgets/no_image_290x220.png +0 -0
- data/templates/project/img/widgets/no_image_293x185.png +0 -0
- data/templates/project/img/widgets/no_image_345x218.png +0 -0
- data/templates/project/img/widgets/no_image_400x260.png +0 -0
- data/templates/project/img/widgets/no_image_400x400.png +0 -0
- data/templates/project/img/widgets/no_image_40x40.png +0 -0
- data/templates/project/img/widgets/no_image_460x200.png +0 -0
- data/templates/project/img/widgets/no_image_617x220.png +0 -0
- data/templates/project/img/widgets/no_image_617x460.png +0 -0
- data/templates/project/img/widgets/no_image_70x45.png +0 -0
- data/templates/project/img/widgets/no_image_720x300.png +0 -0
- data/templates/project/img/widgets/no_image_720x350.png +0 -0
- data/templates/project/img/widgets/no_image_740x475.png +0 -0
- data/templates/project/img/widgets/no_image_940x415.png +0 -0
- data/templates/project/img/widgets/reticle.png +0 -0
- data/templates/project/img/widgets/slider_full.png +0 -0
- data/templates/project/img/widgets/title_novo_tempo.png +0 -0
- data/templates/project/lib/bootstrap.min.js +6 -0
- data/templates/project/lib/html5shiv.js +301 -0
- data/templates/project/lib/iasd_dropdown_nav.js +47 -0
- data/templates/project/lib/iasd_footer.js +21 -0
- data/templates/project/lib/iasd_global_nav.js +101 -0
- data/templates/project/lib/iasd_home_dsa.js +39 -0
- data/templates/project/lib/iasd_main_nav.js +54 -0
- data/templates/project/lib/iasd_plugins.js +120 -0
- data/templates/project/lib/iasd_widgets.js +321 -0
- data/templates/project/lib/masonry.pkgd.min.js +9 -0
- data/templates/project/lib/mediaelement-and-player.min.js +172 -0
- data/templates/project/lib/modernizr.js +4 -0
- data/templates/project/lib/owl.carousel.js +1512 -0
- data/templates/project/lib/respond.min.js +6 -0
- data/templates/project/manifest.rb +159 -0
- data/templates/project/print.scss +1 -0
- metadata +339 -0
@@ -0,0 +1,101 @@
|
|
1
|
+
if (!window.matchMedia){ window.matchMedia = function(){ return { matches:false }; }; }
|
2
|
+
|
3
|
+
(function($){
|
4
|
+
|
5
|
+
$(document).ready(function (){
|
6
|
+
globalNav.handleEvents();
|
7
|
+
});
|
8
|
+
|
9
|
+
|
10
|
+
var isSmallDevice = window.matchMedia("(max-width: 767px)").matches; //Changes functionality on small devices
|
11
|
+
|
12
|
+
var globalNav = {
|
13
|
+
|
14
|
+
handleEvents : function(){
|
15
|
+
$('.iasd-global_navbar .more-panel a').on('click', globalNav.changeActiveTab);
|
16
|
+
$('.iasd-global_navbar .more a').on('click', globalNav.toggleMorePanel);
|
17
|
+
$('.iasd-global_navbar .navbar-header button').on('click', globalNav.toggleResponsiveMenu);
|
18
|
+
$('.iasd-global_navbar .headquarters > li > a').on('click', globalNav.toggleSubmenu);
|
19
|
+
$('.iasd-global_navbar .headquarters > li > a').on('mouseover', globalNav.changeMap);
|
20
|
+
$('.iasd-global_navbar .headquarters > li > a').on('mouseout', globalNav.cleanMap);
|
21
|
+
$('.iasd-global_navbar .search-link').on('click', globalNav.toggleSearchBox);
|
22
|
+
},
|
23
|
+
|
24
|
+
changeActiveTab : function(e) {
|
25
|
+
var jqThis = $(this);
|
26
|
+
if (isSmallDevice) {
|
27
|
+
jqThis.parent().toggleClass('active').find('> ul').toggleClass('open');
|
28
|
+
} else {
|
29
|
+
jqThis.tab('show');
|
30
|
+
}
|
31
|
+
e.preventDefault();
|
32
|
+
},
|
33
|
+
|
34
|
+
toggleMorePanel : function(e) {
|
35
|
+
var jqThis = $(this);
|
36
|
+
$('.iasd-global_navbar .search-link').removeClass('active');
|
37
|
+
$('.iasd-global_navbar .iasd-global_navbar-search').removeClass('open');
|
38
|
+
jqThis.parent().toggleClass('active');
|
39
|
+
$('.iasd-global_navbar .iasd-global_navbar-more').toggleClass('open');
|
40
|
+
$('.iasd-global_navbar .more-panel a:first').trigger( "click" );
|
41
|
+
e.preventDefault();
|
42
|
+
},
|
43
|
+
|
44
|
+
toggleResponsiveMenu : function(){
|
45
|
+
$('.iasd-global_navbar .search-link').removeClass('active');
|
46
|
+
$('.iasd-global_navbar .iasd-global_navbar-search').removeClass('open');
|
47
|
+
$('.iasd-global_navbar .navbar-collapse').toggleClass('collapse').toggleClass('in');
|
48
|
+
$('.iasd-global_navbar .iasd-global_navbar-more').toggleClass('open');
|
49
|
+
$('.iasd-global_navbar .more-panel a').each(function(){
|
50
|
+
var jqThis = $(this);
|
51
|
+
var selector = jqThis.attr('href');
|
52
|
+
if (isSmallDevice) {
|
53
|
+
$(selector).children('ul').insertAfter(jqThis);
|
54
|
+
}
|
55
|
+
});
|
56
|
+
},
|
57
|
+
|
58
|
+
toggleSubmenu : function(e){
|
59
|
+
var jqThis = $(this);
|
60
|
+
if (isSmallDevice) {
|
61
|
+
jqThis.parent().toggleClass('active').find('ul').toggleClass('open');
|
62
|
+
} else {
|
63
|
+
jqThis.parent().parent().find('ul').removeClass('open');
|
64
|
+
jqThis.parent().find('> ul').addClass('open');
|
65
|
+
jqThis.parent().parent().find('li').removeClass('active');
|
66
|
+
jqThis.parent().addClass('active');
|
67
|
+
$('.tutorial').remove();
|
68
|
+
}
|
69
|
+
e.preventDefault();
|
70
|
+
},
|
71
|
+
|
72
|
+
toggleSearchBox : function(e){
|
73
|
+
var jqThis = $(this);
|
74
|
+
$('.iasd-global_navbar .navbar-collapse').addClass('collapse').removeClass('in');
|
75
|
+
$('.iasd-global_navbar .more a').parent().removeClass('active');
|
76
|
+
$('.iasd-global_navbar .iasd-global_navbar-more').removeClass('open');
|
77
|
+
jqThis.toggleClass('active');
|
78
|
+
$('.iasd-global_navbar .iasd-global_navbar-search').toggleClass('open');
|
79
|
+
e.preventDefault();
|
80
|
+
},
|
81
|
+
|
82
|
+
changeMap : function(){
|
83
|
+
var jqThis = $(this).attr('data-region');
|
84
|
+
$('.headquarters-map').attr('class', 'headquarters-map visible-md visible-lg');
|
85
|
+
$('.headquarters-map').addClass('map-region_'+jqThis);
|
86
|
+
},
|
87
|
+
|
88
|
+
cleanMap : function(){
|
89
|
+
var jqThis = $(this);
|
90
|
+
var defaultRegion = "01";
|
91
|
+
var newDefaultRegion = $('.iasd-global_navbar .headquarters > li.active > a').attr('data-region');
|
92
|
+
if(!newDefaultRegion){
|
93
|
+
$('.headquarters-map').attr('class', 'headquarters-map visible-md visible-lg map-region_'+defaultRegion);
|
94
|
+
} else{
|
95
|
+
$('.headquarters-map').attr('class', 'headquarters-map visible-md visible-lg map-region_'+newDefaultRegion);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
};
|
100
|
+
|
101
|
+
})(jQuery);
|
@@ -0,0 +1,39 @@
|
|
1
|
+
(function($){
|
2
|
+
|
3
|
+
$(document).ready(function (){
|
4
|
+
homeDSA.handleEvents();
|
5
|
+
$(".dsa-home-carousel").owlCarousel({
|
6
|
+
autoPlay: 7000,
|
7
|
+
addClassActive: true,
|
8
|
+
mouseDrag: false,
|
9
|
+
singleItem: true,
|
10
|
+
slideSpeed: 700,
|
11
|
+
touchDrag: false,
|
12
|
+
transitionStyle: "fade"
|
13
|
+
});
|
14
|
+
});
|
15
|
+
|
16
|
+
var deviceWidth = $(window).width();
|
17
|
+
|
18
|
+
var homeDSA = {
|
19
|
+
|
20
|
+
handleEvents : function(){
|
21
|
+
$('.iasd-global_navbar-main .more, .iasd-global_navbar-main .navbar-toggle, .iasd-global_navbar-main .search-link').on('click', homeDSA.applyBackgroundImage);
|
22
|
+
},
|
23
|
+
|
24
|
+
applyBackgroundImage : function(){
|
25
|
+
if (deviceWidth >= 768) {
|
26
|
+
var imageURL = $(".dsa-home-carousel .active div").css('background-image');
|
27
|
+
$('.iasd-global_navbar').css('background-image', imageURL);
|
28
|
+
if( $('.iasd-global_navbar-more').hasClass('open') || $('.iasd-global_navbar-search').hasClass('open')){
|
29
|
+
$('.dsa-home-carousel .owl-controls').addClass('hidden');
|
30
|
+
$(".dsa-home-carousel").trigger('owl.stop');
|
31
|
+
} else{
|
32
|
+
$(".dsa-home-carousel").trigger('owl.play',7000);
|
33
|
+
$('.dsa-home-carousel .owl-controls').removeClass('hidden');
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
};
|
38
|
+
|
39
|
+
})(jQuery);
|
@@ -0,0 +1,54 @@
|
|
1
|
+
if (!window.matchMedia){ window.matchMedia = function(){ return { matches:false }; }; }
|
2
|
+
(function($){
|
3
|
+
|
4
|
+
$(document).ready(function (){
|
5
|
+
mainNav.handleEvents();
|
6
|
+
mainNav.duplicateTouchLink();
|
7
|
+
});
|
8
|
+
|
9
|
+
var isSmallDevice = window.matchMedia("(max-width: 767px)").matches; //Changes functionality on small devices
|
10
|
+
|
11
|
+
var mainNav = {
|
12
|
+
|
13
|
+
handleEvents : function(){
|
14
|
+
$('.iasd-main_navbar .navbar-nav li > a').on('click', mainNav.preventDefaultTouchBehavior); // Fix events for large touch devices
|
15
|
+
$('.iasd-main_navbar .navbar-toggle').on('click', mainNav.toggleResponsiveMenu);
|
16
|
+
},
|
17
|
+
|
18
|
+
preventDefaultTouchBehavior : function(e) {
|
19
|
+
var jqThis = $(this).parent();
|
20
|
+
if (!isSmallDevice) {
|
21
|
+
jqThis.siblings().removeClass('open');
|
22
|
+
}
|
23
|
+
|
24
|
+
jqThis.toggleClass('open');
|
25
|
+
|
26
|
+
if(jqThis.find('ul').length > 0 && (isSmallDevice || $('html').hasClass('touch')) ){
|
27
|
+
e.preventDefault();
|
28
|
+
}
|
29
|
+
var aThis = jqThis.find('>:first-child');
|
30
|
+
if(aThis)
|
31
|
+
if(aThis.attr('href') == '#')
|
32
|
+
e.preventDefault();
|
33
|
+
},
|
34
|
+
|
35
|
+
duplicateTouchLink : function() {
|
36
|
+
if(isSmallDevice || $('html').hasClass('touch')){
|
37
|
+
$('.iasd-main_navbar .navbar-nav li.has-children').each(function(){
|
38
|
+
var jqThis = $(this);
|
39
|
+
var elementURL = jqThis.find('> a').attr('href');
|
40
|
+
var elementContent = jqThis.find('> a').html();
|
41
|
+
if(elementURL!='#'){
|
42
|
+
jqThis.find('> ul').prepend('<li><a href="'+ elementURL +'" title="'+elementContent+'">'+elementContent+'</a></li>'); //TODO Usar jquery templates
|
43
|
+
}
|
44
|
+
});
|
45
|
+
}
|
46
|
+
},
|
47
|
+
|
48
|
+
toggleResponsiveMenu : function(){
|
49
|
+
$('.iasd-main_navbar .navbar-collapse').toggleClass('collapse').toggleClass('in');
|
50
|
+
}
|
51
|
+
|
52
|
+
};
|
53
|
+
|
54
|
+
})(jQuery);
|
@@ -0,0 +1,120 @@
|
|
1
|
+
(function($){
|
2
|
+
|
3
|
+
$(document).ready(function (){
|
4
|
+
iasdCloseModal.closeModal();
|
5
|
+
iasdFilterToggleActive.handleEvents();
|
6
|
+
iasdLoadMorePosts.handleEvents();
|
7
|
+
iasdReturnPageNav.handleEvents();
|
8
|
+
});
|
9
|
+
|
10
|
+
$(window).load(function() {
|
11
|
+
iasdReturnPageNav.autoCollapse();
|
12
|
+
});
|
13
|
+
|
14
|
+
/* ------------------------------------------ */
|
15
|
+
|
16
|
+
var iasdCloseModal = {
|
17
|
+
closeModal : function(e){
|
18
|
+
$('.modal').each(function(){
|
19
|
+
var src = $(this).find('iframe').attr('src');
|
20
|
+
$(this).on('click', function(){
|
21
|
+
$(this).find('iframe').attr('src', '');
|
22
|
+
$(this).find('iframe').attr('src', src);
|
23
|
+
});
|
24
|
+
});
|
25
|
+
}
|
26
|
+
};
|
27
|
+
|
28
|
+
var iasdFilterToggleActive = {
|
29
|
+
|
30
|
+
handleEvents : function(){
|
31
|
+
$('.iasd-search-filters > a > h3').on('click', iasdFilterToggleActive.filterToggleActive);
|
32
|
+
},
|
33
|
+
|
34
|
+
filterToggleActive : function(e){
|
35
|
+
$(this).toggleClass('active');
|
36
|
+
}
|
37
|
+
};
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
var iasdReturnPageNav = {
|
42
|
+
|
43
|
+
handleEvents : function(){
|
44
|
+
$('.iasd-plugin-return_page .toggle-visibility-link').on('click', iasdReturnPageNav.toggleVisibility);
|
45
|
+
},
|
46
|
+
|
47
|
+
toggleVisibility : function(e){
|
48
|
+
jqThis = $(this);
|
49
|
+
jqThis.parent().toggleClass('collapsed');
|
50
|
+
if(jqThis.parent().hasClass('collapsed')){
|
51
|
+
jqThis.attr("title", "Clique para visualizar o link da página anterior");
|
52
|
+
} else{
|
53
|
+
jqThis.attr("title", "Clique para fechar este link");
|
54
|
+
}
|
55
|
+
e.preventDefault();
|
56
|
+
},
|
57
|
+
|
58
|
+
autoCollapse : function(){
|
59
|
+
var jqThis = $('.iasd-plugin-return_page')
|
60
|
+
jqThis.removeClass('collapsed');
|
61
|
+
jqThis.find('.toggle-visibility-link').attr("title", "Clique para fechar este link");
|
62
|
+
setTimeout(function() {
|
63
|
+
jqThis.addClass('collapsed');
|
64
|
+
jqThis.find('.toggle-visibility-link').attr("title", "Clique para visualizar o link da página anterior");
|
65
|
+
}, 5000);
|
66
|
+
}
|
67
|
+
|
68
|
+
};
|
69
|
+
|
70
|
+
var iasdLoadMorePosts = {
|
71
|
+
|
72
|
+
handleEvents : function(){
|
73
|
+
$('.load-more_posts-link').on('click', iasdLoadMorePosts.loadMorePosts);
|
74
|
+
},
|
75
|
+
|
76
|
+
loadMorePosts : function(event) {
|
77
|
+
var $button = jQuery(this);
|
78
|
+
|
79
|
+
if(!$button.hasClass('loading')) {
|
80
|
+
$button.addClass('loading');
|
81
|
+
|
82
|
+
$.ajax({
|
83
|
+
url : $button.attr('href'),
|
84
|
+
context: $button,
|
85
|
+
dataType: 'html'
|
86
|
+
}).done(iasdLoadMorePosts.renderMorePosts).fail(iasdLoadMorePosts.renderMorePostsError);
|
87
|
+
|
88
|
+
}
|
89
|
+
event.preventDefault();
|
90
|
+
},
|
91
|
+
|
92
|
+
renderMorePosts : function(data, textStatus, jqXHR) {
|
93
|
+
var $nextPage = jQuery(data);
|
94
|
+
var $ajaxContainer = jQuery('.iasd-post-list-ajax');
|
95
|
+
var $newAjaxContainer = $nextPage.find('.iasd-post-list-ajax');
|
96
|
+
var nextPageHref = $nextPage.find('.load-more_posts-link').attr('href');
|
97
|
+
|
98
|
+
$newAjaxContainer.find('> .iasd-post-list-item-ajax').appendTo($ajaxContainer);
|
99
|
+
|
100
|
+
var currentPage = $newAjaxContainer.data('page');
|
101
|
+
var maxPages = $ajaxContainer.data('pages');
|
102
|
+
$ajaxContainer.data('page', currentPage);
|
103
|
+
|
104
|
+
var $button = jQuery(this);
|
105
|
+
$button.removeClass('loading');
|
106
|
+
|
107
|
+
if(maxPages == currentPage)
|
108
|
+
$button.hide();
|
109
|
+
|
110
|
+
jQuery('.load-more_posts-link').attr('href', nextPageHref);
|
111
|
+
},
|
112
|
+
|
113
|
+
renderMorePostsError : function(){
|
114
|
+
var $button = jQuery(this);
|
115
|
+
$button.removeClass('loading');
|
116
|
+
}
|
117
|
+
|
118
|
+
};
|
119
|
+
|
120
|
+
})(jQuery);
|
@@ -0,0 +1,321 @@
|
|
1
|
+
(function($){
|
2
|
+
|
3
|
+
var owlCarousels = [];
|
4
|
+
var widthCheckerInterval = false;
|
5
|
+
|
6
|
+
$(document).ready(function (){
|
7
|
+
widgets.handleEvents();
|
8
|
+
owlPlugin.initPostCarousel();
|
9
|
+
owlPlugin.initServiceCarouselLarge();
|
10
|
+
owlPlugin.initServiceCarouselSmall();
|
11
|
+
owlPlugin.initGalleriesCarousel();
|
12
|
+
owlPlugin.initColumnsCarousel();
|
13
|
+
owlPlugin.initMagazineCarousel();
|
14
|
+
owlPlugin.initNewsstandCarouselSmall();
|
15
|
+
owlPlugin.initNewsstandCarouselLarge();
|
16
|
+
owlPlugin.initInstitutionalCarousel();
|
17
|
+
$('.iasd-images-gallery').IASDImageGallery();
|
18
|
+
|
19
|
+
if(owlCarousels.length > 0) {
|
20
|
+
widthCheckerInterval = setInterval(function() { for (var i = owlCarousels.length - 1; i >= 0; i--) { owlCarousels[i].updateVars(); }; }, 2000);
|
21
|
+
setTimeout(function() { clearInterval(widthCheckerInterval); }, 30000);
|
22
|
+
}
|
23
|
+
});
|
24
|
+
|
25
|
+
var widgets = {
|
26
|
+
|
27
|
+
handleEvents : function(){
|
28
|
+
$('.toggle-config-link').on('click', widgets.toggleConfig);
|
29
|
+
$('.custom-select > select').on('change', widgets.removeFocus);
|
30
|
+
},
|
31
|
+
|
32
|
+
toggleConfig : function(e){
|
33
|
+
jqThis = $(this);
|
34
|
+
jqThis.parent().toggleClass('open');
|
35
|
+
e.preventDefault();
|
36
|
+
},
|
37
|
+
|
38
|
+
removeFocus : function(){
|
39
|
+
jqThis = $(this);
|
40
|
+
jqThis.blur();
|
41
|
+
}
|
42
|
+
|
43
|
+
};
|
44
|
+
|
45
|
+
var owlPlugin = {
|
46
|
+
|
47
|
+
initPostCarousel : function(){
|
48
|
+
var element = $(".iasd-widget-slider > .posts, .iasd-widget-slider > .header");
|
49
|
+
if(element.length > 0) {
|
50
|
+
owlCarousels.push(element.owlCarousel({
|
51
|
+
navigation : false,
|
52
|
+
slideSpeed : 500,
|
53
|
+
paginationSpeed : 1000,
|
54
|
+
singleItem: true,
|
55
|
+
autoPlay: true,
|
56
|
+
stopOnHover: true,
|
57
|
+
lazyLoad : true
|
58
|
+
}).data('owlCarousel'));
|
59
|
+
}
|
60
|
+
},
|
61
|
+
|
62
|
+
initServiceCarouselLarge : function(){
|
63
|
+
var element = $(".iasd-widget-slider > .services.large");
|
64
|
+
if(element.length > 0) {
|
65
|
+
owlCarousels.push(element.owlCarousel({
|
66
|
+
items : 5,
|
67
|
+
itemsDesktop : [1200,5],
|
68
|
+
itemsDesktopSmall : [991,5],
|
69
|
+
itemsTablet : [768,3],
|
70
|
+
itemsMobile: [479,2],
|
71
|
+
slideSpeed : 500,
|
72
|
+
paginationSpeed : 1000,
|
73
|
+
autoPlay: false,
|
74
|
+
stopOnHover: true
|
75
|
+
}).data('owlCarousel'));
|
76
|
+
}
|
77
|
+
},
|
78
|
+
|
79
|
+
initServiceCarouselSmall : function(){
|
80
|
+
var element = $(".iasd-widget-slider > .services.small");
|
81
|
+
if(element.length > 0) {
|
82
|
+
owlCarousels.push(element.owlCarousel({
|
83
|
+
items : 2,
|
84
|
+
itemsDesktop : [1200,2],
|
85
|
+
itemsDesktopSmall : [991,2],
|
86
|
+
itemsTablet : [768,5],
|
87
|
+
itemsMobile: [479,2],
|
88
|
+
navigation : false,
|
89
|
+
slideSpeed : 500,
|
90
|
+
paginationSpeed : 1000,
|
91
|
+
autoPlay: false,
|
92
|
+
stopOnHover: true
|
93
|
+
}).data('owlCarousel'));
|
94
|
+
}
|
95
|
+
},
|
96
|
+
|
97
|
+
initGalleriesCarousel : function(){
|
98
|
+
var element = $(".iasd-widget-slider > .galleries");
|
99
|
+
if(element.length > 0) {
|
100
|
+
owlCarousels.push(element.owlCarousel({
|
101
|
+
navigation : true,
|
102
|
+
slideSpeed : 500,
|
103
|
+
pagination : false,
|
104
|
+
singleItem: true,
|
105
|
+
autoPlay: false,
|
106
|
+
stopOnHover: true,
|
107
|
+
navigationText: false,
|
108
|
+
mouseDrag: false,
|
109
|
+
touchDrag: false,
|
110
|
+
transitionStyle : "fade",
|
111
|
+
lazyLoad : true
|
112
|
+
}).data('owlCarousel'));
|
113
|
+
}
|
114
|
+
},
|
115
|
+
|
116
|
+
initColumnsCarousel : function(){
|
117
|
+
var element = $(".iasd-widget-slider .columns > div");
|
118
|
+
if(element.length > 0) {
|
119
|
+
owlCarousels.push(element.owlCarousel({
|
120
|
+
items: 5,
|
121
|
+
itemsDesktop : [1200,4],
|
122
|
+
itemsDesktopSmall : [992,4],
|
123
|
+
itemsTablet : [768,2],
|
124
|
+
itemsMobile: [480,1],
|
125
|
+
navigation : false,
|
126
|
+
slideSpeed : 500,
|
127
|
+
paginationSpeed : 1000,
|
128
|
+
autoPlay: false,
|
129
|
+
stopOnHover: true
|
130
|
+
}).data('owlCarousel'));
|
131
|
+
}
|
132
|
+
},
|
133
|
+
|
134
|
+
initMagazineCarousel : function(){
|
135
|
+
var element = $(".iasd-widget-slider > .magazine");
|
136
|
+
if(element.length > 0) {
|
137
|
+
owlCarousels.push(element.owlCarousel({
|
138
|
+
navigation : true,
|
139
|
+
items : 1,
|
140
|
+
itemsDesktop : [1200,1],
|
141
|
+
itemsDesktopSmall : [991,1],
|
142
|
+
itemsTablet : [768,3],
|
143
|
+
itemsMobile: [479,1],
|
144
|
+
slideSpeed : 500,
|
145
|
+
pagination : false,
|
146
|
+
paginationSpeed : 1000,
|
147
|
+
autoPlay: false,
|
148
|
+
navigationText: false,
|
149
|
+
stopOnHover: true,
|
150
|
+
mouseDrag: false,
|
151
|
+
touchDrag: false,
|
152
|
+
lazyLoad : true
|
153
|
+
}).data('owlCarousel'));
|
154
|
+
}
|
155
|
+
},
|
156
|
+
|
157
|
+
|
158
|
+
initNewsstandCarouselSmall : function(){
|
159
|
+
var element = $(".iasd-widget-slider > .newsstand.small");
|
160
|
+
if(element.length > 0) {
|
161
|
+
owlCarousels.push(element.owlCarousel({
|
162
|
+
navigation : true,
|
163
|
+
items : 1,
|
164
|
+
itemsDesktop : [1200,1],
|
165
|
+
itemsDesktopSmall : [991,3],
|
166
|
+
itemsTablet : [768,2],
|
167
|
+
itemsMobile: [479,1],
|
168
|
+
slideSpeed : 500,
|
169
|
+
pagination : false,
|
170
|
+
paginationSpeed : 1000,
|
171
|
+
autoPlay: false,
|
172
|
+
navigationText: false,
|
173
|
+
stopOnHover: true,
|
174
|
+
mouseDrag: false,
|
175
|
+
touchDrag: false,
|
176
|
+
lazyLoad : true
|
177
|
+
}).data('owlCarousel'));
|
178
|
+
}
|
179
|
+
},
|
180
|
+
|
181
|
+
|
182
|
+
initNewsstandCarouselLarge : function(){
|
183
|
+
var element = $(".iasd-widget-slider > .newsstand.large");
|
184
|
+
if(element.length > 0) {
|
185
|
+
owlCarousels.push(element.owlCarousel({
|
186
|
+
navigation : true,
|
187
|
+
items : 2,
|
188
|
+
itemsDesktop : [1200,2],
|
189
|
+
itemsDesktopSmall : [991,2],
|
190
|
+
itemsTablet : [768,2],
|
191
|
+
itemsMobile: [479,1],
|
192
|
+
slideSpeed : 500,
|
193
|
+
pagination : false,
|
194
|
+
paginationSpeed : 1000,
|
195
|
+
autoPlay: false,
|
196
|
+
navigationText: false,
|
197
|
+
stopOnHover: true,
|
198
|
+
mouseDrag: false,
|
199
|
+
touchDrag: false,
|
200
|
+
lazyLoad : true
|
201
|
+
}).data('owlCarousel'));
|
202
|
+
}
|
203
|
+
},
|
204
|
+
|
205
|
+
initInstitutionalCarousel : function(){
|
206
|
+
var element = $(".iasd-institutional-gallery");
|
207
|
+
if(element.length > 0) {
|
208
|
+
owlCarousels.push(element.owlCarousel({
|
209
|
+
items : 1,
|
210
|
+
itemsDesktop : [1200,1],
|
211
|
+
itemsDesktopSmall : [991,1],
|
212
|
+
itemsTablet : [768,1],
|
213
|
+
itemsMobile: [479,1]
|
214
|
+
}).data('owlCarousel'));
|
215
|
+
}
|
216
|
+
}
|
217
|
+
|
218
|
+
};
|
219
|
+
|
220
|
+
|
221
|
+
$.fn.IASDImageGallery = function(options){
|
222
|
+
|
223
|
+
if ($.type(options) != 'object'){
|
224
|
+
options = {};
|
225
|
+
}
|
226
|
+
|
227
|
+
this.each(function(){
|
228
|
+
ImageGalleryController.init.apply(this, [options]);
|
229
|
+
});
|
230
|
+
}
|
231
|
+
|
232
|
+
var ImageGalleryController = {
|
233
|
+
defaultOptions : {
|
234
|
+
items : 7,
|
235
|
+
itemsDesktop : [1199,7],
|
236
|
+
itemsDesktopSmall : [979,5],
|
237
|
+
itemsTablet : [768,6],
|
238
|
+
itemsMobile : [479,3],
|
239
|
+
pagination : false,
|
240
|
+
responsiveRefreshRate : 100,
|
241
|
+
afterInit : function(el){
|
242
|
+
el.find(".owl-item").eq(0).addClass("synced");
|
243
|
+
}
|
244
|
+
},
|
245
|
+
|
246
|
+
init : function (userOptions){
|
247
|
+
var $container = $(this);
|
248
|
+
|
249
|
+
var options = $.extend({}, ImageGalleryController.defaultOptions, userOptions);
|
250
|
+
var $pics = $container.find(".iasd-images-gallery-pics");
|
251
|
+
var $thumbs = $container.find(".iasd-images-gallery-thumbs");
|
252
|
+
|
253
|
+
$pics.owlCarousel({
|
254
|
+
afterAction : ImageGalleryController.syncPosition,
|
255
|
+
pagination : false,
|
256
|
+
responsiveRefreshRate : 200,
|
257
|
+
navigation : false,
|
258
|
+
singleItem : true,
|
259
|
+
slideSpeed : 1000,
|
260
|
+
autoHeight : true,
|
261
|
+
autoPlay : false,
|
262
|
+
lazyLoad : true,
|
263
|
+
transitionStyle : "fade"
|
264
|
+
});
|
265
|
+
|
266
|
+
$thumbs.owlCarousel(options);
|
267
|
+
|
268
|
+
$thumbs.on("click", ".owl-item", ImageGalleryController.onClickThumbItem);
|
269
|
+
|
270
|
+
},
|
271
|
+
|
272
|
+
syncPosition: function(el){
|
273
|
+
$thumbs = $(el).closest('.iasd-images-gallery').find('.iasd-images-gallery-thumbs');
|
274
|
+
var current = this.currentItem;
|
275
|
+
$thumbs.find(".owl-item").removeClass("synced").eq(current).addClass("synced");
|
276
|
+
|
277
|
+
if( $thumbs.data("owlCarousel") !== undefined ){
|
278
|
+
ImageGalleryController.center(current, $thumbs);
|
279
|
+
}
|
280
|
+
},
|
281
|
+
|
282
|
+
onClickThumbItem: function(e){
|
283
|
+
e.preventDefault();
|
284
|
+
|
285
|
+
$this = $(this);
|
286
|
+
$pics = $this.closest('.iasd-images-gallery').find('.iasd-images-gallery-pics');
|
287
|
+
var number = $this.data("owlItem");
|
288
|
+
$pics.trigger("owl.goTo",number);
|
289
|
+
},
|
290
|
+
|
291
|
+
center: function(number, $thumbs){
|
292
|
+
|
293
|
+
var $thumbsvisible = $thumbs.data("owlCarousel").owl.visibleItems;
|
294
|
+
var num = number;
|
295
|
+
var found = false;
|
296
|
+
for(var i in $thumbsvisible){
|
297
|
+
if(num === $thumbsvisible[i]){
|
298
|
+
var found = true;
|
299
|
+
}
|
300
|
+
}
|
301
|
+
|
302
|
+
if(found===false){
|
303
|
+
if(num>$thumbsvisible[$thumbsvisible.length-1]){
|
304
|
+
$thumbs.trigger("owl.goTo", num - $thumbsvisible.length+2)
|
305
|
+
}else{
|
306
|
+
if(num - 1 === -1){
|
307
|
+
num = 0;
|
308
|
+
}
|
309
|
+
$thumbs.trigger("owl.goTo", num);
|
310
|
+
}
|
311
|
+
} else if(num === $thumbsvisible[$thumbsvisible.length-1]){
|
312
|
+
$thumbs.trigger("owl.goTo", $thumbsvisible[1])
|
313
|
+
} else if(num === $thumbsvisible[0]){
|
314
|
+
$thumbs.trigger("owl.goTo", num-1)
|
315
|
+
}
|
316
|
+
|
317
|
+
}
|
318
|
+
|
319
|
+
};
|
320
|
+
|
321
|
+
})(jQuery);
|