Browse Source

logo fond blanc, youtube autoplay

Bachir Soussi Chiadmi 4 years ago
parent
commit
a4bd434e68

+ 26 - 0
patches.d/youtube_autoplay-2685721-4.patch

@@ -0,0 +1,26 @@
+diff --git a/video_embed_field.handlers.inc b/video_embed_field.handlers.inc
+index 1962008..b9fe593 100644
+--- a/video_embed_field.handlers.inc
++++ b/video_embed_field.handlers.inc
+@@ -195,7 +195,7 @@ function video_embed_field_handle_youtube($url, $settings) {
+ 
+   // Construct the embed code.
+   $settings['wmode'] = 'opaque';
+-  $settings_str = urlencode(_video_embed_code_get_settings_str($settings));
++  $settings_str = _video_embed_code_get_settings_str($settings);
+ 
+   $output['#markup'] = '<iframe class="' . check_plain($class) . '" width="' . check_plain($settings['width']) . '" height="' . check_plain($settings['height']) . '" src="//www.youtube.com/embed/' . $id . '?' . $settings_str . '" frameborder="0" allowfullscreen></iframe>';
+ 
+diff --git a/video_embed_field.module b/video_embed_field.module
+index 8826ead..e4f4282 100644
+--- a/video_embed_field.module
++++ b/video_embed_field.module
+@@ -617,7 +617,7 @@ function _video_embed_code_get_settings_str($settings = array()) {
+       $values[] = $name;
+     }
+     else {
+-      $values[] = $name . '=' . $value;
++      $values[] = $name . '=' . urlencode($value);
+     }
+   }
+ 

+ 7 - 1
patches.md

@@ -1,3 +1,9 @@
-# Field group
+# Modules Patched
+
+## Field group
 compatibility with php 7   
 https://www.drupal.org/node/2661484
+
+## video embed
+youtube autoplay
+https://www.drupal.org/node/2685721#comment-11032685

+ 62 - 62
sites/all/libraries/jquery.domwindow/jquery.DOMWindow.js

