audio links in entree index launch the audio player
This commit is contained in:
@@ -14,12 +14,15 @@
|
||||
// TODO: redirect all no-front pages to front with write hash
|
||||
|
||||
_$body.on('corpus-map-ready', onCorpusMapReady);
|
||||
initScrollbars();
|
||||
initAudioPlayer();
|
||||
|
||||
initAjaxLinks();
|
||||
|
||||
if (_$body.is('.path-productions')) {
|
||||
initProductions();
|
||||
}
|
||||
initAudioPlayer();
|
||||
|
||||
initScrollbars();
|
||||
};
|
||||
|
||||
|
||||
@@ -210,7 +213,7 @@
|
||||
// |__/
|
||||
// TODO: add url hash nav
|
||||
// TODO: implement history.js
|
||||
function initAjaxLinks(){
|
||||
function initAjaxLinks(){
|
||||
console.log('initAjaxLinks');
|
||||
|
||||
$('a', '#block-mainnavigation')
|
||||
@@ -241,6 +244,16 @@
|
||||
if($link.is('.is-active'))
|
||||
return false;
|
||||
|
||||
// Audio links
|
||||
if($link.is('.audio-link')){
|
||||
_audio_player.openDocument({
|
||||
nid:$link.attr('nid'),
|
||||
audio_url:$link.attr('audio_url')
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// other links
|
||||
var sys_path = $(this).attr('data-drupal-link-system-path');
|
||||
var ajax_path = sys_path;
|
||||
if(sys_path == '<front>'){
|
||||
|
||||
Reference in New Issue
Block a user