/[openfoncier]/trunk/app/js/script.js
ViewVC logotype

Diff of /trunk/app/js/script.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 265 by fraynaud, Tue Dec 6 08:49:57 2011 UTC revision 536 by vpihour, Thu Oct 25 16:12:46 2012 UTC
# Line 5  function bible(){ Line 5  function bible(){
5             pfenetre.close();             pfenetre.close();
6      var ev=document.f2.evenement.value;      var ev=document.f2.evenement.value;
7      var idx=document.f2.dossier.value;      var idx=document.f2.dossier.value;
8      pfenetre=window.open("../app/bible.php?ev="+ev+"&idx="+idx,"bible","width=600,height=100,top=120,left=120");      pfenetre=window.open("../app/bible.php?ev="+ev+"&idx="+idx,"bible","scrollbars=yes,width=600,height=600,top=120,left=120");
9      fenetreouverte=true;      fenetreouverte=true;
10  }  }
11    
# Line 15  function bible2() Line 15  function bible2()
15             pfenetre.close();             pfenetre.close();
16      var ev=document.f2.evenement.value;      var ev=document.f2.evenement.value;
17      var idx=document.f2.dossier.value;      var idx=document.f2.dossier.value;
18      pfenetre=window.open("../app/bible2.php?ev="+ev+"&idx="+idx,"bible","width=600,height=100,top=120,left=120");      pfenetre=window.open("../app/bible2.php?ev="+ev+"&idx="+idx,"bible","scrollbars=yes,width=600,height=600,top=120,left=120");
19      fenetreouverte=true;      fenetreouverte=true;
20  }  }
21    
# Line 52  function dossierads() Line 52  function dossierads()
52      document.f1.datedebut.value+"&datefin="+document.f1.datefin.value;      document.f1.datedebut.value+"&datefin="+document.f1.datefin.value;
53  }  }
54    
55  function onSaisieSelect(evt){  
56      //ne pas faire la transformation sur la couche mais sur un clone  function VerifNumdec(champ) {
57      // specifique openfoncier      champ.value = champ.value.replace(",", "."); // remplacement de la virgule
58      geom = evt.feature.geometry.clone()      //if (champ.value.lastIndexOf(".") == -1){ // champ decimal
59      geom.transform(mercator, projection_externe);          if (isNaN(champ.value)) {
60      if(fenetreouverte==true)              alert(msg_alert_error_verifnum);
61          pfenetre.close();              champ.value = "";
62      //compatibilite IE -> mettre des ' au lieu de "              return;
63      pfenetre=window.open("../app/form_sig.php?obj="+obj+"&idx="+idx+"&geom="+geom+"&table="+table+"&champ="+champ, 'saisie_geometrie', 'width=400,height=300,top=120,left=120' );          }
64      fenetreouverte=true;      //}
65  }      
66    }
67    /* -- Debut -- */
68    function messageIt(objsf, link, empty) {
69        // recuperation du terme recherche
70        var recherche = document.getElementById("recherchedyn");
71        if (recherche != null) {
72            link += "&recherche="+recherche.value;
73        }else {
74            link += "&recherche=";
75        }
76        // execution de la requete en POST
77        $.ajax({
78            type: "GET",
79            url: link,
80            cache: false,
81            success: function(html){
82                (empty == true )?$("#sousform-"+objsf).empty():'';
83                $("#sousform-"+objsf).append(html);
84                om_initialize_content();
85            },
86            async: false
87        });
88    }
89    
90    /* Plugin jQuery qui lance un espèce d'appel AJAX vers un script PHP de téléchargement de fichier*/
91    jQuery.download = function(url, data, method){
92        //url and data options required
93        if( url && data ){
94            //data can be string of parameters or array/object
95            data = typeof data == 'string' ? data : jQuery.param(data);
96            //split params into form inputs
97            var inputs = '';
98            jQuery.each(data.split('&'), function(){
99                var pair = this.split('=');
100                inputs+='<input type="hidden" name="'+ pair[0] +'" value="'+ pair[1] +'" />';
101            });
102            //send request
103            jQuery('<form action="'+ url +'" method="'+ (method||'post') +'">'+inputs+'</form>')
104            .prependTo('body').submit().remove();
105        };
106    };
107    
108    /* -- FIN -- */

Legend:
Removed from v.265  
changed lines
  Added in v.536

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26