Changeset 8457 in genesis


Ignore:
Timestamp:
Sep 15, 2010, 7:16:11 AM (14 years ago)
Author:
rick
Message:

Only log if Firebug is installed and activated, else IE and non-Firebug firefox
friends fails to load.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nodes/nodemap.html

    r8456 r8457  
    1111  <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAAKRiFs2kXKhTkKZkE_ms9rhTdBXm62xfhQU7Dk6ZBFSzYdmSteRQWjLqZhwX8afHvGpd4N3iKql6w8g" type="text/javascript"></script>
    1212
    13     <script src="../lib/Firebug/firebug.js"></script>
    1413    <script src="http://openlayers.org/dev/OpenLayers.js"</script>
    1514
     
    3029      nodeStatusImg['planned'] = 'http://www.google.com/mapfiles/kml/paddle/wht-stars-lv.png';
    3130      nodeStatusImg['unknown'] = 'http://www.google.com/mapfiles/kml/paddle/wht-stars-lv.png';
     31
     32      function log(message) {
     33         /* Determine whether Firebug is actually installed and activated before trying to log
     34          * Taken from http://code.google.com/p/fbug/source/browse/branches/firebug1.5/lite/firebugx.js
     35          */
     36         if (window.console && console.firebug) {
     37            console.log(message);
     38         }
     39      }
    3240
    3341      function isInterlink(feature) {
     
    163171                        for (var i = 0; i < feature.cluster.length; i++) {
    164172                          var node = feature.cluster[i];
    165                           // OpenLayers.Console.log(node.attributes.styleUrl);
     173                          log(node.attributes.styleUrl);
    166174                        }
    167175                      }
     
    319327           } else {
    320328             var nodeName = feature.attributes.name.split(' ')[1];
    321              OpenLayers.Console.log(nodeName);
     329             log(nodeName);
    322330             content = "<iframe frameborder='0' height='300px' width='700px' src='http://sunny.wleiden.net/nagios/cgi-bin/status.cgi?host=" + nodeName + "&servicestatustypes=28&hoststatustypes=15&noheader=true'></iframe><br />" + "<em>Locatie: " + feature.attributes.description + "</em>";
    323331           }
Note: See TracChangeset for help on using the changeset viewer.