enregistrement transcription interface is ok
This commit is contained in:
@@ -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');
|
||||
}
|
||||
// as new content is not related to entree, we trigger close entree
|
||||
_$body.trigger({'type':'new-content-not-entree-ajax-loaded'});
|
||||
}
|
||||
@@ -228,6 +232,12 @@
|
||||
addCloseModalBtnToCols();
|
||||
}
|
||||
|
||||
// enregistrement transcription
|
||||
if(data.entity_type == "node" && data.bundle == "enregistrement" && data.view_mode == "transcript"){
|
||||
// window.requestAnimationFrame(initEnregistrementTranscript);
|
||||
initEnregistrementTranscript();
|
||||
}
|
||||
|
||||
// update the language switcher block if it comes in the response
|
||||
if(typeof data.translations_links != 'undefined'){
|
||||
console.log('state',state);
|
||||
@@ -261,7 +271,6 @@
|
||||
_$body.attr('booted', 'booted');
|
||||
_$body.removeClass('ajax-loading');
|
||||
|
||||
|
||||
// url is null means that we are loading content on popState event
|
||||
// so we don't record the state again
|
||||
if(state.url){
|
||||
@@ -271,7 +280,7 @@
|
||||
// };
|
||||
// console.log('url:'+url+' ; state',state);
|
||||
// console.log(window.location);
|
||||
// we can not pushestate with absolute url
|
||||
// /!\ we can not pushestate with absolute url /!\
|
||||
history.pushState(state, null, state.url);
|
||||
}
|
||||
};
|
||||
@@ -713,6 +722,7 @@
|
||||
stop(){
|
||||
// console.log('AudioPlayer stop()');
|
||||
this.audio.pause();
|
||||
// TODO: don't close player if article or transcript is open
|
||||
this.timeOutToHide();
|
||||
},
|
||||
// audio events
|
||||
@@ -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');
|
||||
});
|
||||
};
|
||||
|
||||
// __ __ _ _
|
||||
// | \/ |___ __| |__ _| |___
|
||||
// | |\/| / _ \/ _` / _` | (_-<
|
||||
|
||||
@@ -1306,14 +1306,59 @@ main[role="main"] .layout-content {
|
||||
main[role="main"] .layout-content .field.text-formatted a.audio-link {
|
||||
border-bottom: 1px dotted red; }
|
||||
|
||||
main[role="main"] article.node > h2, main[role="main"] h2.title {
|
||||
main[role="main"] h3.sur-title {
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
margin: 0.9em 0 0; }
|
||||
|
||||
main[role="main"] article.node:not(.node--type-enregistrement) > h2, main[role="main"] h2.title {
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase; }
|
||||
|
||||
main[role="main"] article.node.node--type-enregistrement > h2 {
|
||||
font-size: 0.82em;
|
||||
font-weight: 600;
|
||||
line-height: 1.6;
|
||||
margin: 0.9em 0 0 0; }
|
||||
|
||||
html.js main[role="main"] article.node.node--type-enregistrement h3.sur-title {
|
||||
display: none; }
|
||||
|
||||
main[role="main"] article.node.node--type-enregistrement .field--name-field-transcript-vo .field__label, main[role="main"] article.node.node--type-enregistrement .field--name-field-transcript-trad .field__label {
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase; }
|
||||
html.js main[role="main"] article.node.node--type-enregistrement .field--name-field-transcript-vo .field__label, html.js main[role="main"] article.node.node--type-enregistrement .field--name-field-transcript-trad .field__label {
|
||||
display: none; }
|
||||
|
||||
main[role="main"] article.node.node--type-enregistrement .field--name-field-transcript-vo:not(.visible), main[role="main"] article.node.node--type-enregistrement .field--name-field-transcript-trad:not(.visible) {
|
||||
display: none; }
|
||||
|
||||
main[role="main"] article.node.node--type-enregistrement nav {
|
||||
padding: 1em 0 0; }
|
||||
main[role="main"] article.node.node--type-enregistrement nav div.field__label {
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
margin-right: 1em; }
|
||||
main[role="main"] article.node.node--type-enregistrement nav div.field__label:before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border: 1px solid red;
|
||||
margin-right: 0.5em; }
|
||||
main[role="main"] article.node.node--type-enregistrement nav div.field__label:hover:before, main[role="main"] article.node.node--type-enregistrement nav div.field__label.is-active:before {
|
||||
background-color: red; }
|
||||
|
||||
main[role="main"] article.node p {
|
||||
font-size: 0.75em;
|
||||
font-weight: normal; }
|
||||
font-size: 0.82em;
|
||||
font-weight: normal;
|
||||
line-height: 1.6; }
|
||||
|
||||
main[role="main"] img {
|
||||
max-width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user