Ignore:
Timestamp:
11/07/12 15:03:40 (12 years ago)
Author:
npipsl
Message:

download file _ ajout d'un nom de fichier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geisa/web/initGeisa_script.jsp

    r615 r665  
    14351435                transitionLower=transitionLower.replace(/\+/g,"plus"); 
    14361436 
    1437                 this.nomFichier="GEISA2011"; 
     1437 
     1438                //construction du nom du fichier  (exemple  GEISA2011-0_100) 
     1439                this.nomFichier=this.selectDatabase.getValue()+"-"+$("#rangeLower").val()+"_"+$("#rangeUpper").val(); 
    14381440                //envoie de la requête au controller 
    14391441                //en cas de succes appel de la fonction "handleGeisa" 
     
    16661668                 //numéro unique pour le nom du répertoire 
    16671669                //this.nb = jQuery.parseJSON( result ).nb; 
    1668                 this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut; 
     1670                //this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut; 
     1671                this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut+"image/"; 
    16691672 
    16701673                //chemin de l'image 
     
    16751678                //Pour tracer le bon nombre de graphe et de bouton download 
    16761679                var i=1; 
    1677                 var content = ''; 
     1680                //bouton  Download All 
     1681                var content = "<a href=project?methodName=downloadFile&fileName=" +this.NomRepFileOut + 'GEISA.tar><button class="dataProtocolDownloadButton">Download All</button></a>'; 
     1682                //tracer chaque graphe avec son bouton  download associé 
    16781683                for (i=1; i<this.nbGraph+1; i++) { 
    16791684                    //content = content + '<img src=' + this.pathImg + "graph" + this.nb +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName='  + "graph" + this.nb+"-"+i + ".png"+ '"><button class="dataProtocolDownloadButton">Download</button></a>'; 
    1680                     content = content + '<img src=' + this.pathImg + this.nomFichier +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName=' +this.NomRepFileOut + this.nomFichier+"-"+i + ".png"+ '"><button class="dataProtocolDownloadButton">Download</button></a>'; 
    1681  
    1682                 } 
     1685                    content = content +'<img src=' + this.pathImg + this.nomFichier +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName=' +this.NomRepFileOut + this.nomFichier+"-"+i + ".png&fileNameToDisplay="+this.nomFichier+ '"><button class="dataProtocolDownloadButton">Download</button></a>'; 
     1686               } 
    16831687 
    16841688                this.displayWindow(content); 
     
    23712375                                    text:'Close', 
    23722376                                    height:'30px', 
    2373                                     width:'47px', 
     2377                                    width:'53px', 
    23742378                                    title :'to close the window', 
    23752379                                    click: function() { $(this).dialog("close"); }, 
     
    23772381                                "min" :{ 
    23782382                                    id:'Min', 
    2379                                     text:'Min', 
     2383                                    text:'-', 
    23802384                                    height:'30px', 
    2381                                     width:'47px', 
     2385                                    width:'30px', 
    23822386                                    title :'to reduce the window', 
    23832387                                    click: function() { $(this).dialog({ height: 18, width:350  }); }, 
     
    23852389                                "max" :{ 
    23862390                                    id:'Max', 
    2387                                     text:'Max', 
     2391                                    text:'+', 
    23882392                                    height:'30px', 
    2389                                     width:'47px', 
     2393                                    width:'30px', 
    23902394                                    title :'to enlarge the window ', 
    23912395                                    click: function() { $(this).dialog({ height: 628, width:700  }); }, 
Note: See TracChangeset for help on using the changeset viewer.