- Simplifier l'appel à TextWheel avec le fichier d'options pour déclarer le yaml en global plutot qu'un prepropre

- Le yaml est plus précis
- Up de Z
svn/attic/accordion/107716
toutati@free.fr 7 years ago
parent 50ffd7f814
commit ce3b8ae746

1
.gitattributes vendored

@ -1,4 +1,5 @@
* text=auto !eol
/accordion_options.php -text
/accordion_pipelines.php -text
css/spip_accordion.css -text
images/accordion.png -text

@ -0,0 +1,7 @@
<?php
if (!defined('_ECRIRE_INC_VERSION')) {
return;
}
$GLOBALS['spip_wheels']['raccourcis'][] = 'accordeon.yaml';

@ -4,19 +4,6 @@ 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;

@ -1,7 +1,7 @@
<paquet
prefix="accordion"
categorie="outil"
version="1.0.2"
version="1.0.3"
etat="test"
compatibilite="[3.1.0;3.1.*]"
logo="images/accordion.png"
@ -18,5 +18,4 @@
<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>

@ -1,7 +1,7 @@
--- # callback pour <accordion> !spip.yaml
--- # callback pour <accordeon> !spip.yaml
accordion:
# raccourci <quote>
accordeon:
# raccourci <accordeon>
match: ['<accordeon>', '</accordeon>']
replace: ['<div class="spip_accordeon">', '</div>']
if_str: '<accordeon>'

Loading…
Cancel
Save