Changeset 5793


Ignore:
Timestamp:
02/10/09 12:20:47 (10 years ago)
Author:
pnorton
Message:

Added a config option to turn on and off the use of the minified YUI javascript code.

File:
1 edited

Legend:

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

    r5787 r5793  
    33<html xmlns:py="http://genshi.edgewall.org/"  
    44      xmlns="http://www.w3.org/1999/xhtml" 
    5       xmlns:xi="http://www.w3.org/2001/XInclude">     
     5      xmlns:xi="http://www.w3.org/2001/XInclude"> 
     6        
    67<!-- xi:include href="utils.html" / --> 
    78 
     
    910 
    1011    from pylons import config 
     12 
     13    #check for a custom openlayers import path 
    1114    openlayersImportPath = config.get('openlayers_js_path', config['serverurl'] + '/js/OpenLayers.js') 
     15     
     16    #check if we should use the minified version of the yui javascript 
     17    minified_yui_javascript = config.get('minified_yui_javascript', 'true').lower() == 'true' 
    1218 
    1319    def jsonParseIfNotEmpty(var): 
     
    3238 
    3339<!-- BEGIN: Yahoo Interface Library --> 
    34       
    35 <!-- Dependency source files -->   
    36 <script type="text/javascript" src ="$g.server/js/yui_2.7.0b/yahoo/yahoo.js" ></script>  
    37 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/event/event.js"></script> 
    38 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/dom/dom.js" ></script> 
    39    
    40 <link rel="stylesheet" type="text/css" href="$g.server/js/yui_2.7.0b/fonts/fonts.css" /> 
    41  
    42 <!-- TreeView imports -->   
     40 
     41<!-- css files --> 
    4342<link type="text/css" rel="stylesheet" href="$g.server/js/yui_2.7.0b/treeview/assets/skins/sam/treeview.css"/>  
    4443<link rel="stylesheet" type="text/css" href="$g.server/js/yui_old_treeview_style/treeview-menu.css"/>  
    45 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/treeview/treeview.js" ></script>  
    46  
    47 <!-- needed for the drag and drop list --> 
    48 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/utilities/utilities.js" ></script> 
    49 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/dragdrop/dragdrop.js" ></script> 
     44<link rel="stylesheet" type="text/css" href="$g.server/js/yui_2.7.0b/fonts/fonts.css" /> 
     45 
     46<link rel="stylesheet" type="text/css" href="$g.server/js/yui_2.7.0b/button/assets/skins/sam/button.css" /> 
     47<link rel="stylesheet" type="text/css" href="$g.server/js/yui_2.7.0b/autocomplete/assets/skins/sam/autocomplete.css" /> 
     48 
     49<!-- Dependency source files -->   
     50 
     51<py:choose test="minified_yui_javascript"> 
     52  <py:when test="False"> 
     53   
     54    <script type="text/javascript" src ="$g.server/js/yui_2.7.0b/yahoo/yahoo.js" ></script>  
     55    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/event/event.js"></script> 
     56    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/dom/dom.js" ></script> 
     57     
     58    <!-- YUI treevieew  -->   
     59    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/treeview/treeview.js" ></script>  
     60     
     61    <!-- YUI drag and drop  --> 
     62    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/utilities/utilities.js" ></script> 
     63    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/dragdrop/dragdrop.js" ></script> 
     64     
     65    <!-- YUI autocomplete --> 
     66    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/animation/animation.js"></script> 
     67    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/element/element.js"></script> 
     68    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/button/button.js"></script> 
     69    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/datasource/datasource.js"></script> 
     70    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/autocomplete/autocomplete.js"></script> 
     71   
     72  </py:when> 
     73  <py:otherwise> 
     74 
     75    <!-- minified js code --> 
     76    <script type="text/javascript" src ="$g.server/js/yui_2.7.0b/yuiloader-dom-event/yuiloader-dom-event.js" ></script>  
     77     
     78    <!-- YUI treevieew  -->   
     79    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/treeview/treeview-min.js" ></script>  
     80     
     81    <!-- YUI drag and drop  --> 
     82    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/utilities/utilities.js" ></script> 
     83    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/dragdrop/dragdrop-min.js" ></script> 
     84     
     85    <!-- YUI autocomplete --> 
     86    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/animation/animation-min.js"></script> 
     87    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/element/element-min.js"></script> 
     88    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/button/button-min.js"></script> 
     89    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/datasource/datasource-min.js"></script> 
     90    <script type="text/javascript" src="$g.server/js/yui_2.7.0b/autocomplete/autocomplete-min.js"></script>   
     91   
     92  </py:otherwise> 
     93</py:choose> 
     94 
     95 
     96<!-- END: Yahoo Interface Library --> 
    5097 
    5198<link type="text/css" rel="stylesheet" href="$g.server/layout/drag_drop_style.css"/> 
    5299<script type="text/javascript" src = "$g.server/js/dragAndDrop.js" ></script>  
    53  
    54 <!-- YUI imports for autocomplete --> 
    55 <link rel="stylesheet" type="text/css" href="$g.server/js/yui_2.7.0b/button/assets/skins/sam/button.css" /> 
    56 <link rel="stylesheet" type="text/css" href="$g.server/js/yui_2.7.0b/autocomplete/assets/skins/sam/autocomplete.css" /> 
    57 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/animation/animation.js"></script> 
    58 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/element/element.js"></script> 
    59 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/button/button.js"></script> 
    60 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/datasource/datasource.js"></script> 
    61 <script type="text/javascript" src="$g.server/js/yui_2.7.0b/autocomplete/autocomplete.js"></script> 
    62 <!-- End of autocomplete imports --> 
    63      
    64  
    65 <!-- END: Yahoo Interface Library --> 
    66100 
    67101<!-- BEGIN: WMSC library --> 
Note: See TracChangeset for help on using the changeset viewer.