|
@@ -194,7 +194,11 @@
|
|
|
console.log('selector', state.selector);
|
|
|
$('a[selector="'+state.selector+'"]').addClass('is-active');
|
|
|
}else{
|
|
|
- $('a[data-drupal-link-system-path="'+state.sys_path+'"]').addClass('is-active');
|
|
|
+ if(typeof state.view_mode != 'undefined'){
|
|
|
+ $('a[viewmode="'+state.view_mode+'"][data-drupal-link-system-path="'+state.sys_path+'"]').addClass('is-active');
|
|
|
+ }else{
|
|
|
+ $('a[data-drupal-link-system-path="'+state.sys_path+'"]').addClass('is-active');
|
|
|
+ }
|
|
|
|
|
|
_$body.trigger({'type':'new-content-not-entree-ajax-loaded'});
|
|
|
}
|
|
@@ -228,6 +232,12 @@
|
|
|
addCloseModalBtnToCols();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ if(data.entity_type == "node" && data.bundle == "enregistrement" && data.view_mode == "transcript"){
|
|
|
+
|
|
|
+ initEnregistrementTranscript();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if(typeof data.translations_links != 'undefined'){
|
|
|
console.log('state',state);
|
|
@@ -261,7 +271,6 @@
|
|
|
_$body.attr('booted', 'booted');
|
|
|
_$body.removeClass('ajax-loading');
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
if(state.url){
|
|
@@ -271,7 +280,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
history.pushState(state, null, state.url);
|
|
|
}
|
|
|
};
|
|
@@ -713,6 +722,7 @@
|
|
|
stop(){
|
|
|
|
|
|
this.audio.pause();
|
|
|
+
|
|
|
this.timeOutToHide();
|
|
|
},
|
|
|
|
|
@@ -1201,6 +1211,30 @@
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ function initEnregistrementTranscript(){
|
|
|
+ console.log('initEnregistrementTranscript');
|
|
|
+ var $node = _$row.find('article.node--type-enregistrement.node--view-mode-transcript');
|
|
|
+ var $nav = $('<nav>').prependTo($node);
|
|
|
+ $node.find('.field--name-field-transcript-vo').addClass('visible').find('.field__label')
|
|
|
+ .clone().appendTo($nav).addClass('is-active')
|
|
|
+ .attr('field_target', '.field--name-field-transcript-vo');
|
|
|
+ $node.find('.field--name-field-transcript-trad').find('.field__label')
|
|
|
+ .clone().appendTo($nav)
|
|
|
+ .attr('field_target', '.field--name-field-transcript-trad');
|
|
|
+ $nav.find('.field__label').on('click', function(){
|
|
|
+ var $this = $(this).addClass('is-active');
|
|
|
+ $this.siblings('.is-active').removeClass('is-active');
|
|
|
+ $this.parents('article.node').find('.field.visible').removeClass('visible');
|
|
|
+ $this.parents('article.node').find($this.attr('field_target')).addClass('visible');
|
|
|
+ });
|
|
|
+ };
|
|
|
+
|
|
|
|
|
|
|
|
|
|