Browse Source

- A l'installation on ajoute la config header_prive qui permet d'utiliser les modeles dans l'espace privé

- On déplace les styles css des modèles dans une feuille a part owl.modeles.css
- correction sur les css du video player
- correction sur l'intitulé de config pour l'export de config

+z
svn/root/tags/v1.0.21
arnaud.berard@mister-graphx.com 4 years ago
parent
commit
dc64ce835b
  1. 39
      css/owl.modeles.css
  2. 46
      modeles/article_owl.html
  3. 29
      noisettes/owl-video-player.html
  4. 7
      owlcarousel_administrations.php
  5. 4
      owlcarousel_pipelines.php
  6. 2
      paquet.xml

39
css/owl.modeles.css

@ -0,0 +1,39 @@
/* Modele article_owl */
.article_owl .owl-slide > .caption{
z-index: 100;
position: absolute;
left:55%;
width: 40%;
bottom:5%;
}
.article_owl .owl-slide > .caption > .title{
background: #000;
color : #FFF;
padding: 5px;
width: auto;
}
.article_owl .owl-slide > .caption > p {
background-color: rgba(88, 88, 88, 0.75) ;
color: #FFF;
padding: 5px;
}
/* Owl VideoPlayer */
.owl-video-player .owl-slide {
display: block;
width: 100%;
margin: 0 auto;
}
.owl-video-player .video_thumbs .owl-slide {
display: inline-block;
padding:.5em;
border: 1px solid black;
border-radius: 3px;
margin-right: .5em;
}
.owl-video-player .video_thumbs .owl-slide:hover,
.owl-video-player .video_thumbs .owl-slide.active {
border: 1px solid silver;
}
.owl-video-player .video_thumbs .owl-slide > a {
display: block;
}

46
modeles/article_owl.html

