Hi folks, not sure what I'm doing wrong.  In the pic below is the issue I'm 
getting:
 

<https://lh5.googleusercontent.com/-EePal4bwINw/U4OYz2XiQuI/AAAAAAAAAJU/G6FhZhmzLRo/s1600/issue.png>

As you can see, I can get events to populate and items load, no issues.  
Except on the top band, no text appears.  Here is my source code below.  
(I'm parsing XML from SharePoint 2010 and parsing it, then using events to 
create).  The grabbing of the XML and parsing seems to work fine as I'm 
getting the dates and the events are being created, I can click on the 
bubbles and it works fine as well.  Can anyone please tell me why?  I'm 
assuming something with the theme or CSS, but I'm not strong there, am I 
missing some sort of link or initialization of the default theme?
<html>  
 <head>
 <script>    
  Timeline_ajax_url="
/Shared%20Documents/Timeline/timeline_ajax/simile-ajax-api.js<http://collaboration-cjoc.forces.mil.ca/sites/JOSG/jsr/Shared%20Documents/Timeline/timeline_ajax/simile-ajax-api.js>
";
  Timeline_urlPrefix='/Shared%20Documents/Timeline/timeline_js/';
  Timeline_parameters='bundle=true'        
 </script> 
 <script src="
/Shared%20Documents/Timeline/timeline_js/timeline-api.js"type="text/javascript<http://collaboration-cjoc.forces.mil.ca/sites/JOSG/jsr/Shared%20Documents/Timeline/timeline_js/timeline-api.js"type="text/javascript>
">
 </script>
<script>
var tl;
var eventSource = new Timeline.DefaultEventSource();
function openXMLfile(url)
{        
 if (document.implementation && document.implementation.createDocument)
        {                
  xmlDoc = document.implementation.createDocument("", "", null);
                try {                        
   netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
                        } catch (e) {
                        alert("Permission UniversalBrowserRead denied.");
                        }
                xmlDoc.async=false;
                xmlDoc.load(url);
                return(xmlDoc);
        }        
 else if (window.ActiveXObject)
        {
                xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
                xmlDoc.async="false";
                xmlDoc.load(url);
                return(xmlDoc); 
        }
        else
        {
                alert('Your browser cannot handle this script');
                return;
        }        
}
function takeEventOut(url)
{        
 var rows;
        xmlDoc = openXMLfile(url);
        if (document.implementation && 
document.implementation.createDocument)
        {
         try {
                        
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
                        } catch (e) {
                        alert("Permission UniversalBrowserRead denied.");
                        }      
           var rows = xmlDoc.getElementsByTagName("row");
        }
        else if (window.ActiveXObject)
        {
                rows = xmlDoc.getElementsByTagName("z:row");
        }
        else
        {       
         alert('Your browser cannot handle this script');
                return;
        }
        for (j=0;j<rows.length;j++)
        {
         // taking the event info from the xml
                var rawDateEvent = 
rows.item(j).getAttribute('ows_StartDate');
                var rawEndEvent = rows.item(j).getAttribute('ows_EndDate');
                var eventTitle = rows.item(j).getAttribute('ows_LinkTitle');
                var status = rows.item(j).getAttribute('ows_Activity');
                var priority = rows.item(j).getAttribute('ows_Activity');
                var iconImage;
                iconImage = "
/Timeline/timeline_js/images/dark-red-circle.png<http://collaboration-cjoc.forces.mil.ca/sites/JOSG/jsr/Shared%20Documents/Timeline/timeline_js/images/dark-red-circle.png>
";
  
  var dateArray = rawDateEvent.split("#");
                var dateEvent = dateArray[1];
  dateArray = rawEndEvent.split("#");
                var endEvent = dateArray[1];
 
  //var dateEvent = "Wed Jan 01 2014 00:00:00 GMT-0600";
  //var endEvent = "Thu Feb 22 2014 00:00:00 GMT-0600";
  
  var eventDays = rows.item(j).getAttribute('ows_IsLong');
  dateArray = eventDays.split("#");
  var IsMultiCheck = dateArray[1];
  
  // chossing color for the event
                var color;
                color = "blue";
                /*id, start, end,latestStart, earliestEnd, instant, text, 
description, image, link,  icon, color, textColor */
  //alert(IsMultiCheck);
            // Define your own event, this is static to make things simple
            var evt = new Timeline.DefaultEventSource.Event({
      start: new Date(dateEvent),
                    end: new Date(endEvent),
      durationEvent: "True",
                    title: eventTitle,
      description: eventTitle,
                    color: color,
      image: iconImage
             });
                // alert("Add Event");
  // adding it to the source
                eventSource.add(evt);
        }
}
function onLoad()
{
        /* this will cause an error, cause it need to be in one line */
 takeEventOut("XML DATA SOURCE=");         
//create the timeline
 var theme = Timeline.ClassicTheme.create();
 var bandInfos = [
        Timeline.createBandInfo({
                trackGap:       0.2,
                width:          "70%",
  date:           "1 Jan 2014",
                intervalUnit:   Timeline.DateTime.DAY,
                intervalPixels: 50,
  theme:  theme,
                eventSource: eventSource
                }),
 Timeline.createBandInfo({
                trackHeight:    0.5,
                trackGap:       0.2,
                width:          "30%",
                date:  "1 Jan 2014",
                intervalUnit:   Timeline.DateTime.MONTH,
                intervalPixels: 150,
                eventSource: eventSource
                })
        ];         
 bandInfos[1].syncWith = 0;
        bandInfos[1].highlight = true;
        tl = Timeline.create(document.getElementById("my-timeline"), 
bandInfos);
}
var resizeTimerID = null;
function onResize() {
    if (resizeTimerID == null) {
        resizeTimerID = window.setTimeout(function() {
            resizeTimerID = null;
            tl.layout();
        }, 500);
    }
}
    </script>
  </head>
  <body onload="onLoad();" onresize="onResize();">
     <div id="my-timeline" style="height: 500px; border: 1px solid 
#aaa"></div>
  </body>
</html>
 

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/simile-widgets.
For more options, visit https://groups.google.com/d/optout.

Reply via email to