Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9570ee1823 | ||
|
|
c5ae3d6b00 | ||
|
|
4967111a0e | ||
|
|
e27d1f1e5a | ||
|
|
df54d07169 | ||
|
|
efca592b17 | ||
|
|
95cd2c15cf | ||
|
|
00166e7917 | ||
|
|
ea435b7517 | ||
|
|
6d88ca7c8d | ||
|
|
d4087b2924 |
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\edlp_admin\Plugin\Filter;
|
||||
|
||||
use Drupal\Component\Utility\Html;
|
||||
// use Drupal\Component\Utility\Unicode;
|
||||
// use Drupal\Component\Utility\Xss;
|
||||
use Drupal\filter\FilterProcessResult;
|
||||
use Drupal\filter\Plugin\FilterBase;
|
||||
// use Drupal\Core\Url;
|
||||
// use Drupal\Core\Template\Attribute;
|
||||
|
||||
/**
|
||||
* Provides a filter to convert audio links.
|
||||
*
|
||||
* @Filter(
|
||||
* id = "css",
|
||||
* title = @Translation("Css remove filter"),
|
||||
* description = @Translation("Remove all style attributes"),
|
||||
* type = Drupal\filter\Plugin\FilterInterface::TYPE_TRANSFORM_REVERSIBLE
|
||||
* )
|
||||
*/
|
||||
class CssFilter extends FilterBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function process($text, $langcode) {
|
||||
$result = new FilterProcessResult($text);
|
||||
|
||||
$cleaned_text = preg_replace('/style="[^"]*"/i', '', $text);
|
||||
|
||||
$result->setProcessedText($cleaned_text);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,29 @@ function edlp_ajax_page_attachments(array &$attachments) {
|
||||
$current_language = \Drupal::languageManager()->getCurrentLanguage()->getId();
|
||||
$is_front = \Drupal::service('path.matcher')->isFrontPage();
|
||||
|
||||
$entity_type = null;
|
||||
$entity_bundle = null;
|
||||
$entity_id = null;
|
||||
$audio_url = null;
|
||||
foreach (['node', 'taxonomy_term'] as $type) {
|
||||
$entity = \Drupal::routeMatch()->getParameter($type);
|
||||
if($entity){
|
||||
$entity_type = $type;
|
||||
$entity_bundle = $entity->bundle();
|
||||
$entity_id = $entity->id();
|
||||
if($entity_bundle == 'enregistrement'){
|
||||
$field_son_values = $entity->get('field_son')->getValue();
|
||||
$audio_fid = count($field_son_values) ? $field_son_values[0]['target_id'] : null;
|
||||
if($audio_fid){
|
||||
$audio_file = \Drupal\file\Entity\File::load($audio_fid);
|
||||
$son_uri = $audio_file->getFileUri();
|
||||
$audio_url = file_create_url($son_uri);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// do not redirect if not node, term, or custom routing
|
||||
// FIXME: check with routes instead of path as path can change !!!
|
||||
if(preg_match('/^\/?node\/\d+/', $current_path)
|
||||
@@ -41,6 +64,10 @@ function edlp_ajax_page_attachments(array &$attachments) {
|
||||
is_front:".($is_front ? 'true':'false').",\n
|
||||
redirect:".($redirect ? 'true':'false').",\n
|
||||
lang_code:'".$current_language."',\n
|
||||
entity_type:'".$entity_type."',\n
|
||||
entity_bundle:'".$entity_bundle."',\n
|
||||
entity_id:'".$entity_id."',\n
|
||||
audio_url:'".$audio_url."',\n
|
||||
};";
|
||||
|
||||
$attachments['#attached']['html_head'][] = [
|
||||
@@ -66,9 +93,11 @@ function edlp_ajax_theme($existing, $type, $theme, $path) {
|
||||
'edlp_ajax' => array(
|
||||
'file' => 'includes/edlp_ajax.inc',
|
||||
'variables' => array(
|
||||
'entity_type' => 'node',
|
||||
'entity' => NULL,
|
||||
'view_mode' => 'default'
|
||||
'entity_type' => null,
|
||||
'bundle' => null,
|
||||
'entity' => null,
|
||||
'view_mode' => 'default',
|
||||
'aside' => array(),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -82,6 +111,7 @@ function edlp_ajax_theme_suggestions_edlp_ajax(array $vars) {
|
||||
$suggestions = [];
|
||||
// $node = $variables['elements']['#node'];
|
||||
$sanitized_view_mode = strtr($vars['view_mode'], '.', '_');
|
||||
// $entity = $vars['entity'];
|
||||
//
|
||||
$suggestions[] = 'edlp_ajax__' . $vars['entity_type'];
|
||||
$suggestions[] = 'edlp_ajax__' . $vars['entity_type'] . '__' . $sanitized_view_mode;
|
||||
@@ -89,5 +119,8 @@ function edlp_ajax_theme_suggestions_edlp_ajax(array $vars) {
|
||||
$suggestions[] = 'edlp_ajax__' . $vars['entity_type'] . '__' . $vars['entity']->id();
|
||||
$suggestions[] = 'edlp_ajax__' . $vars['entity_type'] . '__' . $vars['entity']->id() . '__' . $sanitized_view_mode;
|
||||
|
||||
$suggestions[] = 'edlp_ajax__' . $vars['entity_type'] . '__' . $vars['bundle'];
|
||||
$suggestions[] = 'edlp_ajax__' . $vars['entity_type'] . '__' . $vars['bundle'] . '__' . $sanitized_view_mode;
|
||||
|
||||
return $suggestions;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,5 @@ function template_preprocess_edlp_ajax(&$vars){
|
||||
*/
|
||||
$view_builder = \Drupal::entityTypeManager()->getViewBuilder($vars['entity_type']);
|
||||
$vars['content'] = $view_builder->view($vars['entity'], $vars['view_mode']);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Drupal\menu_link_content\Entity\MenuLinkContent;
|
||||
use Drupal\Core\Datetime\DrupalDateTime;
|
||||
|
||||
// use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use \Drupal\block\Entity\Block;
|
||||
use Drupal\Core\Cache\CacheableJsonResponse;
|
||||
@@ -18,6 +20,107 @@ class EdlpAjaxController extends ControllerBase {
|
||||
|
||||
private function query() {
|
||||
$this->entity = entity_load($this->entity_type, $this->id);
|
||||
|
||||
if($this->entity){
|
||||
switch($this->entity_type){
|
||||
case 'node':
|
||||
$this->bundle = $this->entity->getType();
|
||||
break;
|
||||
case 'taxonomy_term':
|
||||
$this->bundle = $this->entity->bundle();
|
||||
break;
|
||||
default:
|
||||
$this->bundle = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function getProductionDatesAside(){
|
||||
|
||||
$now = new DrupalDateTime('now');
|
||||
$now->setTimezone(new \DateTimeZone(DATETIME_STORAGE_TIMEZONE));
|
||||
|
||||
$future_dates_query = \Drupal::entityQuery('node')
|
||||
->condition('status', 1)
|
||||
->condition('type', 'evenement')
|
||||
->condition('field_page_liee.target_id', $this->entity->id(), 'IN')
|
||||
->condition('field_date', $now->format(DATETIME_DATETIME_STORAGE_FORMAT), '>=')
|
||||
->sort('field_date');
|
||||
$future_nids = $future_dates_query->execute();
|
||||
|
||||
$past_dates_query = \Drupal::entityQuery('node')
|
||||
->condition('status', 1)
|
||||
->condition('type', 'evenement')
|
||||
->condition('field_page_liee.target_id', $this->entity->id(), 'IN')
|
||||
->condition('field_date', $now->format(DATETIME_DATETIME_STORAGE_FORMAT), '<')
|
||||
->sort('field_date', 'DESC');
|
||||
$past_nids = $past_dates_query->execute();
|
||||
|
||||
if(count($future_nids) || count($past_nids)){
|
||||
|
||||
$aside = array(
|
||||
'#type'=>'container',
|
||||
"#attributes"=>array(
|
||||
"class"=>['agenda']
|
||||
)
|
||||
);
|
||||
|
||||
$node_view_builder = \Drupal::entityTypeManager()->getViewBuilder('node');
|
||||
|
||||
if(count($future_nids)){
|
||||
$future_nodes = entity_load_multiple('node', $future_nids);
|
||||
$future_list = array (
|
||||
'#theme' => 'item_list',
|
||||
'#items' => [],
|
||||
);
|
||||
foreach($future_nodes as $node){
|
||||
$future_list['#items'][] = $node_view_builder->view($node, 'aside');
|
||||
}
|
||||
$aside['future_events'] = array(
|
||||
"#type"=>"container",
|
||||
"#attributes"=>array(
|
||||
"class"=>['future-events']
|
||||
),
|
||||
"#markup"=>"<h3>" . t("Future events") . "</h3>",
|
||||
"future_events"=>$future_list
|
||||
);
|
||||
}
|
||||
|
||||
if(count($past_nids)){
|
||||
$past_nodes = entity_load_multiple('node', $past_nids);
|
||||
$past_list = array (
|
||||
'#theme' => 'item_list',
|
||||
'#items' => [],
|
||||
);
|
||||
foreach($past_nodes as $node){
|
||||
$past_list['#items'][] = $node_view_builder->view($node, 'aside');
|
||||
}
|
||||
$aside['past_events'] = array(
|
||||
"#type"=>"container",
|
||||
"#attributes"=>array(
|
||||
"class"=>['past-events']
|
||||
),
|
||||
"#markup"=>"<h3>" . t("Past events") . "</h3>",
|
||||
"past_events"=>$past_list
|
||||
);
|
||||
}
|
||||
}else{
|
||||
$aside = null;
|
||||
}
|
||||
return $aside;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* return a renderable array
|
||||
*/
|
||||
private function getAside() {
|
||||
if($this->bundle == 'page'){
|
||||
$aside = $this->getProductionDatesAside();
|
||||
}else{
|
||||
$aside = null;
|
||||
}
|
||||
return $aside;
|
||||
}
|
||||
|
||||
private function toRenderable(){
|
||||
@@ -29,6 +132,8 @@ class EdlpAjaxController extends ControllerBase {
|
||||
"#entity_type" => $this->entity_type,
|
||||
'#entity' => $this->entity,
|
||||
'#view_mode' => $this->viewmode,
|
||||
'#aside' => $this->getAside(),
|
||||
'#bundle' => $this->bundle,
|
||||
);
|
||||
}else{
|
||||
return array(
|
||||
@@ -55,28 +160,18 @@ class EdlpAjaxController extends ControllerBase {
|
||||
return render($renderable);
|
||||
});
|
||||
|
||||
switch($this->entity_type){
|
||||
case 'node':
|
||||
$bundle = $this->entity->getType();
|
||||
break;
|
||||
case 'taxonomy_term':
|
||||
$bundle = $this->entity->bundle();
|
||||
break;
|
||||
default:
|
||||
$bundle = NULL;
|
||||
}
|
||||
|
||||
$data = [
|
||||
'date' => time(),
|
||||
'id' => $this->id,
|
||||
'view_mode' => $this->viewmode,
|
||||
'bundle' => $bundle,
|
||||
'bundle' => $this->bundle,
|
||||
'entity_type' => $this->entity_type,
|
||||
'rendered'=> $rendered,
|
||||
];
|
||||
|
||||
// if content type page (productions) get the menu items
|
||||
if($bundle == "page"){
|
||||
// if content type page (productions) get the menu items and linked dates
|
||||
if($this->bundle == "page"){
|
||||
$menuLinkManager = \Drupal::service('plugin.manager.menu.link');
|
||||
$links = $menuLinkManager->loadLinksByRoute('entity.node.canonical', array('node' => $this->id), 'productions');
|
||||
// dpm($links, 'links');
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
{{ content }}
|
||||
{{ aside }}
|
||||
|
||||
@@ -30,7 +30,7 @@ createNodesRepulsions();};function highlightEntries(){_$entrees_block_termlinks.
|
||||
var entree;if(id!=-1){for(var i=0;i<_nodes[id].entrees.length;i++){entree=_nodes[id].entrees[i];_$entrees_block_termlinks.filter(function(){return $(this).attr('tid')==entree;}).addClass('highlighted');}}};function filterSearchResults(nids){shutDownArticles();_nodes_centered=[];for(var n=0;n<_nodes.length;n++){if(nids.indexOf(_nodes[n].nid)==-1){_nodes[n].setAside();}else{_nodes[n].setCentered();_nodes_centered.push(_nodes[n]);}}
|
||||
createNodesRepulsions();};function scrambleCollection(){for(var i=0;i<_nodes.length;i++){_nodes[i].scramble();}};function closeAllEntries(){_$entrees_block_termlinks.each(function(index,el){if($(this).parents('li').is('.opened')){$(this).trigger('click');return false;}});};function initArtilesLink(){_$articles_link=$('<a>').html('Articles').attr("href","#articles").addClass('articles-link').on('click',onCLickedOnArticles);$('.item-list ul',_$entrees_block).append($('<li>').append($('<span class="oblique-wrapper">').append(_$articles_link)));};function onCLickedOnArticles(e){e.preventDefault();$(this).toggleClass('is-active');if($(this).is('.is-active')){filterArticles();closeAllEntries();}else{resetArticlesFilter();}
|
||||
return false;};function filterArticles(){for(var i=0;i<_no_articles_nodes.length;i++){_no_articles_nodes[i].fade();}};function resetArticlesFilter(){for(var i=0;i<_no_articles_nodes.length;i++){_no_articles_nodes[i].unFade();}};function shutDownArticles(){if(_$articles_link.is('.is-active'))
|
||||
_$articles_link.trigger('click');};function initEvents(){void 0;_$canvas.on('mousemove',function(event){event.preventDefault();_m_pos.x=event.originalEvent.clientX;_m_pos.y=event.originalEvent.clientY;}).on('mouseenter',function(event){_mouse_in=true;}).on('mouseout',function(event){_mouse_in=false;_node_pop_up.removeNode();}).on('click',function(event){if(event.target.tagName!="A"&&event.target.tagName!="INPUT"){event.preventDefault();if(_node_hover_id!=-1){var event={'type':'corpus-cliked-on-node','target_node':{'id':_node_hover_id,'nid':_nodes[_node_hover_id].nid,'audio_url':_nodes[_node_hover_id].audio_url},};_$canvas.trigger(event);}else{_$canvas.trigger('corpus-cliked-on-map');}}}).on('audio-node-opened',function(e){openNodeByNid(e.nid);}).on('audio-node-closed',function(e){closeNode();}).on('open-entree',function(e){toggleEntree(e.tid);}).on('close-all-entree',function(e){closeAllEntries();});_$entrees_block_termlinks.on('click',function(event){event.preventDefault();toggleEntree($(this).attr('tid'),true);return false;});_$body.on('chutier-action-done',function(e){_nodes_by_nid[e.target_id].chutier_action=e.new_action;}).on('search-results-loaded',function(e){filterSearchResults(e.results);}).on('search-closed',function(e){scrambleCollection();}).on('new-content-not-entree-ajax-loaded',function(e){if(_$entrees_block_termlinks.parents('li.opened').length){_$entrees_block_termlinks.parents('li').removeClass('opened');scrambleCollection();}});};function checkPreOpenedEntry(){_$entrees_block.find('li.entree').each(function(index,el){var $li=$(this);if($('a.is-active',$li).length){$li.addClass('opened');filterEntree($li.attr('tid'));return false;}});};function initNodePopup(){_node_pop_up=new NodePopUp();};function NodePopUp(){this.visible=false;this.node;this.$dom=$('<div>').addClass('node-popup').attr('pos','top-right').appendTo('body');this.$content=$('<div>').addClass('inner').appendTo(this.$dom);if(typeof NodePopUp.initialized=="undefined"){NodePopUp.prototype.setNode=function(n){this.node=n;this.setPositioning();this.setContent();};NodePopUp.prototype.setPositioning=function(){switch(true){case this.node.x>this.node.wall_limits.right-350&&this.node.y<this.node.wall_limits.top+200:this.$dom.attr('pos','bottom-left');break;case this.node.x>this.node.wall_limits.right-350:this.$dom.attr('pos','top-left');break;case this.node.y<this.node.wall_limits.top+200:this.$dom.attr('pos','bottom-right');break;default:this.$dom.attr('pos','top-right');}};NodePopUp.prototype.setContent=function(){this.$content.html('');var $entrees=$('<div>').addClass('entrees');for(var i=0;i<this.node.entrees.length;i++){var tid=this.node.entrees[i];$entrees.append($('<span>').addClass('entree').attr('tid',tid));}
|
||||
_$articles_link.trigger('click');};function initEvents(){void 0;_$canvas.on('mousemove',function(event){event.preventDefault();_m_pos.x=event.originalEvent.clientX;_m_pos.y=event.originalEvent.clientY;}).on('mouseenter',function(event){_mouse_in=true;}).on('mouseout',function(event){_mouse_in=false;_node_pop_up.removeNode();}).on('click',function(event){if(event.target.tagName!="A"&&event.target.tagName!="INPUT"){event.preventDefault();if(_node_hover_id!=-1){var event={'type':'corpus-cliked-on-node','target_node':_nodes[_node_hover_id],};_$canvas.trigger(event);}else{_$canvas.trigger('corpus-cliked-on-map');}}}).on('audio-node-opened',function(e){openNodeByNid(e.nid);}).on('audio-node-closed',function(e){closeNode();}).on('open-entree',function(e){toggleEntree(e.tid);}).on('close-all-entree',function(e){closeAllEntries();});_$entrees_block_termlinks.on('click',function(event){event.preventDefault();toggleEntree($(this).attr('tid'),true);return false;});_$body.on('chutier-action-done',function(e){_nodes_by_nid[e.target_id].chutier_action=e.new_action;}).on('search-results-loaded',function(e){filterSearchResults(e.results);}).on('search-closed',function(e){scrambleCollection();}).on('new-content-not-entree-ajax-loaded',function(e){if(_$entrees_block_termlinks.parents('li.opened').length){_$entrees_block_termlinks.parents('li').removeClass('opened');scrambleCollection();}});};function checkPreOpenedEntry(){_$entrees_block.find('li.entree').each(function(index,el){var $li=$(this);if($('a.is-active',$li).length){$li.addClass('opened');filterEntree($li.attr('tid'));return false;}});};function initNodePopup(){_node_pop_up=new NodePopUp();};function NodePopUp(){this.visible=false;this.node;this.$dom=$('<div>').addClass('node-popup').attr('pos','top-right').appendTo('body');this.$content=$('<div>').addClass('inner').appendTo(this.$dom);if(typeof NodePopUp.initialized=="undefined"){NodePopUp.prototype.setNode=function(n){this.node=n;this.setPositioning();this.setContent();};NodePopUp.prototype.setPositioning=function(){switch(true){case this.node.x>this.node.wall_limits.right-350&&this.node.y<this.node.wall_limits.top+200:this.$dom.attr('pos','bottom-left');break;case this.node.x>this.node.wall_limits.right-350:this.$dom.attr('pos','top-left');break;case this.node.y<this.node.wall_limits.top+200:this.$dom.attr('pos','bottom-right');break;default:this.$dom.attr('pos','top-right');}};NodePopUp.prototype.setContent=function(){this.$content.html('');var $entrees=$('<div>').addClass('entrees');for(var i=0;i<this.node.entrees.length;i++){var tid=this.node.entrees[i];$entrees.append($('<span>').addClass('entree').attr('tid',tid));}
|
||||
var $chutier_action=$('<span>').addClass('chutier-icon').attr('action',this.node.chutier_action);this.$content.append($entrees).append('<h2 class="title">'+this.node.title+'</h2>').append('<section class="description">'+this.node.description+'</section>').append($chutier_action);};NodePopUp.prototype.removeNode=function(){this.node=false;};NodePopUp.prototype.draw=function(){if(this.node){this.$dom.css({'display':"block",'left':this.node.x+"px",'top':this.node.y+"px",});}else{this.$dom.css({'display':"none",});}};NodePopUp.initialized=true;}}
|
||||
function render(){_ctx.clearRect(0,0,_canvas.width,_canvas.height);checkParticulesCollisions();for(var i=0;i<_nodes.length;i++){_nodes[i].onUpdate();}
|
||||
_node_pop_up.draw();if(_node_hover_id!=-1){_canvas.style.cursor='pointer';}else{_canvas.style.cursor='auto';}
|
||||
|
||||
@@ -1 +1 @@
|
||||
canvas#corpus-map{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;left:0;z-index:0}canvas#corpus-map.de-activated{background-color:#f4f4f4}div.node-popup{z-index:10;position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:300px;min-height:30px;top:60%;left:30%;pointer-events:none}div.node-popup .inner{padding:1em;outline:red solid 1px;background-color:#fff}div.node-popup:before{content:"";position:absolute;width:60px;height:0;border-top:1px solid red}div.node-popup[pos=bottom-right]{-webkit-transform:translateY(42px) translateX(42px);transform:translateY(42px) translateX(42px)}div.node-popup[pos=bottom-right]:before{top:-1px;left:-61px;-webkit-transform-origin:bottom right;transform-origin:bottom right;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}div.node-popup[pos=bottom-left]{-webkit-transform:translateX(-100%) translateY(42px) translateX(-42px);transform:translateX(-100%) translateY(42px) translateX(-42px)}div.node-popup[pos=bottom-left]:before{top:calc(100% +1px);left:100%;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:rotateZ(-45deg);transform:rotateZ(-45deg)}div.node-popup[pos=top-left]{-webkit-transform:translateY(-100%) translateX(-100%) translateY(-42px) translateX(-42px);transform:translateY(-100%) translateX(-100%) translateY(-42px) translateX(-42px)}div.node-popup[pos=top-left]:before{bottom:0;left:100%;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}div.node-popup[pos=top-right]{-webkit-transform:translateY(-100%) translateY(-42px) translateX(42px);transform:translateY(-100%) translateY(-42px) translateX(42px)}div.node-popup[pos=top-right]:before{top:calc(100% + 1px);left:-61px;-webkit-transform-origin:top right;transform-origin:top right;-webkit-transform:rotateZ(-45deg);transform:rotateZ(-45deg)}
|
||||
canvas#corpus-map{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;left:0;z-index:0}canvas#corpus-map.de-activated{background-color:#f4f4f4}div.node-popup{z-index:10;position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:300px;min-height:30px;top:60%;left:30%;pointer-events:none}div.node-popup .inner{padding:.4em;outline:red solid 1px;background-color:#fff}div.node-popup:before{content:"";position:absolute;width:60px;height:0;border-top:1px solid red}div.node-popup[pos=bottom-right]{-webkit-transform:translateY(42px) translateX(42px);transform:translateY(42px) translateX(42px)}div.node-popup[pos=bottom-right]:before{top:-1px;left:-61px;-webkit-transform-origin:bottom right;transform-origin:bottom right;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}div.node-popup[pos=bottom-left]{-webkit-transform:translateX(-100%) translateY(42px) translateX(-42px);transform:translateX(-100%) translateY(42px) translateX(-42px)}div.node-popup[pos=bottom-left]:before{top:calc(100% +1px);left:100%;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:rotateZ(-45deg);transform:rotateZ(-45deg)}div.node-popup[pos=top-left]{-webkit-transform:translateY(-100%) translateX(-100%) translateY(-42px) translateX(-42px);transform:translateY(-100%) translateX(-100%) translateY(-42px) translateX(-42px)}div.node-popup[pos=top-left]:before{bottom:0;left:100%;-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}div.node-popup[pos=top-right]{-webkit-transform:translateY(-100%) translateY(-42px) translateX(42px);transform:translateY(-100%) translateY(-42px) translateX(42px)}div.node-popup[pos=top-right]:before{top:calc(100% + 1px);left:-61px;-webkit-transform-origin:top right;transform-origin:top right;-webkit-transform:rotateZ(-45deg);transform:rotateZ(-45deg)}
|
||||
@@ -155,7 +155,7 @@
|
||||
// | .` / _ \/ _` / -_|_-<
|
||||
// |_|\_\___/\__,_\___/__/
|
||||
function buildNodes(nodes){
|
||||
//console.log("buildNodes", nodes);
|
||||
// console.log("buildNodes", nodes);
|
||||
var d;
|
||||
for (var i in nodes) {
|
||||
d = i < 1 ? true : false;
|
||||
@@ -791,11 +791,7 @@
|
||||
// console.log("corpus : click on node", _nodes[_node_hover_id]);
|
||||
var event = {
|
||||
'type':'corpus-cliked-on-node',
|
||||
'target_node':{
|
||||
'id':_node_hover_id,
|
||||
'nid':_nodes[_node_hover_id].nid,
|
||||
'audio_url':_nodes[_node_hover_id].audio_url
|
||||
},
|
||||
'target_node':_nodes[_node_hover_id],
|
||||
};
|
||||
_$canvas.trigger(event);
|
||||
// instead of directly opening the doc, create an event listener (e.g. : audio played from random)
|
||||
|
||||
@@ -34,7 +34,7 @@ div.node-popup{
|
||||
pointer-events: none;
|
||||
|
||||
.inner{
|
||||
padding:1em;
|
||||
padding:0.4em;
|
||||
outline: 1px solid red;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,11 @@ function edlp_corpus_entity_extra_field_info(){
|
||||
'weight' => 99,
|
||||
// 'visible' => FALSE,
|
||||
];
|
||||
$extra['node']['enregistrement']['display']['relations'] = [
|
||||
'label' => t('Relations'),
|
||||
'description' => 'Display enregistrement relations with other content types',
|
||||
'weight' => 99,
|
||||
];
|
||||
return $extra;
|
||||
}
|
||||
|
||||
@@ -93,6 +98,58 @@ function edlp_corpus_taxonomy_term_view(array &$build, EntityInterface $entity,
|
||||
}
|
||||
}
|
||||
|
||||
function edlp_corpus_node_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
|
||||
if($entity->bundle() == "enregistrement"){
|
||||
$relations_display_settings = $display->getComponent('relations');
|
||||
if(!empty($relations_display_settings)){
|
||||
|
||||
// querying all productions page that have this document in their entity reference "field_documents_liés"
|
||||
$query = \Drupal::entityQuery('node')
|
||||
->condition('status', 1)
|
||||
->condition('type', 'page') // page (production)
|
||||
->exists('field_page_type')
|
||||
->condition('field_documents_lies.target_id', $entity->id(), 'IN');
|
||||
|
||||
$nids = $query->execute();
|
||||
$nodes = entity_load_multiple('node', $nids);
|
||||
// dpm($nodes, '$nodes');
|
||||
|
||||
// build the array of relateds classified by page_type (taxonomy)
|
||||
$relateds = array();
|
||||
foreach ($nodes as $nid => $node) {
|
||||
$page_type = $node->get('field_page_type')->get(0)->getValue();
|
||||
// dpm($page_type, 'page_type');
|
||||
$term = entity_load('taxonomy_term', $page_type['target_id']);
|
||||
// dpm($term, 'term');
|
||||
$relateds[$term->getName()][] = $node->getTitle();
|
||||
}
|
||||
// dpm($relateds, 'relateds');
|
||||
|
||||
// if relateds, build the sentence for display and the render array
|
||||
if(count($relateds)){
|
||||
$relations = '<h3>' . t('This sound is about :') . '</h3><p>';
|
||||
|
||||
foreach ($relateds as $cat => $titles) {
|
||||
$relations .= '<span class="cat">' . $cat . ' :</span> ' . implode(', ', $titles) . ' | ';
|
||||
}
|
||||
|
||||
$relations = preg_replace('/\s\|\s$/', '', $relations);
|
||||
$relations .= '</p>';
|
||||
|
||||
$build['relations'] = array(
|
||||
'#type'=>"container",
|
||||
'#attributes'=>array(
|
||||
'class'=>'relations'
|
||||
),
|
||||
"#markup"=> $relations,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_page_attachments().
|
||||
* @param array $attachments
|
||||
|
||||
@@ -8,6 +8,7 @@ use Drupal\File\Entity\File;
|
||||
// use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Drupal\Core\Cache\CacheableJsonResponse;
|
||||
use Drupal\Core\Cache\CacheableMetadata;
|
||||
use Drupal\core\render\RenderContext;
|
||||
use Drupal\Core\Ajax\AjaxResponse;
|
||||
|
||||
|
||||
@@ -77,6 +78,10 @@ class CorpusController extends ControllerBase {
|
||||
// if($has_article && $article_value[0]['value'] == "")
|
||||
// dpm($article_value);
|
||||
|
||||
$document_url = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($node) {
|
||||
return $node->toUrl()->toString();
|
||||
});
|
||||
|
||||
// favoris marker
|
||||
$nodes_data[] = array(
|
||||
"nid" => $node->get('nid')->getString(),
|
||||
@@ -87,6 +92,7 @@ class CorpusController extends ControllerBase {
|
||||
"audio_url" => $audio_url,
|
||||
"has_article" => $has_article,
|
||||
"chutier_action" => 'add',
|
||||
"document_url" => $document_url,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@ name: 'edlp_search'
|
||||
type: module
|
||||
description: 'Edlp search module'
|
||||
core: 8.x
|
||||
package: 'edlp'
|
||||
package: Edlp
|
||||
dependencies:
|
||||
- search_api
|
||||
|
||||
@@ -10,6 +10,9 @@ use Drupal\Core\Url;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
// use Drupal\Core\Cache\CacheableJsonResponse;
|
||||
// use Drupal\Core\Cache\CacheableMetadata;
|
||||
use Drupal\core\render\RenderContext;
|
||||
|
||||
/**
|
||||
* Class EdlpSearchController.
|
||||
|
||||
@@ -2,6 +2,6 @@ name: 'Edlp Studio'
|
||||
type: module
|
||||
description: 'Edlp module that handle chutier and Compositions entities'
|
||||
core: 8.x
|
||||
package: 'edlp'
|
||||
package: Edlp
|
||||
dependencies:
|
||||
- entity_reference
|
||||
|
||||
@@ -138,6 +138,8 @@ function edlp_studio_node_view(array &$build, \Drupal\Core\Entity\EntityInterfac
|
||||
$user = \Drupal::currentUser();
|
||||
// dpm($user);
|
||||
// check if user loged in ? no -> popup message : yes -> links
|
||||
$register_url = Url::fromRoute('user.register');
|
||||
|
||||
if($user->id() == 0){
|
||||
$build['chutier_actions'] = array(
|
||||
'#type' => 'container',
|
||||
@@ -156,14 +158,29 @@ function edlp_studio_node_view(array &$build, \Drupal\Core\Entity\EntityInterfac
|
||||
),
|
||||
'text'=>array(
|
||||
'#prefix'=>'<p>',
|
||||
'#markup'=>t('Le Studio rassemble vos documents favoris.Il permet de les sauvgarder et de les agencer en compositions.'),
|
||||
'#markup'=>t('Le Studio rassemble vos documents favoris. Il permet de les sauvegarder et de les agencer en compositions.'),
|
||||
'#suffix'=>'</p>'
|
||||
),
|
||||
// TODO: ajouter le login form
|
||||
'links'=>array(
|
||||
'#prefix'=>'<p>',
|
||||
'#markup'=>'todo: login link',
|
||||
'register'=> array(
|
||||
'#type' => 'link',
|
||||
'#title' => t('Create new account'),
|
||||
'#url' => $register_url,
|
||||
'#options'=>array(
|
||||
'attributes' => array(
|
||||
'data-drupal-link-system-path' => $register_url->getInternalPath()
|
||||
)
|
||||
)
|
||||
),
|
||||
'#suffix'=>'</p>'
|
||||
)
|
||||
),
|
||||
'text'=>array(
|
||||
'#prefix'=>'<p>',
|
||||
'#markup'=>t("Ou connectez vous en survolant l'icone du studio en bas a droite de la page"),
|
||||
'#suffix'=>'</p>'
|
||||
),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -9,6 +9,9 @@ use Drupal\User\UserDataInterface;
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
// use Drupal\Core\Cache\CacheableJsonResponse;
|
||||
// use Drupal\Core\Cache\CacheableMetadata;
|
||||
use Drupal\core\render\RenderContext;
|
||||
|
||||
use Drupal\edlp_studio\Entity\Chutier;
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
|
||||
void 0;if(edlp.redirect){void 0;void 0;window.localStorage.setItem('edlp_origin_path',edlp.sys_path.replace(/^\//,''));window.localStorage.setItem('edlp_origin_url',window.location.pathname);window.localStorage.setItem('edlp_origin_hash',window.location.hash);window.location.replace(window.location.origin+'/'+edlp.lang_code);}else{void 0;}
|
||||
void 0;if(edlp.redirect){void 0;void 0;edlp.sys_path=edlp.sys_path.replace(/^\//,'');edlp.url=window.location.pathname;edlp.hash=window.location.hash;window.localStorage.setItem('edlp_origin',JSON.stringify(edlp));window.location.replace(window.location.origin+'/'+edlp.lang_code);}else{void 0;}
|
||||
@@ -1,21 +1,27 @@
|
||||
|
||||
(function($,Drupal,drupalSettings){EdlpTheme=function(){var _ajax_settings=drupalSettings.edlp_ajax;var _$body=$('body');var _is_front=_$body.is('.path-frontpage');var _corpus_ready=false;var _$corpus_canvas;var _$row=$('main[role="main"]>.layout-content>.row');var _$ajaxLinks;var _audioPlayer;var _randomPlayer;var _compoPlayer;function init(){void 0;initAjaxLinks();initHistory();if(!drupalSettings.path.isFront)
|
||||
return;initEvents();_audioPlayer=new AudioPlayer();_compoPlayer=new CompoPlayer();};function initEvents(){_$body.on('corpus-map-ready',onCorpusMapReady).on('on-studio-chutier-updated',initAjaxLinks).on('studio-initialized',function(e){_compoPlayer.newCompo();}).on('studio-not-active',function(e){_compoPlayer.deactivate();}).on('on-studio-compo-updated',function(e){initAjaxLinks();_compoPlayer.refresh();}).on('on-studio-compo-opened',function(e){initAjaxLinks();_compoPlayer.newCompo();}).on('search-results-loaded',initAjaxLinks).on('open_entree',function(e){void 0;closeAllModals();_$body.removeClass();if(typeof e.url!='undefined'){var state=getSysPathState(e.sys_path);history.pushState(state,null,e.url);}}).on('close_entree',backToFrontPage);}
|
||||
(function($,Drupal,drupalSettings){EdlpTheme=function(){var _ajax_settings=drupalSettings.edlp_ajax;var _$body=$('body');var _corpus_ready=false;var _$corpus_canvas;var _$row=$('main[role="main"]>.layout-content>.row');var _$ajaxLinks;var _audioPlayer;var _randomPlayer;var _compoPlayer;function init(){void 0;_audioPlayer=new AudioPlayer();_compoPlayer=new CompoPlayer();initAjaxLinks();initHistory();if(!drupalSettings.path.isFront)
|
||||
return;initEvents();};function initEvents(){_$body.on('corpus-map-ready',onCorpusMapReady).on('on-studio-chutier-updated',initAjaxLinks).on('studio-initialized',function(e){_compoPlayer.newCompo();}).on('studio-not-active',function(e){_compoPlayer.deactivate();}).on('on-studio-compo-updated',function(e){initAjaxLinks();_compoPlayer.refresh();}).on('on-studio-compo-opened',function(e){initAjaxLinks();_compoPlayer.newCompo();}).on('search-results-loaded',initAjaxLinks).on('open_entree',function(e){void 0;closeAllModals();_$body.removeClass();if(typeof e.url!='undefined'){var state=getSysPathState(e.sys_path);history.pushState(state,null,e.url);}}).on('close_entree',backToFrontPage);}
|
||||
function initScrollbars(){};function getSysPathState(sys_path,view_mode){var state={'sys_path':sys_path,'ajax_path':sys_path};var node_match=state.ajax_path.match(/^\/?(node\/(\d+))$/i);void 0;var term_match=state.ajax_path.match(/^\/?(taxonomy\/term\/(\d+))$/i);void 0;if(node_match){state.ajax_path=_ajax_settings.entityjson_path+'/'+node_match[1];state.node_nid=node_match[2];if(view_mode){state.ajax_path+='/'+view_mode;}}else if(term_match){state.ajax_path=_ajax_settings.entityjson_path+'/'+term_match[1];state.ajax_path=state.ajax_path.replace(/taxonomy\/term/,'taxonomy_term');state.entree_tid=term_match[2];if(view_mode){state.ajax_path+='/'+view_mode;state.view_mode=view_mode;}else{state.ajax_path=null;}}else{state.ajax_path+='/ajax'}
|
||||
return state;};function ajaxLoadContent(state){void 0;_$body.addClass('ajax-loading');var path=window.location.origin+Drupal.url(state.ajax_path);$.getJSON(path,{}).done(function(data){onAjaxLoaded(data,state);}).fail(function(jqxhr,textStatus,error){onAjaxLoadError(jqxhr,textStatus,error,state.sys_path);});};function onAjaxLoadError(jqxhr,textStatus,error,sys_path){void 0;$('.ajax-loading').removeClass('ajax-loading');_$body.removeClass('ajax-loading');};function onAjaxLoaded(data,state){void 0;_$row.removeAttr('style').html(data.rendered);var body_classes=['path-'+state.sys_path.replace(/\//g,'-'),'entity-type-'+data.entity_type,'bundle-'+data.bundle,'view-mode-'+data.view_mode];_$body.removeClass().addClass(body_classes.join(' '));if(state.node_nid)
|
||||
_$body.addClass('path-edlp-node');$('.ajax-loading').removeClass('ajax-loading');$('.is-active').removeClass('is-active');$('.is-active-trail').removeClass('is-active-trail');if(typeof state.selector!='undefined'){void 0;$('a[selector="'+state.selector+'"]').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'});}
|
||||
return state;};function ajaxLoadContent(state){void 0;_$body.addClass('ajax-loading');var path=window.location.origin+Drupal.url(state.ajax_path);$.getJSON(path,{}).done(function(data){onAjaxLoaded(data,state);}).fail(function(jqxhr,textStatus,error){onAjaxLoadError(jqxhr,textStatus,error,state.sys_path);});};function onAjaxLoadError(jqxhr,textStatus,error,sys_path){void 0;$('.ajax-loading').removeClass('ajax-loading');_$body.removeClass('ajax-loading');};function onAjaxLoaded(data,state){void 0;if(data.entity_type=="node"&&data.bundle=="evenement"){if(_$row.find('.col.event').length){_$row.find('.col.event').replaceWith(data.rendered);}else if(_$row.find('.col.aside').length){_$row.find('.col.aside').replaceWith(data.rendered);}else{_$row.append(data.rendered);}}else{_$row.removeAttr('style').html(data.rendered);}
|
||||
var body_classes=['path-'+state.sys_path.replace(/\//g,'-'),'entity-type-'+data.entity_type,'bundle-'+data.bundle,'view-mode-'+data.view_mode];_$body.removeClass().addClass(body_classes.join(' '));if(state.node_nid)
|
||||
_$body.addClass('path-edlp-node');$('.ajax-loading').removeClass('ajax-loading');$('.is-active').removeClass('is-active');$('.is-active-trail').removeClass('is-active-trail');if(typeof state.selector!='undefined'){void 0;$('a[selector="'+state.selector+'"]').addClass('is-active');}else{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'});}
|
||||
if(typeof data.bundle!='undefined'&&data.bundle=="page"){$('a[data-drupal-link-system-path="productions"]').addClass('is-active-trail');}
|
||||
if(typeof data.menu_parents!='undefined'){for(var i=0;i<data.menu_parents.length;i++){var menu_sys_path=data.menu_parents[i];$('a[data-drupal-link-system-path="'+menu_sys_path+'"]').addClass('is-active-trail');}}
|
||||
if(typeof data.block!='undefined'){if(!$('#'+data.block.id,'.region-'+data.block.region).length){$('.region-'+data.block.region).append(data.block.rendered);}}
|
||||
if(state.sys_path=="productions"){initProductions();}else{addCloseModalBtnToCols();}
|
||||
if(data.entity_type=="node"&&data.bundle=="enregistrement"&&data.view_mode=="transcript"){initEnregistrementTranscript();}
|
||||
if(typeof data.translations_links!='undefined'){void 0;var lang_code=drupalSettings.path.currentLanguage;var $links=$(data.translations_links);$links.find('li[hreflang="'+lang_code+'"]').addClass('is-active').find('a').addClass('is-active');if(state.view_mode){$links.find('a').each(function(i,e){var $a=$(this);$a.attr('href',$a.attr('href')+'#'+state.view_mode);});}
|
||||
$('ul','.block.language-switcher-language-url').replaceWith($links);}
|
||||
initAjaxLinks();_$body.trigger({'type':'new-content-ajax-loaded'});Drupal.attachBehaviors(_$row[0]);_$body.attr('booted','booted');_$body.removeClass('ajax-loading');if(state.url){history.pushState(state,null,state.url);}};function addCloseModalBtnToCols(){$('.col',_$row).each(function(index,el){if($('span.close-col-btn',this).length)
|
||||
return true;$(this).children('.wrapper').prepend($('<span>').addClass('close-col-btn').on('click',function(e){var $col=$(this).parents('.col');var theme=$col.attr('theme');if(theme!=''){_$body.trigger({'type':theme+'-col-closed'});}
|
||||
$col.remove();if(!$('.col',_$row).length&&!_$body.is('.entity-type-node.bundle-page')){backToFrontPage();}}));});};function refreshAllBlocks(){var path=window.location.origin+Drupal.url(_ajax_settings.blocksjson_path);$.getJSON(path,{}).done(function(data){onAjaxBlockLoaded(data);}).fail(function(jqxhr,textStatus,error){onAjaxBlockLoadError(jqxhr,textStatus,error);});};function onAjaxBlockLoadError(jqxhr,textStatus,error){void 0;};function onAjaxBlockLoaded(data){void 0;for(var blockname in data.blocks){var block=data.blocks[blockname];void 0;$(block.id).replaceWith(block.rendered);}};function initHistory(){initFirstLoad();window.addEventListener('popstate',onHistoryPopState);};function initFirstLoad(){void 0;var origin_sys_path=window.localStorage.getItem('edlp_origin_path');if(origin_sys_path){var origin_url=window.localStorage.getItem('edlp_origin_url');var origin_hash=window.localStorage.getItem('edlp_origin_hash');var view_mode=origin_hash.replace('#','');if(view_mode){var $link=$('[href="'+origin_url+'"][viewmode="'+view_mode+'"]');var selector=$link.attr('selector')||null;if(selector){if(_corpus_ready){_$corpus_canvas.trigger({type:'open-entree',tid:$link.attr('tid')});}else{$('li.entree[tid="'+$link.attr('tid')+'"] a.term-link').addClass('is-active');}}}
|
||||
var state=getSysPathState(origin_sys_path,view_mode);if(state.ajax_path){ajaxLoadContent(state);}
|
||||
$col.remove();if(!$('.col',_$row).length&&!_$body.is('.entity-type-node.bundle-page')){backToFrontPage();}}));});};function refreshAllBlocks(){var path=window.location.origin+Drupal.url(_ajax_settings.blocksjson_path);$.getJSON(path,{}).done(function(data){onAjaxBlockLoaded(data);}).fail(function(jqxhr,textStatus,error){onAjaxBlockLoadError(jqxhr,textStatus,error);});};function onAjaxBlockLoadError(jqxhr,textStatus,error){void 0;};function onAjaxBlockLoaded(data){void 0;for(var blockname in data.blocks){var block=data.blocks[blockname];void 0;$(block.id).replaceWith(block.rendered);}};function initHistory(){initFirstLoad();window.addEventListener('popstate',onHistoryPopState);};function initFirstLoad(){void 0;var edlp_origin=JSON.parse(window.localStorage.getItem('edlp_origin'));if(edlp_origin.sys_path){var view_mode=edlp_origin.hash.replace('#','');if(view_mode){var $link=$('[href="'+edlp_origin.url+'"][viewmode="'+view_mode+'"]');var selector=$link.attr('selector')||null;if(selector){if(_corpus_ready){_$corpus_canvas.trigger({type:'open-entree',tid:$link.attr('tid')});}else{$('li.entree[tid="'+$link.attr('tid')+'"] a.term-link').addClass('is-active');}}}
|
||||
var state=getSysPathState(edlp_origin.sys_path,view_mode);if(edlp_origin.audio_url){var node={nid:edlp_origin.entity_id,audio_url:edlp_origin.audio_url};_audioPlayer.openDocument(node,'history_first_load');if(view_mode==""){state.audio=true;state.node=node;}else{ajaxLoadContent(state);}}
|
||||
else if(state.ajax_path){ajaxLoadContent(state);}
|
||||
if(state.entree_tid){openEntree(state.entree_tid);}
|
||||
history.replaceState(state,null,origin_url+origin_hash);window.localStorage.removeItem("edlp_origin_path");window.localStorage.removeItem("edlp_origin_url");}else{history.replaceState({home:true},null,window.location.pathname);_$body.attr('booted','booted');}};function onHistoryPopState(e){void 0;if(e.state.home){backToFrontPage(true);}else{if(e.state.entree_tid){openEntree(e.state.entree_tid);}
|
||||
history.replaceState(state,null,edlp_origin.url+edlp_origin.hash);window.localStorage.removeItem("edlp_origin");}else{history.replaceState({home:true},null,window.location.pathname);_$body.attr('booted','booted');}};function onHistoryPopState(e){void 0;if(e.state.home){backToFrontPage(true);}
|
||||
else if(e.state.audio){_audioPlayer.openDocument(e.state.node,'popstate',e.state.historic_index);}
|
||||
else{if(e.state.entree_tid){openEntree(e.state.entree_tid);}
|
||||
if(e.state.ajax_path){e.state.url=null;ajaxLoadContent(e.state);}}};function initAjaxLinks(){$('a.site-name','#block-edlptheme-branding').add('a','#block-mainnavigation').add('a','#block-footer.menu--footer').add('a','#block-productions').add('a','article.node:not(.node--type-enregistrement) h2.node-title').add('a','.productions-subtree').add('a','.productions-parent').addClass('ajax-link');_$ajaxLinks=$('.ajax-link:not(.ajax-enabled)').each(function(i,e){var $this=$(this);if($this.is('.ajax-enable'))return;if($this.attr('data-drupal-link-system-path')){$this.on('click',onClickAjaxLink).addClass('ajax-enable');}});};function onClickAjaxLink(e){e.preventDefault();var $link=$(this);if($link.is('.is-active'))
|
||||
return false;if($link.is('.audio-link')){_audioPlayer.emmit('stop-shuffle').openDocument({nid:$link.attr('nid'),audio_url:$link.attr('audio_url')});return false;}
|
||||
var sys_path=$(this).attr('data-drupal-link-system-path');if(sys_path=='<front>'){backToFrontPage();return false;}
|
||||
@@ -23,21 +29,23 @@ var view_mode=$link.attr('viewmode');var state=getSysPathState(sys_path,view_mod
|
||||
if($link.is('[selector]')){state.selector=$link.attr('selector');}
|
||||
$link.addClass('ajax-loading');ajaxLoadContent(state);return false;};function onCorpusMapReady(e){_corpus_ready=true;_$corpus_canvas=$('canvas#corpus-map');_$corpus_canvas.on('corpus-cliked-on-map',function(e){backToFrontPage();}).on('corpus-cliked-on-node',function(e){_audioPlayer.emmit('stop-shuffle').openDocument(e.target_node);});_randomPlayer=new RandomPlayer(e.playlist);_$body.attr('corpus-map','ready');}
|
||||
function openEntree(tid){if(tid){closeAllModals();_$body.removeClass();if(_corpus_ready){_$corpus_canvas.trigger({type:'open-entree',tid:tid});}else{$('li.entree[tid="'+tid+'"] a.term-link').addClass('is-active');}}};function AudioPlayer(){var that=this;this.fid;this.audio=new Audio();this.audio_events=["loadedmetadata","canplay","playing","pause","timeupdate","ended"];this.$container=$('<div id="audio-player">');this.$btns=$('<div>').addClass('btns').appendTo(this.$container);this.$previous=$('<div>').addClass('previous').appendTo(this.$btns);this.$playpause=$('<div>').addClass('play-pause').appendTo(this.$btns);this.$next=$('<div>').addClass('next').appendTo(this.$btns);this.$timelinecont=$('<div>').addClass('time-line-container').appendTo(this.$container);this.$timeline=$('<div>').addClass('time-line').appendTo(this.$timelinecont);this.$loader=$('<div>').addClass('loader').appendTo(this.$timeline);this.$cursor=$('<div>').addClass('cursor').appendTo(this.$timeline);this.$time=$('<div>').addClass('time').appendTo(this.$container);this.$currentTime=$('<div>').addClass('current-time').html('00:00').appendTo(this.$time);this.$duration=$('<div>').addClass('duration').html('00:00').appendTo(this.$time);this.$fav=$('<div>').addClass('favoris').appendTo(this.$container);this.$cartel=$('<div>').addClass('cartel').appendTo(this.$container);this.hideTimer=false;this.hideTimeMS=10000;this.currentHistoricIndex=null;this.historic=[];this.shuffle_is_active=false;this.event_handlers={'audio-open-document':[],'audio-play':[],'audio-pause':[],'audio-play-next':[],'audio-ended':[],'stop-shuffle':[]};this.init();};AudioPlayer.prototype={init(){this.$container.appendTo('header[role="banner"] .region-header');this.timeline_w=parseInt(this.$timeline.width());var fn='';for(var i=0;i<this.audio_events.length;i++){fn=this.audio_events[i];fn='on'+fn.charAt(0).toUpperCase()+fn.slice(1);this.audio.addEventListener(this.audio_events[i],this[fn].bind(this),true);}
|
||||
this.$previous.on('click',this.playPrevious.bind(this));this.$playpause.on('click',this.togglePlayPause.bind(this));this.$next.on('click',this.playNext.bind(this));},openDocument(node,caller){if(typeof node=='undefined'||typeof node.nid=='undefined'||typeof node.audio_url=='undfined'){void 0;return false;}
|
||||
this.historic.push(node);this.currentHistoricIndex=this.historic.length-1;this.emmit('audio-open-document',{caller:caller});this.launch();},launch(){this.clearTimeOutToHide();this.setSRC(this.historic[this.currentHistoricIndex].audio_url);this.loadNode(this.historic[this.currentHistoricIndex].nid);try{_$corpus_canvas.trigger({'type':'audio-node-opened','nid':this.historic[this.currentHistoricIndex].nid});}catch(e){void 0;}
|
||||
this.showHidePreviousBtn();this.showHideNextBtn();this.show();},setSRC(url){this.audio.src=url;},onLoadedmetadata(){var rem=parseInt(this.audio.duration,10),mins=Math.floor(rem/60,10),secs=rem-mins*60;this.$duration.html('<span>'+(mins<10?'0':'')+mins+':'+(secs<10?'0':'')+secs+'</span>');this.updateLoadingBar();},updateLoadingBar(){this.$loader.css({'width':parseInt((100*this.audio.buffered.end(0)/this.audio.duration),10)+'%'});if(this.audio.buffered.end(0)<this.audio.duration){var that=this;window.requestAnimationFrame(that.updateLoadingBar.bind(that));}else{}},onCanplay(){this.play();},play(){this.clearTimeOutToHide();this.audio.play();},playPrevious(){if(this.currentHistoricIndex>0){this.currentHistoricIndex-=1;this.launch();}},playNext(){if(this.currentHistoricIndex<this.historic.length-1){this.currentHistoricIndex+=1;this.launch();}else{this.emmit('audio-play-next');}},togglePlayPause(e){if(this.audio.paused){this.audio.play();}else{this.audio.pause();}},stop(){this.audio.pause();this.timeOutToHide();},onPlaying(){this.$btns.addClass('is-playing');this.emmit('audio-play');},onPause(){this.$btns.removeClass('is-playing');this.emmit('audio-pause');},onTimeupdate(){this.$cursor.css({'left':(this.audio.currentTime/this.audio.duration*this.timeline_w)+"px"});var rem=parseInt(this.audio.currentTime,10),mins=Math.floor(rem/60,10),secs=rem-mins*60;this.$currentTime.html('<span>'+(mins<10?'0':'')+mins+':'+(secs<10?'0':'')+secs+'</span>');},onEnded(){this.emmit('audio-ended');this.stop();},loadNode(nid){this.$cartel.addClass('loading');var vm='player_cartel';var ajax_path=_ajax_settings.entityjson_path+'/node/'+nid+'/'+vm;var path=window.location.origin+Drupal.url(ajax_path);$.getJSON(path,{}).done(this.onNodeLoaded.bind(this)).fail(this.onNodeLoadFail.bind(this));},onNodeLoaded(data){this.$cartel.html(data.rendered).removeClass('loading');_$body.trigger({'type':'new-audio-cartel-loaded'});initAjaxLinks();},onNodeLoadFail(jqxhr,textStatus,error){void 0;this.$cartel.removeClass('loading').html('');},show(){this.$container.addClass('visible');},showHidePreviousBtn(){if(this.historic.length>1&&this.currentHistoricIndex>0){this.$previous.addClass('is-active');}else{this.$previous.removeClass('is-active');}},showHideNextBtn(){if(this.currentHistoricIndex<this.historic.length-1||this.shuffle_is_active){this.$next.addClass('is-active');}else{this.$next.removeClass('is-active');}},timeOutToHide(){this.clearTimeOutToHide();this.hideTimer=setTimeout(this.hide.bind(this),this.hideTimeMS);},clearTimeOutToHide(){if(this.hideTimer){clearTimeout(this.hideTimer);this.hideTimer=false;}},hide(){this.$container.removeClass('visible');try{_$corpus_canvas.trigger('audio-node-closed');}catch(e){void 0;}},on(event_name,handler){if(typeof this.event_handlers[event_name]=='undefined'){void 0;}
|
||||
this.$previous.on('click',this.playPrevious.bind(this));this.$playpause.on('click',this.togglePlayPause.bind(this));this.$next.on('click',this.playNext.bind(this));},openDocument(node,caller,historic_index){if(typeof node=='undefined'||typeof node.nid=='undefined'||typeof node.audio_url=='undfined'){void 0;return false;}
|
||||
if(typeof caller=='undefined'||caller!='popstate'){this.historic.push(node);this.currentHistoricIndex=this.historic.length-1;if(caller!="history_first_load"){state={audio:true,node:node,historic_index:this.currentHistoricIndex,};history.pushState(state,null,node.document_url);}}else{this.currentHistoricIndex=historic_index;}
|
||||
this.emmit('audio-open-document',{caller:caller});this.launch();},launch(){this.clearTimeOutToHide();this.setSRC(this.historic[this.currentHistoricIndex].audio_url);this.loadNode(this.historic[this.currentHistoricIndex].nid);try{_$corpus_canvas.trigger({'type':'audio-node-opened','nid':this.historic[this.currentHistoricIndex].nid});}catch(e){void 0;}
|
||||
this.showHidePreviousBtn();this.showHideNextBtn();this.show();},setSRC(url){this.audio.src=url;},onLoadedmetadata(){var rem=parseInt(this.audio.duration,10),mins=Math.floor(rem/60,10),secs=rem-mins*60;this.$duration.html('<span>'+(mins<10?'0':'')+mins+':'+(secs<10?'0':'')+secs+'</span>');this.updateLoadingBar();},updateLoadingBar(){this.$loader.css({'width':parseInt((100*this.audio.buffered.end(0)/this.audio.duration),10)+'%'});if(this.audio.buffered.end(0)<this.audio.duration){var that=this;window.requestAnimationFrame(that.updateLoadingBar.bind(that));}else{}},onCanplay(){this.play();},play(){this.clearTimeOutToHide();this.audio.play();},playPrevious(){if(this.currentHistoricIndex>0){this.currentHistoricIndex-=1;this.launch();}},playNext(){if(this.currentHistoricIndex<this.historic.length-1){this.currentHistoricIndex+=1;this.launch();}else{this.emmit('audio-play-next');}},togglePlayPause(e){if(this.audio.paused){this.audio.play();}else{this.audio.pause();}},stop(){this.audio.pause();if(!_$body.is('.path-node-'+this.historic[this.currentHistoricIndex].nid)){this.timeOutToHide();}},onPlaying(){this.$btns.addClass('is-playing');this.emmit('audio-play');},onPause(){this.$btns.removeClass('is-playing');this.emmit('audio-pause');},onTimeupdate(){this.$cursor.css({'left':(this.audio.currentTime/this.audio.duration*this.timeline_w)+"px"});var rem=parseInt(this.audio.currentTime,10),mins=Math.floor(rem/60,10),secs=rem-mins*60;this.$currentTime.html('<span>'+(mins<10?'0':'')+mins+':'+(secs<10?'0':'')+secs+'</span>');},onEnded(){void 0;this.emmit('audio-ended');this.stop();},loadNode(nid){this.$cartel.addClass('loading');var vm='player_cartel';var ajax_path=_ajax_settings.entityjson_path+'/node/'+nid+'/'+vm;var path=window.location.origin+Drupal.url(ajax_path);$.getJSON(path,{}).done(this.onNodeLoaded.bind(this)).fail(this.onNodeLoadFail.bind(this));},onNodeLoaded(data){this.$cartel.html(data.rendered).removeClass('loading');_$body.trigger({'type':'new-audio-cartel-loaded'});initAjaxLinks();},onNodeLoadFail(jqxhr,textStatus,error){void 0;this.$cartel.removeClass('loading').html('');},show(){this.$container.addClass('visible');},showHidePreviousBtn(){if(this.historic.length>1&&this.currentHistoricIndex>0){this.$previous.addClass('is-active');}else{this.$previous.removeClass('is-active');}},showHideNextBtn(){if(this.currentHistoricIndex<this.historic.length-1||this.shuffle_is_active){this.$next.addClass('is-active');}else{this.$next.removeClass('is-active');}},timeOutToHide(){this.clearTimeOutToHide();this.hideTimer=setTimeout(this.hide.bind(this),this.hideTimeMS);},clearTimeOutToHide(){if(this.hideTimer){clearTimeout(this.hideTimer);this.hideTimer=false;}},hide(){this.$container.removeClass('visible');try{_$corpus_canvas.trigger('audio-node-closed');}catch(e){void 0;}},on(event_name,handler){if(typeof this.event_handlers[event_name]=='undefined'){void 0;}
|
||||
this.event_handlers[event_name].push(handler);return this;},emmit(event_name,args){var handler;var args=args||{};for(var i=this.event_handlers[event_name].length-1;i>=0;i--){handler=this.event_handlers[event_name][i];setTimeout(function(){handler(args);},0);}
|
||||
return this;},}
|
||||
function RandomPlayer(playlist){this.active=false;this.playlist=playlist;this.$btn=$('<a>').html('Shuffle').addClass('random-player-btn');this.init();};RandomPlayer.prototype={init(){$('<div>').addClass('block random-player').append(this.$btn).prependTo('.region-footer-right');this.$btn.on('click',this.toggleActive.bind(this));_audioPlayer.on('audio-ended',this.onAudioPlayerEnded.bind(this)).on('audio-play-next',this.onAudioPlayNext.bind(this)).on('stop-shuffle',this.stop.bind(this));},shuffle(){var tempPLaylist=[];for(var i=this.playlist.length-1;i>=0;i--){tempPLaylist.push(this.playlist[i]);}
|
||||
this.shuffledPlaylist=[];while(tempPLaylist.length>0){var r=Math.floor(Math.random()*tempPLaylist.length);this.shuffledPlaylist.push(tempPLaylist.splice(r,1)[0]);}},toggleActive(e){if(this.active){this.stop();}else{this.start();}},start(){this.active=_audioPlayer.shuffle_is_active=true;this.$btn.addClass('is-active');this.shuffle();this.next();},stop(){this.active=_audioPlayer.shuffle_is_active=false;this.$btn.removeClass('is-active');},next(){if(this.active&&this.shuffledPlaylist.length>0)
|
||||
_audioPlayer.openDocument(this.shuffledPlaylist.splice(0,1)[0]);},onAudioPlayNext(){this.next();},onAudioPlayerEnded(){this.next();}};function CompoPlayer(){this.active=false;this.playing=false;this.paused=false;this.playlist=[];this.current_index=0;this.$composer=null;this.$compo=null;this.$controls=null;this.init();};CompoPlayer.prototype={init(){_audioPlayer.on('audio-open-document',this.onAudioOpenDocument.bind(this)).on('audio-play',this.onAudioPlayerPlay.bind(this)).on('audio-pause',this.onAudioPlayerPause.bind(this)).on('audio-ended',this.onAudioPlayerEnded.bind(this));},newCompo(){this.initControls();},initControls(){this.$composer=$('.composition_ui .composer');this.$compo=$('.composition_ui .composer .composition');this.$controls=$('.composition_ui .composer .compo-player-controls');if(!this.$controls.is('.ready')&&this.$compo){this.$previous=$('<div>').addClass('previous').on('click',this.prev.bind(this)).appendTo(this.$controls);this.$playpause=$('<div>').addClass('play-pause').on('click',this.togglePlayPause.bind(this)).appendTo(this.$controls);this.$next=$('<div>').addClass('next').on('click',this.next.bind(this)).appendTo(this.$controls);this.$controls.addClass('ready');this.refresh();this.active=true;}},refresh(){this.stop();this.playlist=[];var that=this;$('.field--name-documents .field__item',this.$compo).each(function(i,el){var $link=$('a.audio-link',this);that.playlist.push({item:$(this),audio_url:$link.attr("audio_url"),nid:$link.attr("nid"),});});this.showHideControls();},togglePlayPause(){if(this.playing&&!this.paused){this.pause();}else{if(this.playing&&this.paused){this.play();}else{this.start();}}},start(){this.playing=true;this.play();},play(){if(this.paused){this.paused=false;_audioPlayer.play();}else{_audioPlayer.openDocument(this.playlist[this.current_index],this);}
|
||||
this.setActiveItem().showHideControls();},pause(){this.paused=true;this.showHideControls();_audioPlayer.stop();},next(){if(this.playing){this.current_index+=1;if(this.current_index<this.playlist.length){this.play();}else{this.stop();}}},prev(){if(this.playing){this.current_index-=1;if(this.current_index>=0){this.play();}else{this.stop();}}},stop(){_audioPlayer.stop();this.reset();},reset(){this.playing=false;this.paused=false;this.resetIndex();},resetIndex(){this.current_index=0;this.showHideControls().resetActiveItems();},setActiveItem(){this.resetActiveItems();if(this.playing&&this.current_index>=0){this.playlist[this.current_index].item.addClass('is-active');}
|
||||
this.setActiveItem().showHideControls();},pause(){this.paused=true;this.showHideControls();_audioPlayer.stop();},next(){if(this.playing){this.current_index+=1;if(this.current_index<this.playlist.length){this.play();}else{this.stop();}}},prev(){if(this.playing){this.current_index-=1;if(this.current_index>=0){this.play();}else{this.stop();}}},stop(){if(this.playing){_audioPlayer.stop();}
|
||||
this.reset();},reset(){this.playing=false;this.paused=false;this.resetIndex();},resetIndex(){this.current_index=0;this.showHideControls().resetActiveItems();},setActiveItem(){this.resetActiveItems();if(this.playing&&this.current_index>=0){this.playlist[this.current_index].item.addClass('is-active');}
|
||||
this.showHideControls();return this;},resetActiveItems(){for(var n=0;n<this.playlist.length;n++){this.playlist[n].item.removeClass('is-active');}
|
||||
return this;},showHideControls(){if(this.$controls){if(this.playing&&!this.paused){this.$controls.addClass('is-playing');}else{this.$controls.removeClass('is-playing');}}
|
||||
if(this.$playpause){if(this.playlist.length>0){this.$playpause.addClass('is-active');}else{this.$playpause.removeClass('is-active');}}
|
||||
if(this.$next){if(this.playing&&this.playlist.length>1&&this.current_index<this.playlist.length-1){this.$next.addClass('is-active');}else{this.$next.removeClass('is-active');}}
|
||||
if(this.$previous){if(this.playing&&this.playlist.length>1&&this.current_index>0){this.$previous.addClass('is-active');}else{this.$previous.removeClass('is-active');}}
|
||||
return this;},deactivate(){this.stop();this.active=false;},onAudioOpenDocument(args){if(args.caller!==this){this.reset();}},onAudioPlayerPlay(){if(this.playing&&this.paused){this.paused=false;this.showHideControls();}},onAudioPlayerPause(){if(this.playing&&!this.paused){this.paused=true;this.showHideControls();}},onAudioPlayerEnded(){this.next();},};function backToFrontPage(pop_state){closeAllModals();$('body').removeClass().addClass('path-frontpage');$('a[data-drupal-link-system-path="<front>"]').addClass('is-active');_$corpus_canvas.trigger({'type':'close-all-entree'});if(!pop_state){history.pushState({home:true},null,window.location.origin);}}
|
||||
return this;},deactivate(){this.stop();this.active=false;},onAudioOpenDocument(args){if(args.caller!==this){this.reset();}},onAudioPlayerPlay(){if(this.playing&&this.paused){this.paused=false;this.showHideControls();}},onAudioPlayerPause(){if(this.playing&&!this.paused){this.paused=true;this.showHideControls();}},onAudioPlayerEnded(){this.next();},};function backToFrontPage(pop_state){closeAllModals();$('body').removeClass().addClass('path-frontpage');$('a[data-drupal-link-system-path="<front>"]').addClass('is-active');_$corpus_canvas.trigger({'type':'close-all-entree'});if(!pop_state){history.pushState({home:true},null,drupalSettings.path.baseUrl+drupalSettings.path.currentLanguage);}}
|
||||
function initHome(){addCloseModalBtnToCols();var $grid=$('.grid',_$row).masonry({itemSelector:'.col',columnWidth:'.col-2',horizontalOrder:true,containerStyle:null,});$grid.imagesLoaded().progress(function(){$grid.masonry('layout');});$grid.imagesLoaded(function(){$grid.masonry('layout');});}
|
||||
function initProductions(){var $grid=$('.grid',_$row).masonry({itemSelector:'.col',columnWidth:'.col-2',horizontalOrder:true,containerStyle:null,});$grid.imagesLoaded().progress(function(){$grid.masonry('layout');});$grid.imagesLoaded(function(){$grid.masonry('layout');});};function closeAllModals(){_$row.html('');_$ajaxLinks.removeClass('is-active');_$body.trigger({'type':'all-modal-closed'});};init();}
|
||||
$(document).ready(function($){var edlptheme=new EdlpTheme();});})(jQuery,Drupal,drupalSettings);
|
||||
function initProductions(){var $grid=$('.grid',_$row).masonry({itemSelector:'.col',columnWidth:'.col-2',horizontalOrder:true,containerStyle:null,});$grid.imagesLoaded().progress(function(){$grid.masonry('layout');});$grid.imagesLoaded(function(){$grid.masonry('layout');});};function initEnregistrementTranscript(){void 0;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');});};function closeAllModals(){_$row.html('');_$ajaxLinks.removeClass('is-active');_$body.trigger({'type':'all-modal-closed'});};init();}
|
||||
$(document).ready(function($){if(drupalSettings.path.isFront){var edlptheme=new EdlpTheme();}});})(jQuery,Drupal,drupalSettings);
|
||||
File diff suppressed because one or more lines are too long
@@ -3,9 +3,16 @@ console.log('EDLP THEME HISTORY.js');
|
||||
if(edlp.redirect){
|
||||
console.log('history redirect', edlp);
|
||||
console.log('window.location', window.location);
|
||||
window.localStorage.setItem('edlp_origin_path', edlp.sys_path.replace(/^\//, ''));
|
||||
window.localStorage.setItem('edlp_origin_url', window.location.pathname);
|
||||
window.localStorage.setItem('edlp_origin_hash', window.location.hash);
|
||||
// window.localStorage.setItem('edlp_origin_path', edlp.sys_path.replace(/^\//, ''));
|
||||
edlp.sys_path = edlp.sys_path.replace(/^\//, '');
|
||||
|
||||
// window.localStorage.setItem('edlp_origin_url', window.location.pathname);
|
||||
edlp.url = window.location.pathname;
|
||||
|
||||
// window.localStorage.setItem('edlp_origin_hash', window.location.hash);
|
||||
edlp.hash = window.location.hash;
|
||||
|
||||
window.localStorage.setItem('edlp_origin', JSON.stringify(edlp));
|
||||
// redirect to home
|
||||
window.location.replace(window.location.origin+'/'+edlp.lang_code);
|
||||
}else{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
EdlpTheme = function(){
|
||||
var _ajax_settings = drupalSettings.edlp_ajax;
|
||||
var _$body = $('body');
|
||||
var _is_front = _$body.is('.path-frontpage');
|
||||
// var _is_front = drupalSettings.path.isFront;
|
||||
var _corpus_ready = false;
|
||||
var _$corpus_canvas;
|
||||
var _$row = $('main[role="main"]>.layout-content>.row');
|
||||
@@ -19,6 +19,9 @@
|
||||
function init(){
|
||||
console.log("EdlpTheme init()");
|
||||
|
||||
_audioPlayer = new AudioPlayer();
|
||||
_compoPlayer = new CompoPlayer();
|
||||
|
||||
initAjaxLinks();
|
||||
|
||||
initHistory();
|
||||
@@ -28,9 +31,6 @@
|
||||
|
||||
initEvents();
|
||||
|
||||
_audioPlayer = new AudioPlayer();
|
||||
_compoPlayer = new CompoPlayer();
|
||||
|
||||
};
|
||||
|
||||
// ___ _
|
||||
@@ -118,6 +118,8 @@
|
||||
var term_match = state.ajax_path.match(/^\/?(taxonomy\/term\/(\d+))$/i);
|
||||
console.log('term_match', term_match);
|
||||
if(node_match){
|
||||
// TODO: detect audio links which will open audioplayer and wont load any ajax content unless view_mode "article" or "transcript"
|
||||
|
||||
state.ajax_path = _ajax_settings.entityjson_path+'/'+node_match[1];
|
||||
state.node_nid = node_match[2];
|
||||
// check for viewmode attribute
|
||||
@@ -167,7 +169,17 @@
|
||||
// reset all style may been added by other pages (like masonry for productions)
|
||||
// and replace all content with newly loaded
|
||||
// TODO: build a system to replace or append contents (like studio + search)
|
||||
_$row.removeAttr('style').html(data.rendered);
|
||||
if(data.entity_type == "node" && data.bundle == "evenement"){
|
||||
if(_$row.find('.col.event').length){
|
||||
_$row.find('.col.event').replaceWith(data.rendered);
|
||||
}else if(_$row.find('.col.aside').length){
|
||||
_$row.find('.col.aside').replaceWith(data.rendered);
|
||||
}else{
|
||||
_$row.append(data.rendered);
|
||||
}
|
||||
}else{
|
||||
_$row.removeAttr('style').html(data.rendered);
|
||||
}
|
||||
|
||||
// add body class for currently loaded content
|
||||
var body_classes = [
|
||||
@@ -194,7 +206,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 +244,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 +283,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 +292,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);
|
||||
}
|
||||
};
|
||||
@@ -331,6 +352,7 @@
|
||||
$(block.id).replaceWith(block.rendered);
|
||||
}
|
||||
};
|
||||
|
||||
// _ _ _ _
|
||||
// | || (_)__| |_ ___ _ _ _ _
|
||||
// | __ | (_-< _/ _ \ '_| || |
|
||||
@@ -343,18 +365,22 @@
|
||||
function initFirstLoad(){
|
||||
console.log('theme : initFirstLoad()');
|
||||
|
||||
var origin_sys_path = window.localStorage.getItem('edlp_origin_path');
|
||||
if(origin_sys_path){
|
||||
var origin_url = window.localStorage.getItem('edlp_origin_url');
|
||||
// var origin_sys_path = window.localStorage.getItem('edlp_origin_path');
|
||||
var edlp_origin = JSON.parse(window.localStorage.getItem('edlp_origin'));
|
||||
|
||||
if(edlp_origin.sys_path){
|
||||
// var origin_url = window.localStorage.getItem('edlp_origin_url');
|
||||
// origin_hash is used as viewmode for taxonomy term entrees load (index or notice)
|
||||
var origin_hash = window.localStorage.getItem('edlp_origin_hash');
|
||||
var view_mode = origin_hash.replace('#', '');
|
||||
// var origin_hash = window.localStorage.getItem('edlp_origin_hash');
|
||||
var view_mode = edlp_origin.hash.replace('#', '');
|
||||
|
||||
// // TODO: refactorize with new infos from edlp_origin
|
||||
if(view_mode){
|
||||
// TODO first load with index or notice do not activate the right link (activate all)
|
||||
var $link = $('[href="'+origin_url+'"][viewmode="'+view_mode+'"]');
|
||||
var $link = $('[href="'+edlp_origin.url+'"][viewmode="'+view_mode+'"]');
|
||||
var selector = $link.attr('selector') || null;
|
||||
if(selector){
|
||||
// in case of entree link (actualy, selector is used only for entries links)
|
||||
// TODO: use a promise
|
||||
if(_corpus_ready){
|
||||
_$corpus_canvas.trigger({
|
||||
type:'open-entree',
|
||||
@@ -363,33 +389,49 @@
|
||||
}else{
|
||||
// else : EdlpCorpus will check when ready if entry item (notice or index) is already .is-active
|
||||
// .is-active class is added by onAjaxLoaded() (when content is loaded)
|
||||
// but what if corpus ready before onAjaxLoaded
|
||||
// but what if corpus ready before onAjaxLoaded >> use a promise !!
|
||||
$('li.entree[tid="'+$link.attr('tid')+'"] a.term-link').addClass('is-active');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// create history state
|
||||
var state = getSysPathState(origin_sys_path, view_mode);
|
||||
var state = getSysPathState(edlp_origin.sys_path, view_mode);
|
||||
|
||||
// check if audio link
|
||||
if(edlp_origin.audio_url){
|
||||
var node = {
|
||||
nid:edlp_origin.entity_id,
|
||||
audio_url:edlp_origin.audio_url
|
||||
};
|
||||
_audioPlayer.openDocument(node, 'history_first_load');
|
||||
if(view_mode == ""){
|
||||
// if audio only record in state
|
||||
state.audio = true;
|
||||
state.node = node;
|
||||
}else{
|
||||
// ajax load content for audio only if article or transcript
|
||||
ajaxLoadContent(state);
|
||||
}
|
||||
}
|
||||
// only if not entree path
|
||||
if(state.ajax_path){
|
||||
// only if not audio (without article or transcript) path
|
||||
else if(state.ajax_path){
|
||||
// load content through ajax
|
||||
// ajaxLoadContent(null, state.sys_path, state.ajax_path, selector);
|
||||
ajaxLoadContent(state);
|
||||
}
|
||||
|
||||
// TODO what about entree alone (without notice or index)
|
||||
if(state.entree_tid){
|
||||
openEntree(state.entree_tid);
|
||||
}
|
||||
|
||||
// record history state
|
||||
history.replaceState(state, null, origin_url+origin_hash);
|
||||
history.replaceState(state, null, edlp_origin.url+edlp_origin.hash);
|
||||
|
||||
// reset the storage
|
||||
window.localStorage.removeItem("edlp_origin_path");
|
||||
window.localStorage.removeItem("edlp_origin_url");
|
||||
window.localStorage.removeItem("edlp_origin");
|
||||
// window.localStorage.removeItem("edlp_origin_url");
|
||||
|
||||
}else{
|
||||
history.replaceState({home:true}, null, window.location.pathname);
|
||||
@@ -400,7 +442,11 @@
|
||||
console.log('onPopState',e.state);
|
||||
if(e.state.home){
|
||||
backToFrontPage(true);
|
||||
}else{
|
||||
}
|
||||
else if (e.state.audio) {
|
||||
_audioPlayer.openDocument(e.state.node, 'popstate', e.state.historic_index);
|
||||
}
|
||||
else{
|
||||
if(e.state.entree_tid){
|
||||
openEntree(e.state.entree_tid);
|
||||
}
|
||||
@@ -622,7 +668,7 @@
|
||||
this.$playpause.on('click', this.togglePlayPause.bind(this));
|
||||
this.$next.on('click', this.playNext.bind(this));
|
||||
},
|
||||
openDocument(node, caller){
|
||||
openDocument(node, caller, historic_index){
|
||||
// console.log('AudioPlayer openDocument', node);
|
||||
if(typeof node == 'undefined'
|
||||
|| typeof node.nid == 'undefined'
|
||||
@@ -630,11 +676,27 @@
|
||||
console.warn('AudioPlayer openDocument() node is malformed', node);
|
||||
return false;
|
||||
}
|
||||
this.historic.push(node);
|
||||
this.currentHistoricIndex = this.historic.length-1;
|
||||
// this.shuffle_mode = shuffle_mode || false;
|
||||
|
||||
// TODO: add an hash tag to be able to share and play audio from any where
|
||||
// if we don't come from history popstate
|
||||
if(typeof caller == 'undefined' || caller != 'popstate'){
|
||||
this.historic.push(node);
|
||||
this.currentHistoricIndex = this.historic.length-1;
|
||||
// this.shuffle_mode = shuffle_mode || false;
|
||||
|
||||
// add the document opening to history to be able to share and play audio from any where
|
||||
if(caller != "history_first_load"){
|
||||
state = {
|
||||
audio:true,
|
||||
node:node,
|
||||
historic_index : this.currentHistoricIndex,
|
||||
};
|
||||
|
||||
history.pushState(state, null, node.document_url);
|
||||
}
|
||||
}else{
|
||||
// if the call commes from popstate, we update the current position of index
|
||||
this.currentHistoricIndex = historic_index;
|
||||
}
|
||||
|
||||
this.emmit('audio-open-document', {caller:caller});
|
||||
|
||||
@@ -712,8 +774,12 @@
|
||||
},
|
||||
stop(){
|
||||
// console.log('AudioPlayer stop()');
|
||||
// debugger;
|
||||
this.audio.pause();
|
||||
this.timeOutToHide();
|
||||
// don't close player if article or transcript is open
|
||||
if(!_$body.is('.path-node-'+this.historic[this.currentHistoricIndex].nid)){
|
||||
this.timeOutToHide();
|
||||
}
|
||||
},
|
||||
// audio events
|
||||
onPlaying(){
|
||||
@@ -736,6 +802,7 @@
|
||||
this.$currentTime.html('<span>'+(mins<10 ? '0':'')+mins+':'+(secs<10 ? '0':'')+secs+'</span>');
|
||||
},
|
||||
onEnded(){
|
||||
console.log('AudioPlayer onEnded()');
|
||||
this.emmit('audio-ended');
|
||||
this.stop();
|
||||
},
|
||||
@@ -1030,7 +1097,9 @@
|
||||
}
|
||||
},
|
||||
stop(){
|
||||
_audioPlayer.stop();
|
||||
if(this.playing){
|
||||
_audioPlayer.stop();
|
||||
}
|
||||
this.reset();
|
||||
},
|
||||
reset(){
|
||||
@@ -1141,7 +1210,7 @@
|
||||
// close entrees
|
||||
_$corpus_canvas.trigger({'type':'close-all-entree'});
|
||||
if(!pop_state){
|
||||
history.pushState({home:true}, null, window.location.origin);
|
||||
history.pushState({home:true}, null, drupalSettings.path.baseUrl+drupalSettings.path.currentLanguage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1201,6 +1270,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');
|
||||
});
|
||||
};
|
||||
|
||||
// __ __ _ _
|
||||
// | \/ |___ __| |__ _| |___
|
||||
// | |\/| / _ \/ _` / _` | (_-<
|
||||
@@ -1235,7 +1328,9 @@
|
||||
} // end EdlpTheme()
|
||||
|
||||
$(document).ready(function($) {
|
||||
var edlptheme = new EdlpTheme();
|
||||
if(drupalSettings.path.isFront){
|
||||
var edlptheme = new EdlpTheme();
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery, Drupal, drupalSettings);
|
||||
|
||||
@@ -20,31 +20,38 @@
|
||||
animation: rotation 2s infinite linear;
|
||||
}
|
||||
|
||||
@mixin entrie-micro-square {
|
||||
display:inline-block;
|
||||
$s:8px;
|
||||
width:$s; height:$s;
|
||||
background-color: black;
|
||||
margin-right: 3px;
|
||||
&[tid='134']{background-color: var(--e-col-134);}
|
||||
&[tid='121']{background-color: var(--e-col-121);}
|
||||
&[tid='125']{background-color: var(--e-col-125);}
|
||||
&[tid='119']{background-color: var(--e-col-119);}
|
||||
&[tid='132']{background-color: var(--e-col-132);}
|
||||
&[tid='122']{background-color: var(--e-col-122);}
|
||||
&[tid='129']{background-color: var(--e-col-129);}
|
||||
&[tid='120']{background-color: var(--e-col-120);}
|
||||
&[tid='130']{background-color: var(--e-col-130);}
|
||||
&[tid='118']{background-color: var(--e-col-118);}
|
||||
&[tid='127']{background-color: var(--e-col-127);}
|
||||
&[tid='133']{background-color: var(--e-col-133);}
|
||||
&[tid='128']{background-color: var(--e-col-128);}
|
||||
&[tid='124']{background-color: var(--e-col-124);}
|
||||
&[tid='116']{background-color: var(--e-col-116);}
|
||||
&[tid='117']{background-color: var(--e-col-117);}
|
||||
&[tid='131']{background-color: var(--e-col-131);}
|
||||
&[tid='126']{background-color: var(--e-col-126);}
|
||||
&[tid='123']{background-color: var(--e-col-123);}
|
||||
@mixin entree-micro-square {
|
||||
white-space: nowrap;
|
||||
font-size: 0.5em;
|
||||
line-height: 0;
|
||||
letter-spacing: 0px;
|
||||
span{
|
||||
display:inline-block;
|
||||
$s:6px;
|
||||
width:$s; height:$s;
|
||||
background-color: black;
|
||||
margin-right: 2px;
|
||||
&[tid='134']{background-color: var(--e-col-134);}
|
||||
&[tid='121']{background-color: var(--e-col-121);}
|
||||
&[tid='125']{background-color: var(--e-col-125);}
|
||||
&[tid='119']{background-color: var(--e-col-119);}
|
||||
&[tid='132']{background-color: var(--e-col-132);}
|
||||
&[tid='122']{background-color: var(--e-col-122);}
|
||||
&[tid='129']{background-color: var(--e-col-129);}
|
||||
&[tid='120']{background-color: var(--e-col-120);}
|
||||
&[tid='130']{background-color: var(--e-col-130);}
|
||||
&[tid='118']{background-color: var(--e-col-118);}
|
||||
&[tid='127']{background-color: var(--e-col-127);}
|
||||
&[tid='133']{background-color: var(--e-col-133);}
|
||||
&[tid='128']{background-color: var(--e-col-128);}
|
||||
&[tid='124']{background-color: var(--e-col-124);}
|
||||
&[tid='116']{background-color: var(--e-col-116);}
|
||||
&[tid='117']{background-color: var(--e-col-117);}
|
||||
&[tid='131']{background-color: var(--e-col-131);}
|
||||
&[tid='126']{background-color: var(--e-col-126);}
|
||||
&[tid='123']{background-color: var(--e-col-123);}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -241,18 +248,181 @@ main[role="main"]{
|
||||
}
|
||||
}
|
||||
}
|
||||
.field.text-formatted{
|
||||
a.audio-link{
|
||||
border-bottom: 1px dotted red;
|
||||
}
|
||||
h3.sur-title{
|
||||
@include content_titles;
|
||||
margin:0.9em 0 0;
|
||||
}
|
||||
article.node:not(.node--type-enregistrement)>h2, h2.title{
|
||||
@include content_titles;
|
||||
}
|
||||
article.node.node--type-enregistrement{
|
||||
margin:0.5em 0;
|
||||
>h2{
|
||||
@include document_titles_teaser;
|
||||
}
|
||||
}
|
||||
article.node.node--type-enregistrement.node--view-mode-transcript,
|
||||
article.node.node--type-enregistrement.node--view-mode-article{
|
||||
>h2{
|
||||
@include content_subtitles;
|
||||
margin:0.9em 0 0 0;
|
||||
}
|
||||
}
|
||||
article.node.node--type-enregistrement.node--view-mode-transcript{
|
||||
html.js &{
|
||||
h3.sur-title{display:none;}
|
||||
}
|
||||
.field--name-field-transcript-vo, .field--name-field-transcript-trad{
|
||||
.field__label{
|
||||
@include content_titles;
|
||||
html.js &{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&:not(.visible){
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
nav{
|
||||
padding:1em 0 0;
|
||||
div.field__label{
|
||||
@include content_titles;
|
||||
display: inline-block;
|
||||
cursor:pointer;
|
||||
margin-right: 1em;
|
||||
&:before{
|
||||
content: "";
|
||||
display:inline-block;
|
||||
$sq:7px;
|
||||
width: $sq; height:$sq;
|
||||
border: 1px solid red;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
&:hover:before,
|
||||
&.is-active:before{
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
article.node>h2, h2.title{
|
||||
@include content_titles;
|
||||
|
||||
article.node--type-page.node--view-mode-default{
|
||||
>h2.node-title{
|
||||
@include content_big_titles;
|
||||
margin:0.3em 0;
|
||||
}
|
||||
.field--name-field-visuel{
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
article.node p{
|
||||
|
||||
.agenda{
|
||||
.past-events{
|
||||
border-top: 1px solid red;
|
||||
margin-top: 1em;
|
||||
}
|
||||
text-align: center;
|
||||
h3{
|
||||
@include content_titles;
|
||||
}
|
||||
article.node > h2.node-title{
|
||||
@include content_subtitles;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.field--name-field-date{
|
||||
time{
|
||||
@include content_courant;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
div.taxonomy-term{
|
||||
>h2{display:none;}
|
||||
>.content{
|
||||
margin-top: 1em;
|
||||
}
|
||||
.field__label{
|
||||
@include content_titles;
|
||||
}
|
||||
.field--name-field-notice{
|
||||
.field__label{
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
article.node--type-enregistrement{
|
||||
h2.node-title{
|
||||
@include content_subtitles;
|
||||
margin:0.9em 0 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
article.node p, div.taxonomy-term p{
|
||||
@include content_courant;
|
||||
margin:0 0 1em 0;
|
||||
}
|
||||
|
||||
.field.text-formatted{
|
||||
a{
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
&:after{
|
||||
content:'';
|
||||
position: absolute;
|
||||
// z-index: -1;
|
||||
width:100%;
|
||||
left:0; bottom:0.2em;
|
||||
border-bottom: 1px dotted #1A1A1A;
|
||||
}
|
||||
&.audio-link{
|
||||
&:after{
|
||||
border-color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.productions-subtree{
|
||||
a{
|
||||
@include nav_link;
|
||||
&:before{
|
||||
content: "";
|
||||
display:inline-block;
|
||||
$sq:7px;
|
||||
width: $sq; height:$sq;
|
||||
border: 1px solid black;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
&:hover:before,
|
||||
&.is-active:before{
|
||||
background-color: black;
|
||||
}
|
||||
&.ajax-loading:before{
|
||||
@include spining-loader-square;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.productions-parent{
|
||||
margin-top: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
a{
|
||||
@include nav_link;
|
||||
&:before{
|
||||
content:'\2039';
|
||||
// font-weight: bold;
|
||||
font-size: 1.7em;
|
||||
line-height: 0.95;
|
||||
margin-right:0.1em;
|
||||
margin-left: -0.4em;
|
||||
display: inline-block;
|
||||
vertical-align:bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img{
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
@@ -334,6 +504,7 @@ main[role="main"]{
|
||||
opacity: 1;
|
||||
pointer-events:all;
|
||||
}
|
||||
white-space: nowrap;
|
||||
&>*{
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
@@ -341,6 +512,7 @@ main[role="main"]{
|
||||
padding:0;
|
||||
max-height: 100%;
|
||||
// outline: 1px solid green;
|
||||
white-space: normal;
|
||||
}
|
||||
.btns{
|
||||
@include audio_controls;
|
||||
@@ -385,7 +557,7 @@ main[role="main"]{
|
||||
.cartel{
|
||||
// TODO: set max-width regarding responsive
|
||||
position: relative;
|
||||
max-width: 350px;
|
||||
// max-width: 350px;
|
||||
margin-left: 1em;
|
||||
background-color: white;
|
||||
opacity: 1;
|
||||
@@ -403,20 +575,18 @@ main[role="main"]{
|
||||
}
|
||||
.cartels{
|
||||
.first-cartel{
|
||||
|
||||
// visibility: hidden;
|
||||
.entrees{
|
||||
line-height: 0;
|
||||
span{
|
||||
@include entrie-micro-square;
|
||||
}
|
||||
@include entree-micro-square;
|
||||
}
|
||||
h2.node-title{
|
||||
margin:0.2em 0 0;
|
||||
font-size: 1em;
|
||||
font-size: 0.9em;
|
||||
font-weight: 600;
|
||||
}
|
||||
p{
|
||||
margin:0;
|
||||
font-size: 0.75em;
|
||||
font-size: 0.756em;
|
||||
}
|
||||
}
|
||||
.second-cartel{
|
||||
@@ -426,27 +596,47 @@ main[role="main"]{
|
||||
height:100%; min-width: 100%;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
white-space: nowrap;
|
||||
&>*{
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
white-space: normal;
|
||||
}
|
||||
.col-left{
|
||||
a{
|
||||
display: block;
|
||||
font-size: 0.90em;
|
||||
font-size: 0.82em;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.col-right{
|
||||
font-size: 0.75em;
|
||||
border-left:1px solid #1A1A1A;
|
||||
margin-left:5px; padding-left:5px;
|
||||
h3{
|
||||
font-size: 0.82em;
|
||||
margin:0;
|
||||
}
|
||||
p{
|
||||
font-size: 0.756em;
|
||||
margin:0;
|
||||
span.cat{
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover{
|
||||
.second-cartel{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
article:not(.has-second-cartel){
|
||||
.second-cartel{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -490,7 +680,13 @@ main[role="main"]{
|
||||
text-indent: 0;
|
||||
padding: 0.5em;
|
||||
margin:$s*1.2 0 0 $s*1.2;
|
||||
p{margin: 0;}
|
||||
p{
|
||||
font-size: 0.756em;
|
||||
margin:0;
|
||||
&:not(:last-of-type){
|
||||
margin: 0 0 0.4em 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
@@ -606,10 +802,7 @@ main[role="main"]{
|
||||
}
|
||||
}
|
||||
.entrees{
|
||||
line-height: 0;
|
||||
span{
|
||||
@include entrie-micro-square;
|
||||
}
|
||||
@include entree-micro-square;
|
||||
}
|
||||
a.audio-link{
|
||||
text-transform: capitalize;
|
||||
@@ -990,17 +1183,18 @@ main[role="main"]{
|
||||
&.ajax-loading{
|
||||
opacity:0.2;
|
||||
}
|
||||
article{
|
||||
article.node{
|
||||
&:first-of-type{
|
||||
margin-top: 1em!important;
|
||||
}
|
||||
.entrees{
|
||||
span{
|
||||
@include entrie-micro-square;
|
||||
}
|
||||
@include entree-micro-square;
|
||||
}
|
||||
h2.node-title{
|
||||
margin:0 0 0.3em 0;
|
||||
font-size: 0.8em;
|
||||
font-weight: 500;
|
||||
text-transform: none;
|
||||
// font-size: 0.8em;
|
||||
// font-weight: 500;
|
||||
// text-transform: none;
|
||||
}
|
||||
// .description{
|
||||
// p{
|
||||
@@ -1033,29 +1227,28 @@ body.path-agenda main .col{
|
||||
height:100%;
|
||||
}
|
||||
}
|
||||
#agenda{
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
height: 100%;
|
||||
div.column{
|
||||
white-space: normal;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
height:100%;
|
||||
}
|
||||
div.next-event{
|
||||
width:65%;
|
||||
}
|
||||
div.future-past-events{
|
||||
width:33%;
|
||||
}
|
||||
.agenda{
|
||||
// position: relative;
|
||||
// white-space: nowrap;
|
||||
// height: 100%;
|
||||
// >*{
|
||||
// white-space: normal;
|
||||
// }
|
||||
// div.column{
|
||||
// display: inline-block;
|
||||
// vertical-align: top;
|
||||
// height:100%;
|
||||
// }
|
||||
// div.next-event{
|
||||
// width:65%;
|
||||
// }
|
||||
// div.future-past-events{
|
||||
// width:33%;
|
||||
// }
|
||||
ul,li{
|
||||
margin:0; padding:0;
|
||||
list-style: none;
|
||||
}
|
||||
article.node--type-evenement{
|
||||
h2{ @include content_titles; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1098,8 +1291,7 @@ body.path-frontpage, body.path-productions{
|
||||
padding:0.5em 1em;
|
||||
h2.node-title{
|
||||
margin:0;
|
||||
font-size: 0.8em;
|
||||
text-transform: lowercase;
|
||||
@include content_titles;
|
||||
}
|
||||
// p{margin: 0;}
|
||||
}
|
||||
@@ -1109,21 +1301,21 @@ body.path-frontpage, body.path-productions{
|
||||
position: absolute;
|
||||
bottom: 0; left:0;
|
||||
h2.node-title{
|
||||
font-size: 1.2em;
|
||||
font-weight: 500;
|
||||
@include content_big_titles;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.node--view-mode-image-1-columns{
|
||||
h2.node-title{
|
||||
font-size: 1em;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
// &.node--view-mode-image-1-columns{
|
||||
// h2.node-title{
|
||||
// // font-size: 1em;
|
||||
// // font-weight: 500;
|
||||
// }
|
||||
// }
|
||||
&.node--view-mode-text-1-column{
|
||||
padding:0 1em;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1647,24 +1839,23 @@ footer{
|
||||
.inner{
|
||||
position: relative;
|
||||
.entrees{
|
||||
span{
|
||||
@include entrie-micro-square;
|
||||
}
|
||||
@include entree-micro-square;
|
||||
}
|
||||
.title{
|
||||
margin:0.3em 0;
|
||||
font-size: 1.2em;
|
||||
font-weight: 500;
|
||||
margin:0.2em 0 0;
|
||||
// margin:0.3em 0;
|
||||
font-size: 0.9em;
|
||||
font-weight: 600;
|
||||
}
|
||||
.description{
|
||||
p{
|
||||
margin:0;
|
||||
font-size: 0.75em;
|
||||
font-size: 0.756em;
|
||||
}
|
||||
}
|
||||
.chutier-icon{
|
||||
position:absolute;
|
||||
top:1em; right:1em;
|
||||
top:0.4em; right:0.4em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,36 @@
|
||||
@mixin content_big_titles {
|
||||
font-size: 1.3em;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
@mixin content_titles {
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
@mixin content_courant {
|
||||
font-size: 0.75em;
|
||||
font-weight: normal;
|
||||
|
||||
@mixin document_titles_teaser {
|
||||
font-size: 0.82em;
|
||||
font-weight: 500;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
@mixin content_subtitles {
|
||||
font-size: 0.82em;
|
||||
font-weight: 600;
|
||||
line-height: 1.6;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
@mixin content_courant {
|
||||
font-size: 0.82em;
|
||||
font-weight: normal;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
@mixin nav_link {
|
||||
font-size: 0.82em;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ $med-bp:1080px;
|
||||
// $large-bp:1900px;
|
||||
|
||||
@mixin row() {
|
||||
font-size: 0;
|
||||
white-space: nowrap;
|
||||
// font-size: 0;
|
||||
// white-space: nowrap;
|
||||
position: relative;
|
||||
>*{
|
||||
font-size: 16px;
|
||||
@@ -18,10 +18,11 @@ $med-bp:1080px;
|
||||
|
||||
%col-reset {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
// display: inline-block;
|
||||
// white-space:normal;
|
||||
// font-size: 16px;
|
||||
float:left;
|
||||
box-sizing: border-box;
|
||||
white-space:normal;
|
||||
}
|
||||
|
||||
@mixin col($col, $offset: 0, $sum: $default_sum, $gap: $default_gap, $align: top) {
|
||||
@@ -33,7 +34,7 @@ $med-bp:1080px;
|
||||
|
||||
// @media only screen and (min-width: 768px) {
|
||||
width: percentage($col/$sum);
|
||||
vertical-align: $align;
|
||||
// vertical-align: $align;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\Core\Link;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Template\Attribute;
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
@@ -35,6 +36,11 @@ function edlptheme_preprocess_node(&$vars){
|
||||
$vars['link_attributes'] = new Attribute(array(
|
||||
'data-drupal-link-system-path' => $system_path=='' ? '<front>' : $system_path
|
||||
));
|
||||
|
||||
if($node->bundle() == 'enregistrement' && in_array($vars['view_mode'], ['article','transcript'])){
|
||||
$vars['page'] = true;
|
||||
$vars['sur_title'] = $vars['view_mode'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,58 +170,50 @@ function edlptheme_preprocess_node__enregistrement__compo(&$vars){
|
||||
|
||||
function edlptheme_preprocess_node__enregistrement__player_cartel(&$vars){
|
||||
// dpm($vars);
|
||||
$node = $vars['node'];
|
||||
|
||||
$vars['col_left'] = false;
|
||||
$vars['col_right'] = false;
|
||||
|
||||
// if transcript not empty
|
||||
$url = Url::fromRoute('entity.node.canonical', ['node'=>$vars['node']->id()], array(
|
||||
'attributes' => array(
|
||||
'class' => ['link-transcript', 'ajax-link'],
|
||||
'viewmode'=>'transcript'
|
||||
)
|
||||
));
|
||||
$vars['link_transcript'] = array(
|
||||
'#title' => t("Lire le text."),
|
||||
'#type' => 'link',
|
||||
'#url' => $url,
|
||||
'#options'=>array(
|
||||
$transcript = $node->get('field_transcript_vo');
|
||||
if(!$transcript->isEmpty()){
|
||||
$vars['col_left'] = true;
|
||||
$url = Url::fromRoute('entity.node.canonical', ['node'=>$node->id()]);
|
||||
$url->setOptions(array(
|
||||
'attributes' => array(
|
||||
'class' => ['link-transcript', 'ajax-link'],
|
||||
'viewmode'=>'transcript',
|
||||
'data-drupal-link-system-path' => $url->getInternalPath()
|
||||
)
|
||||
)
|
||||
);
|
||||
// TODO: refacorize the link generator as following :
|
||||
// $url = Url::fromRoute('entity.taxonomy_term.canonical', ['taxonomy_term'=>$tid]);
|
||||
// $url->setOptions(array(
|
||||
// 'attributes' => array(
|
||||
// 'class' => ['index-link', 'ajax-link'],
|
||||
// 'viewmode'=>'index',
|
||||
// 'tid'=>$tid,
|
||||
// 'data-drupal-link-system-path' => $url->getInternalPath()
|
||||
// )
|
||||
// ));
|
||||
// $entree['index_link'] = Link::fromTextAndUrl('index', $url);
|
||||
));
|
||||
$vars['link_transcript'] = Link::fromTextAndUrl(t("Lire le text."), $url);
|
||||
}
|
||||
|
||||
// if article not empty
|
||||
$url = Url::fromRoute('entity.node.canonical', ['node'=>$vars['node']->id()], array(
|
||||
'attributes' => array(
|
||||
'class' => ['link-article', 'ajax-link'],
|
||||
'viewmode'=>'article'
|
||||
)
|
||||
));
|
||||
$vars['link_article'] = array(
|
||||
'#title' => t("Lire l'article."),
|
||||
'#type' => 'link',
|
||||
'#url' => $url,
|
||||
'#options' => array(
|
||||
'attributes'=>array(
|
||||
$article = $node->get('body');
|
||||
if(!$article->isEmpty()){
|
||||
$vars['col_left'] = true;
|
||||
$url = Url::fromRoute('entity.node.canonical', ['node'=>$node->id()]);
|
||||
$url->setOptions(array(
|
||||
'attributes' => array(
|
||||
'class' => ['link-article', 'ajax-link'],
|
||||
'viewmode'=>'article',
|
||||
'data-drupal-link-system-path' => $url->getInternalPath()
|
||||
)
|
||||
)
|
||||
);
|
||||
// if article or transcript
|
||||
$vars['col_left'] = true;
|
||||
));
|
||||
$vars['link_article'] = Link::fromTextAndUrl(t("Lire l'article."), $url);
|
||||
}
|
||||
|
||||
// if
|
||||
$vars['col_right'] = true;
|
||||
// relations (defined in edlp_corpus.module)
|
||||
if(isset($vars['content']['relations'])){
|
||||
// dpm($relations);
|
||||
$vars['col_right'] = true;
|
||||
}
|
||||
|
||||
if($vars['col_left'] || $vars['col_right']){
|
||||
$vars['second_cartel'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<div class="col small-col-12 med-col-12 large-col-8 ">
|
||||
<div class="col small-col-12 med-col-4 large-col-3 ">
|
||||
<div class="wrapper">
|
||||
<div id="agenda">
|
||||
|
||||
<div class="column next-event">
|
||||
{{ next_event }}
|
||||
</div>
|
||||
<div class="column future-past-events os-scroll">
|
||||
<div class="agenda">
|
||||
{{ coming_events }}
|
||||
{{ past_events }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col small-col-12 med-col-8 large-col-5 event float-right">
|
||||
<div class="wrapper">
|
||||
<div class="agenda">
|
||||
{{ next_event }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+10
-1
@@ -1,7 +1,16 @@
|
||||
<div class="col small-col-12 med-col-6 large-col-6">
|
||||
<div class="col small-col-12 med-col-6 large-col-5">
|
||||
<div class="wrapper">
|
||||
{#<div class="os-scroll">#}
|
||||
{{ content }}
|
||||
{#</div>#}
|
||||
</div>
|
||||
</div>
|
||||
{% if aside %}
|
||||
<div class="col small-col-12 med-col-4 large-col-3 aside float-right">
|
||||
<div class="wrapper">
|
||||
{#<div class="os-scroll">#}
|
||||
{{ aside }}
|
||||
{#</div>#}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<div class="col small-col-12 med-col-6 large-col-4 event float-right">
|
||||
<div class="wrapper">
|
||||
<div class="agenda">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+2
-1
@@ -78,6 +78,7 @@
|
||||
node.isSticky() ? 'node--sticky',
|
||||
not node.isPublished() ? 'node--unpublished',
|
||||
view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
|
||||
second_cartel ? 'has-second-cartel',
|
||||
]
|
||||
%}
|
||||
{{ attach_library('classy/node') }}
|
||||
@@ -111,7 +112,7 @@
|
||||
{% endif %}
|
||||
{% if col_right %}
|
||||
<div class="col-right">
|
||||
right colume
|
||||
{{ content.relations }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
@@ -83,12 +83,17 @@
|
||||
{{ attach_library('classy/node') }}
|
||||
<article{{ attributes.addClass(classes) }}>
|
||||
|
||||
{{ title_prefix }}
|
||||
{% if not page %}
|
||||
<h2{{ title_attributes.addClass('node-title') }}>
|
||||
<a href="{{ url }}" rel="bookmark" {{ link_attributes }}>{{ label }}</a>
|
||||
</h2>
|
||||
{% if sur_title %}
|
||||
<h3 class="sur-title">{{ sur_title }}</h3>
|
||||
{% endif %}
|
||||
{{ title_prefix }}
|
||||
<h2{{ title_attributes.addClass('node-title') }}>
|
||||
{% if not page %}
|
||||
<a href="{{ url }}" rel="bookmark" {{ link_attributes }}>{{ label }}</a>
|
||||
{% else %}
|
||||
{{ label }}
|
||||
{% endif %}
|
||||
</h2>
|
||||
{{ title_suffix }}
|
||||
|
||||
{% if display_submitted %}
|
||||
|
||||
@@ -11,7 +11,10 @@ dependencies:
|
||||
- field.field.node.enregistrement.field_genres
|
||||
- field.field.node.enregistrement.field_langues
|
||||
- field.field.node.enregistrement.field_locuteurs
|
||||
- field.field.node.enregistrement.field_nbr_locuteurs
|
||||
- field.field.node.enregistrement.field_son
|
||||
- field.field.node.enregistrement.field_transcript_trad
|
||||
- field.field.node.enregistrement.field_transcript_vo
|
||||
- field.field.node.enregistrement.field_workflow
|
||||
- node.type.enregistrement
|
||||
module:
|
||||
@@ -35,13 +38,18 @@ content:
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
chutier_actions: true
|
||||
field_collectionneurs: true
|
||||
field_description: true
|
||||
field_entrees: true
|
||||
field_genres: true
|
||||
field_langues: true
|
||||
field_locuteurs: true
|
||||
field_nbr_locuteurs: true
|
||||
field_son: true
|
||||
field_transcript_trad: true
|
||||
field_transcript_vo: true
|
||||
field_workflow: true
|
||||
langcode: true
|
||||
links: true
|
||||
relations: true
|
||||
|
||||
@@ -11,6 +11,7 @@ dependencies:
|
||||
- field.field.node.enregistrement.field_genres
|
||||
- field.field.node.enregistrement.field_langues
|
||||
- field.field.node.enregistrement.field_locuteurs
|
||||
- field.field.node.enregistrement.field_nbr_locuteurs
|
||||
- field.field.node.enregistrement.field_son
|
||||
- field.field.node.enregistrement.field_transcript_trad
|
||||
- field.field.node.enregistrement.field_transcript_vo
|
||||
@@ -44,9 +45,11 @@ hidden:
|
||||
field_genres: true
|
||||
field_langues: true
|
||||
field_locuteurs: true
|
||||
field_nbr_locuteurs: true
|
||||
field_son: true
|
||||
field_transcript_trad: true
|
||||
field_transcript_vo: true
|
||||
field_workflow: true
|
||||
langcode: true
|
||||
links: true
|
||||
relations: true
|
||||
|
||||
@@ -52,3 +52,4 @@ hidden:
|
||||
field_workflow: true
|
||||
langcode: true
|
||||
links: true
|
||||
relations: true
|
||||
|
||||
@@ -58,3 +58,4 @@ hidden:
|
||||
field_workflow: true
|
||||
langcode: true
|
||||
links: true
|
||||
relations: true
|
||||
|
||||
@@ -11,6 +11,7 @@ dependencies:
|
||||
- field.field.node.enregistrement.field_genres
|
||||
- field.field.node.enregistrement.field_langues
|
||||
- field.field.node.enregistrement.field_locuteurs
|
||||
- field.field.node.enregistrement.field_nbr_locuteurs
|
||||
- field.field.node.enregistrement.field_son
|
||||
- field.field.node.enregistrement.field_transcript_trad
|
||||
- field.field.node.enregistrement.field_transcript_vo
|
||||
@@ -38,14 +39,17 @@ content:
|
||||
region: content
|
||||
hidden:
|
||||
body: true
|
||||
chutier_actions: true
|
||||
field_collectionneurs: true
|
||||
field_entrees: true
|
||||
field_genres: true
|
||||
field_langues: true
|
||||
field_locuteurs: true
|
||||
field_nbr_locuteurs: true
|
||||
field_son: true
|
||||
field_transcript_trad: true
|
||||
field_transcript_vo: true
|
||||
field_workflow: true
|
||||
langcode: true
|
||||
links: true
|
||||
relations: true
|
||||
|
||||
+3
@@ -11,6 +11,7 @@ dependencies:
|
||||
- field.field.node.enregistrement.field_genres
|
||||
- field.field.node.enregistrement.field_langues
|
||||
- field.field.node.enregistrement.field_locuteurs
|
||||
- field.field.node.enregistrement.field_nbr_locuteurs
|
||||
- field.field.node.enregistrement.field_son
|
||||
- field.field.node.enregistrement.field_transcript_trad
|
||||
- field.field.node.enregistrement.field_transcript_vo
|
||||
@@ -51,9 +52,11 @@ hidden:
|
||||
field_genres: true
|
||||
field_langues: true
|
||||
field_locuteurs: true
|
||||
field_nbr_locuteurs: true
|
||||
field_son: true
|
||||
field_transcript_trad: true
|
||||
field_transcript_vo: true
|
||||
field_workflow: true
|
||||
langcode: true
|
||||
links: true
|
||||
relations: true
|
||||
|
||||
@@ -11,6 +11,7 @@ dependencies:
|
||||
- field.field.node.enregistrement.field_genres
|
||||
- field.field.node.enregistrement.field_langues
|
||||
- field.field.node.enregistrement.field_locuteurs
|
||||
- field.field.node.enregistrement.field_nbr_locuteurs
|
||||
- field.field.node.enregistrement.field_son
|
||||
- field.field.node.enregistrement.field_transcript_trad
|
||||
- field.field.node.enregistrement.field_transcript_vo
|
||||
@@ -45,13 +46,16 @@ content:
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
body: true
|
||||
chutier_actions: true
|
||||
field_collectionneurs: true
|
||||
field_description: true
|
||||
field_entrees: true
|
||||
field_genres: true
|
||||
field_langues: true
|
||||
field_locuteurs: true
|
||||
field_nbr_locuteurs: true
|
||||
field_son: true
|
||||
field_workflow: true
|
||||
langcode: true
|
||||
links: true
|
||||
relations: true
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
uuid: f5c1b1ab-e59e-4d7c-9b30-adc390450b46
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- core.entity_view_mode.node.aside
|
||||
- field.field.node.evenement.body
|
||||
- field.field.node.evenement.field_date
|
||||
- field.field.node.evenement.field_page_liee
|
||||
- field.field.node.evenement.field_workflow_generic
|
||||
- node.type.evenement
|
||||
module:
|
||||
- datetime_range
|
||||
- user
|
||||
id: node.evenement.aside
|
||||
targetEntityType: node
|
||||
bundle: evenement
|
||||
mode: aside
|
||||
content:
|
||||
field_date:
|
||||
weight: 1
|
||||
label: hidden
|
||||
settings:
|
||||
timezone_override: ''
|
||||
format_type: long
|
||||
separator: '-'
|
||||
third_party_settings: { }
|
||||
type: daterange_default
|
||||
region: content
|
||||
links:
|
||||
weight: 0
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
hidden:
|
||||
body: true
|
||||
field_page_liee: true
|
||||
field_workflow_generic: true
|
||||
langcode: true
|
||||
@@ -4,6 +4,7 @@ status: true
|
||||
dependencies:
|
||||
config:
|
||||
- core.entity_view_mode.taxonomy_term.notice
|
||||
- field.field.taxonomy_term.entrees.field_color
|
||||
- field.field.taxonomy_term.entrees.field_notice
|
||||
- field.field.taxonomy_term.entrees.field_workflow
|
||||
- taxonomy.vocabulary.entrees
|
||||
@@ -23,5 +24,7 @@ content:
|
||||
region: content
|
||||
hidden:
|
||||
description: true
|
||||
field_color: true
|
||||
field_workflow: true
|
||||
index: true
|
||||
langcode: true
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
uuid: f634def2-a5a8-4b28-a71e-be46cf1edbd4
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
id: node.aside
|
||||
label: Aside
|
||||
targetEntityType: node
|
||||
cache: true
|
||||
@@ -11,7 +11,7 @@ id: node.enregistrement.field_transcript_trad
|
||||
field_name: field_transcript_trad
|
||||
entity_type: node
|
||||
bundle: enregistrement
|
||||
label: 'Transcription (Traduction)'
|
||||
label: Traduction
|
||||
description: ''
|
||||
required: false
|
||||
translatable: true
|
||||
|
||||
@@ -11,7 +11,7 @@ id: node.enregistrement.field_transcript_vo
|
||||
field_name: field_transcript_vo
|
||||
entity_type: node
|
||||
bundle: enregistrement
|
||||
label: 'Transcription (Version Originale)'
|
||||
label: Transcription
|
||||
description: ''
|
||||
required: false
|
||||
translatable: false
|
||||
|
||||
@@ -4,6 +4,7 @@ status: true
|
||||
dependencies:
|
||||
module:
|
||||
- editor
|
||||
- edlp_admin
|
||||
- edlp_corpus
|
||||
- url_to_video_filter
|
||||
name: wysiwyg
|
||||
@@ -84,3 +85,9 @@ filters:
|
||||
youtube_webp_preview: '0'
|
||||
vimeo: '1'
|
||||
autoload: '0'
|
||||
css:
|
||||
id: css
|
||||
provider: edlp_admin
|
||||
status: true
|
||||
weight: 0
|
||||
settings: { }
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
uuid: 4974717e-ade6-4010-951e-fa1d78d84a00
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
id: documents
|
||||
label: Documents
|
||||
type: 'canonical_entities:node'
|
||||
pattern: 'documents/[node:title]'
|
||||
selection_criteria:
|
||||
88beab32-c4e4-446a-99f7-aaa33b66a902:
|
||||
id: node_type
|
||||
bundles:
|
||||
enregistrement: enregistrement
|
||||
negate: false
|
||||
context_mapping:
|
||||
node: node
|
||||
uuid: 88beab32-c4e4-446a-99f7-aaa33b66a902
|
||||
selection_logic: and
|
||||
weight: -5
|
||||
relationships: { }
|
||||
@@ -15,5 +15,6 @@ permissions:
|
||||
- 'access synonyms entity autocomplete'
|
||||
- 'create corpus_documents workflow_transition'
|
||||
- 'create generique workflow_transition'
|
||||
- 'use text format wysiwyg'
|
||||
- 'view published fil entities'
|
||||
- 'view search api pages'
|
||||
|
||||
Reference in New Issue
Block a user