From 11d54412cd8d036d35ec6845d7d563da1d474dbc Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Tue, 21 Jul 2020 10:27:27 +0200 Subject: [PATCH] fixed back to home mobile #423 --- .../edlptheme/assets/dist/scripts/main.min.js | 4 +- .../custom/edlptheme/assets/scripts/main.js | 42 +++++++++++-------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/web/themes/custom/edlptheme/assets/dist/scripts/main.min.js b/web/themes/custom/edlptheme/assets/dist/scripts/main.min.js index 4ad18d86c..bc061b480 100644 --- a/web/themes/custom/edlptheme/assets/dist/scripts/main.min.js +++ b/web/themes/custom/edlptheme/assets/dist/scripts/main.min.js @@ -95,9 +95,9 @@ function initGrid(){void 0;if(!_is_mobile){checkGridBlockHeight();_$row.find('.c if(false){var $grid=$('.grid',_$row).masonry({itemSelector:'.col',columnWidth:'.col-2',containerStyle:null,resizeContainer:false,transitionDuration:0,});$grid.imagesLoaded().progress(function(){$grid.masonry('layout');});$grid.imagesLoaded(function(){$grid.masonry('layout');});$grid.on('layoutComplete',checkGridBlockVisible);}else{if(!_is_mobile){checkGridBlockVisible();}}};function checkGridBlockHeight(){var $r_h=_$row.height();var $this;$('.grid .col',_$row).each(function(i,e){$this=$(this);if(!$this.is('[init-height]')){$this.attr('init-height',$this.outerHeight())} $this.height(Math.min($this.attr('init-height'),_$row.height()));});};function checkGridBlockVisible(){var $r_h=_$row.height();var $this,pos;$('.grid .col',_$row).each(function(i,e){$this=$(this);pos=$this.position();if(pos.top+$this.height()<=$r_h){$this.removeClass('offfield');}else{$this.addClass('offfield');}});} function initCollectionNav(){void 0;$('.field--name-field-notice, .index','.taxonomy-term.vocabulary-entrees.home_mobile').addClass('closed');$('.field--name-field-notice>.field__label','.taxonomy-term.vocabulary-entrees.home_mobile').on('click',onClickCollectionNotice);$('.index>.field__label','.taxonomy-term.vocabulary-entrees.home_mobile').on('click',onClickCollectionIndex);};function onClickCollectionNotice(e){toggleEntreeOpening($(this).parent(),'notice');};function onClickCollectionIndex(e){toggleEntreeOpening($(this).parent(),'index');};function toggleEntreeOpening($e,part){$e.toggleClass('closed').parents('.taxonomy-term.vocabulary-entrees.home_mobile').toggleClass(part+'-opened');} -function initSearch(){$('#edit-entries--wrapper legend','#edlp-search-form').on('click',function(){$(this).parent().toggleClass('opened');});};function initEnregistrementTranscript(){void 0;var $node=_$row.find('article.node--type-enregistrement.node--view-mode-transcript');var $nav=$('