audio links in entree index launch the audio player

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-09 10:52:51 +01:00
parent 6d1b3d33bb
commit 02155ede91
8 changed files with 146 additions and 15 deletions
@@ -37,12 +37,15 @@ edlp_vars = {
// 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();
};
@@ -233,7 +236,7 @@ edlp_vars = {
// |__/
// TODO: add url hash nav
// TODO: implement history.js
function initAjaxLinks(){
function initAjaxLinks(){
console.log('initAjaxLinks');
$('a', '#block-mainnavigation')
@@ -264,6 +267,16 @@ edlp_vars = {
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>'){
@@ -1742,7 +1742,7 @@ footer {
footer .block-block-edlp-entrees ul li[tid='123'] a.term-link:before, footer .block-block-edlp-entrees ul li[tid='123'] .entree-content span.oblique-wrapper a:before {
border-color: #497715;
background-color: #497715; }
footer .block-block-edlp-entrees ul li .entree-content span.oblique-wrapper a:not(:hover):before {
footer .block-block-edlp-entrees ul li .entree-content span.oblique-wrapper a:not(:hover):not(.is-active):before {
background-color: #fff !important; }
footer .block-block-edlp-entrees ul li:not(.opened) a.term-link:not(:hover):not(.highlighted):before {
background-color: #fff !important; }
@@ -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>'){
@@ -728,7 +728,7 @@ footer{
// color: red;
// }
// }
.entree-content span.oblique-wrapper a:not(:hover):before{background-color: #fff!important;}
.entree-content span.oblique-wrapper a:not(:hover):not(.is-active):before{background-color: #fff!important;}
&:not(.opened){
a.term-link:not(:hover):not(.highlighted):before{