Changeset 106636 in spip-zone
- Timestamp:
- Oct 9, 2017, 9:34:33 AM (3 years ago)
- Location:
- _plugins_/blocsdepliables
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/blocsdepliables/blocsdepliables_pipelines.php
r104699 r106636 59 59 60 60 function blocsdepliables_callback($matches) { 61 list($titre, $corps) = preg_split(',(\n\n|\r\n\r\n|\r\r),', trim($matches[3]), 2);61 list($titre, $corps) = array_pad(preg_split(',(\n\n|\r\n\r\n|\r\r),', trim($matches[3]), 2), 2, null); 62 62 // pas de corps ! 63 63 if (!strlen($corps = trim($corps))) { -
_plugins_/blocsdepliables/js/blocs.js
r104699 r106636 142 142 if(deplies) 143 143 jQuery(deplies).blocs_replie_tout().blocs_toggle(); 144 jQuery(window). bind('unload', function() {144 jQuery(window).on('unload', function() { 145 145 jQuery.cookie(blocs_cookie_name, blocs_deplies()); 146 146 }); … … 187 187 // Si un bloc contient une pagination inseree dans un bloc, 188 188 // code JS a inserer dans le header de votre squelette APRES les appels du Couteau Suisse : 189 jQuery( document).ready(function() {189 jQuery(function($) { 190 190 if(blocs_pagination!==false) { 191 jQuery('div.cs_bloc' + blocs_pagination + ' .blocs_titre').eq(0).click();191 $('div.cs_bloc' + blocs_pagination + ' .blocs_titre').eq(0).click(); 192 192 window.location.hash = '#pagination' + blocs_pagination; 193 193 } … … 208 208 // le clic sur un point de suite cliquable de la balise #INTRODUCTION produit l'ouverture du bloc. 209 209 // code JS a inserer dans le header de votre squelette APRES les appels du Couteau Suisse : 210 jQuery( document).ready(function(){211 jQuery('.blocs_resume>a.pts_suite')210 jQuery(function($){ 211 $('.blocs_resume>a.pts_suite') 212 212 .click( function(){ 213 jQuery(this).parents('.cs_blocs:first').children('.blocs_titre')213 $(this).parents('.cs_blocs:first').children('.blocs_titre') 214 214 .blocs_replie_tout().blocs_toggle(); 215 215 // annulation du clic … … 224 224 }; 225 225 var cs_sel_jQuery=''; 226 jQuery(function( ){227 blocs_init.apply(document);228 if(typeof onAjaxLoad=='function') onAjaxLoad(blocs_init);229 if(blocs_js_cookie && jQuery('div.cs_blocs').length) jQuery.getScript(blocs_js_cookie, cs_blocs_cookie);230 /* Quand on pointe vers une ancre qui est à l'intérieur d'un bloc, on231 déplie le bloc */232 var ancre = location.hash.substring(1);233 if (ancre) {234 $('.cs_blocs').has('[name="' + ancre + '"]')235 .find('.blocs_titre.blocs_replie').blocs_toggle();236 $('.cs_blocs').has('#' + ancre)237 .find('.blocs_titre.blocs_replie').blocs_toggle();238 location = location;239 }226 jQuery(function($){ 227 blocs_init.apply(document); 228 if(typeof onAjaxLoad=='function') onAjaxLoad(blocs_init); 229 if(blocs_js_cookie && $('div.cs_blocs').length) $.getScript(blocs_js_cookie, cs_blocs_cookie); 230 /* Quand on pointe vers une ancre qui est à l'intérieur d'un bloc, on 231 déplie le bloc */ 232 var ancre = location.hash.substring(1); 233 if (ancre) { 234 $('.cs_blocs').has('[name="' + ancre + '"]') 235 .find('.blocs_titre.blocs_replie').blocs_toggle(); 236 $('.cs_blocs').has('#' + ancre) 237 .find('.blocs_titre.blocs_replie').blocs_toggle(); 238 location = location; 239 } 240 240 }); -
_plugins_/blocsdepliables/paquet.xml
r105045 r106636 2 2 prefix="blocsdepliables" 3 3 categorie="edition" 4 version="1.2. 1"4 version="1.2.2" 5 5 etat="stable" 6 compatibilite="[3.0.0;3. 1.*]"6 compatibilite="[3.0.0;3.2.*]" 7 7 logo="prive/themes/spip/images/blocsdepliables-64.png" 8 8 documentation="https://contrib.spip.net/Des-blocs-depliables"
Note: See TracChangeset
for help on using the changeset viewer.