From 1c12c205ec2026ea0162bd1e9afbeee76c5d087f Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Thu, 26 Apr 2018 18:11:59 +0200 Subject: [PATCH 1/3] audio player autohide @ 15sec --- .../all/themes/custom/edlptheme/assets/dist/scripts/main.min.js | 2 +- sites/all/themes/custom/edlptheme/assets/scripts/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js b/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js index 785c5af9b..5595bb5f1 100644 --- a/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js +++ b/sites/all/themes/custom/edlptheme/assets/dist/scripts/main.min.js @@ -32,7 +32,7 @@ var sys_path=$(this).attr('data-drupal-link-system-path');if(sys_path=='' var view_mode=$link.attr('viewmode');var state=getSysPathState(sys_path,view_mode);state.url=$(this).attr('href');if(view_mode){state.url+="#"+view_mode;} 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').setAutoOpenArticle(e.article).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 checkVisibleCorpusMapSpace(){var left_limit=0,right_limit=0;_$row.find('.col').each(function(i,e){var $col=$(this);var offset=$col.offset();switch(true){case $col.is('.float-right'):right_limit=Math.max(right_limit,Math.abs(offset.left-window.innerWidth));break;default:left_limit=Math.max(left_limit,offset.left+$col.width());break;}});void 0;if(_corpus_ready){_$body.trigger({type:'visible-space-changed',left_limit:left_limit,right_limit:right_limit});}else{_corpus_promise.done(function(){_$body.trigger({type:'visible-space-changed',left_limit:left_limit,right_limit:right_limit});});}};function AudioPlayer(){var that=this;this.fid;this.audio=new Audio();this.audio_events=["loadedmetadata","playing","pause","timeupdate","ended","error"];this.$container=$('
');this.$btns=$('
').addClass('btns').appendTo(this.$container);this.$previous=$('
').addClass('previous').appendTo(this.$btns);this.$playpause=$('
').addClass('play-pause').appendTo(this.$btns);this.$next=$('
').addClass('next').appendTo(this.$btns);this.$timelinecont=$('
').addClass('time-line-container').appendTo(this.$container);this.$timeline=$('
').addClass('time-line').appendTo(this.$timelinecont);this.$loader=$('
').addClass('loader').appendTo(this.$timeline);this.$cursor=$('
').addClass('cursor').appendTo(this.$timeline);this.$time=$('
').addClass('time').appendTo(this.$container);this.$currentTime=$('
').addClass('current-time').html('00:00').appendTo(this.$time);this.$duration=$('
').addClass('duration').html('00:00').appendTo(this.$time);this.$fav=$('
').addClass('favoris').appendTo(this.$container);this.$cartel=$('
').addClass('cartel').appendTo(this.$container);this.hideTimer=false;this.hideTimeMS=10000;this.currentHistoricIndex=null;this.historic=[];this.shuffle_is_active=false;this.auto_open_article=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_parent=$('header[role="banner"] .region-header');this.$container.appendTo(this.$container_parent);this.timeline_w=parseInt(this.$timeline.width());var fn='';for(var i=0;i');this.$btns=$('
').addClass('btns').appendTo(this.$container);this.$previous=$('
').addClass('previous').appendTo(this.$btns);this.$playpause=$('
').addClass('play-pause').appendTo(this.$btns);this.$next=$('
').addClass('next').appendTo(this.$btns);this.$timelinecont=$('
').addClass('time-line-container').appendTo(this.$container);this.$timeline=$('
').addClass('time-line').appendTo(this.$timelinecont);this.$loader=$('
').addClass('loader').appendTo(this.$timeline);this.$cursor=$('
').addClass('cursor').appendTo(this.$timeline);this.$time=$('
').addClass('time').appendTo(this.$container);this.$currentTime=$('
').addClass('current-time').html('00:00').appendTo(this.$time);this.$duration=$('
').addClass('duration').html('00:00').appendTo(this.$time);this.$fav=$('
').addClass('favoris').appendTo(this.$container);this.$cartel=$('
').addClass('cartel').appendTo(this.$container);this.hideTimer=false;this.hideTimeMS=15000;this.currentHistoricIndex=null;this.historic=[];this.shuffle_is_active=false;this.auto_open_article=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_parent=$('header[role="banner"] .region-header');this.$container.appendTo(this.$container_parent);this.timeline_w=parseInt(this.$timeline.width());var fn='';for(var i=0;i Date: Thu, 26 Apr 2018 18:19:06 +0200 Subject: [PATCH 2/3] added agenda title to home agenda --- .../figli/edlp_home/includes/edlp_home.inc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sites/all/modules/figli/edlp_home/includes/edlp_home.inc b/sites/all/modules/figli/edlp_home/includes/edlp_home.inc index a740c6b19..80f60ed4c 100644 --- a/sites/all/modules/figli/edlp_home/includes/edlp_home.inc +++ b/sites/all/modules/figli/edlp_home/includes/edlp_home.inc @@ -93,12 +93,19 @@ function template_preprocess_edlp_home(&$vars){ // ); // render the next events of agenda as list - $agenda = array ( - '#theme' => 'item_list', - '#items' => [], + $agenda = array( + '#type'=>"container", + 'title'=>array( + '#markup'=>"

".t("Agenda")."

", + ), + 'list'=> array( + '#theme' => 'item_list', + '#items' => [], + ), ); + foreach($vars['agenda_items'] as $node){ - $agenda['#items'][] = $view_builder->view($node, 'teaser'); + $agenda['list']['#items'][] = $view_builder->view($node, 'teaser'); } $vars['agenda'] = render($agenda); From b7abbe605bf08583ade4f0cb7c7e438af9051368 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Thu, 26 Apr 2018 18:30:24 +0200 Subject: [PATCH 3/3] translated audio doc links --- sites/all/themes/custom/edlptheme/edlptheme.theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sites/all/themes/custom/edlptheme/edlptheme.theme b/sites/all/themes/custom/edlptheme/edlptheme.theme index 718f45dde..e0b954260 100644 --- a/sites/all/themes/custom/edlptheme/edlptheme.theme +++ b/sites/all/themes/custom/edlptheme/edlptheme.theme @@ -202,7 +202,7 @@ function edlptheme_preprocess_node__enregistrement__player_cartel(&$vars){ 'data-drupal-link-system-path' => $url->getInternalPath() ) )); - $vars['link_transcript'] = Link::fromTextAndUrl(t("Lire le text."), $url); + $vars['link_transcript'] = Link::fromTextAndUrl(t("Read the text."), $url); } // if article not empty @@ -217,7 +217,7 @@ function edlptheme_preprocess_node__enregistrement__player_cartel(&$vars){ 'data-drupal-link-system-path' => $url->getInternalPath() ) )); - $vars['link_article'] = Link::fromTextAndUrl(t("Lire l'article."), $url); + $vars['link_article'] = Link::fromTextAndUrl(t("Read the article."), $url); } // relations (defined in edlp_corpus.module)