Ignore:
Timestamp:
14/12/09 15:18:14 (10 years ago)
Author:
pnorton
Message:

Made several changes to try and reduce the amount of data to download on the wmsviz page. Also created a single place where the js files for the wmsviz page are listed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cowsclient/trunk/cowsclient/templates/wmsviz2.html

    r6030 r6119  
    1111 
    1212    #check if we should use the minified version of the yui javascript 
    13     minified_yui_javascript = config.get('minified_yui_javascript', 'true').lower() == 'true' 
     13    minified_yui_javascript = config.get('minified_yui_javascript', 'false').lower() == 'true' 
     14    minified_client_javascript = config.get('minified_client_javascript', 'false').lower() == 'true' 
    1415?> 
    15  
    1616 
    1717<head> 
     
    3838<link rel="stylesheet" type="text/css" href="$g.server/js/yui_2.7.0b/button/assets/skins/sam/button.css" /> 
    3939 
     40<link type="text/css" rel="stylesheet" href="$g.server/layout/drag_drop_style.css"/> 
     41<link type="text/css" rel="stylesheet" href="$g.server/layout/ndg2.css"/> 
     42<link type="text/css" rel="stylesheet" href="$g.server/layout/ddc_style.css"/> 
     43<link type="text/css" rel="stylesheet" href="$g.server/layout/wmsviz2.css"/> 
     44<link rel="stylesheet" type="text/css" href="$g.server/layout/bottom_controls.css" /> 
     45<link rel="stylesheet" type="text/css" href="$g.server/layout/yui_autocomplete.css" /> 
    4046 
    4147<!-- Dependency source files -->   
     
    5561    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/dragdrop/dragdrop.js" ></script> 
    5662     
    57     <!-- YUI autocomplete --> 
     63    <!-- YUI autocomplete  
    5864    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/animation/animation.js"></script> 
    5965    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/element/element.js"></script> 
     
    6167    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/datasource/datasource.js"></script> 
    6268    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/autocomplete/autocomplete.js"></script> 
     69    --> 
    6370     
    6471    <!-- YUI tabs  --> 
     
    8592    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/dragdrop/dragdrop-min.js" ></script> 
    8693     
    87     <!-- YUI autocomplete --> 
     94    <!-- YUI autocomplete 
    8895    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/animation/animation-min.js"></script> 
    8996    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/element/element-min.js"></script> 
     
    9198    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/datasource/datasource-min.js"></script> 
    9299    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/autocomplete/autocomplete-min.js"></script>   
    93  
     100 --> 
    94101    <!-- YUI tabs  --> 
    95102    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/tabview/tabview-min.js"></script> 
     
    107114<!-- END: Yahoo Interface Library --> 
    108115 
    109 <link type="text/css" rel="stylesheet" href="$g.server/layout/drag_drop_style.css"/> 
    110116<script type="text/javascript" src = "$g.server/js/dragAndDrop.js" ></script>  
    111117 
    112118 
    113 <link type="text/css" rel="stylesheet" href="$g.server/layout/ndg2.css"/> 
    114 <link type="text/css" rel="stylesheet" href="$g.server/layout/ddc_style.css"/> 
    115 <link type="text/css" rel="stylesheet" href="$g.server/layout/wmsviz2.css"/> 
    116  
     119 
     120<script type="text/javascript" src="$g.server/js/json2.js"></script> 
     121<script type="text/javascript" src="${h.getOpenLayersImportPath()}"></script> 
     122<script type="text/javascript" src="$g.server/js/prototype.js"></script> 
     123 
     124<script type="text/javascript" src="$g.server/js/toggleDiv.js"></script> 
     125<script type="text/javascript" src="$g.server/js/LoadingPanel.js"></script> 
     126<script type="text/javascript" src="$g.server/js/openlayers-x.js"></script> 
    117127 
    118128<!-- BEGIN: WMSC library --> 
    119  
    120  
    121 <script type="text/javascript" src="$g.server/js/toggleDiv.js"></script> 
    122 <script type="text/javascript" src="$g.server/js/wmsc.js"></script> 
    123 <script type="text/javascript" src="$g.server/js/prototype.js"></script> 
    124 <script type="text/javascript" src="${h.getOpenLayersImportPath()}"></script> 
    125 <script type="text/javascript" src="$g.server/js/LoadingPanel.js"></script> 
    126  
    127 <script type="text/javascript" src="$g.server/js/utils.js"></script> 
    128  
    129 <script type="text/javascript" src="$g.server/js/openlayers-x.js"></script> 
    130 <script type="text/javascript" src="$g.server/js/mapControl.js"></script> 
    131 <script type="text/javascript" src="$g.server/js/layerControl.js"></script>  
    132 <script type="text/javascript" src="$g.server/js/capabilities.js"></script> 
    133 <script type="text/javascript" src="$g.server/js/wcs.js"></script> 
    134  
    135 <script type="text/javascript" src="$g.server/js/displayOptionsRetriever.js"></script> 
    136 <script type="text/javascript" src="$g.server/js/json2.js"></script> 
    137  
    138 <script type="text/javascript" src="$g.server/js/layerList.js"></script> 
    139  
    140 <link rel="stylesheet" type="text/css" href="$g.server/layout/bottom_controls.css" /> 
    141  
    142 <!-- The layer properties stuff --> 
    143  
    144 <link rel="stylesheet" type="text/css" href="$g.server/layout/yui_autocomplete.css" /> 
    145  
    146 <script type="text/javascript" src="$g.server/js/endpoint.js"></script> 
    147 <script type="text/javascript" src="$g.server/js/furtherInfoLink.js"></script> 
    148  
    149 <script type="text/javascript" src="$g.server/js/layerInformation.js"></script> 
    150 <script type="text/javascript" src="$g.server/js/layerDisplayOptions.js"></script> 
    151 <script type="text/javascript" src="$g.server/js/layerDownload.js"></script> 
    152 <script type="text/javascript" src="$g.server/js/splitAxisConfig.js"></script> 
    153 <script type="text/javascript" src="$g.server/js/splitAxisSelect.js"></script> 
    154  
    155 <script type="text/javascript" src="$g.server/js/ajaxRetriever.js"></script> 
    156 <script type="text/javascript" src="$g.server/js/axisConfigRetriever.js"></script> 
    157  
    158 <script type="text/javascript" src="$g.server/js/endpointSelection.js"></script> 
    159 <script type="text/javascript" src="$g.server/js/layoutManager.js"></script> 
    160 <script type="text/javascript" src="$g.server/js/layerDimensions.js"></script> 
    161 <script type="text/javascript" src="$g.server/js/layerParameters.js"></script> 
    162  
    163 <script type="text/javascript" src="$g.server/js/figureBuilder.js"></script> 
    164 <script type="text/javascript" src="$g.server/js/layerFigureDownload.js"></script> 
    165  
    166 <script type="text/javascript" src="$g.server/js/legendContainer.js"></script> 
    167 <script type="text/javascript" src="$g.server/js/boundsControl.js"></script> 
    168 <script type="text/javascript" src="$g.server/js/wmcRetriever.js"></script> 
    169  
    170 <script type="text/javascript" src="$g.server/js/layerDefaultSetter.js"></script> 
    171 <script type="text/javascript" src="$g.server/js/outlineControl.js"></script> 
     129<?python 
     130    javascript_files = ['wmsc.js', 
     131                        'utils.js', 
     132                        'endpoint.js', 
     133                        'furtherInfoLink.js', 
     134                        'displayOptionsRetriever.js', 
     135                        'mapControl.js', 
     136                        'layerControl.js', 
     137                        'capabilities.js', 
     138                        'wcs.js', 
     139                        'layerFigureDownload.js', 
     140                        'layerInformation.js', 
     141                        'layerList.js', 
     142                        'layerDisplayOptions.js', 
     143                        'layerDownload.js', 
     144                        'layoutManager.js', 
     145                        'splitAxisConfig.js', 
     146                        'splitAxisSelect.js', 
     147                        'endpointSelection.js', 
     148                        'ajaxRetriever.js', 
     149                        'axisConfigRetriever.js', 
     150                        'layerDimensions.js', 
     151                        'layerParameters.js', 
     152                        'figureBuilder.js', 
     153                        'legendContainer.js', 
     154                        'boundsControl.js', 
     155                        'wmcRetriever.js', 
     156                        'layerDefaultSetter.js', 
     157                        'outlineControl.js'] 
     158?> 
     159 
     160<py:choose test="minified_client_javascript"> 
     161 <py:when test="False"> 
     162  <py:for each="file in javascript_files"> 
     163    <script type="text/javascript" src="$g.server/js/${file}"></script> 
     164  </py:for> 
     165 </py:when> 
     166  
     167 <py:otherwise> 
     168   <script type="text/javascript" src="$g.server/js/compressed_client.js"></script> 
     169 </py:otherwise> 
     170   
     171</py:choose> 
     172 
    172173 
    173174<!-- END: WMSC library --> 
     175 
    174176<script type="text/javascript"> 
    175177 
Note: See TracChangeset for help on using the changeset viewer.