@@ -1,17 +1,17 @@
 (function($){
-	
+
 	//closeDOMWindow
 	$.fn.closeDOMWindow = function(settings){
-		
+
 		if(!settings){settings={};}
-		
+
 		var run = function(passingThis){
-			
+
 			if(settings.anchoredClassName){
 				var $anchorClassName = $('.'+settings.anchoredClassName);
 				$anchorClassName.fadeOut('fast',function(){
 					if($.fn.draggable){
-						$anchorClassName.draggable('destory').trigger("unload").remove();	
+						$anchorClassName.draggable('destory').trigger("unload").remove();
 					}else{
 						$anchorClassName.trigger("unload").remove();
 					}
@@ -21,7 +21,7 @@
 				var $DOMWindowOverlay = $('#DOMWindowOverlay');
 				var $DOMWindow = $('#DOMWindow');
 				$DOMWindowOverlay.fadeOut('fast',function(){
-					$DOMWindowOverlay.trigger('unload').unbind().remove();																	  
+					$DOMWindowOverlay.trigger('unload').unbind().remove();
 				});
 				$DOMWindow.fadeOut('fast',function(){
 					if($.fn.draggable){
@@ -30,15 +30,15 @@
 						$DOMWindow.trigger("unload").remove();
 					}
 				});
-			
+
 				$(window).unbind('scroll.DOMWindow');
 				$(window).unbind('resize.DOMWindow');
-				
+
 				if($.fn.openDOMWindow.isIE6){$('#DOMWindowIE6FixIframe').remove();}
 				if(settings.functionCallOnClose){settings.functionCallAfterClose();}
-			}	
+			}
 		};
-		
+
 		if(settings.eventType){//if used with $().
 			return this.each(function(index){
 				$(this).bind(settings.eventType, function(){
@@ -49,19 +49,19 @@
 		}else{//else called as $.function
 			run();
 		}
-		
+
 	};
-	
+
 	//allow for public call, pass settings
 	$.closeDOMWindow = function(s){$.fn.closeDOMWindow(s);};
-	
+
 	//openDOMWindow
-	$.fn.openDOMWindow = function(instanceSettings){	
-		
+	$.fn.openDOMWindow = function(instanceSettings){
+
 		var shortcut =  $.fn.openDOMWindow;
-	
+
 		//default settings combined with callerSettings////////////////////////////////////////////////////////////////////////
-		
+
 		shortcut.defaultsSettings = {
 			anchoredClassName:'',
 			anchoredSelector:'',
@@ -84,7 +84,7 @@
 			positionLeft:0,
 			positionTop:0,
 			positionType:'centered', // centered, anchored, absolute, fixed
-			width:500, 
+			width:500,
 			windowBGColor:'#fff',
 			windowBGImage:null, // http path
 			windowHTTPType:'get',
@@ -94,19 +94,19 @@
 			windowSourceURL:'',
 			windowSourceAttrURL:'href'
 		};
-		
+
 		var settings = $.extend({}, $.fn.openDOMWindow.defaultsSettings , instanceSettings || {});
-		
+
 		//Public functions
-		
+
 		shortcut.viewPortHeight = function(){ return self.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;};
 		shortcut.viewPortWidth = function(){ return self.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;};
 		shortcut.scrollOffsetHeight = function(){ return self.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;};
 		shortcut.scrollOffsetWidth = function(){ return self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft;};
 		shortcut.isIE6 = typeof document.body.style.maxHeight === "undefined";
-		
+
 		//Private Functions/////////////////////////////////////////////////////////////////////////////////////////////////////////
-		
+
 		var sizeOverlay = function(){
 			var $DOMWindowOverlay = $('#DOMWindowOverlay');
 			if(shortcut.isIE6){//if IE 6
@@ -115,15 +115,15 @@
 				$DOMWindowOverlay.css({'height':overlayViewportHeight +'px','width':overlayViewportWidth+'px'});
 			}else{//else Firefox, safari, opera, IE 7+
 				$DOMWindowOverlay.css({'height':'100%','width':'100%','position':'fixed'});
-			}	
+			}
 		};
-		
+
 		var sizeIE6Iframe = function(){
 			var overlayViewportHeight = document.documentElement.offsetHeight + document.documentElement.scrollTop - 4;
 			var overlayViewportWidth = document.documentElement.offsetWidth - 21;
 			$('#DOMWindowIE6FixIframe').css({'height':overlayViewportHeight +'px','width':overlayViewportWidth+'px'});
 		};
-		
+
 		var centerDOMWindow = function() {
 			var $DOMWindow = $('#DOMWindow');
 			if(settings.height + 50 > shortcut.viewPortHeight()){//added 50 to be safe
@@ -133,7 +133,7 @@
 				$DOMWindow.css('top',Math.round(shortcut.viewPortHeight()/2) + shortcut.scrollOffsetHeight() - Math.round(($DOMWindow.outerHeight())/2));
 			}
 		};
-		
+
 		var centerLoader = function() {
 			var $DOMWindowLoader = $('#DOMWindowLoader');
 			if(shortcut.isIE6){//if IE 6
@@ -142,34 +142,34 @@
 			}else{
 				$DOMWindowLoader.css({'left':'50%','top':'50%','position':'fixed'});
 			}
-			
+
 		};
-		
+
 		var fixedDOMWindow = function(){
 			var $DOMWindow = $('#DOMWindow');
 			$DOMWindow.css('left', settings.positionLeft + shortcut.scrollOffsetWidth());
 			$DOMWindow.css('top', + settings.positionTop + shortcut.scrollOffsetHeight());
 		};
-		
+
 		var showDOMWindow = function(instance){
 			if(arguments[0]){
 				$('.'+instance+' #DOMWindowLoader').remove();
 				$('.'+instance+' #DOMWindowContent').fadeIn('fast',function(){if(settings.functionCallOnOpen){settings.functionCallOnOpen();}});
 				$('.'+instance+ '.closeDOMWindow').click(function(){
-					$.closeDOMWindow();	
+					$.closeDOMWindow();
 					return false;
 				});
 			}else{
 				$('#DOMWindowLoader').remove();
 				$('#DOMWindow').fadeIn('fast',function(){if(settings.functionCallOnOpen){settings.functionCallOnOpen();}});
-				$('#DOMWindow .closeDOMWindow').click(function(){						
+				$('#DOMWindow .closeDOMWindow').click(function(){
 					$.closeDOMWindow();
 					return false;
 				});
 			}
-			
+
 		};
-		
+
 		var urlQueryToObject = function(s){
 			  var query = {};
 			  s.replace(/b([^&=]*)=([^&=]*)b/g, function (m, a, d) {
@@ -181,38 +181,38 @@
 			  });
 			  return query;
 		};
-			
+
 		//Run Routine ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
 		var run = function(passingThis){
-			
+
 			//get values from element clicked, or assume its passed as an option
 			settings.windowSourceID = $(passingThis).attr('href') || settings.windowSourceID;
 			settings.windowSourceURL = $(passingThis).attr(settings.windowSourceAttrURL) || settings.windowSourceURL;
 			settings.windowBGImage = settings.windowBGImage ? 'background-image:url('+settings.windowBGImage+')' : '';
 			var urlOnly, urlQueryObject;
-			
+
 			if(settings.positionType == 'anchored'){//anchored DOM window
-				
+
 				var anchoredPositions = $(settings.anchoredSelector).position();
 				var anchoredPositionX = anchoredPositions.left + settings.positionLeft;
 				var anchoredPositionY = anchoredPositions.top + settings.positionTop;
-				
-				$('body').append('<div class="'+settings.anchoredClassName+'" style="'+settings.windowBGImage+';background-repeat:no-repeat;padding:'+settings.windowPadding+'px;overflow:auto;position:absolute;top:'+anchoredPositionY+'px;left:'+anchoredPositionX+'px;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+';z-index:10001"><div id="DOMWindowContent" style="display:none"></div></div>');		
+
+				$('body').append('<div class="'+settings.anchoredClassName+'" style="'+settings.windowBGImage+';background-repeat:no-repeat;padding:'+settings.windowPadding+'px;overflow:auto;position:absolute;top:'+anchoredPositionY+'px;left:'+anchoredPositionX+'px;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+';z-index:10001"><div id="DOMWindowContent" style="display:none"></div></div>');
 				//loader
 				if(settings.loader && settings.loaderImagePath !== ''){
 					$('.'+settings.anchoredClassName).append('<div id="DOMWindowLoader" style="width:'+settings.loaderWidth+'px;height:'+settings.loaderHeight+'px;"><img src="'+settings.loaderImagePath+'" /></div>');
-					
+
 				}
 
 				if($.fn.draggable){
 					if(settings.draggable){$('.' + settings.anchoredClassName).draggable({cursor:'move'});}
 				}
-				
+
 				switch(settings.windowSource){
 					case 'inline'://////////////////////////////// inline //////////////////////////////////////////
 						$('.' + settings.anchoredClassName+" #DOMWindowContent").append($(settings.windowSourceID).children());
 						$('.' + settings.anchoredClassName).unload(function(){// move elements back when you're finished
-							$('.' + settings.windowSourceID).append( $('.' + settings.anchoredClassName+" #DOMWindowContent").children());				
+							$('.' + settings.windowSourceID).append( $('.' + settings.anchoredClassName+" #DOMWindowContent").children());
 						});
 						showDOMWindow(settings.anchoredClassName);
 					break;
@@ -220,9 +220,9 @@
 						$('.' + settings.anchoredClassName+" #DOMWindowContent").append('<iframe frameborder="0" hspace="0" wspace="0" src="'+settings.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1000)+'" style="width:100%;height:100%;border:none;background-color:#fff;" class="'+settings.anchoredClassName+'Iframe" ></iframe>');
 						$('.'+settings.anchoredClassName+'Iframe').load(showDOMWindow(settings.anchoredClassName));
 					break;
-					case 'ajax'://////////////////////////////// ajax //////////////////////////////////////////	
+					case 'ajax'://////////////////////////////// ajax //////////////////////////////////////////
 						if(settings.windowHTTPType == 'post'){
-							
+
 							if(settings.windowSourceURL.indexOf("?") !== -1){//has a query string
 								urlOnly = settings.windowSourceURL.substr(0, settings.windowSourceURL.indexOf("?"));
 								urlQueryObject = urlQueryToObject(settings.windowSourceURL);
@@ -244,9 +244,9 @@
 						}
 					break;
 				}
-				
+
 			}else{//centered, fixed, absolute DOM window
-				
+
 				//overlay & modal
 				if(settings.overlay){
 					$('body').append('<div id="DOMWindowOverlay" style="z-index:10000;display:none;position:absolute;top:0;left:0;background-color:'+settings.overlayColor+';filter:alpha(opacity='+settings.overlayOpacity+');-moz-opacity: 0.'+settings.overlayOpacity+';opacity: 0.'+settings.overlayOpacity+';"></div>');
@@ -259,7 +259,7 @@
 					$DOMWindowOverlay.fadeIn('fast');
 					if(!settings.modal){$DOMWindowOverlay.click(function(){$.closeDOMWindow();});}
 				}
-				
+
 				//loader
 				if(settings.loader && settings.loaderImagePath !== ''){
 					$('body').append('<div id="DOMWindowLoader" style="z-index:10002;width:'+settings.loaderWidth+'px;height:'+settings.loaderHeight+'px;"><img src="'+settings.loaderImagePath+'" /></div>');
@@ -268,7 +268,7 @@
 
 				//add DOMwindow
 				$('body').append('<div id="DOMWindow" style="background-repeat:no-repeat;'+settings.windowBGImage+';overflow:auto;padding:'+settings.windowPadding+'px;display:none;height:'+settings.height+'px;width:'+settings.width+'px;background-color:'+settings.windowBGColor+';border:'+settings.borderSize+'px solid '+settings.borderColor+'; position:absolute;z-index:10001"></div>');
-				
+
 				var $DOMWindow = $('#DOMWindow');
 				//centered, absolute, or fixed
 				switch(settings.positionType){
@@ -292,10 +292,10 @@
 						var anchoredPositionX = anchoredPositions.left + settings.positionLeft;
 						var anchoredPositionY = anchoredPositions.top + settings.positionTop;
 						$DOMWindow.css({'top':anchoredPositionY + 'px','left':anchoredPositionX+'px'});
-								
+
 					break;
 				}
-				
+
 				$(window).bind('scroll.DOMWindow',function(){
 					if(settings.overlay){sizeOverlay();}
 					if(shortcut.isIE6){sizeIE6Iframe();}
@@ -308,12 +308,12 @@
 					if(settings.overlay){sizeOverlay();}
 					if(settings.positionType == 'centered'){centerDOMWindow();}
 				});
-				
+
 				switch(settings.windowSource){
 					case 'inline'://////////////////////////////// inline //////////////////////////////////////////
 						$DOMWindow.append($(settings.windowSourceID).children());
 						$DOMWindow.unload(function(){// move elements back when you're finished
-							$(settings.windowSourceID).append($DOMWindow.children());				
+							$(settings.windowSourceID).append($DOMWindow.children());
 						});
 						showDOMWindow();
 					break;
@@ -323,7 +323,7 @@
 					break;
 					case 'ajax'://////////////////////////////// ajax //////////////////////////////////////////
 						if(settings.windowHTTPType == 'post'){
-							
+
 							if(settings.windowSourceURL.indexOf("?") !== -1){//has a query string
 								urlOnly = settings.windowSourceURL.substr(0, settings.windowSourceURL.indexOf("?"));
 								urlQueryObject = urlQueryToObject(settings.windowSourceURL);
@@ -345,25 +345,25 @@
 						}
 					break;
 				}
-				
+
 			}//end if anchored, or absolute, fixed, centered
-			
+
 		};//end run()
-		
+
 		if(settings.eventType){//if used with $().
-			return this.each(function(index){				  
+			return this.each(function(index){
 				$(this).bind(settings.eventType,function(){
 					run(this);
 					return false;
 				});
-			});	
+			});
 		}else{//else called as $.function
 			run();
 		}
-		
+
 	};//end function openDOMWindow
-	
+
 	//allow for public call, pass settings
 	$.openDOMWindow = function(s){$.fn.openDOMWindow(s);};
-	
+
 })(jQuery);

+ 11 - 0
sites/all/modules/contrib/fields/video_embed_field/.rej

@@ -0,0 +1,11 @@
+--- video_embed_field.handlers.inc
++++ video_embed_field.handlers.inc
+@@ -195,7 +195,7 @@ function video_embed_field_handle_youtube($url, $settings) {
+ 
+   // Construct the embed code.
+   $settings['wmode'] = 'opaque';
+-  $settings_str = urlencode(_video_embed_code_get_settings_str($settings));
++  $settings_str = _video_embed_code_get_settings_str($settings);
+ 
+   $output['#markup'] = '<iframe class="' . check_plain($class) . '" width="' . check_plain($settings['width']) . '" height="' . check_plain($settings['height']) . '" src="//www.youtube.com/embed/' . $id . '?' . $settings_str . '" frameborder="0" allowfullscreen></iframe>';
+ 

+ 1 - 1
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.handlers.inc

@@ -195,7 +195,7 @@ function video_embed_field_handle_youtube($url, $settings) {
 
   // Construct the embed code.
   $settings['wmode'] = 'opaque';
-  $settings_str = urlencode(_video_embed_code_get_settings_str($settings));
+  $settings_str = _video_embed_code_get_settings_str($settings);
 
   $output['#markup'] = '<iframe class="' . check_plain($class) . '" width="' . check_plain($settings['width']) . '" height="' . check_plain($settings['height']) . '" src="//www.youtube.com/embed/' . $id . '?' . $settings_str . '" frameborder="0" allowfullscreen></iframe>';
 

+ 1 - 1
sites/all/modules/contrib/fields/video_embed_field/video_embed_field.module

@@ -617,7 +617,7 @@ function _video_embed_code_get_settings_str($settings = array()) {
       $values[] = $name;
     }
     else {
-      $values[] = $name . '=' . $value;
+      $values[] = $name . '=' . urlencode($value);
     }
   }
 

+ 11 - 4
sites/all/modules/figureslibres/clameursmod/clameursmod.js

@@ -70,11 +70,18 @@
         width:w,
         height:h,
         windowSourceID:"#videoframe",
-        functionCallOnClose:true,
-        functionCallAfterClose:function(){
-          $('#videoframe').remove();
-        }
+        // functionCallOnClose:function(){
+        //   console.log('overlay closed');
+        //   $('#videoframe').remove();
+        // },
+        // functionCallAfterClose:function(){
+        //   console.log('overlay closed');
+        //   $('#videoframe').remove();
+        // }
       });
+
+      // autoplay vid youtube
+      // see patch https://www.drupal.org/node/2685721#comment-11032685
     };
 
     function onCloseOverlay(){

+ 1 - 1
sites/all/modules/figureslibres/clameursmod/clameursmod.module

@@ -33,7 +33,7 @@ function _clameursmod_getemvidfield(){
   $data['test'] = "OK";
   $data['src'] = $_GET['src'];
 
-  $data['embed'] = theme('video_embed_field_embed_code', array('url'=>$data['src']));
+  $data['embed'] = theme('video_embed_field_embed_code', array('url'=>$data['src'], 'style'=>'normal'));
 
   drupal_json_output($data);
 }

+ 3 - 2
sites/all/themes/figureslibres/clameurs/css/dist/styles.css

@@ -81,7 +81,8 @@ input {
   #header h2 {
     text-align: center;
     color: #20c498;
-    font-size: 1em; }
+    font-size: 1em;
+    font-weight: 500; }
     @media only screen and (min-width: 62.5625em) {
       #header h2 {
         font-size: 2em; } }
@@ -385,7 +386,7 @@ input {
               display: block; } }
           .node-thematique .content article.main .field-name-body .value p {
             font-size: 1em;
-            padding: 1em 1em 0;
+            padding: 1em 1em 0 1.5em;
             line-height: 1.3;
             margin: 0;
             background-color: #fff; }

+ 2 - 1
sites/all/themes/figureslibres/clameurs/css/styles.scss

@@ -146,6 +146,7 @@ $header_height_large:400px;
 		text-align: center;
 		color:$vert;
 		font-size: 1em;
+    font-weight: 500;
 		@media #{$large-up} {
 			font-size: 2em;
 		}
@@ -442,7 +443,7 @@ $header_height_large:400px;
 					background-color: #fff;
 					overflow: hidden;
 					p{
-						font-size: 1em; padding: 1em 1em 0; line-height: 1.3; margin:0;
+						font-size: 1em; padding: 1em 1em 0 1.5em; line-height: 1.3; margin:0;
             background-color: #fff;
 					}
 				}

BIN
sites/all/themes/figureslibres/clameurs/images/logo.png


File diff suppressed because it is too large
+ 14 - 6
sites/all/themes/figureslibres/clameurs/images/logo.svg