Changeset 93771 in spip-zone


Ignore:
Timestamp:
Dec 17, 2015, 11:17:47 PM (4 years ago)
Author:
p@…
Message:

Simplifier le pipeline javascript

Location:
_plugins_/foundation_6/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/foundation_6/trunk/foundation_6_pipelines.php

    r93757 r93771  
    1717function foundation_6_insert_head ($flux) {
    1818  include_spip('inc/foundation');
    19   return foundation_get_js($flux);
     19
     20  // Si on est en mode app, on revoie le bon squelette
     21  if (_FOUNDATION_SASS) {
     22    $flux .= recuperer_fond('inclure/head-foundation-app');
     23  }
     24  else {
     25    $flux .= recuperer_fond('inclure/head-foundation');
     26  }
     27
     28  return $flux;
    2029}
    2130
  • _plugins_/foundation_6/trunk/inc/foundation.php

    r93756 r93771  
    2121}
    2222
    23 
    24 /**
    25  * Récupération des fichier javascript de foundation
    26  */
    27 function foundation_get_js($flux = '') {
    28 
    29   // On lit la configuration du plugin pour savoir quel version de Foundation charger.
    30   $config = lire_config('foundation');
    31 
    32   // Si on est en mode app, on revoie le bon squelette
    33   if (_FOUNDATION_SASS) {
    34       $flux .= recuperer_fond('inclure/head-foundation-app');
    35   }
    36   else {
    37       // On renvoie le flux head avec le squelette foundation correspondant.
    38       if ($config['variante'] == '3')
    39           $flux .= recuperer_fond('inclure/head-foundation-3');
    40       elseif ($config['variante'] == '4')
    41           $flux .= recuperer_fond('inclure/head-foundation-4');
    42       elseif ($config['variante'] == '5')
    43           $flux .= recuperer_fond('inclure/head-foundation-5');
    44       // Si foundation est désactivé, on revoie directement le flux,
    45       // sans aller chercher le head-foundation.
    46       else
    47           return $flux;
    48   }
    49 
    50   // Charger le head commun a foundation
    51   $flux .= recuperer_fond('inclure/head-foundation');
    52 
    53   return $flux;
    54 }
    5523
    5624/**
Note: See TracChangeset for help on using the changeset viewer.