Changeset 105911 in spip-zone
- Timestamp:
- Aug 23, 2017, 4:38:28 PM (4 years ago)
- Location:
- _plugins_/foundation_6/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/foundation_6/trunk/inc/foundation.php
r102933 r105911 61 61 } 62 62 } 63 64 /** 65 * Utiliser jQl pour charger les scripts de foundation 66 * 67 * @param array $files les fichiers à envoyée dans jQl 68 * @access public 69 */ 70 function jQlfoundation($files) { 71 $js = ''; 72 73 // Dans le cas ou jQl n'est pas activé pour tout les scripts 74 if (!defined('_JS_ASYNC_LOAD') and !test_espace_prive()) { 75 // On cherche dans un premier temps si jQl existe 76 lire_fichier(find_in_path('lib/jQl/jQl.min.js'), $jQl); 77 if ($jQl) { 78 // Inclure les librairie utile du compresseur 79 include_spip('inc/compresseur_concatener'); 80 include_spip('inc/compresseur_minifier'); 81 82 // traitement des fichiers, on concatène et minifie le tout 83 $foundation_js = concatener_fichiers($files); 84 $foundation_js = minifier($foundation_js[0]); 85 86 // charger et utiliser jQl sur les fichiers de foundation 87 $js = "<script type=\"text/javascript\">\n".$jQl."\n"; 88 $js .= 'jQl.loadjQ("'.trim($foundation_js).'");'."\n"; 89 $js .= '</script>'; 90 } 91 } elseif (defined('_JS_ASYNC_LOAD') and !test_espace_prive()) { 92 // Dans le cas ou jQl est activé pour tout les scripts, on va simplement 93 // les référencés de manière "classique" pour qu'ils soit intégrer par 94 // le compresseur. 95 foreach ($files as $file) { 96 $js .= '<script type="text/javascript" src="'.trim($file).'"/>'; 97 } 98 } 99 100 return $js; 101 } -
_plugins_/foundation_6/trunk/inclure/head-foundation-app.html
r101654 r105911 2 2 [(#CONFIG{foundation_6/javascript}|oui) 3 3 4 [(#SPIP_VERSION|floatval|>={3.1}|oui) 5 6 [(#REM) 7 Trouver le fichier foundation.js 8 ] 9 [(#CHEMIN{bower_components/foundation-sites/dist/js/foundation.js}|?{ 10 [(#SET{foundationjs,[(#CHEMIN{bower_components/foundation-sites/dist/js/foundation.js}|timestamp)]})], 11 [(#SET{foundationjs,[(#CHEMIN{bower_components/foundation-sites/dist/foundation.js}|timestamp)]})] 12 })] 13 14 [(#REM) 15 Trouver l'emplacement de what-input.js 16 ] 17 [(#CHEMIN{bower_components/what-input/what-input.min.js}|?{ 18 [(#SET{whatinpujs, [(#CHEMIN{bower_components/what-input/what-input.min.js}|timestamp)]})], 19 [(#SET{whatinpujs, [(#CHEMIN{bower_components/what-input/dist/what-input.min.js}|timestamp)]})] 20 })] 21 22 [(#LISTE{ 23 #GET{whatinpujs}, 24 #GET{foundationjs}, 25 [(#CHEMIN{lib/foundation-6/js/app.js}|timestamp)], 26 [(#CHEMIN{javascript/spip.foundation.js}|timestamp)] 27 }|jQlfoundation)] 28 ] 29 30 [(#SPIP_VERSION|floatval|>={3.1}|non) 4 31 [(#CHEMIN{bower_components/foundation-sites/dist/js/foundation.js}|?{ 5 32 [<script src="(#CHEMIN{bower_components/foundation-sites/dist/js/foundation.js})" type="text/javascript"></script>], … … 18 45 </script> 19 46 ] 47 48 ] -
_plugins_/foundation_6/trunk/inclure/head-foundation.html
r101652 r105911 1 1 [(#REM) Inclusion des fichier Javascript si la config le permet ] 2 2 [(#CONFIG{foundation_6/javascript}|oui) 3 [<script src="(#CHEMIN{lib/foundation-6/js/vendor/foundation.js})" type="text/javascript"></script>] 4 <script type="text/javascript"> 5 // Charger les scripts foundations 6 $(function () { 7 $.getScript("[(#CHEMIN{lib/foundation-6/js/vendor/what-input.js}|timestamp)]"); 8 $.getScript("[(#CHEMIN{lib/foundation-6/js/app.js}|timestamp)]"); 9 $.getScript("[(#CHEMIN{javascript/spip.foundation.js}|timestamp)]"); 10 }); 11 </script> 3 4 [(#SPIP_VERSION|floatval|>={3.1}|oui) 5 [(#LISTE{ 6 [(#CHEMIN{lib/foundation-6/js/vendor/what-input.js}|timestamp)], 7 [(#CHEMIN{lib/foundation-6/js/vendor/foundation.js}|timestamp)], 8 [(#CHEMIN{lib/foundation-6/js/app.js}|timestamp)], 9 [(#CHEMIN{javascript/spip.foundation.js}|timestamp)] 10 }|jQlfoundation)] 12 11 ] 12 13 [(#REM) 14 jQl n'est présent qu'en SPIP 3.1, donc il faut tester la version de SPIP 15 ] 16 17 [(#SPIP_VERSION|floatval|>={3.1}|non) 18 [<script src="(#CHEMIN{lib/foundation-6/js/vendor/foundation.js})" type="text/javascript"></script>] 19 <script type="text/javascript"> 20 // Charger les scripts foundations 21 $(function () { 22 $.getScript("[(#CHEMIN{lib/foundation-6/js/vendor/what-input.js}|timestamp)]"); 23 $.getScript("[(#CHEMIN{lib/foundation-6/js/app.js}|timestamp)]"); 24 $.getScript("[(#CHEMIN{javascript/spip.foundation.js}|timestamp)]"); 25 }); 26 </script> 27 ] 28 29 ] -
_plugins_/foundation_6/trunk/paquet.xml
r105857 r105911 2 2 prefix="foundation_6" 3 3 categorie="outil" 4 version="6. 3.10"4 version="6.4.10" 5 5 etat="stable" 6 6 compatibilite="[3.0.0;3.2.*]"
Note: See TracChangeset
for help on using the changeset viewer.