production sound are now playable
This commit is contained in:
@@ -576,6 +576,7 @@
|
||||
.add('a', '.productions-subtree')
|
||||
.add('a', '.productions-parent')
|
||||
// .add('a.index-link, a.notice-link', '#block-edlpentreesblock')
|
||||
.add('a', '.field--name-field-son')
|
||||
.addClass('ajax-link');
|
||||
|
||||
_$ajaxLinks = $('.ajax-link:not(.ajax-enabled)')
|
||||
@@ -583,7 +584,7 @@
|
||||
var $this = $(this);
|
||||
// avoid already ajaxified links
|
||||
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');
|
||||
}
|
||||
});
|
||||
@@ -608,6 +609,14 @@
|
||||
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 ? )
|
||||
// if($link.is('.language-link')){
|
||||
// TODO: change global site current language
|
||||
@@ -884,6 +893,16 @@
|
||||
this.showHideNextBtn();
|
||||
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
|
||||
setSRC(url){
|
||||
console.log('AudioPlayer setSRC : url', url);
|
||||
|
||||
Reference in New Issue
Block a user