OpenLayers OpenLayers

Changeset 1639

Show
Ignore:
Timestamp:
10/06/06 00:03:58 (2 years ago)
Author:
crschmidt
Message:

Commit changes to code for skinning, including doc/customization, which
documents the class style naming for OL, although it isn't implemented yet,
so that we have a standard to work against. Update release scripts, tests,
and create a 'theme' directory which will hold theme information as it is
developed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Map.js

    r1634 r1639  
    112112    numZoomLevels: 16, 
    113113 
     114    /** @type string */ 
     115    theme: null, 
    114116 
    115117    /** 
     
    159161        //set the default options 
    160162        this.setOptions(options); 
     163         
     164        var cssNode = document.createElement('link'); 
     165        cssNode.setAttribute('rel', 'stylesheet'); 
     166        cssNode.setAttribute('type', 'text/css'); 
     167        cssNode.setAttribute('href', this.theme); 
     168        document.getElementsByTagName('head')[0].appendChild(cssNode);  
    161169 
    162170        this.layers = []; 
     
    217225         
    218226        this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90); 
     227 
     228        this.theme = OpenLayers._getScriptLocation() +  
     229                             'theme/default/style.css';  
    219230 
    220231        // now add the options declared by the user 
  • trunk/openlayers/tests/test_Map.html

    r1604 r1639  
    6464    function test_04_Map_options(t) { 
    6565        t.plan(2); 
    66         map = new OpenLayers.Map($('map'), {numZoomLevels: 6, maxResolution: 3.14159}); 
     66        map = new OpenLayers.Map($('map'), {numZoomLevels: 6, maxResolution: 3.14159, theme: 'foo'}); 
    6767        t.eq( map.numZoomLevels, 6, "map.numZoomLevels set correctly via options hashtable" ); 
    6868        t.eq( map.maxResolution, 3.14159, "map.maxResolution set correctly via options hashtable" ); 
     69        t.eq( map.theme, 'foo', "map theme set correctly." ); 
    6970    } 
    7071    function test_05_Map_center(t) { 
  • trunk/openlayers/tools/release.sh

    r1515 r1639  
    99cd .. 
    1010cp -a img/ /www/openlayers/htdocs/api/$VERSION 
     11cp -a theme/ /www/openlayers/htdocs/api/$VERSION 
    1112rm tools/*.pyc 
    1213cd ..