var _today = new Date(); var y = _today.getFullYear(); var m = _today.getMonth(); var d = _today.getDate(); var dayLaneData = [{ eventId: 1, startDate: new Date(y, m, d, 1, 0), endDate: new Date(y, m, d, 12, 0), name: '1 Development Meeting', description: 'Development meeting', lane: 'lane1' }, { eventId: 2, startDate: new Date(y, m, d, 2, 0), endDate: new Date(y, m, d, 11, 0), name: '2 Mgmt Meeting', description: 'Management meeting', lane: 'lane1' }, { eventId: 3, startDate: new Date(y, m, d, 3, 0), endDate: new Date(y, m, d, 10, 0), name: '3 Data Cleansing', description: 'Data Cleansing', lane: 'lane1' }, { eventId: 4, startDate: new Date(y, m, d, 4, 30), endDate: new Date(y, m, d, 9, 0), name: '4 Data Migration', description: 'Data Migration', lane: 'lane1' }, { eventId: 5, startDate: new Date(y, m, d, 5, 0), endDate: new Date(y, m, d, 8, 0), name: '5 Documentation', description: 'Product documentation', lane: 'lane1' }]; var lanes = [{ name: 'lane1', title: 'Lane 1' }, { name: 'lane2', title: 'Lane 2' }]; isc.defineClass('OBTEST_Test', isc.Layout).addProperties({ width: '100%', height: '100%', align: 'center', layoutTopMargin: 20, align: 'center', defaultLayoutAlign: 'center', membersMargin: 20, initWidget: function () { var cal = { top: 40, showWeekView: false, showMonthView: false, showTimelineView: false, eventAutoArrange: true, eventOverlap: true, eventOverlapPercent: '30', eventOverlapIdenticalStartTimes: false, overlapSortSpecifiers: [{ property: 'name', direction: 'ascending' }], chosenDate: new Date(), showDayLanes: true, canEditLane: true, }, c1 = isc.Calendar.create(isc.addProperties(isc.shallowClone(cal), { data: isc.shallowClone(dayLaneData), lanes: isc.shallowClone(lanes), overlapSortSpecifiers: [{ property: 'name', direction: 'ascending' }] })), c2 = isc.Calendar.create(isc.addProperties(isc.shallowClone(cal), { data: isc.shallowClone(dayLaneData), lanes: isc.shallowClone(lanes), overlapSortSpecifiers: [{ property: 'name', direction: 'descending' }] })); this.children = [c1, c2]; this.Super('initWidget', arguments); } }); (function () { if (!window.OB) { // not in OB, let's just render it isc.OBTEST_Test.create(); } })()