Changeset 4474 for MILK


Ignore:
Timestamp:
20/11/08 15:55:55 (11 years ago)
Author:
cbyrom
Message:

Strip out code not relevant to MILK - mainly WCS and WMS stuff - also including the CSML server code + trackback code
Also tidy up structure of 'public' dir - setting up new 'style' dir and
centralising icons in icons dir + remove all unused icons, javascript and stylesheets.
Also strip out testcase code and populate new test directory structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/public/js/ndgJavascript.js

    r4213 r4474  
    44 * there is nothing in these lines of code which is not duplicated everywhere 
    55 */ 
    6 function createRequestObject() { 
    7   
    8     var req; 
    9   
    10     if(window.XMLHttpRequest){ 
    11        // Firefox, Safari, Opera... 
    12        req = new XMLHttpRequest(); 
    13     } else if(window.ActiveXObject) { 
    14        // Internet Explorer 5+ 
    15        req = new ActiveXObject("Microsoft.XMLHTTP"); 
    16     } else { 
    17        // There is an error creating the object, 
    18        // just as an old browser is being used. 
    19        alert('Problem creating the XMLHttpRequest object'); 
    20     } 
    21   
    22     return req; 
    23   
    24  } 
    25  
    266function swapLayers( layer1, layer2 ) 
    277{ 
     
    4727  vis.display = (vis.display==''||vis.display=='block')?'none':'block'; 
    4828} 
    49  
    50 // Make the XMLHttpRequest object 
    51 var http = createRequestObject(); 
    52  
    53 function sendRequestGet(act) { 
    5429  
    55     // Talk to a server client script for requests 
    56     http.open('get',"webclient2.py?define="+act); 
    57     http.onreadystatechange = handleResponse; 
    58     http.send(null); 
    59   
    60  } 
    61 function handleResponse() { 
    62  
    63     if(http.readyState == 4 && http.status == 200){ 
    64   
    65        // Text returned from python script 
    66        var response = http.responseText; 
    67  
    68        if(response) { 
    69           // Update ajaxTest content 
    70           document.getElementById("ndgDefine").innerHTML = response; 
    71        } 
    72   
    73     } 
    74   
    75  } 
    76 function ManageTabPanelDisplay() { 
    77  
    78 // Between the parenthesis, list the id's of the div's that  
    79 //     will be effected when tabs are clicked. List in any  
    80 //     order. Put the id's in single quotes (apostrophes)  
    81 //     and separate them with a comma -- all one line. 
    82 // 
    83 // Only the following line needs to be modified for tabs ... 
    84 // 
    85 var idlist = new Array('TabHistoryFocus','TabCartFocus','TabHistoryReady','TabCartReady','HistoryContent','CartContent'); 
    86  
    87 if(arguments.length < 1) { return; } 
    88 for(var i = 0; i < idlist.length; i++) { 
    89    var block = false; 
    90    for(var ii = 0; ii < arguments.length; ii++) { 
    91       if(idlist[i] == arguments[ii]) { 
    92          block = true; 
    93          break; 
    94          } 
    95       } 
    96    if(block) { document.getElementById(idlist[i]).style.display = "block"; } 
    97    else { document.getElementById(idlist[i]).style.display = "none"; } 
    98    } 
    99 } 
    100  
    101 /** 
    102  * Set all checkboxes in a table to be the same state as the checkbox passed in 
    103  * @param abox: the 'select all' checkbox - NB, the other checkboxes will be set to the same 
    104  *                              state as this one 
    105  * @param tableID: the ID of the parent table containing the checkboxes 
    106  */  
    107 function selectAll(abox, tableID)  
    108 { 
    109         var table = document.getElementById(tableID); 
    110     var cboxes = table.getElementsByTagName('input'); 
    111         var l = cboxes.length; 
    112  
    113         for (var i = 0; i < l; i++) 
    114         { 
    115         var n = cboxes[i]; 
    116         if ('checkbox' == n.type && n != abox) 
    117         { 
    118                         n.checked = abox.checked; 
    119         } 
    120     } 
    121 } 
    122   
Note: See TracChangeset for help on using the changeset viewer.