OpenLayers OpenLayers

Changeset 4348

Show
Ignore:
Timestamp:
09/17/07 09:27:00 (1 year ago)
Author:
jachym
Message:

more comments added

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/jachym/openlayers/lib/OpenLayers/Control/WPS.js

    r4303 r4348  
    2626    xmlhttp: null, 
    2727 
    28   // DOM Elements 
    2928   
    3029    /** 
     
    277276        this.showControls(true); 
    278277         
    279         if (this.inputform) { 
     278        /*if (this.inputform) { 
    280279            this.inputform.parentNode.removeChild(this.inputform); 
    281280            this.inputform = null; 
     
    285284            this.wpsform = null; 
    286285        } 
     286        */ 
    287287 
    288288        if (e) { 
     
    701701                document.createTextNode(inputs[i].getElementsByTagName("Title")[0].firstChild.nodeValue+ ": ")); 
    702702            lbl.style.width = (parseInt(this.WPS.inputSize,10)/2)+"px"; 
     703            // TODO onmousein/onmouseout display abstr 
     704                     
     705 
     706            // create description floating div 
     707            try { 
     708                abstr = document.createElement("div"); 
     709                abstr.style.background = "navy"; 
     710                abstr.style.boder = "solid 1px white"; 
     711                abstr.appendChild(document.createTextNode( 
     712                    inputs[i].getElementsByTagName("Abstract")[0].firstChild.nodeValue)); 
     713                abstr.style.width = "150px"; 
     714                abstr.style.display = "none"; 
     715                abstr.id = "wps_abstr_"+inputs[i].getElementsByTagName("Identifier")[0].firstChild.nodeValue; 
     716            } 
     717            catch (e) {} 
    703718 
    704719            this.WPS.inputform.appendChild(lbl); 
     
    786801        this.WPS.xmlhttp = this.WPS.makeXmlHttp(); 
    787802        this.WPS.xmlhttp.onreadystatechange = this.WPS.execute; 
    788         this.WPS.xmlhttp.open("POST",this.WPS.server,true); 
     803        var uri = OpenLayers.ProxyHost ? OpenLayers.ProxyHost + escape(this.WPS.server) : this.WPS.server; 
     804        this.WPS.xmlhttp.open("POST",uri,true); 
    789805        this.WPS.xmlhttp.send(this.WPS.executeRequest); 
    790806 
    791807    }, 
    792808 
     809    /** 
     810     * Method: execute 
     811     * Called, when "Execute" button clicked 
     812     * 
     813     */ 
    793814    execute: function() { 
    794815        if (this.WPS.xmlhttp.readyState == 4) { 
     
    797818                this.WPS.parseExecuteResponse(this.WPS.xmlhttp); 
    798819            } 
    799         } 
    800     }, 
    801  
    802  
     820            else if (this.WPS.xmlhttp.status==404) { 
     821            } 
     822        } 
     823        else if (this.WPS.xmlhttp.readyState == 3) { 
     824        } 
     825    }, 
     826 
     827 
     828    /** 
     829     * Method: parseExecuteResponse 
     830     * Tryes to parse response of the Execute request 
     831     * 
     832     * Parameters: xmlhttp response 
     833     */ 
    803834    parseExecuteResponse: function(response) { 
    804835 
     
    855886    }, 
    856887 
     888    /** 
     889     * Method: makeXmlHttp 
     890     * We need our own xmlhttp object, since we are using HTTP POST and 
     891     * other custom features 
     892     * 
     893     * Parameters:  
     894     */ 
    857895    makeXmlHttp: function () { 
    858896        var xmlHttp;