dojo.require("dojox.fx.easing"); dojo.require("dojo.date.locale"); dojo.require("dojo.date.stamp"); dojo.require("dijit.Tooltip"); var dayNames = dojo.date.locale.getNames('days', 'wide'); if(!isNaN(dayNames[0])){ var dayNames = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; } function goToDay(iDay) { for(var i=0; i<3; i++) { dojo.byId("session_days_" + i).style.fontWeight = "normal"; dojo.byId("session_li_days_" + i).className = ""; } dojo.byId("session_days_" + iDay).style.fontWeight = "bold"; dojo.byId("session_li_days_" + iDay).className = "selected"; dojo.animateProperty({ node: dojo.byId("schedule"), //easing: dojox.fx.easing["elasticOut"], easing: dojox.fx.easing["backOut"], duration: 1000, properties: { top: -oDaySize.start[iDay]+3 } }).play(); } function createElement(/*String*/type,/*String*/id,/*Array*/classes,/*String|DomNode*/refNode,/*String|Number*/position,/*Object?*/box){ var sType = type || "div"; var oObject = dojo.doc.createElement(sType); if(id!=""){ oObject.id = id; } if (classes != "") { for (var i = 0; i < classes.length; i++) { dojo.addClass(oObject, classes[i]); } } refNode = dojo.byId(refNode); if(dojo.place(oObject, refNode, position)){ if(typeof box != "undefined" && box != ""){ dojo.marginBox(oObject, box); } return oObject; }else{ return false; } } function createSchedule(){ var oEvent, dStart, dEnd, iStart, iEnd, iTotal, oEventBox, oTextDiv; var oTime, oHL, oDiv, dayBox; for(var rooms=0; rooms<3; rooms++) { dayBox = { h: 4320, w: 225 }; if(rooms==2){ dayBox.w = 150; } console.log("dayBox", dayBox); oDiv = createElement("div","",["daycolumn"],"schedule","last",dayBox); } var dDate = new Date(confStartDate); var oTimeBox = { h:60 } for(var hours=0; hours<72; hours++) { dDate.setHours(hours); oTime = createElement("div","",["time"],"timeDiv","last",oTimeBox); oTime.innerHTML = dojo.date.locale.format(dDate, {formatLength:"short", selector:"time"}); iTop = 60*hours-1; oHL = createElement("div","",["timeline"],"schedule","last",{h:1,t:iTop,w:786,l:0}); oHL.innerHTML = " "; iTop = iTop+30; oHL = createElement("div","",["timeline"],"schedule","last",{h:1,t:iTop,w:786,l:0}); oHL.innerHTML = " "; } dDate = new Date(confStartDate); var iSession = 0; var oTooltip; for(var s=0; s 1440 && oDaySize.start[1] == 0){ oDaySize.start[1] = iStart; }else if(iStart > 2880 && oDaySize.start[2] == 0){ oDaySize.start[2] = iStart; } dEnd = dojo.date.stamp.fromISOString(oEvent.end); iEnd = dojo.date.difference(dDate, dEnd, "minute"); iTotal = iEnd - iStart; oEventBox = { t: iStart, l: (oEvent.room[0]==1?60:oEvent.room[0]==2?285:510), h: iTotal, w: oEvent.room.length*225 }; if(oEvent.room.length==3){ oEventBox.w = 600; } if(oEvent.room[0]==3){ oEventBox.w = 150; } oDiv = createElement("div","",["event", oEvent.category],"schedule","last",oEventBox); sHTML = ''; sHTML += dojo.date.locale.format(dStart, {formatLength:"short", selector:"time"}); sHTML += ' - '; sHTML += dojo.date.locale.format(dEnd, {formatLength:"short", selector:"time"}); sHTML += '
'; sHTML += '' + oEvent.title + '
'; for(var i=0; i0?', ':''); sHTML += oEvent.speakers[i]; } sHTML += '
'; oDiv.innerHTML = sHTML; sHTML = '
'; sHTML += '

'; sHTML += dojo.date.locale.format(dStart, {formatLength:"medium", selector:"date"}); sHTML += '
'; sHTML += dojo.date.locale.format(dStart, {formatLength:"short", selector:"time"}); sHTML += ' - '; sHTML += dojo.date.locale.format(dEnd, {formatLength:"short", selector:"time"}); sHTML += '

'; sHTML += '

' + oEvent.title + '

'; sHTML += '

' + oEvent.tagline + '

'; for(var i=0; i'; } sHTML += '
'; sHTML += '
'; sHTML += '

' + oEvent.speakers[i] + '

'; sHTML += '

' + oSpeaker.title + '

'; sHTML += '

' + oSpeaker.company + '

'; sHTML += '

' + oSpeaker.website + '

'; sHTML += '
'; sHTML += ''; } } sHTML += ''; oTooltip = new dijit.Tooltip({ label: sHTML, connectId: ["s_"+iSession] }); } //dojo.marginBox("container", {h:oDaySize.height[0]}); dojo.marginBox("schedule", {t:-oDaySize.start[0]+3}); }