diff --git a/sites/all/modules/features/clameurs/clameurs.features.field_instance.inc b/sites/all/modules/features/clameurs/clameurs.features.field_instance.inc index aa8a0ec3..f42b39c0 100644 --- a/sites/all/modules/features/clameurs/clameurs.features.field_instance.inc +++ b/sites/all/modules/features/clameurs/clameurs.features.field_instance.inc @@ -289,15 +289,14 @@ function clameurs_field_default_field_instances() { 'display' => array( 'accueil' => array( 'label' => 'hidden', - 'module' => 'video_embed_field_overlay', + 'module' => 'video_embed_field', 'settings' => array( 'description' => 1, + 'description_position' => 'bottom', + 'image_link' => 'source', 'image_style' => 'video_thumb_docu', - 'overlay' => 'dom-window', - 'show_thumbnail' => 1, - 'video_style' => 'normal', ), - 'type' => 'video_embed_field_overlay', + 'type' => 'video_embed_field_thumbnail', 'weight' => 5, ), 'default' => array( @@ -457,15 +456,14 @@ function clameurs_field_default_field_instances() { 'display' => array( 'accueil' => array( 'label' => 'hidden', - 'module' => 'video_embed_field_overlay', + 'module' => 'video_embed_field', 'settings' => array( 'description' => 1, + 'description_position' => 'bottom', + 'image_link' => 'source', 'image_style' => 'video_thumb_episode', - 'overlay' => 'dom-window', - 'show_thumbnail' => 1, - 'video_style' => 'normal', ), - 'type' => 'video_embed_field_overlay', + 'type' => 'video_embed_field_thumbnail', 'weight' => 9, ), 'default' => array( @@ -893,15 +891,14 @@ function clameurs_field_default_field_instances() { 'display' => array( 'accueil' => array( 'label' => 'hidden', - 'module' => 'video_embed_field_overlay', + 'module' => 'video_embed_field', 'settings' => array( 'description' => 1, + 'description_position' => 'bottom', + 'image_link' => 'source', 'image_style' => 'video_thumb_themat', - 'overlay' => 'dom-window', - 'show_thumbnail' => 1, - 'video_style' => 'normal', ), - 'type' => 'video_embed_field_overlay', + 'type' => 'video_embed_field_thumbnail', 'weight' => 8, ), 'default' => array( diff --git a/sites/all/modules/figureslibres/clameursmod/clameursmod.info b/sites/all/modules/figureslibres/clameursmod/clameursmod.info index af808b47..f91bd5a8 100644 --- a/sites/all/modules/figureslibres/clameursmod/clameursmod.info +++ b/sites/all/modules/figureslibres/clameursmod/clameursmod.info @@ -2,4 +2,5 @@ name = Clameurs Mod description = module for clameurs website core = 7.x package = "Clameurs" -dependencies[] = panels +dependencies[] = video_embed_field +dependencies[] = domwindow diff --git a/sites/all/modules/figureslibres/clameursmod/clameursmod.js b/sites/all/modules/figureslibres/clameursmod/clameursmod.js new file mode 100644 index 00000000..7ef2c675 --- /dev/null +++ b/sites/all/modules/figureslibres/clameursmod/clameursmod.js @@ -0,0 +1,83 @@ +(function($) { + + Clameurs = function(){ + + function init(){ + console.log("Clameurs"); + initVideoEvents(); + } + + function initVideoEvents(){ + + $('.field-type-video-embed-field a').on('click', clickVideo); + + }; + + function clickVideo(event){ + event.preventDefault(); + console.log('Click video', this); + var vid_src = $(this).attr('href'); + console.log("vid_src", vid_src); + getEmVidField(vid_src); + return false; + }; + + function getEmVidField(src){ + $.getJSON('clameursmod/getemvidfield', + {'src':src}, + function(json){ + console.log("json loaded", json); + displayVid(json) + } + ); + }; + + function displayVid(json){ + $('#videoframe').remove(); + + $vid = $('
') + .attr('id', 'videoframe') + .append(json.embed) + .hide() + .appendTo('body'); + + var iframe = $('iframe', $vid)[0]; + + var winwidth = $(window).width(); + var winheight = $(window).height(); + console.log('win :'+winwidth+' | '+winheight); + + if (winwidth > winheight) { + var w = winwidth*0.9; + var h = w*(360/640); + }else{ + var h = winheight*0.9; + var w = h*(640/360); + } + + console.log('win :'+w+' | '+h); + + $.openDOMWindow({ + loader:0, + windowPadding:10, + overlay:1, + overlayColor:'#fff', + overlayOpacity:'90', + borderColor:'transparent', + borderSize:'0', + width:w, + height:h, + windowSourceID:"#videoframe" + }); + } + + init(); + }; + + $(document).ready(function() { + var clameurs = new Clameurs(); + }); + + + +})(jQuery); diff --git a/sites/all/modules/figureslibres/clameursmod/clameursmod.module b/sites/all/modules/figureslibres/clameursmod/clameursmod.module index abd10bde..8356dba5 100644 --- a/sites/all/modules/figureslibres/clameursmod/clameursmod.module +++ b/sites/all/modules/figureslibres/clameursmod/clameursmod.module @@ -1,21 +1,43 @@ '', -// 'page callback' => '', -// 'page arguments' => array(), -// 'access arguments' => array(''), -// 'type' => , -// 'file' => , -// ); -// -// return $items; -// } +function clameursmod_menu() { + + $items['clameursmod/getemvidfield'] = array( + 'page callback' => '_clameursmod_getemvidfield', + 'page arguments' => array(), + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, + // 'file' => , + ); + + return $items; +} + +function _clameursmod_getemvidfield(){ + $data = array(); + $data['test'] = "OK"; + $data['src'] = $_GET['src']; + + $data['embed'] = theme('video_embed_field_embed_code', array('url'=>$data['src'])); + + drupal_json_output($data); +} + /** * Implements hook_entity_info_alter(). diff --git a/sites/all/themes/figureslibres/clameurs/css/dist/styles.css b/sites/all/themes/figureslibres/clameurs/css/dist/styles.css index f7239357..c0cda09e 100755 --- a/sites/all/themes/figureslibres/clameurs/css/dist/styles.css +++ b/sites/all/themes/figureslibres/clameurs/css/dist/styles.css @@ -289,8 +289,9 @@ input { opacity: 1; background-color: rgba(255, 255, 255, 0.9); } -#DOMWindowOverlay { - background-color: #fff !important; } +#DOMWindow .embedded-video, #DOMWindow .player, #DOMWindow iframe { + width: 100%; + height: 100%; } #footer-bottom { text-align: center; } diff --git a/sites/all/themes/figureslibres/clameurs/css/styles.scss b/sites/all/themes/figureslibres/clameurs/css/styles.scss index 1642ae6c..961d4035 100755 --- a/sites/all/themes/figureslibres/clameurs/css/styles.scss +++ b/sites/all/themes/figureslibres/clameurs/css/styles.scss @@ -360,11 +360,14 @@ body{ } #DOMWindowOverlay{ - background-color: #fff!important; + // background-color: #fff!important; } #DOMWindow{ - + .embedded-video, .player ,iframe{ + width:100%; + height:100%; + } } #footer{ diff --git a/sites/all/themes/figureslibres/clameurs/js/dist/script.min.js b/sites/all/themes/figureslibres/clameurs/js/dist/script.min.js index f3427e20..894cf5f3 100755 --- a/sites/all/themes/figureslibres/clameurs/js/dist/script.min.js +++ b/sites/all/themes/figureslibres/clameurs/js/dist/script.min.js @@ -1,3 +1,3 @@ -Drupal.behaviors.init_theme=function(context){$('#messages-and-help > div.messages:not(.processed)').addClass('processed').each(function(){if($('a',this).size()||$(this).is('.error')||$(this).is('.warning')||$(this).text().length>100){$(this).prepend("X");$('span.close',this).click(function(){$(this).parent().slideUp('fast');});} -else{$(this).animate({opacity:1},5000,'linear',function(){$(this).slideUp('fast');});}});}; \ No newline at end of file +(function($){Drupal.behaviors.init_theme=function(context){$('#messages-and-help > div.messages:not(.processed)').addClass('processed').each(function(){if($('a',this).size()||$(this).is('.error')||$(this).is('.warning')||$(this).text().length>100){$(this).prepend("X");$('span.close',this).click(function(){$(this).parent().slideUp('fast');});} +else{$(this).animate({opacity:1},5000,'linear',function(){$(this).slideUp('fast');});}});};})(jQuery); \ No newline at end of file diff --git a/sites/all/themes/figureslibres/clameurs/js/script.js b/sites/all/themes/figureslibres/clameurs/js/script.js index 89b612c4..470b22ae 100755 --- a/sites/all/themes/figureslibres/clameurs/js/script.js +++ b/sites/all/themes/figureslibres/clameurs/js/script.js @@ -1,27 +1,29 @@ - -// @codekit-prepend "gui.js" +(function($) { -Drupal.behaviors.init_theme = function (context) { - // Growl-style system messages - $('#messages-and-help > div.messages:not(.processed)') - .addClass('processed') - .each(function() { - // If a message meets these criteria, we don't autoclose - // - contains a link - // - is an error or warning - // - contains a lenghthy amount of text - if ($('a', this).size() || $(this).is('.error') || $(this).is('.warning') || $(this).text().length > 100) { - $(this).prepend("X"); - $('span.close', this).click(function() { - $(this).parent().slideUp('fast'); - }); - } - else { - // This essentially adds a 3 second pause before hiding the message. - $(this).animate({opacity:1}, 5000, 'linear', function() { - $(this).slideUp('fast'); - }); - } - }); -}; + Drupal.behaviors.init_theme = function (context) { + // Growl-style system messages + $('#messages-and-help > div.messages:not(.processed)') + .addClass('processed') + .each(function() { + // If a message meets these criteria, we don't autoclose + // - contains a link + // - is an error or warning + // - contains a lenghthy amount of text + if ($('a', this).size() || $(this).is('.error') || $(this).is('.warning') || $(this).text().length > 100) { + $(this).prepend("X"); + $('span.close', this).click(function() { + $(this).parent().slideUp('fast'); + }); + } + else { + // This essentially adds a 3 second pause before hiding the message. + $(this).animate({opacity:1}, 5000, 'linear', function() { + $(this).slideUp('fast'); + }); + } + }); + }; + + +})(jQuery); diff --git a/sites/all/themes/figureslibres/clameurs/layouts/column/column.css b/sites/all/themes/figureslibres/clameurs/layouts/column/column.css index e69de29b..cbe70df4 100644 --- a/sites/all/themes/figureslibres/clameurs/layouts/column/column.css +++ b/sites/all/themes/figureslibres/clameurs/layouts/column/column.css @@ -0,0 +1,4 @@ +/* +column css +nothing need +*/ diff --git a/sites/all/themes/figureslibres/clameurs/layouts/column/column.inc b/sites/all/themes/figureslibres/clameurs/layouts/column/column.inc index e61c623a..830e5cdf 100644 --- a/sites/all/themes/figureslibres/clameurs/layouts/column/column.inc +++ b/sites/all/themes/figureslibres/clameurs/layouts/column/column.inc @@ -6,7 +6,7 @@ */ // Plugin definition. $plugin = array( - 'title' => t('Column'), + 'title' => t('1 Column clameur'), 'category' => t('Columns: 1'), 'icon' => 'column.png', 'theme' => 'panels_column',