@ -17,42 +17,20 @@ Insertion du modele <articleX|owl>
@param animateOut - une animation css3 , `fadeOut` est la seul fournie par owl, sinon ajouter animate.css
-->]
<style>
[#(#ENV{id-carousel,demo})] .owl-slide > .caption{
z-index: 100;
position: absolute;
left:55%;
width: 40%;
bottom:5%;
}
[#(#ENV{id-carousel,demo})] .owl-slide > .caption > .title{
background: #000;
color : #FFF;
padding: 5px;
width: auto;
}
[#(#ENV{id-carousel,demo})] .owl-slide > .caption > p {
background-color: rgba(88, 88, 88, 0.75) ;
/*float: right;*/
color: #FFF;
padding: 5px;
}
</style>
[(#REM) <!-- Diaporama -->]
<div id="#ENV{id-carousel,demo}" class="owl-carousel owl-theme">
<BOUCLE_listDocs(DOCUMENTS){id_article?}{id_document==^((#ENV{docs}|replace{',',|}|sinon{.*}))$}{extension==jpg|png|gif}>
<div class="owl-slide"[ (#ENV{URLhashListener}|=={true}|oui)data-hash="#ENV{id-carousel,demo}#ID_DOCUMENT"]>
[(#ENV{caption,oui}|=={oui}|oui)
<div class="caption[ (#ENV{caption_css})]">[
<h3 class="title">(#TITRE)</h3>][
<p class="hidden-phone">(#DESCRIPTIF|textebrut)</p>]</div>]
<a href="#FICHIER" class="mediabox"[ rel="diaporama(#ENV{id-carousel,demo})"][ title="(#TITRE|attribut_html|couper{80})"]>
<img [(#ENV{lazyLoad}|=={true}|oui)class="owl-lazy" data-]src="[(#FICHIER|image_reduire{650,450}|extraire_attribut{src})]" alt="[(#TITRE|textebrut)]">
</a>
</div>
</BOUCLE_listDocs>
<div id="#ENV{id-carousel,demo}" class="article_owl owl-carousel owl-theme">
<BOUCLE_listDocs(DOCUMENTS){id_article?}{id_document==^((#ENV{docs}|replace{',',|}|sinon{.*}))$}{extension==jpg|png|gif}>
<div class="owl-slide"[ (#ENV{URLhashListener}|=={true}|oui)data-hash="#ENV{id-carousel,demo}#ID_DOCUMENT"]>
[(#ENV{caption,oui}|=={oui}|oui)
<div class="caption[ (#ENV{caption_css})]">[
<h3 class="title">(#TITRE)</h3>][
<p class="hidden-phone">(#DESCRIPTIF|textebrut)</p>]</div>]
<a href="#FICHIER" class="mediabox"[ rel="diaporama(#ENV{id-carousel,demo})"][ title="(#TITRE|attribut_html|couper{80})"]>
<img [(#ENV{lazyLoad}|=={true}|oui)class="owl-lazy" data-]src="[(#FICHIER|image_reduire{650,450}|extraire_attribut{src})]" alt="[(#TITRE|textebrut)]">
</a>
</div>
</BOUCLE_listDocs>
</div>
<script type="text/javascript">
jQuery(function($){
$("[#(#ENV{id-carousel,demo})]").owlCarousel({

29
noisettes/owl-video-player.html

@ -18,33 +18,8 @@ VideoPlayer avec Owl Carousel et oembed
@todo - Corriger : en mode touch/drag le player vidéo n'est pas détruit du coup plusieurs vidéos peuvent jouer en mm temps
-->]
#SET{id-carousel, #ENV{id-carousel,owlvideoplayer} }
<style>
[#(#GET{id-carousel})] .owl-stage-outer {
/*height: 40rem;*/
}
[#(#GET{id-carousel})] .owl-slide {
display: block;
width: 100%;
margin: 0 auto;
}
.video_thumbs .owl-slide {
display: inline-block;
padding:.5em;
border: 1px solid black;
border-radius: 3px;
margin-right: .5em;
}
.video_thumbs .owl-slide:hover,
.video_thumbs .owl-slide.active {
border: 1px solid silver;
}
.video_thumbs .owl-slide > a {
display: block;
}
</style>
[(#REM) <!-- Active item -->]
<div class="owl-video-player">
<div id="#GET{id-carousel}" class="owl-carousel owl-theme">
<BOUCLE_listDocs(DOCUMENTS spip_documents_liens){objet ?}{id_objet ?}{id_document ?}
{media=video}
@ -75,7 +50,7 @@ VideoPlayer avec Owl Carousel et oembed
</div>
</div>
</B_docs>
</div>
<script>
jQuery(function($){
var mainCarousel = $("[#(#GET{id-carousel})]");

7
owlcarousel_administrations.php

@ -9,14 +9,15 @@ function owlcarousel_upgrade($nom_meta_base_version, $version_cible) {
$maj = array();
$config = array(
'css' => 'on'
'css' => 'on',
'header_prive'=> 'on'
);
// Tableau de la configuration par défaut
$maj['0.0.1'] = array(
array('ecrire_config', 'owlcarousel', $config)
);
// Maj du plugin.
include_spip('base/upgrade');
maj_plugin($nom_meta_base_version, $version_cible, $maj);
@ -29,4 +30,4 @@ function owlcarousel_vider_tables($nom_meta_base_version) {
// Supprimer les méta, ou oublie pas celle de la base.
effacer_meta('owlcarousel');
effacer_meta($nom_meta_base_version);
}
}

4
owlcarousel_pipelines.php

@ -13,6 +13,7 @@ function owlcarousel_insert_head_css($flux){
if(lire_config('owlcarousel/css', 0)){
$flux.='<link rel="stylesheet" type="text/css" href="'.find_in_path('css/owl.carousel.css').'" media="screen" />'."\n";
$flux.='<link rel="stylesheet" type="text/css" href="'.find_in_path('css/owl.theme.css').'" media="screen" />'."\n";
$flux.='<link rel="stylesheet" type="text/css" href="'.find_in_path('css/owl.modeles.css').'" media="screen" />'."\n";
}
return $flux;
}
@ -27,6 +28,7 @@ function owlcarousel_header_prive($flux){
if(lire_config('owlcarousel/header_prive', 0)){
$flux.='<link rel="stylesheet" type="text/css" href="'.find_in_path('css/owl.carousel.css').'" media="screen" />'."\n";
$flux.='<link rel="stylesheet" type="text/css" href="'.find_in_path('css/owl.theme.css').'" media="screen" />'."\n";
$flux.='<link rel="stylesheet" type="text/css" href="'.find_in_path('css/owl.modeles.css').'" media="screen" />'."\n";
$flux = owlcarousel_insert_head($flux);
}
return $flux;
@ -37,7 +39,7 @@ function owlcarousel_header_prive($flux){
* http://contrib.spip.net/Importeur-Exporteur-de-configurations-documentation#reply460680
*/
function owlcarousel_ieconfig_metas($table){
$table['owlcarousel']['titre'] = _T('owlcarousel:cfg_titre_owlcarousel');
$table['owlcarousel']['titre'] = _T('owlcarousel:cfg_titre_page_configurer_owlcarousel');
$table['owlcarousel']['icone'] = 'prive/themes/spip/images/owlcarousel-16.png';
$table['owlcarousel']['metas_serialize'] = 'owlcarousel';
return $table;

2
paquet.xml

@ -1,7 +1,7 @@
<paquet
prefix="owlcarousel"
categorie="multimedia"
version="1.0.14"
version="1.0.15"
schema="0.0.1"
etat="test"
compatibilite="[3.0.5;3.2.*]"

Loading…
Cancel
Save