Changeset 89034 in spip-zone for _plugins_/gisban


Ignore:
Timestamp:
May 4, 2015, 1:29:30 PM (5 years ago)
Author:
laurent@…
Message:

Suppression des surcharges GIS. Utilisation du pipeline recuperer_fond

Location:
_plugins_/gisban
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/gisban/.hg_archival.txt

    r88937 r89034  
    11repo: 837a0848a67742d6ff2c3dcd58eef442dd74c4d3
    2 node: af08ad5250e527465b6e432811fc79aca95ecc17
     2node: 67d979948adb487d11b3766f10109dfcdd188e2f
    33branch: default
    44latesttag: null
    5 latesttagdistance: 3
     5latesttagdistance: 4
  • _plugins_/gisban/gisban_pipelines.php

    r88937 r89034  
    2525    return $flux;
    2626}
     27
     28
     29/**
     30 * Ajouter le module leaflet.photon.js dans les javascripts chargés
     31 *
     32 * @param $flux
     33 * @return mixed
     34 */
     35function gisban_recuperer_fond($flux){
     36    if ($flux['args']['fond'] == 'modeles/carte_gis') {
     37        $modele = recuperer_fond('inclure/inc-carte-gisban', $flux['data']['contexte']);
     38        $flux['data']['texte'] .= "\n" . $modele;
     39    }
     40    if ($flux['args']['fond'] == 'javascript/gis.js') {
     41        $ajouts = "var filter_gisban = '". lire_config('gisban/filtre_gisban') ."';\n";
     42        $ajouts .= "\n" . spip_file_get_contents(find_in_path('lib/leaflet.photon/leaflet.photon.js'));
     43        $flux['data']['texte'] .= $ajouts;
     44    }
     45    return $flux;
     46}
    2747?>
  • _plugins_/gisban/paquet.xml

    r88937 r89034  
    22    prefix="gisban"
    33    categorie="divers"
    4     version="0.0.1"
     4    version="0.0.2"
    55    etat="test"
    66    compatibilite="[3.0.0;3.1.*]"
     
    2424    <pipeline nom="header_prive" inclure="gisban_pipelines.php" />
    2525    <pipeline nom="insert_head_css" inclure="gisban_pipelines.php" />
     26    <pipeline nom="recuperer_fond" inclure="gisban_pipelines.php" />
    2627
    2728</paquet>
Note: See TracChangeset for help on using the changeset viewer.