created lastdocs home block and corresponfing page

This commit is contained in:
2018-09-14 16:04:48 +02:00
parent 03ab172f42
commit 6ca52c635e
23 changed files with 479 additions and 19 deletions
@@ -35,12 +35,13 @@
_audioPlayer = new AudioPlayer();
_compoPlayer = new CompoPlayer();
checkLayout();
initAjaxLinks();
initHistory();
initAudioLinksHover();
}else{
if(drupalSettings.path.isFront){
initHomeMobile();
@@ -393,6 +394,8 @@
initAjaxLinks();
initAudioLinksHover();
checkVisibleCorpusMapSpace();
// trigger other modules behaviours
@@ -404,6 +407,7 @@
_$body.attr('booted', 'booted');
_$body.removeClass('ajax-loading');
// url is null means that we are loading content on popState event
// so we don't record the state again
if(state.url){
@@ -435,6 +439,7 @@
};
function initAudioLinksHover(){
console.log("initAudioLinksHover()");
_$row.find('a.audio-link')
.on('mouseover', function(event) {
event.preventDefault();
@@ -687,13 +692,17 @@
// Audio links
// launch audio player and stop here
if($link.is('.audio-link')){
// check if caller is lastdocs block
caller = $link.parents('.lastdocs').length ? 'lastdocs' : null;
// open audio player
_audioPlayer
.emmit('stop-shuffle')
.openDocument({
nid:$link.attr('nid'),
audio_url:$link.attr('audio_url'),
title:$link.find('.field--name-title').html()
});
},
caller);
return false;
}
@@ -957,7 +966,7 @@
this.currentHistoricIndex = historic_index;
}
if(_$body.is('.path-frontpage')){
if(_$body.is('.path-frontpage') && caller !== 'lastdocs'){
closeAllModals();
}
// TODO: update language switcher for document url