created lastdocs home block and corresponfing page
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user