Commit ba39f040 authored by imac's avatar imac

[Bugfix]Redmine #728 : Marge phototheque

parent d929b995
...@@ -96,7 +96,8 @@ var initFunction=function(){ ...@@ -96,7 +96,8 @@ var initFunction=function(){
}); });
setTimeout(function(){ setTimeout(function(){
$('.gallery-wrapper').removeClass('hidden-elem').addClass('animated visible-elem fadeInUp'); $('.gallery-wrapper').removeClass('hidden-elem').addClass('animated visible-elem fadeInUp');
},0) $.fn.responsive();
},100)
} }
function appendLoading() { function appendLoading() {
$('.load-page').append($('#loading-container-subpage').clone()); $('.load-page').append($('#loading-container-subpage').clone());
...@@ -112,7 +113,6 @@ var initFunction=function(){ ...@@ -112,7 +113,6 @@ var initFunction=function(){
$('.load-page').parent().addClass('active'); $('.load-page').parent().addClass('active');
history.pushState(null, null, link); history.pushState(null, null, link);
$('.load-page').load(link,function(){ $('.load-page').load(link,function(){
console.log('load page');
$.fn.loadPageContent(); $.fn.loadPageContent();
$('#loading-container-subpage').hide(); $('#loading-container-subpage').hide();
}); });
...@@ -151,7 +151,7 @@ scrollTop: div.outerHeight() ...@@ -151,7 +151,7 @@ scrollTop: div.outerHeight()
},600) },600)
return false; return false;
}); });
//Get file name of uploaded file //Get file name of uploaded file
$('#file-p').on('change',function(e){ $('#file-p').on('change',function(e){
var fileName = e.target.files[0].name; var fileName = e.target.files[0].name;
$('.upload-btn').after($('<p class="loaded-file">' + fileName + '</p>')); $('.upload-btn').after($('<p class="loaded-file">' + fileName + '</p>'));
...@@ -258,7 +258,7 @@ $.fn.open_nav = function(){ ...@@ -258,7 +258,7 @@ $.fn.open_nav = function(){
tl.staggerFrom('.nav-content >ul>li, .phototheque-content nav >ul > li',0.5,{opacity:0,x:200},0.1,0.5); tl.staggerFrom('.nav-content >ul>li, .phototheque-content nav >ul > li',0.5,{opacity:0,x:200},0.1,0.5);
tl.staggerFromTo('nav ul ul li ',0.5,{opacity:0,x:200},{opacity:1,x:0},0.1,1.2); tl.staggerFromTo('nav ul ul li ',0.5,{opacity:0,x:200},{opacity:1,x:0},0.1,1.2);
tl.fromTo('.news-btn',0.9,{autoAlpha:0,scale:'0'},{autoAlpha:1,scale:'1'},0); tl.fromTo('.news-btn',0.9,{autoAlpha:0,scale:'0'},{autoAlpha:1,scale:'1'},0);
} }
$.fn.openPanelAnimation = function(){ $.fn.openPanelAnimation = function(){
$(this).addClass('animated slideInRight').removeClass('slideOutRight').show(); $(this).addClass('animated slideInRight').removeClass('slideOutRight').show();
} }
...@@ -269,7 +269,7 @@ $.fn.open_news = function(){ ...@@ -269,7 +269,7 @@ $.fn.open_news = function(){
$(this).on('click',function(){ $(this).on('click',function(){
$('.news-wrapper').openPanelAnimation(); $('.news-wrapper').openPanelAnimation();
}) })
} }
$.fn.close_news = function(){ $.fn.close_news = function(){
$(this).on('click',function(){ $(this).on('click',function(){
$('.news-wrapper').closePanelAnimation(); $('.news-wrapper').closePanelAnimation();
...@@ -277,7 +277,7 @@ $.fn.close_news = function(){ ...@@ -277,7 +277,7 @@ $.fn.close_news = function(){
} }
$.fn.reinitFilter = function(){ $.fn.reinitFilter = function(){
$(this).removeClass('selected-filter selected'); $(this).removeClass('selected-filter selected');
} }
$.fn.open_filter = function(){ $.fn.open_filter = function(){
$(this).on('click','.filter-btn',function(){ $(this).on('click','.filter-btn',function(){
var filterW = $('.filter-list').outerWidth(), var filterW = $('.filter-list').outerWidth(),
...@@ -330,7 +330,7 @@ $.fn.open_filter = function(){ ...@@ -330,7 +330,7 @@ $.fn.open_filter = function(){
$.fn.checkSelectedFilter = function(){ $.fn.checkSelectedFilter = function(){
if ($('.filter-content .filter-bloc.selected-filter').length){ if ($('.filter-content .filter-bloc.selected-filter').length){
$('.filter-btn').addClass('selected-filter'); $('.filter-btn').addClass('selected-filter');
} }
} }
$.fn.changeProductImageBg = function(){ $.fn.changeProductImageBg = function(){
var var
...@@ -349,7 +349,7 @@ $.fn.animatePageScroll = function(element, duration) { ...@@ -349,7 +349,7 @@ $.fn.animatePageScroll = function(element, duration) {
{opacity:1,visibility:"visible",marginBottom:'0px'},0.7); {opacity:1,visibility:"visible",marginBottom:'0px'},0.7);
} }
$.fn.fullpageSlide = function(){ $.fn.fullpageSlide = function(){
var var
timeout = 1.7, timeout = 1.7,
duration = 1.2; duration = 1.2;
setTimeout(function(){ setTimeout(function(){
...@@ -379,7 +379,7 @@ tl1.fromTo(firstSection.find('.bloc .desc-content'),1, ...@@ -379,7 +379,7 @@ tl1.fromTo(firstSection.find('.bloc .desc-content'),1,
{opacity:1,visibility:"visible",marginLeft:'0px'},timeout); {opacity:1,visibility:"visible",marginLeft:'0px'},timeout);
}, },
onLeave: function(index, nextIndex, direction){ onLeave: function(index, nextIndex, direction){
var var
activeSection = $(this), activeSection = $(this),
nextSection = $(this).next(); nextSection = $(this).next();
tl2 = new TimelineMax(); tl2 = new TimelineMax();
...@@ -421,7 +421,7 @@ $.fn.getMenuBg = function(){ ...@@ -421,7 +421,7 @@ $.fn.getMenuBg = function(){
'background-image': "url("+ imgSrc +")", 'background-image': "url("+ imgSrc +")",
'opacity' : 0, 'opacity' : 0,
}) })
tlBg = new TimelineMax(); tlBg = new TimelineMax();
tlBg.to('.container-bg',0.9,{opacity:1},0.5); tlBg.to('.container-bg',0.9,{opacity:1},0.5);
tlBg.from('.full-slides',1.2,{opacity:0, width:0},0.4); tlBg.from('.full-slides',1.2,{opacity:0, width:0},0.4);
if (windowWidth > 860){ if (windowWidth > 860){
...@@ -449,11 +449,11 @@ $.fn.appendMobileMenu = function(){ ...@@ -449,11 +449,11 @@ $.fn.appendMobileMenu = function(){
},2000) },2000)
} }
//Responsive function //Responsive function
$.fn.responsive = function(){ $.fn.responsive = function(){
var footerHeight = $('footer').height(), var footerHeight = $('footer').height(),
productHeight = $(".product-details").outerHeight(), productHeight = $(".product-details").outerHeight(),
productWidth = $(".product-details").outerWidth(), productWidth = $(".product-details").outerWidth(),
windowHeight = $(window).innerHeight(), windowHeight = $(window).innerHeight(),
windowWidth = $(window).width(), windowWidth = $(window).width(),
navMenuWidth = $('.nav-wrapper').outerWidth(), navMenuWidth = $('.nav-wrapper').outerWidth(),
...@@ -655,13 +655,13 @@ function checkFooterNavPosition(){ ...@@ -655,13 +655,13 @@ function checkFooterNavPosition(){
}else{ }else{
$('.header .nav-content .footer').removeClass('relative'); $('.header .nav-content .footer').removeClass('relative');
} }
} }
function checkFilterContactWrapper(){ function checkFilterContactWrapper(){
setTimeout(function(){ setTimeout(function(){
if ( if (
($('.contact-form .form-wrapper').outerHeight() ($('.contact-form .form-wrapper').outerHeight()
+ $('.filter-wrapper').outerHeight() + $('.filter-wrapper').outerHeight()
+ $('nav .main-nav').outerHeight() + $('.main-nav').outerHeight()) < $(window).outerHeight() + $('nav .main-nav').outerHeight() + $('.main-nav').outerHeight()) < $(window).outerHeight()
/*&& /*&&
( $('.contact-form .form-wrapper').outerHeight() + ( $('.contact-form .form-wrapper').outerHeight() +
$('.contact-form .footer').outerHeight() + $('.contact-form .footer').outerHeight() +
...@@ -674,7 +674,7 @@ function checkFilterContactWrapper(){ ...@@ -674,7 +674,7 @@ function checkFilterContactWrapper(){
$('.contact-form .footer').removeClass('fixed'); $('.contact-form .footer').removeClass('fixed');
} }
},500) },500)
} }
$(window).load( function() { $(window).load( function() {
initFunction(); initFunction();
$('.header .nav-wrapper .nav-content > ul > li').each(function(){ $('.header .nav-wrapper .nav-content > ul > li').each(function(){
...@@ -704,7 +704,7 @@ $(document).ready(function(){ ...@@ -704,7 +704,7 @@ $(document).ready(function(){
$(this).stop(false,true).fadeImage(); $(this).stop(false,true).fadeImage();
}); });
// Catalog Page : Change product image depending on selected color // Catalog Page : Change product image depending on selected color
$('.product-list article ul li').on('mouseover',function(){ $('.product-list article ul li').on('mouseover',function(){
$(this).changeProductImageBg(); $(this).changeProductImageBg();
}); });
$('.product-list article').each(function(){ $('.product-list article').each(function(){
...@@ -743,7 +743,7 @@ $(window).resize(function() { ...@@ -743,7 +743,7 @@ $(window).resize(function() {
}); //end document resize }); //end document resize
window.addEventListener("load", function(){ window.addEventListener("load", function(){
var load_screen = document.getElementById("loading-container"); var load_screen = document.getElementById("loading-container");
document.body.removeChild(load_screen); document.body.removeChild(load_screen);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment