Plugin accordion JQuery

svn/attic/accordion/107716
toutati@free.fr 7 years ago
commit 7a6b5bb551

6
.gitattributes vendored

@ -0,0 +1,6 @@
* text=auto !eol
/accordion_pipelines.php -text
images/accordion.png -text
lang/paquet-accordion_fr.php -text
/paquet.xml -text
wheels/accordeon.yaml -text

@ -0,0 +1,36 @@
<?php
if (!defined('_ECRIRE_INC_VERSION')){
return;
}
function accordion_pre_propre($letexte) {
$GLOBALS['spip_wheels']['accordeon'] = array(
'accordeon.yaml'
);
static $wheel = null;
if (!isset($wheel)) {
$wheel = new TextWheel(
SPIPTextWheelRuleset::loader($GLOBALS['spip_wheels']['accordeon'])
);
}
return $wheel->text($letexte);
}
function accordion_jqueryui_plugins($plugins){
$plugins[] = "jquery.ui.accordion";
return $plugins;
}
function accordion_insert_head($flux) {
$flux .="<script>$(document).ready(function(){
$( '.spip_accordeon' ).accordion({
header: 'h3',
active: false,
heightStyle: 'content',
collapsible: true
});
});
</script>";
return $flux;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -0,0 +1,14 @@
<?php
// This is a SPIP language file -- Ceci est un fichier langue de SPIP
if (!defined('_ECRIRE_INC_VERSION')) {
return;
}
$GLOBALS[$GLOBALS['idx_lang']] = array(
// A
'accordion_description' => 'Utilisez accordion de JQueryUI dans votre contenu avec le raccourci accordeon et les intertitres SPIP.',
'accordion_nom' => 'Raccourci Accordéon',
'accordion_slogan' => 'Des paragraphes repliables en accordéon',
);

@ -0,0 +1,21 @@
<paquet
prefix="accordion"
categorie="outil"
version="1.0.0"
etat="test"
compatibilite="[3.1.0;3.1.*]"
logo="images/accordion.png"
>
<nom>Raccourci~accordeon</nom>
<auteur lien="http://elastick.net">Anne-Lise Martenot</auteur>
<credit>Arno*</credit>
<licence lien="http://www.gnu.org/licenses/gpl-3.0.html">GNU/GPL</licence>
<copyright>2016</copyright>
<pipeline nom="jqueryui_plugins" inclure="accordion_pipelines.php" />
<pipeline nom="insert_head" inclure="accordion_pipelines.php" />
<pipeline nom="header_prive" action="insert_head" inclure="accordion_pipelines.php" />
<pipeline nom="pre_propre" inclure="accordion_pipelines.php" />
</paquet>

@ -0,0 +1,8 @@
--- # callback pour <accordion> !spip.yaml
accordion:
# raccourci <quote>
match: ['<accordeon>', '</accordeon>']
replace: ['<div class="spip_accordeon">', '</div>']
if_str: '<accordeon>'
type: str
Loading…
Cancel
Save