Ignore:
Timestamp:
11/07/12 18:19:06 (12 years ago)
Author:
npipsl
Message:

tar et download all

File:
1 edited

Legend:

Unmodified
Added
Removed
  • geisa/web/initGeisa_script.jsp

    r665 r666  
    3838                this.containerDownload = $( "#downloadContainer" ); 
    3939                this.containerLoading = $( "#loading" ); 
     40 
    4041                /** *********** VARIABLE *********** **/ 
     42                //on va chercher les chemin déclaré dans le controller 
     43                this.pathProcess = "<%=Controller.PATH_PROCESS%>"; 
     44                this.LongPathImages = "<%=Controller.LONG_PATH_IMAGES%>"; 
     45 
    4146                <%--this.pathImg = <%=Controller.PATH_IMAGES%>;--%> 
    4247 
     
    986991            requestGeisa: function() 
    987992            { 
    988  
    989                 //on va chercher les chemin déclaré dans le controller 
    990                 this.pathProcess = "<%=Controller.PATH_PROCESS%>"; 
    991                 this.LongPathImages = "<%=Controller.LONG_PATH_IMAGES%>"; 
    992  
    993  
     993                //temps en ms pour obtenir un nom unique de répertoire 
     994                //this.dateTime = new Date().getTime(); 
     995                var dateTime = new Date().getTime(); 
     996                this.NomRepFileOut = "graph"+dateTime+"/"; 
     997 
     998//                var verification = this.verifyBob(); 
     999//                if(verification) 
     1000                // appel ajax 
    9941001 
    9951002                 //sélection du fichier binaire de la base geisa sélectionnée 
     
    9971004                switch (this.selectDatabase.getValue()) { 
    9981005                    case 'GEISA2003': 
    999                         paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+" -filein "+this.pathProcess+"line_GEISA2003_asc_gs03_v1.0 -input_format asc -database_name GEISA2003 -database_type gs03"; 
     1006                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISA2003_asc_gs03_v1.0 -input_format asc -database_name GEISA2003 -database_type gs03"; 
    10001007                        break; 
    10011008                    case 'GEISA2011': 
    1002                         paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+" -filein "+this.pathProcess+"line_GEISA2009_bin -database_name GEISA2011 -database_type gs08"; 
     1009                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISA2009_bin -database_name GEISA2011 -database_type gs08"; 
    10031010                        break; 
    10041011                    case 'GEISAIASI2003': 
    1005                         paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+" -filein "+this.pathProcess+"line_GEISAIASI2003_asc_gsi03_v1.0 -input_format asc -database_name GEISAIASI2003 -database_type gsi03"; 
     1012                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISAIASI2003_asc_gsi03_v1.0 -input_format asc -database_name GEISAIASI2003 -database_type gsi03"; 
    10061013                        break; 
    10071014                    case 'GEISAIASI2011': 
    1008                         paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+" -filein "+this.pathProcess+"line_GEISAIASI2011_bin_gsi08_v1.0 -database_name GEISAIASI2011 -database_type gsi08"; 
     1015                        paramBase = " -dirin "+this.pathProcess+" -dirout "+this.LongPathImages+this.NomRepFileOut+" -filein "+this.pathProcess+"line_GEISAIASI2011_bin_gsi08_v1.0 -database_name GEISAIASI2011 -database_type gsi08"; 
    10091016                        break; 
    10101017                } 
     
    14431450                            //url: "project?methodName=createUserRequest&"+parameters+"&nbGraph="+ this.nbGraph, 
    14441451                            //url: "project?methodName=createUserRequest&"+parameters+"&transitionUpper="+ transitionUpper+"&transitionLower="+ transitionLower+"&nbGraph="+ this.nbGraph, 
    1445                             url: "project?methodName=createUserRequest&"+parameters+"&transitionUpper="+ transitionUpper+"&transitionLower="+ transitionLower+"&nbGraph="+ this.nbGraph+"&nomFichier="+this.nomFichier, 
     1452                            url: "project?methodName=createUserRequest&"+parameters+"&transitionUpper="+ transitionUpper+"&transitionLower="+ transitionLower+"&nbGraph="+ this.nbGraph+"&nomFichier="+this.nomFichier+"&NomRepFileOut="+this.NomRepFileOut, 
    14461453                            success:jQuery.proxy( this.handleGeisa, this ) 
    14471454                        } ); 
     
    16691676                //this.nb = jQuery.parseJSON( result ).nb; 
    16701677                //this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut; 
    1671                 this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut+"image/"; 
     1678                //this.NomRepFileOut = jQuery.parseJSON( result ).NomRepFileOut+"image/"; 
     1679                 this.NomRepFileOutImage = this.NomRepFileOut+"image/"; 
    16721680 
    16731681                //chemin de l'image 
    16741682//                this.pathImg = jQuery.parseJSON( result ).pathImg; 
    1675                 this.pathImg = "<%=Controller.PATH_IMAGES%>"+this.NomRepFileOut; 
     1683                this.pathImg = "<%=Controller.PATH_IMAGES%>"+this.NomRepFileOutImage; 
    16761684 
    16771685 
     
    16791687                var i=1; 
    16801688                //bouton  Download All 
    1681                 var content = "<a href=project?methodName=downloadFile&fileName=" +this.NomRepFileOut + 'GEISA.tar><button class="dataProtocolDownloadButton">Download All</button></a>'; 
     1689                var content = "<a href=project?methodName=downloadFile&fileName=" +this.NomRepFileOutImage + "GEISA.tar&fileNameToDisplay=GEISA.tar><button class='dataProtocolDownloadButton'>Download All</button></a>"; 
    16821690                //tracer chaque graphe avec son bouton  download associé 
    16831691                for (i=1; i<this.nbGraph+1; i++) { 
    16841692                    //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>'; 
    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                } 
     1693                    content = content +'<img src=' + this.pathImg + this.nomFichier +"-"+i+ ".png"+ ' /><a href="project?methodName=downloadFile&fileName=' +this.NomRepFileOutImage + this.nomFichier+"-"+i + ".png&fileNameToDisplay="+this.nomFichier+"-"+i + ".png"+ '"><button class="dataProtocolDownloadButton">Download</button></a>'; 
     1694                } 
    16871695 
    16881696                this.displayWindow(content); 
Note: See TracChangeset for help on using the changeset viewer.