Changeset 22702 in spip-zone


Ignore:
Timestamp:
Sep 22, 2008, 4:35:35 PM (13 years ago)
Author:
brunobergot@…
Message:

Un peu de ménage dans les URLbase, la variable est définie à l'aide de _DIR_PLUGIN_GEOMAP sinon le chemin n'est pas toujours bon (cas d'un plugin installé dans plugins/auto). Pour être bien il faudrait passer les fichier js en squelettes et utiliser des #CHEMIN pour cibler les diférents éléments...

Location:
_plugins_/_dev_/googlemap_api
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/_dev_/googlemap_api/inc_public_map.html

    r22628 r22702  
    44        }
    55        //<![CDATA[
    6         URLbase = "[(#CHEMIN{plugins}|url_absolue)]";
     6        URLbase = "[(#EVAL{_DIR_PLUGIN_GEOMAP}|url_absolue)]";
     7        URLbaseGis = "[(#EVAL{_DIR_PLUGIN_GIS}|url_absolue)]";
    78        //var numero = 1;
    89        [(#SET{id_carte_gis,#ENV{id_carte_gis,1}})]
  • _plugins_/_dev_/googlemap_api/js/customControls.js

    r17262 r22702  
    2828        });
    2929        var typeMapImg = document.createElement("img");
    30         typeMapImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlMap." + images_extension;
     30        typeMapImg.src = URLbase + "/img_pack/" + images_folder + "/ctlMap." + images_extension;
    3131        typeMapImg.style.cursor = "pointer";
    3232        typeMapImg.style.position = "absolute";
     
    3939        });
    4040        var typeSatImg = document.createElement("img");
    41         typeSatImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlSat." + images_extension;
     41        typeSatImg.src = URLbase + "/img_pack/" + images_folder + "/ctlSat." + images_extension;
    4242        typeSatImg.style.cursor = "pointer";
    4343        typeSatImg.style.position = "absolute";
     
    5050        });
    5151        var typeHybImg = document.createElement("img");
    52         typeHybImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlHyb." + images_extension;
     52        typeHybImg.src = URLbase + "/img_pack/" + images_folder + "/ctlHyb." + images_extension;
    5353        typeHybImg.style.cursor = "pointer";
    5454        typeHybImg.style.position = "absolute";
     
    7979        zoomIn.style.top= "0px";
    8080        GEvent.addDomListener(zoomIn, "click", function() {
    81                 this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomNotch." + images_extension;
     81                this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/img_pack/" + images_folder + "/ctlZoomNotch." + images_extension;
    8282                map.zoomIn();
    83                 this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomSel." + images_extension;
     83                this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/img_pack/" + images_folder + "/ctlZoomSel." + images_extension;
    8484        });
    8585        var zoomInImg = document.createElement("img");
    86         zoomInImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomIn." + images_extension;
     86        zoomInImg.src = URLbase + "/img_pack/" + images_folder + "/ctlZoomIn." + images_extension;
    8787        zoomInImg.style.cursor = "pointer";
    8888        zoomIn.appendChild(zoomInImg);
     
    9494                notchDiv[i] = document.createElement("div");
    9595                GEvent.addDomListener(notchDiv[i], "click", function() {
    96                         this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomNotch." + images_extension;
     96                        this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/img_pack/" + images_folder + "/ctlZoomNotch." + images_extension;
    9797                        map.setZoom(17 - this.zoom);
    98                         this.firstChild.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomSel." + images_extension;
     98                        this.firstChild.src = URLbase + "/img_pack/" + images_folder + "/ctlZoomSel." + images_extension;
    9999                });
    100100                notchDiv[i].zoom = i;
     
    102102                notchDiv[i].style.top= 9 + (i*9) + "px";
    103103                notchImg[i] = document.createElement("img");
    104                 notchImg[i].src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomNotch." + images_extension;
     104                notchImg[i].src = URLbase + "/img_pack/" + images_folder + "/ctlZoomNotch." + images_extension;
    105105                notchImg[i].style.cursor = "pointer";
    106106                notchDiv[i].appendChild(notchImg[i]);
     
    112112        zoomOut.style.top= "179px";
    113113        GEvent.addDomListener(zoomOut, "click", function() {
    114                 this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomNotch." + images_extension;
     114                this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/img_pack/" + images_folder + "/ctlZoomNotch." + images_extension;
    115115                map.zoomOut();
    116                 this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomSel." + images_extension;
     116                this.parentNode.childNodes[18 - map.getZoom()].firstChild.src = URLbase + "/img_pack/" + images_folder + "/ctlZoomSel." + images_extension;
    117117        });
    118118        var zoomOutImg = document.createElement("img");
    119         zoomOutImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlZoomOut." + images_extension;
     119        zoomOutImg.src = URLbase + "/img_pack/" + images_folder + "/ctlZoomOut." + images_extension;
    120120        zoomOutImg.style.cursor = "pointer";
    121121        zoomOut.appendChild(zoomOutImg);
     
    140140               
    141141        var mapMoveImgUL = document.createElement("img");
    142         mapMoveImgUL.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlTopLeft." + images_extension;
     142        mapMoveImgUL.src = URLbase + "/img_pack/" + images_folder + "/ctlTopLeft." + images_extension;
    143143        mapMoveImgUL.style.position = "absolute";
    144144        mapMoveImgUL.style.left= "7px";
     
    152152        });
    153153        var butomUpImg = document.createElement("img");
    154         butomUpImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlTop." + images_extension;
     154        butomUpImg.src = URLbase + "/img_pack/" + images_folder + "/ctlTop." + images_extension;
    155155        butomUpImg.style.cursor = "pointer";
    156156        butomUpDiv.appendChild(butomUpImg);
     
    158158               
    159159        var mapMoveImgUR = document.createElement("img");
    160         mapMoveImgUR.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlTopRight." + images_extension;
     160        mapMoveImgUR.src = URLbase + "/img_pack/" + images_folder + "/ctlTopRight." + images_extension;
    161161        mapMoveImgUR.style.position = "absolute";
    162162        mapMoveImgUR.style.left= "43px";
     
    171171        });
    172172        var butomRightImg = document.createElement("img");
    173         butomRightImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlRight." + images_extension;
     173        butomRightImg.src = URLbase + "/img_pack/" + images_folder + "/ctlRight." + images_extension;
    174174        butomRightImg.style.cursor = "pointer";
    175175        butomRightDiv.appendChild(butomRightImg);
     
    184184        });
    185185        var butomCenterImg = document.createElement("img");
    186         butomCenterImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlCenter." + images_extension;
     186        butomCenterImg.src = URLbase + "/img_pack/" + images_folder + "/ctlCenter." + images_extension;
    187187        butomCenterImg.style.cursor = "pointer";
    188188        butomCenterDiv.appendChild(butomCenterImg);
     
    197197        });
    198198        var butomLeftImg = document.createElement("img");
    199         butomLeftImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlLeft." + images_extension;
     199        butomLeftImg.src = URLbase + "/img_pack/" + images_folder + "/ctlLeft." + images_extension;
    200200        butomLeftImg.style.cursor = "pointer";
    201201        butomLeftDiv.appendChild(butomLeftImg);
     
    203203               
    204204        var mapMoveImgDL = document.createElement("img");
    205         mapMoveImgDL.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlBotLeft." + images_extension;
     205        mapMoveImgDL.src = URLbase + "/img_pack/" + images_folder + "/ctlBotLeft." + images_extension;
    206206        mapMoveImgDL.style.position = "absolute";
    207207        mapMoveImgDL.style.top= "36px";
     
    217217        });
    218218        var butomDownImg = document.createElement("img");
    219         butomDownImg.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlBot." + images_extension;
     219        butomDownImg.src = URLbase + "/img_pack/" + images_folder + "/ctlBot." + images_extension;
    220220        butomDownImg.style.cursor = "pointer";
    221221        butomDownDiv.appendChild(butomDownImg);
     
    223223               
    224224        var mapMoveImgDR = document.createElement("img");
    225         mapMoveImgDR.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/ctlBotRight." + images_extension;
     225        mapMoveImgDR.src = URLbase + "/img_pack/" + images_folder + "/ctlBotRight." + images_extension;
    226226        mapMoveImgDR.style.position = "absolute";
    227227        mapMoveImgDR.style.left= "43px";
     
    265265        div.style.position = "absolute";
    266266        var img1 = document.createElement("img");
    267         img1.src =  URLbase + "/googlemap_api/img_pack/" + images_folder + "/corner01." + images_extension;
     267        img1.src =  URLbase + "/img_pack/" + images_folder + "/corner01." + images_extension;
    268268        img1.style.position = "absolute";
    269269        img1.style.left= "0px";
    270270        div.appendChild(img1);
    271271        var img2 = document.createElement("img");
    272         img2.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/corner02." + images_extension;
     272        img2.src = URLbase + "/img_pack/" + images_folder + "/corner02." + images_extension;
    273273        img2.style.position = "absolute";
    274274        img2.style.left = (size.width - 15) + "px";
    275275        div.appendChild(img2);
    276276        var img3 = document.createElement("img");
    277         img3.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/corner03." + images_extension;
     277        img3.src = URLbase + "/img_pack/" + images_folder + "/corner03." + images_extension;
    278278        img3.style.position = "absolute";
    279279        img3.style.left = (size.width - 15) + "px";
     
    281281        div.appendChild(img3);
    282282        var img4 = document.createElement("img");
    283         img4.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/corner04." + images_extension;
     283        img4.src = URLbase + "/img_pack/" + images_folder + "/corner04." + images_extension;
    284284        img4.style.position = "absolute";
    285285        img4.style.left = "0px";
     
    305305                $("#menuses").toggle();
    306306        });
    307         imgAddress.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/libro." + images_extension;
     307        imgAddress.src = URLbase + "/img_pack/" + images_folder + "/libro." + images_extension;
    308308        imgAddress.style.cursor = "pointer";
    309309        imgAddress.style.position = "absolute";
     
    315315       
    316316        var left = document.createElement("img");
    317         left.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/left." + images_extension;
     317        left.src = URLbase + "/img_pack/" + images_folder + "/left." + images_extension;
    318318        left.style.position = "absolute";
    319319        left.style.top= "10px";
     
    322322       
    323323        var center = document.createElement("img");
    324         center.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/center." + images_extension;
     324        center.src = URLbase + "/img_pack/" + images_folder + "/center." + images_extension;
    325325        center.style.width = "290px";
    326326        center.style.height = "35px";
     
    341341        formContainer.appendChild(input);
    342342        var boton = document.createElement("img");
    343         boton.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/go." + images_extension;
     343        boton.src = URLbase + "/img_pack/" + images_folder + "/go." + images_extension;
    344344        boton.style.cursor = "pointer";
    345345        boton.style.position = "absolute";
     
    370370       
    371371        var right = document.createElement("img");
    372         right.src = URLbase + "/googlemap_api/img_pack/" + images_folder + "/right." + images_extension;
     372        right.src = URLbase + "/img_pack/" + images_folder + "/right." + images_extension;
    373373        right.style.position = "absolute";
    374374        right.style.top= "10px";
  • _plugins_/_dev_/googlemap_api/js/geomap.js

    r22634 r22702  
    4949                        if(son){
    5050                                //esta parte del codigo enbebe un obxecto flah na ventana creado con flashobject.js
    51                                 var fo = new FlashObject(URLbase + "/gis/img_pack/musicplayer.swf?autoplay=true&song_url="+son, "player_x", "17", "17", "6", "#FFFFFF");
     51                                var fo = new FlashObject(URLbaseGis + "/img_pack/musicplayer.swf?autoplay=true&song_url="+son, "player_x", "17", "17", "6", "#FFFFFF");
    5252                                fo.write("player");
    5353                        }
     
    7878                //creamos un icono para o marcador
    7979                var icono_categoria = new GIcon();
    80                 icono_categoria.image = (icon != "" ? icon : URLbase + "/gis/img_pack/correxir.png");
    81                 icono_categoria.shadow = URLbase + "/gis/img_pack/shadow.png";
     80                icono_categoria.image = (icon != "" ? icon : URLbase + "/img_pack/correxir.png");
     81                icono_categoria.shadow = URLbase + "/img_pack/shadow.png";
    8282                icono_categoria.iconSize = new GSize(20, 34);
    8383                icono_categoria.shadowSize = new GSize(37, 34);
     
    109109        marcadores[identificador].openInfoWindowHtml(contidosHTML[identificador]);
    110110        //enbebemos o flash player do son
    111         var fo = new FlashObject( URLbase + "/img_pack/musicplayer.swf?autoplay=true&song_url=" + URLsons[identificador], "player_x", "17", "17", "6", "#FFFFFF");
     111        var fo = new FlashObject( URLbaseGis + "/img_pack/musicplayer.swf?autoplay=true&song_url=" + URLsons[identificador], "player_x", "17", "17", "6", "#FFFFFF");
    112112        fo.write("player");
    113113}
  • _plugins_/_dev_/googlemap_api/modeles/geomap.html

    r15577 r22702  
    33<script type="text/javascript">
    44        //<![CDATA[
    5         URLbase = "#URL_SITE_SPIP/";
     5        URLbase = "[(#EVAL{_DIR_PLUGIN_GEOMAP}|url_absolue)]";
    66        var map;
    77        var markerManager;
Note: See TracChangeset for help on using the changeset viewer.