|
@@ -576,6 +576,7 @@
|
|
.add('a', '.productions-subtree')
|
|
.add('a', '.productions-subtree')
|
|
.add('a', '.productions-parent')
|
|
.add('a', '.productions-parent')
|
|
// .add('a.index-link, a.notice-link', '#block-edlpentreesblock')
|
|
// .add('a.index-link, a.notice-link', '#block-edlpentreesblock')
|
|
|
|
+ .add('a', '.field--name-field-son')
|
|
.addClass('ajax-link');
|
|
.addClass('ajax-link');
|
|
|
|
|
|
_$ajaxLinks = $('.ajax-link:not(.ajax-enabled)')
|
|
_$ajaxLinks = $('.ajax-link:not(.ajax-enabled)')
|
|
@@ -583,7 +584,7 @@
|
|
var $this = $(this);
|
|
var $this = $(this);
|
|
// avoid already ajaxified links
|
|
// avoid already ajaxified links
|
|
if($this.is('.ajax-enable')) return;
|
|
if($this.is('.ajax-enable')) return;
|
|
- if($this.attr('data-drupal-link-system-path')){
|
|
|
|
|
|
+ if($this.attr('data-drupal-link-system-path') || $this.is('[type^="audio"]')){
|
|
$this.on('click', onClickAjaxLink).addClass('ajax-enable');
|
|
$this.on('click', onClickAjaxLink).addClass('ajax-enable');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -608,6 +609,14 @@
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // other sounds playing
|
|
|
|
+ if($link.is('[type^="audio"]')){
|
|
|
|
+ _audioPlayer
|
|
|
|
+ .emmit('stop-shuffle')
|
|
|
|
+ .openSound($link.attr('href'), $link.html());
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
// NOT USED ( YET ? )
|
|
// NOT USED ( YET ? )
|
|
// if($link.is('.language-link')){
|
|
// if($link.is('.language-link')){
|
|
// TODO: change global site current language
|
|
// TODO: change global site current language
|
|
@@ -884,6 +893,16 @@
|
|
this.showHideNextBtn();
|
|
this.showHideNextBtn();
|
|
this.show();
|
|
this.show();
|
|
},
|
|
},
|
|
|
|
+ openSound(url, title){
|
|
|
|
+ this.hide();
|
|
|
|
+ this.clearTimeOutToHide();
|
|
|
|
+ this.$cartel.html("");
|
|
|
|
+ this.setSRC(url);
|
|
|
|
+ this.show();
|
|
|
|
+ if(typeof _paq !== 'undefined'){
|
|
|
|
+ _paq.push(['trackEvent', 'Audio', 'play', url]);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// audio functions
|
|
// audio functions
|
|
setSRC(url){
|
|
setSRC(url){
|
|
console.log('AudioPlayer setSRC : url', url);
|
|
console.log('AudioPlayer setSRC : url', url);
|