Plugin accordion JQuery
commit
7a6b5bb551
@ -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,8 @@
|
||||
--- # callback pour <accordion> !spip.yaml
|
||||
|
||||
accordion:
|
||||
# raccourci <quote>
|
||||
match: ['<accordeon>', '</accordeon>']
|
||||
replace: ['<div class="spip_accordeon">', '</div>']
|
||||
if_str: '<accordeon>'
|
||||
type: str
|
Loading…
Reference in New Issue