var outString = ""; var firstDay = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, 1); // retrieve the next/last month and year dates var dates = application.ptCalendar.date.calculateMonthsYears(inDate=firstDay); var firstDayDigit = DayOfWeek(FirstDay); var itm = 1; var i = 1; var h = 1; var hDay = 1; var eventDataList = ""; var appConfig = getAppConfig(); var viewLinkData = StructNew(); var qParamDelimiter = "?"; var height = 24; var width = 30; var currentDayClass = "month-grid-small-day-current"; var eventDayClass = "month-grid-small-day-event"; var standardDayClass = "month-grid-small-day-standard"; var dayHeaderClass = "month-grid-small-subheader"; var prevNextClass = "month-grid-small-header"; var nextImage = ""; var prevImage = ""; var detailLink = cgi.script_name; var dailyLink = cgi.script_name; var weeklyListLink = cgi.script_name; var weeklyGridLink = cgi.script_name; var monthlyListLink = cgi.script_name; var monthlyGridLink = cgi.script_name; var currentView = application.ptCalendar.defaultView; var monthlabelLink = cgi.script_name; var nextPrevLink = cgi.script_name; var viewParamName = application.ptCalendar.viewParamName; var gridLabelTxt = DateFormat(firstDay, 'mmmm yyyy'); var gridLabelLink = ""; var gridPrevLink = ""; var gridNextLink = ""; // Get Grid Cell Width if ( structKeyExists(appConfig,"calendar_small_grid_cell_width") AND LEN(TRIM(appConfig['calendar_small_grid_cell_width'])) ) width = appConfig['calendar_small_grid_cell_width']; // Get Grid Cell Height if ( structKeyExists(appConfig,"calendar_small_grid_cell_height") AND LEN(TRIM(appConfig['calendar_small_grid_cell_height'])) ) height = appConfig['calendar_small_grid_cell_height']; // Get the view link data structure if ( application.ptCalendar.viewPageMode EQ "Single" ) { if ( LEN(TRIM(arguments.linkedPage)) ) viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageURL=arguments.linkedPage,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageParams=arguments.linkedParams); // Reset the query param initial delimiter to & qParamDelimiter = "&"; // update the nextPrevLink URL ... for the Small Grid Calendar keep the current calendar view if ( StructKeyExists(request.params,viewParamName) ) currentView = request.params[viewParamName]; // Make currentView safe for output in HTML and JS Links currentView = application.ptCalendar.calRenderViewService.makeViewParamValueSafe(paramValue=currentView); nextPrevLink = nextPrevLink & "?" & viewParamName & "=" & lcase(currentView); } else { if ( LEN(TRIM(arguments.linkedSubsite)) ) viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(subsiteID=linkedSubsite,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(pageParams=arguments.linkedParams); if ( LEN(TRIM(arguments.linkedParams)) ) qParamDelimiter = "&"; } // Set Page Mapping Variables if( structKeyExists(viewLinkData, "detailPage") and len(viewLinkData.detailPage) ) detailLink = viewLinkData.detailPage; if( structKeyExists(viewLinkData, "dailyPage") and len(viewLinkData.dailyPage) ) dailyLink = viewLinkData.dailyPage; if( structKeyExists(viewLinkData, "weeklyListPage") and len(viewLinkData.weeklyListPage) ) weeklyListLink = viewLinkData.weeklyListPage; if( structKeyExists(viewLinkData, "weeklyGridPage") and len(viewLinkData.weeklyGridPage) ) weeklyGridLink = viewLinkData.weeklyGridPage; if( structKeyExists(viewLinkData, "monthlyListPage") and len(viewLinkData.monthlyListPage) ) monthlyListLink = viewLinkData.monthlyListPage; if( structKeyExists(viewLinkData, "monthlyGridPage") and len(viewLinkData.monthlyGridPage) ) monthlyGridLink = viewLinkData.monthlyGridPage; // Get the Default Calendar View Link to use for the MonthLabelLink monthlabelLink = monthlyGridLink; defaultViewPageVar = application.ptcalendar.calRenderViewDAO.getCalendarDefaultViewPageVar(); if( structKeyExists(viewLinkData,defaultViewPageVar) and LEN(TRIM(viewLinkData[defaultViewPageVar])) ) monthlabelLink = viewLinkData[defaultViewPageVar]; // Get the Default Calendar View Link to use for the nextPrevLink, if not a monthlist or monthgrid view if ( application.ptCalendar.viewPageMode EQ "Single" ) { if ( currentView NEQ ListLast(monthlyListLink,"=") AND currentView NEQ ListLast(monthlyGridLink,"=") ) nextPrevLink = monthlabelLink; } else { if ( cgi.script_name NEQ monthlyListLink AND cgi.script_name NEQ monthlyGridLink ) nextPrevLink = monthlabelLink; } // Build the Grid Header Nav Links gridLabelLink = "#monthlabelLink##qParamDelimiter#day=1&month=#arguments.curMonth#&year=#arguments.curYear#&clicked=1"; gridPrevLink = "#nextPrevLink##qParamDelimiter#month=#dates.lastMonth#&year=#dates.lastYear#&clicked=1"; gridNextLink = "#nextPrevLink##qParamDelimiter#month=#dates.nextMonth#&year=#dates.nextYear#&clicked=1"; // TODO: replace with the app settings data /* // determine some of the default rendering properties if( structKeyExists(metadata, "calendarProps") ) { if( len(metadata.calendarProps.currentDayClass) ) currentDayClass = metadata.calendarProps.currentDayClass; if( len(metadata.calendarProps..eventDayClass) ) eventDayClass = metadata.calendarProps.eventDayClass; if( len(metadata.calendarProps..standardDayClass) ) standardDayClass = metadata.calendarProps.standardDayClass; if( len(metadata.calendarProps.dayHeaderClass) ) dayHeaderClass = metadata.calendarProps.dayHeaderClass; if( len(metadata.calendarProps.prevNextClass) ) prevNextClass = metadata.calendarProps.prevNextClass; if( len(metadata.calendarProps.nextImage) ) nextImage = metadata.calendarProps.nextImage; if( len(metadata.calendarProps.prevImage) ) prevImage = metadata.calendarProps.prevImage; }*/ // END TODO // loop through the items in the element for ( itm=1; itm LTE arrayLen(arguments.calendarData); itm=itm+1 ) { // set structure friendly variable for this event eventDate = dateFormat(arguments.calendarData[itm][arguments.eventField], "yyyymmdd"); // see if this events date exists in the eventDataStruct if( not listFind(eventDataList, eventDate) ) eventDataList = listAppend(eventDataList, eventDate); } // if it isn't sunday, then we need to if space over to start on the corrent day of week if ( firstDayDigit neq 1 ) { outString = outString & ""; for ( h=1; h lt DayOfWeek(FirstDay); h=h+1 ) { outString = outString & ""; } } // loop thru all the dates in this month for ( i=1; i lte DaysInMonth(firstDay); i = i+1 ) { // local variable for this date thisDate = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, i); // is it Sunday? if so start new row. if ( DayOfWeek(thisDate) eq 1 ) outString = outString & ""; //determine the class for the current day or if the day has an event classTxt = ' class="#standardDayClass#"'; dayText = i; // todays date if ( thisDate eq application.ptCalendar.date.createValidDate(year(now()),month(now()),day(now())) ) classTxt = ' class="#currentDayClass#"'; // has event for this date if( listFind(eventDataList, dateFormat(thisDate, 'yyyymmdd')) ) { classTxt = ' class="#eventDayClass#"'; dayText = '#dayText#'; } // output the day cell outString = outString & " "; // is it the last day of the month? if so, fill row with blanks. if ( i eq DaysInMonth(firstDay) ) { for ( h=1; h lte (7-DayOfWeek(thisDate)); h=h+1 ) { outString = outString & ""; } if ( h GT 1 ) outString = outString & ""; } if ( DayOfWeek(thisDate) eq 7 ) outString = outString & ""; } outString=outString & "
#buildMonthGridHeaderNavSmall(labelText=gridLabelTxt,labelLink=gridLabelLink,prevLink=gridPrevLink,nextLink=gridNextLink)#
#Left(DayOfWeekAsString(hDay), 1)#
 
#dayText#
 
"; return outString;
var outString = ""; var firstDay = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, 1); var dates = application.ptCalendar.date.calculateMonthsYears(inDate=firstDay); // retrieve the next/last month and year dates var firstDayDigit = DayOfWeek(FirstDay); var itm = 1; var i = 1; var h = 1; var hDay = 1; var eventDataStruct = structNew(); var appConfig = getAppConfig(); var viewLinkData = StructNew(); var qParamDelimiter = "?"; var height = 150; var width = 130; var currentDayClass = "month-grid-day-current"; var eventDayClass = "month-grid-day-event"; var standardDayClass = "month-grid-day-standard"; var dayHeaderClass = "month-grid-subheader"; var prevNextClass = "month-grid-header"; var nextImage = ""; var prevImage = ""; var detailLink = cgi.script_name; var dailyLink = cgi.script_name; var weeklyListLink = cgi.script_name; var weeklyGridLink = cgi.script_name; var monthlyListLink = cgi.script_name; var monthlyGridLink = cgi.script_name; var nextPrevLink = cgi.script_name; var uiTheme = getUItheme(); var useEventToolTip = getUseToolTipStatus(); var qTipStyleName = getToolTipTheme(); var eventDetailOptions = StructNew(); var gridLabelTxt = DateFormat(firstDay, 'mmmm yyyy'); var gridLabelLink = ""; var gridPrevLink = ""; var gridNextLink = ""; // Set the Event Detailed Day Text Options to pass to the BuildDetailedDayText function eventDetailOptions.showTime = false; eventDetailOptions.showLocation = false; eventDetailOptions.showCategoryIcons = true; // Get Grid Cell Width if ( structKeyExists(appConfig,"calendar_large_grid_cell_width") AND LEN(TRIM(appConfig['calendar_large_grid_cell_width'])) ) width = appConfig['calendar_large_grid_cell_width']; // Get Grid Cell Height if ( structKeyExists(appConfig,"calendar_large_grid_cell_height") AND LEN(TRIM(appConfig['calendar_large_grid_cell_height'])) ) height = appConfig['calendar_large_grid_cell_height']; // Set Page Mapping Variables if ( !arguments.showAdminTools ) { // Get the view link data structure if ( application.ptCalendar.viewPageMode EQ "Single" ) { if ( LEN(TRIM(arguments.linkedPage)) ) viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageURL=arguments.linkedPage,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageParams=arguments.linkedParams); // Reset the query param initial delimiter to & qParamDelimiter = "&"; } else { if ( LEN(TRIM(arguments.linkedSubsite)) ) viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(subsiteID=linkedSubsite,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(pageParams=arguments.linkedParams); if ( LEN(TRIM(arguments.linkedParams)) ) qParamDelimiter = "&"; } if( structKeyExists(viewLinkData, "detailPage") and len(viewLinkData.detailPage) ) detailLink = viewLinkData.detailPage; if( structKeyExists(viewLinkData, "dailyPage") and len(viewLinkData.dailyPage) ) dailyLink = viewLinkData.dailyPage; if( structKeyExists(viewLinkData, "weeklyListPage") and len(viewLinkData.weeklyListPage) ) weeklyListLink = viewLinkData.weeklyListPage; if( structKeyExists(viewLinkData, "weeklyGridPage") and len(viewLinkData.weeklyGridPage) ) weeklyGridLink = viewLinkData.weeklyGridPage; if( structKeyExists(viewLinkData, "monthlyListPage") and len(viewLinkData.monthlyListPage) ) monthlyListLink = viewLinkData.monthlyListPage; if( structKeyExists(viewLinkData, "monthlyGridPage") and len(viewLinkData.monthlyGridPage) ) monthlyGridLink = viewLinkData.monthlyGridPage; // set the nextPrevLink to the current view link nextPrevLink = monthlyGridLink; // Build the Grid Header Nav Links gridLabelLink = "#monthlyGridLink##qParamDelimiter#day=1&month=#arguments.curMonth#&year=#arguments.curYear#&clicked=1"; gridPrevLink = "#nextPrevLink##qParamDelimiter#month=#dates.lastMonth#&year=#dates.lastYear#&clicked=1"; gridNextLink = "#nextPrevLink##qParamDelimiter#month=#dates.nextMonth#&year=#dates.nextYear#&clicked=1"; } // Admin Tools specific settings if ( arguments.showAdminTools ) { // override for the config Tool tip setting useEventToolTip = true; formID = getCalEventDetailsFormID(); } // TODO: replace with the app settings data /* // determine some of the default rendering properties if( structKeyExists(metadata, "calendarProps") ) { if( len(metadata.calendarProps.currentDayClass) ) currentDayClass = metadata.calendarProps.currentDayClass; if( len(metadata.calendarProps..eventDayClass) ) eventDayClass = metadata.calendarProps.eventDayClass; if( len(metadata.calendarProps..standardDayClass) ) standardDayClass = metadata.calendarProps.standardDayClass; if( len(metadata.calendarProps.dayHeaderClass) ) dayHeaderClass = metadata.calendarProps.dayHeaderClass; if( len(metadata.calendarProps.prevNextClass) ) prevNextClass = metadata.calendarProps.prevNextClass; if( len(metadata.calendarProps.nextImage) ) nextImage = metadata.calendarProps.nextImage; if( len(metadata.calendarProps.prevImage) ) prevImage = metadata.calendarProps.prevImage; } */ // END - TODO // loop through the items in the element for ( itm=1; itm LTE arrayLen(arguments.calendarData); itm=itm+1 ) { // set structure friendly variable for this event thisDateStruct = dateFormat(arguments.calendarData[itm][arguments.eventField], "yyyymmdd"); // see if this events date exists in the eventDataStruct if( not structKeyExists(eventDataStruct, thisDateStruct) ) eventDataStruct[thisDateStruct] = itm; else eventDataStruct[thisDateStruct] = listAppend(eventDataStruct[thisDateStruct], itm); } application.ptCalendar.scripts.loadJQuery(); // Add the Tool Tips Script to the Calendar if ( useEventToolTip ) buildEventToolTipScript(showAdminTools=arguments.showAdminTools); // Add the Admin Tools Script to the Calendar if ( arguments.showAdminTools ) buildAdminToolsScript();
// if it isn't sunday, then we need to space over to start on the current day of week if ( firstDayDigit neq 1 ) { outString = outString & ""; for ( h=1; h lt DayOfWeek(FirstDay); h = h+1 ) { outString = outString & ""; } } // loop thru all the dates in this month for ( i=1; i lte DaysInMonth(firstDay); i=i+1 ) { // local variable for this date thisDate = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, i); //is it Sunday? if so start new row. if ( DayOfWeek(thisDate) eq 1 ) outString = outString & ""; //determine the class for the current day or if the day has an event classTxt = ' class="#standardDayClass#"'; dayText = i; // todays date if ( thisDate eq application.ptCalendar.date.createValidDate(year(now()),month(now()),day(now())) ) classTxt = ' class="#currentDayClass#"'; // has event for this date if ( structKeyExists(eventDataStruct, dateFormat(thisDate, 'yyyymmdd')) ) { classTxt = ' class="calEventDayCell #eventDayClass#"'; if ( !arguments.showAdminTools ) dayText = '#dayText#'; } // Add the ADD new link if Admin Tools are needed if ( arguments.showAdminTools ) dayText = dayText & ''; //+Event if ( structKeyExists(eventDataStruct, dateFormat(thisDate, 'yyyymmdd')) ) { if ( arguments.showAdminTools ) detailedDayText = buildDetailedDayTextGridAdmin(arguments.calendarData,arguments.eventField,eventDataStruct[dateFormat(thisDate, 'yyyymmdd')],detailLink,useEventToolTip,eventDetailOptions,true); else detailedDayText = buildDetailedDayTextGrid(arguments.calendarData,arguments.eventField,eventDataStruct[dateFormat(thisDate, 'yyyymmdd')],detailLink,useEventToolTip,eventDetailOptions,false); dayText = dayText & detailedDayText; } // output the day cell outString = outString & " "; // is it the last day of the month? if so, fill row with blanks. if ( i eq DaysInMonth(firstDay) ) { for ( h=1; h lte (7-DayOfWeek(thisDate)); h=h+1 ) { outString = outString & ""; } if ( h gt 1 ) outString = outString & ""; } if ( DayOfWeek(thisDate) eq 7 ) outString = outString & ""; } // Calendar Table End outString=outString & "
align="center"> #buildMonthGridHeaderNav(labelText=gridLabelTxt,labelLink=gridLabelLink,prevLink=gridPrevLink,nextLink=gridNextLink)# #gridLabelTxt#
#Left(DayOfWeekAsString(hDay), 3)#
 
#dayText#
 
"; // calendarWrapper END outString=outString & "
"; return outString;
var outString = ""; var monthAsListJS = ""; var firstDay = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, 1); // retrieve the next/last month and year dates var dates = application.ptCalendar.date.calculateMonthsYears(inDate=firstDay); var firstDayDigit = DayOfWeek(FirstDay); var itm = 1; var i = 1; var h = 1; var eventDataStruct = structNew(); var eventCounter = 0; var currentDate = application.ptCalendar.date.createValidDate(year(now()),month(now()),day(now())); var isThisDatePastDate = true; var appConfig = getAppConfig(); var viewLinkData = StructNew(); var qParamDelimiter = "?"; var monthWrapperClass = "month-list-wrapper"; var currentDayClass = "month-list-day-current"; var eventDayHeaderClass = "month-list-day-header"; var standardDayClass = "month-list-day-standard"; var eventDayClass = "month-list-day-event"; var pastEventsDayClass = "calPastEventListWrapper"; var pastDayTextPreText = '
'; var pastDayTextPostText = '
'; var detailLink = cgi.script_name; var dailyLink = cgi.script_name; var weeklyListLink = cgi.script_name; var weeklyGridLink = cgi.script_name; var monthlyListLink = cgi.script_name; var monthlyGridLink = cgi.script_name; var nextPrevLink = cgi.script_name; var collapseCurrMonthPastEvents = getCollapseCurrentMonthsPastEventsStatus(); var useEventToolTip = getUseToolTipStatus(); var qTipStyleName = getToolTipTheme(); var eventDetailOptions = StructNew(); var listLabelTxt = "Events List for #DateFormat(firstDay,'mmmm yyyy')#"; var listLabelLink = ""; var listPrevTxt = "#monthAsString(dates.lastMonth)# #dates.lastYear#"; var listPrevLink = ""; var listNextTxt = "#monthAsString(dates.nextMonth)# #dates.nextYear#"; var listNextLink = ""; // Set the Event Detailed Day Text Options to pass to the BuildDetailedDayText function eventDetailOptions.showTime = true; eventDetailOptions.showLocation = true; eventDetailOptions.showCategoryIcons = true; // Get the view link data structure if ( application.ptCalendar.viewPageMode EQ "Single" ) { if ( LEN(TRIM(arguments.linkedPage)) ) viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageURL=arguments.linkedPage,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageParams=arguments.linkedParams); // Reset the query param initial delimiter to & qParamDelimiter = "&"; } else { if (LEN(TRIM(arguments.linkedSubsite))) viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(subsiteID=linkedSubsite,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(pageParams=arguments.linkedParams); if ( LEN(TRIM(arguments.linkedParams)) ) qParamDelimiter = "&"; } if( structKeyExists(viewLinkData, "detailPage") and len(viewLinkData.detailPage) ) detailLink = viewLinkData.detailPage; if( structKeyExists(viewLinkData, "dailyPage") and len(viewLinkData.dailyPage) ) dailyLink = viewLinkData.dailyPage; if( structKeyExists(viewLinkData, "weeklyListPage") and len(viewLinkData.weeklyListPage) ) weeklyListLink = viewLinkData.weeklyListPage; if( structKeyExists(viewLinkData, "weeklyGridPage") and len(viewLinkData.weeklyGridPage) ) weeklyGridLink = viewLinkData.weeklyGridPage; if( structKeyExists(viewLinkData, "monthlyListPage") and len(viewLinkData.monthlyListPage) ) monthlyListLink = viewLinkData.monthlyListPage; if( structKeyExists(viewLinkData, "monthlyGridPage") and len(viewLinkData.monthlyGridPage) ) monthlyGridLink = viewLinkData.monthlyGridPage; // set the nextPrevLink to the current view link nextPrevLink = monthlyListLink; // Build the List Header Nav Links listPrevLink = "#nextPrevLink##qParamDelimiter#month=#dates.lastMonth#&year=#dates.lastYear#&clicked=1"; listNextLink = "#nextPrevLink##qParamDelimiter#month=#dates.nextMonth#&year=#dates.nextYear#&clicked=1"; // loop through the items in the element for ( itm=1; itm LTE arrayLen(arguments.calendarData); itm=itm+1 ) { // set structure friendly variable for this event thisDateStruct = dateFormat(arguments.calendarData[itm][arguments.eventField], "yyyymmdd"); // see if this events date exists in the eventDataStruct if( not structKeyExists(eventDataStruct, thisDateStruct) ) eventDataStruct[thisDateStruct] = itm; else eventDataStruct[thisDateStruct] = listAppend(eventDataStruct[thisDateStruct], itm); } if ( !arrayLen(arguments.calendarData) ) collapseCurrMonthPastEvents = false;
application.ptCalendar.scripts.loadJQuery(); // Add the Tool Tips Script to the Calendar if ( useEventToolTip ) buildEventToolTipScript(); application.ADF.scripts.addFooterJS(monthAsListJS,"TERTIARY");
#buildMonthListHeaderNav(labelText=listLabelTxt,prevText=listPrevTxt,nextText=listNextTxt,prevLink=listPrevLink,nextLink=listNextLink)#
Show Past Events
// Start to build the Calender List mthClassTxt = ' class="#monthWrapperClass#"'; outString = outString & ""; // loop thru all the dates in this month for ( i=1; i lte DaysInMonth(firstDay); i=i+1 ) { // local variable for this date thisDate = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, i); // Determine if the rendered date occurred in the past isThisDatePastDate = false; if ( application.ptCalendar.date.IsRealDate(thisDate) AND DateCompare(currentDate,thisDate,"d") EQ 1 ) isThisDatePastDate = true; //determine the class for the current day or if the day has an event if ( isThisDatePastDate ) { dayclassTxt = ' class="#standardDayClass# calPastEventsDayWrapper"'; dayHeaderClassTxt = ' class="calEventListHeader #eventDayHeaderClass# calPastDayHeader"'; } else if ( thisDate EQ currentDate ) { // todays date dayclassTxt = ' class="#currentDayClass#"'; dayHeaderClassTxt = ' class="calEventListHeader #eventDayHeaderClass#"'; } else { dayclassTxt = ' class="#standardDayClass#"'; dayHeaderClassTxt = ' class="calEventListHeader #eventDayHeaderClass#"'; } dayText = ""; // has event for this date if ( structKeyExists(eventDataStruct, dateFormat(thisDate, 'yyyymmdd')) ) { dayText = '#DateFormat(thisDate,"full")#
'; detailedDayText = buildDetailedDayTextList(calendarData=arguments.calendarData,eventField=arguments.eventField,indexList=eventDataStruct[dateFormat(thisDate, 'yyyymmdd')],detailPageURL=detailLink,useTooltips=useEventToolTip,detailTextOptions=eventDetailOptions,flagPastEvents=isThisDatePastDate); if ( isThisDatePastDate ) dayText = dayText & pastDayTextPreText & detailedDayText & pastDayTextPostText; else dayText = dayText & detailedDayText; // output the day cell outString = outString & "#dayText# "; eventCounter = eventCounter + 1; } } if ( eventCounter EQ 0 ) { outString = outString & ''; dayText = "No Events Scheduled for the Month"; outString = outString & "#dayText# "; } outString=outString & ""; // calendarWrapper END outString=outString & ""; return outString;
var refDay = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, arguments.curDay); // retrieve the date struct for the surrounding weeks var weekStruct = application.ptCalendar.date.calculateWeekDates(inDate=refDay); var outString = ""; var itm = 1; var i = 1; var h = 1; var hDay = 1; var eventDataStruct = StructNew(); var appConfig = getAppConfig(); var viewLinkData = StructNew(); var qParamDelimiter = "?"; var height = 150; var width = 130; var currentDayClass = "week-grid-day-current"; var eventDayClass = "week-grid-day-event"; var standardDayClass = "week-grid-day-standard"; var dayHeaderClass = "week-grid-subheader"; var prevNextClass = "week-grid-header"; var dayText = ''; var detailedDayText = ''; var nextImage = ""; var prevImage = ""; var detailLink = cgi.script_name; var dailyLink = cgi.script_name; var weeklyListLink = cgi.script_name; var weeklyGridLink = cgi.script_name; var monthlyListLink = cgi.script_name; var monthlyGridLink = cgi.script_name; var nextPrevLink = cgi.script_name; var useEventToolTip = getUseToolTipStatus(); var qTipStyleName = getToolTipTheme(); var eventDetailOptions = StructNew(); var gridLabelTxt = "Week of #weekStruct.formattedThisWeek#"; var gridLabelLink = ""; var gridPrevTxt = "Week of #dateFormat(weekStruct.formattedLastWeek,"mmmm d")#"; var gridPrevLink = ""; var gridNextTxt = "Week of #dateFormat(weekStruct.formattedNextWeek,"mmmm d")#"; var gridNextLink = ""; // Set the Event Detailed Day Text Options to pass to the BuildDetailedDayText function eventDetailOptions.showTime = false; eventDetailOptions.showLocation = false; eventDetailOptions.showCategoryIcons = true; // Get the view link data structure if ( application.ptCalendar.viewPageMode EQ "Single" ) { if ( LEN(TRIM(arguments.linkedPage)) ) viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageURL=arguments.linkedPage,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageParams=arguments.linkedParams); qParamDelimiter = "&"; } else { if (LEN(TRIM(arguments.linkedSubsite))) viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(subsiteID=linkedSubsite,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(pageParams=arguments.linkedParams); if ( LEN(TRIM(arguments.linkedParams)) ) qParamDelimiter = "&"; } if( structKeyExists(viewLinkData, "detailPage") and len(viewLinkData.detailPage) ) detailLink = viewLinkData.detailPage; if( structKeyExists(viewLinkData, "dailyPage") and len(viewLinkData.dailyPage) ) dailyLink = viewLinkData.dailyPage; if( structKeyExists(viewLinkData, "weeklyListPage") and len(viewLinkData.weeklyListPage) ) weeklyListLink = viewLinkData.weeklyListPage; if( structKeyExists(viewLinkData, "weeklyGridPage") and len(viewLinkData.weeklyGridPage) ) weeklyGridLink = viewLinkData.weeklyGridPage; if( structKeyExists(viewLinkData, "monthlyListPage") and len(viewLinkData.monthlyListPage) ) monthlyListLink = viewLinkData.monthlyListPage; if( structKeyExists(viewLinkData, "monthlyGridPage") and len(viewLinkData.monthlyGridPage) ) monthlyGridLink = viewLinkData.monthlyGridPage; // set the nextPrevLink to the current view link nextPrevLink = weeklyGridLink; // Build the Grid Header Nav Links gridPrevLink = "#nextPrevLink##qParamDelimiter#clicked=1&day=#day(weekStruct.firstOfLastWeek)#&month=#month(weekStruct.firstOfLastWeek)#&year=#year(weekStruct.firstOfLastWeek)#"; gridNextLink = "#nextPrevLink##qParamDelimiter#clicked=1&day=#day(weekStruct.firstOfNextWeek)#&month=#month(weekStruct.firstOfNextWeek)#&year=#year(weekStruct.firstOfNextWeek)#"; // loop through the items in the element for ( itm=1; itm LTE arrayLen(arguments.calendarData); itm=itm+1 ) { // set structure friendly variable for this event thisDateStruct = dateFormat(arguments.calendarData[itm][arguments.eventField], "yyyymmdd"); // see if this events date exists in the eventDataStruct if( not structKeyExists(eventDataStruct, thisDateStruct) ) eventDataStruct[thisDateStruct] = itm; else eventDataStruct[thisDateStruct] = listAppend(eventDataStruct[thisDateStruct], itm); } application.ptCalendar.scripts.loadJQuery(); // Add the Tool Tips Script to the Calendar if ( useEventToolTip ) buildEventToolTipScript();
#buildWeekGridHeaderNav(labelText=gridLabelTxt,prevText=gridPrevTxt,nextText=gridNextTxt,prevLink=gridPrevLink,nextLink=gridNextLink)# outString = outString & ""; // loop thru all the dates in this month for ( i=0; i lte 6; i=i+1 ) { // local variable for this date //thisDate = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, i); thisDate = dateAdd("d", i, weekStruct.firstOfThisWeek); curDateKey = dateFormat(thisDate, "yyyymmdd"); //determine the class for the current day or if the day has an event classTxt = ' class="#standardDayClass#"'; dayText = dateFormat(thisDate, 'd'); // todays date if ( thisDate eq application.ptCalendar.date.createValidDate(year(now()),month(now()),day(now())) ) classTxt = ' class="#currentDayClass#"'; // has event for this date if ( structKeyExists(eventDataStruct, dateFormat(thisDate, 'yyyymmdd')) ) { classTxt = ' class="calEventDayCell #eventDayClass#"'; dayText = '#dateFormat(thisDate, 'd')#'; detailedDayText = buildDetailedDayTextGrid(arguments.calendarData,arguments.eventField,eventDataStruct[dateFormat(thisDate, 'yyyymmdd')],detailLink,useEventToolTip,eventDetailOptions); dayText = dayText & detailedDayText; } // output the day cell outString = outString & " "; } outString = outString & ""; outString = outString & "
#Left(DayOfWeekAsString(hDay), 3)#
#dayText#
"; // calendarWrapper END outString = outString & "
"; return outString;
var refDay = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, arguments.curDay); // retrieve the date struct for the surrounding weeks var weekStruct = application.ptCalendar.date.calculateWeekDates(inDate=refDay); var outString = ""; var i = 1; var itm = 1; var h = 1; var eventDataStruct = structNew(); var eventCounter = 0; var appConfig = getAppConfig(); var viewLinkData = StructNew(); var qParamDelimiter = "?"; var weekWrapperClass = "week-list-wrapper"; var currentDayClass = "week-list-day-current"; var eventDayHeaderClass = "week-list-day-header"; var eventDayListClass = "week-list-day-outer"; var standardDayClass = "week-list-day-standard"; var eventDayClass = "week-list-day-event"; var dayClassTxt = ''; var dayHeaderClassTxt = ''; var daylistClassTxt = ''; var dayText = ''; var detailedDayText = ''; var detailLink = cgi.script_name; var dailyLink = cgi.script_name; var weeklyListLink = cgi.script_name; var weeklyGridLink = cgi.script_name; var monthlyListLink = cgi.script_name; var monthlyGridLink = cgi.script_name; var nextPrevLink = cgi.script_name; var useEventToolTip = getUseToolTipStatus(); var qTipStyleName = getToolTipTheme(); var eventDetailOptions = StructNew(); var listLabelTxt = "Week of #weekStruct.formattedThisWeek#"; var listLabelLink = ""; var listPrevTxt = "Week of #dateFormat(weekStruct.formattedLastWeek,"mmmm d")#"; var listPrevLink = ""; var listNextTxt = "Week of #dateFormat(weekStruct.formattedNextWeek,"mmmm d")#"; var listNextLink = ""; // Set the Event Detailed Day Text Options to pass to the BuildDetailedDayText function eventDetailOptions.showTime = true; eventDetailOptions.showLocation = true; eventDetailOptions.showCategoryIcons = true; if ( application.ptCalendar.viewPageMode EQ "Single" ) { if ( LEN(TRIM(arguments.linkedPage)) ) viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageURL=arguments.linkedPage,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageParams=arguments.linkedParams); qParamDelimiter = "&"; } else { if (LEN(TRIM(arguments.linkedSubsite))) viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(subsiteID=linkedSubsite,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(pageParams=arguments.linkedParams); if ( LEN(TRIM(arguments.linkedParams)) ) qParamDelimiter = "&"; } if( structKeyExists(viewLinkData, "detailPage") and len(viewLinkData.detailPage) ) detailLink = viewLinkData.detailPage; if( structKeyExists(viewLinkData, "dailyPage") and len(viewLinkData.dailyPage) ) dailyLink = viewLinkData.dailyPage; if( structKeyExists(viewLinkData, "weeklyListPage") and len(viewLinkData.weeklyListPage) ) weeklyListLink = viewLinkData.weeklyListPage; if( structKeyExists(viewLinkData, "weeklyGridPage") and len(viewLinkData.weeklyGridPage) ) weeklyGridLink = viewLinkData.weeklyGridPage; if( structKeyExists(viewLinkData, "monthlyListPage") and len(viewLinkData.monthlyListPage) ) monthlyListLink = viewLinkData.monthlyListPage; if( structKeyExists(viewLinkData, "monthlyGridPage") and len(viewLinkData.monthlyGridPage) ) monthlyGridLink = viewLinkData.monthlyGridPage; // set the nextPrevLink to the current view link nextPrevLink = weeklyListLink; // Build the List Header Nav Links listPrevLink = "#nextPrevLink##qParamDelimiter#clicked=1&day=#day(weekStruct.firstOfLastWeek)#&month=#month(weekStruct.firstOfLastWeek)#&year=#year(weekStruct.firstOfLastWeek)#"; listNextLink = "#nextPrevLink##qParamDelimiter#clicked=1&day=#day(weekStruct.firstOfNextWeek)#&month=#month(weekStruct.firstOfNextWeek)#&year=#year(weekStruct.firstOfNextWeek)#"; // loop through the items in the element for ( itm=1; itm LTE arrayLen(arguments.calendarData); itm=itm+1 ) { // set structure friendly variable for this event thisDateStruct = dateFormat(arguments.calendarData[itm][arguments.eventField], "yyyymmdd"); // see if this events date exists in the eventDataStruct if( not structKeyExists(eventDataStruct, thisDateStruct) ) eventDataStruct[thisDateStruct] = itm; else eventDataStruct[thisDateStruct] = listAppend(eventDataStruct[thisDateStruct], itm); } application.ptCalendar.scripts.loadJQuery(); // Add the Tool Tips Script to the Calendar if ( useEventToolTip ) buildEventToolTipScript();
#buildWeekListHeaderNav(labelText=listLabelTxt,prevText=listPrevTxt,nextText=listNextTxt,prevLink=listPrevLink,nextLink=listNextLink)# // Start to build the Calender List //outString = outString & "
"; wkClassTxt = ' class="#weekWrapperClass#"'; outString = outString & ""; // loop thru all the dates in this month for ( i=0; i lte 6; i=i+1 ) { // local variable for this date //thisDate = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, i); thisDate = dateAdd("d", i, weekStruct.firstOfThisWeek); curDateKey = dateFormat(thisDate, "yyyymmdd"); //determine the class for the current day or if the day has an event dayClassTxt = ' class="#standardDayClass#"'; dayHeaderClassTxt = ' class="calEventListHeader #eventDayHeaderClass#"'; daylistClassTxt = ' class="#eventDayListClass#"'; dayText = DateFormat(thisDate,"full"); // todays date if ( thisDate eq application.ptCalendar.date.createValidDate(year(now()),month(now()),day(now())) ) dayClassTxt = ' class="#currentDayClass#"'; // has event for this date if ( structKeyExists(eventDataStruct, dateFormat(thisDate, 'yyyymmdd')) ) { //dayClassTxt = ' class="#eventDayClass#"'; dayText = '#dayText#
'; dayText = ''; detailedDayText = buildDetailedDayTextList(arguments.calendarData,arguments.eventField,eventDataStruct[dateFormat(thisDate, 'yyyymmdd')],detailLink,useEventToolTip,eventDetailOptions,false,false); dayText = dayText & detailedDayText; dayText = ''; } else { dayText = '#dayText#
'; detailedDayText = '
No events listed for this date
'; detailedDayText = detailedDayText & '
'; dayText = dayText & detailedDayText; } // output the day cell outString = outString & "#dayText# "; eventCounter = eventCounter + 1; } if ( eventCounter EQ 0 ) { outString = outString & ''; dayText = "No Events Scheduled for the Week"; outString = outString & "#dayText# "; } outString=outString & ""; // calendarWrapper END outString=outString & ""; return outString;
var outString = ''; var refDay = application.ptCalendar.date.createValidDate(arguments.curYear, arguments.curMonth, arguments.curDay); var eventData = arguments.calendarData; var appConfig = getAppConfig(); var viewLinkData = {}; var qParamDelimiter = "?"; // Get the date/time CF display masks var cfDateDisplayMask = getDisplayCFdateMask(); // "M/D/YYYY" - DATE FORMAT FOR DISPLAY var cfTimeDisplayMask = getDisplayCFtimeMask(); // "h:mm tt" - TIME FORMAT FOR DISPLAY // initialize the link variables var detailLink = cgi.script_name; var dailyLink = cgi.script_name; var nextPrevLink = ''; var dayPrevTxt = ""; var dayPrevLink =""; var dayNextTxt = ""; var dayNextLink = ""; var dayLabelTxt = ''; var defaultCalendarView = getDefaultDisplayView(); var backToCalendarLink = ''; // Set the Event Cache status from the configuration element var useEventsCache = getEventCacheStatus(); // Check if we have data to sort if ( ArrayLen(eventData) ) { // Sort the retArray eventData = application.ptCalendar.data.arrayOfStructsSortMultiKeys( aOfS=eventData ,orderByKeyList="eventDate,AllDay DESC,StartTime" ); } // Get the view link data structure if ( application.ptCalendar.viewPageMode EQ "Single" ) { if ( LEN(TRIM(arguments.linkedPage)) ) viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageURL=arguments.linkedPage,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(pageParams=arguments.linkedParams); qParamDelimiter = "&"; } else { if (LEN(TRIM(arguments.linkedSubsite))) viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(subsiteID=linkedSubsite,pageParams=arguments.linkedParams); else viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(pageParams=arguments.linkedParams); if ( LEN(TRIM(arguments.linkedParams)) ) qParamDelimiter = "&"; } if( structKeyExists(viewLinkData, "detailPage") and len(trim(viewLinkData.detailPage)) ) detailLink = viewLinkData.detailPage; if( structKeyExists(viewLinkData, "dailyPage") and len(trim(viewLinkData.dailyPage)) ) dailyLink = viewLinkData.dailyPage; if( structKeyExists(viewLinkData, "weeklyListPage") and len(viewLinkData.weeklyListPage) ) weeklyListLink = viewLinkData.weeklyListPage; if( structKeyExists(viewLinkData, "weeklyGridPage") and len(viewLinkData.weeklyGridPage) ) weeklyGridLink = viewLinkData.weeklyGridPage; if( structKeyExists(viewLinkData, "monthlyListPage") and len(viewLinkData.monthlyListPage) ) monthlyListLink = viewLinkData.monthlyListPage; if( structKeyExists(viewLinkData, "monthlyGridPage") and len(viewLinkData.monthlyGridPage) ) monthlyGridLink = viewLinkData.monthlyGridPage; // set the nextPrevLink to the current view link nextPrevLink = dailyLink; // Build the Day Header Nav Links dayPrevTxt = "#dateFormat(request.ptCalendar.yesterday, "mmmm d")#"; dayPrevLink ="#nextPrevLink##qParamDelimiter#clicked=1&day=#day(request.ptCalendar.yesterday)#&month=#month(request.ptCalendar.yesterday)#&year=#year(request.ptCalendar.yesterday)#"; dayNextTxt = "#dateFormat(request.ptCalendar.tomorrow, "mmmm d")#"; dayNextLink = "#nextPrevLink##qParamDelimiter#clicked=1&day=#day(request.ptCalendar.tomorrow)#&month=#month(request.ptCalendar.tomorrow)#&year=#year(request.ptCalendar.tomorrow)#"; dayLabelTxt = "Events for #request.ptCalendar.formattedDate#"; if ( defaultCalendarView EQ 'MonthGrid' ) backToCalendarLink = monthlyGridLink; else if ( defaultCalendarView EQ 'MonthList' ) backToCalendarLink = monthlyListLink; else if ( defaultCalendarView EQ 'WeekGrid' ) backToCalendarLink = weeklyGridLink; else if ( defaultCalendarView EQ 'WeekList' ) backToCalendarLink = weeklyListLink;
#buildDayListHeaderNav(labelText=dayLabelTxt,prevText=dayPrevTxt,nextText=dayNextTxt,labelLink="",prevLink=dayPrevLink,nextLink=dayNextLink,labelClass="day-header",prevNextClass="day-nav")#

No events for today

linkParamsData = buildEventDetailsLinksParams(eventDataStruct=eventData[itm]); eventDetailLink = buildLinkParamURL( linkURL=detailLink ,linkParamName=linkParamsData.UIDvarName ,linkParamValue=linkParamsData.UIDvalue ,urlParams="" ); eventLayerID = linkParamsData.UIDstring;
#catName#
- #categoryArray[cat].values.name#
[ALL DAY] #timeFormat(eventData[itm].startTime, cfTimeDisplayMask)# - #timeFormat(eventData[itm].endTime, cfTimeDisplayMask)#
#timeStr#
#iconImgStr# #eventData[itm].title#  [R*]  [R]
  • Location: #eventData[itm].location#
  • Name: #eventData[itm].contactName#
    Phone: #eventData[itm].contactPhone#
return outString;
var gridNavStr = ""; //arguments.prevText = "<< " & arguments.prevText; //arguments.nextText = arguments.nextText & " >>"; application.ptCalendar.scripts.loadFontAwesome(); var gridNavStr = ""; //arguments.prevText = "<< " & arguments.prevText; //arguments.nextText = arguments.nextText & " >>"; application.ptCalendar.scripts.loadFontAwesome(); var gridNavStr = ""; //arguments.prevText = "<< " & arguments.prevText; //arguments.nextText = arguments.nextText & " >>"; application.ptCalendar.scripts.loadFontAwesome();

#arguments.labelText#

var listNavStr = ""; //arguments.prevText = "<< " & arguments.prevText; //arguments.nextText = arguments.nextText & " >>"; application.ptCalendar.scripts.loadFontAwesome();

#arguments.labelText#

var listNavStr = ""; //arguments.prevText = "<< " & arguments.prevText; //arguments.nextText = arguments.nextText & " >>"; application.ptCalendar.scripts.loadFontAwesome();

#arguments.labelText#

var listNavStr = ""; //arguments.prevText = "<< " & arguments.prevText; //arguments.nextText = arguments.nextText & " >>"; application.ptCalendar.scripts.loadFontAwesome();

#arguments.labelText#

var appConfig = getAppConfig(); var uiTheme = getUItheme(); var rtnString = ""; var i = ""; var eventItm = ""; var eventArray = ArrayNew(1); var categoryArray = ArrayNew(1); var itm = ""; var icn = ""; var toolTipContent = ""; var newEventStr = ""; var timeStr = ""; var iconImgStr = ""; var iconStruct = StructNew(); var eventDetailLink = ""; var qParamDelimiter = "?"; //var eventID = ""; //var UID = ""; //var UIDvarName = ""; var currentDate = application.ptCalendar.date.createValidDate(year(now()),month(now()),day(now())); var isThisEventPast = false; var eventTypeClassList = ""; var detailURL = ""; var showEventTime = false; var showEventLocation = false; var showEventCategoryIcons = true; var actionApp = getAppBeanName(); var actionForms = "calEventsForms"; var eventCatIconClass = "calEventGridCatIcon"; //var showNoEventsText = false; //var noEventsListedText = "No events listed for this date"; if ( application.ptCalendar.viewPageMode EQ "Single" ) qParamDelimiter = "&"; if ( LEN(TRIM(arguments.detailPageURL)) ) detailURL = TRIM(arguments.detailPageURL); if ( structKeyExists(arguments.detailTextOptions,"showTime") ) showEventTime = detailTextOptions.showTime; if ( structKeyExists(arguments.detailTextOptions,"showLocation") ) showEventLocation = detailTextOptions.showLocation; if ( structKeyExists(arguments.detailTextOptions,"showCategoryIcons") ) showEventCategoryIcons = detailTextOptions.showCategoryIcons; /* if ( structKeyExists(arguments.detailTextOptions,"showNoEvents") AND detailTextOptions.showNoEvents IS true ) showNoEventsText = true; */ /* if ( structKeyExists(arguments.detailTextOptions,"noEventsText") AND LEN(TRIM(detailTextOptions.noEventsText)) ) noEventsListedText = detailTextOptions.noEventsText; */ // Determine if this event as occurred int he past if ( application.ptCalendar.date.IsRealDate(thisDate) AND DateCompare(currentDate,thisDate,"d") EQ 1 ) isThisEventPast = true; // Grab the Days events from the calendarData and Put in a new eventArray for ( i=1;i LTE ListLen(arguments.indexList); i=i+1 ) { eventItm = ListGetAt(arguments.indexList, i); eventArray[i] = arguments.calendarData[eventItm]; } // Check if we have data to sort if ( ArrayLen(eventArray) ) { // Sort the retArray by eventDate, AllDay and StartTime eventArray = application.ptCalendar.data.arrayOfStructsSortMultiKeys( aOfS=eventArray ,orderByKeyList="eventDate,AllDay DESC,StartTime" ); } #categoryArray[icn].values.name# [ALL DAY] #timeFormat(eventArray[itm].startTime, "h:mm tt")# - #timeFormat(eventArray[itm].endTime, "h:mm tt")#
#timeStr#
Location: #eventArray[itm].location#
#application.ptCalendar.ui.buildLightboxProxyLink( linkTitle="Edit Event" ,bean=actionForms ,method="renderEditTypeConfirmHTMLForm" ,urlParams=urlPamams ,lbTitle="Edit Event" ,linkClass="calendar-event-remove ui-icon ui-icon-pencil" ,appName=actionApp ,uiTheme=uiTheme ,linkText="" )# #application.ptCalendar.ui.buildLightboxProxyLink( linkTitle="Delete Event" ,bean=actionForms ,method="renderDeleteTypeConfirmHTMLForm" ,urlParams=urlPamams ,lbTitle="Delete Event" ,linkClass="calendar-event-remove ui-icon ui-icon-trash" ,appName=actionApp ,uiTheme=uiTheme ,linkText="" )#  
var toolTipScriptJS = ""; var ADFminVersionForQTip2 = "1.6.2"; var ADFversionCompare = application.ptCalendar.utils.versionCompare(versionA=application.ADF.version,versionB=ADFminVersionForQTip2); var uiTheme = getUItheme(); var qTipStyleName = getToolTipTheme(); var useUItheme = false; if ( qTipStyleName EQ "UI" OR arguments.showAdminTools ) useUItheme = true; application.ptCalendar.scripts.loadJQuery(); if ( useUItheme ) application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme); if ( ADFversionCompare GTE 0 ) { application.ptCalendar.scripts.loadQTip(); application.ptCalendar.scripts.loadJQueryImagesLoaded(); } else { application.ptCalendar.scripts.loadQTip(version='1.0'); } // Load the inline JavaScript after the libraries have loaded application.ptCalendar.scripts.addFooterJS(toolTipScriptJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY //var formID = getCalendarFormID(); var eventStruct = arguments.eventData; var toolTipStr = ""; var detailURL = ""; var eventDetailLink = ""; var cfDateDisplayMask = application.ptCalendar.getDisplayCFdateMask(); // "M/D/YYYY" - DATE FORMAT FOR DISPLAY var cfTimeDisplayMask = application.ptCalendar.getDisplayCFtimeMask(); // "h:mm tt" - TIME FORMAT FOR DISPLAY // Cat String and Icon Variables var iconImgStr = ""; var catName = ""; var iconStruct = StructNew(); var cat = 0; var icn = 0; var catTextStr = ""; var orgTextStr = ""; // Time String Variables var timeStr = ""; // Contact String Variables var contactStr = ""; var descriptText = ""; var descriptMaxWordCnt = getToolTipDescriptionMaxWordCount(); var qParamDelimiter = "?"; if ( application.ptCalendar.viewPageMode EQ "Single" ) qParamDelimiter = "&"; if ( LEN(TRIM(arguments.detailPageURL)) ) detailURL = TRIM(arguments.detailPageURL); // Build the event details link with URL params for the occurrence // There may be many Event Records with the the same calEventID (recurring events or an event with multiple date times) // - Each occurrence of a recurring event gets a unique dtHashID // - Each "date/time" record for an event gets a unique dateTimeID eventDetailLink = buildEventDetailsLinkURL(eventDataStruct=eventData,detailsLinkURL=detailURL);
#catName#
- #categoryArray[cat].values.name#
[ALL DAY] #timeFormat(eventStruct.startTime, cfTimeDisplayMask)# - #timeFormat(eventStruct.endTime, cfTimeDisplayMask)#
#eventStruct.contactName#
#eventStruct.contactPhone#

#iconImgStr# #titleText#  [R*]  [R]

  • Time: #timeStr#
  • Location: #locationStr#
  • Contact: #contactStr#
  • Categories: #catTextStr#
  • Organizations: #orgTextStr#
  • --->

#descriptText#

var linkParams = buildEventDetailsLinksParams(eventDataStruct=arguments.eventDataStruct); var retStr = buildLinkParamURL( linkURL=arguments.detailsLinkURL ,linkParamName=linkParams.UIDvarName ,linkParamValue=linkParams.UIDvalue ,urlParams=arguments.urlParams ); return retStr; var retData = StructNew(); retData.UIDvalue = ""; retData.UIDvarName = ""; retData.UIDstring = ""; // Build the event details URL params for the occurrence // There may be many Event Records with the the same calEventID (recurring events or an event with multiple date times) // - Each ocurrence of a recurring event gets a unique dtHashID // - Each static "date/time" record for an event gets a unique dateTimeID if ( StructKeyExists(arguments.eventDataStruct,"dtHashID") AND LEN(TRIM(arguments.eventDataStruct.dtHashID)) ) { retData.UIDvalue = arguments.eventDataStruct.dtHashID; retData.UIDvarName = "oid"; } else if ( StructKeyExists(arguments.eventDataStruct,"dateTimeID") AND LEN(TRIM(arguments.eventDataStruct.dateTimeID)) ) { retData.UIDvalue = arguments.eventDataStruct.dateTimeID; retData.UIDvarName = "dtid"; } retData.UIDstring = "eid-" & retData.UIDvarName & "-" & retData.UIDvalue; return retData; var retStr = ""; var uParams = ""; var qDelimiter = "?"; // If the linkURL already has a "?" set the query param delimiter to an & if ( Find("?",arguments.linkURL,1) ) qDelimiter = "&"; if ( LEN(TRIM(arguments.urlParams)) ) { uParams = TRIM(arguments.urlParams); if ( Find("&",uParams,"1") NEQ 1 ) uParams = "&" & uParams; } retStr = arguments.linkURL & qDelimiter & arguments.linkParamName & "=" & arguments.linkParamValue & uParams; return retStr; var retData = {}; var viewType = ''; var dtHashID = ''; var dateTimeID = ''; var viewParamName = getViewParamName(); if ( StructKeyExists(request,"params") AND StructKeyExists(request.params,viewParamName) ) { if ( !StructKeyExists(request,"ptCalendar") ) application.ptCalendar.calRenderController.processSelectedDate(); if ( StructKeyExists(request.ptCalendar,"view") ) viewType = request.ptCalendar.view; if ( StructKeyExists(request,"params") ) { if ( StructKeyExists(request.params,"oid") ) dtHashID = request.params.oid; if ( StructKeyExists(request.params,"dtid") ) dateTimeID = request.params.dtid; } retData = getCalendarPageData(viewType=viewType,theYear=request.ptCalendar.thisYear,theMonth=request.ptCalendar.thisMonth,theDay=request.ptCalendar.thisDay,oid=dtHashID,dtid=dateTimeID); } return retData; var retStr = ''; var pageData = getCalendarCurrentPageData(); if ( StructKeyExists(pageData,"title") AND LEN(TRIM(pageData.title)) ) retStr = pageData.title; return retStr; var viewParamName = getViewParamName(); var paramData = {}; var viewType = ''; var year = ''; var month = ''; var day = ''; var dtHashID = ''; var dateTimeID = ''; if ( Left(arguments.urlParams,1) EQ "?" ) arguments.urlParams = Right(arguments.urlParams,Len(arguments.urlParams)-1); paramData = application.ADF.data.queryStringToStruct(inString=arguments.urlParams); //WriteDump(var=paramData,label="paramData"); if ( StructKeyExists(paramData,viewParamName) ) viewType = TRIM(paramData[viewParamName]); if ( StructKeyExists(paramData,"year") ) year = paramData.year; if ( StructKeyExists(paramData,"month") ) month = paramData.month; if ( StructKeyExists(paramData,"day") ) day = paramData.day; if ( StructKeyExists(paramData,"oid") ) dtHashID = paramData.oid; if ( StructKeyExists(paramData,"dtid") ) dateTimeID = paramData.dtid; //WriteOutput("viewType: " & viewType & "
"); //WriteOutput("year: " & year & "
"); //WriteOutput("month: " & month & "
"); //WriteOutput("day: " & day & "
"); //WriteOutput("dtHashID: " & dtHashID & "
"); //WriteOutput("dateTimeID: " & dateTimeID & "
"); return getCalendarPageData(viewType=viewType,theYear=year,theMonth=month,theDay=day,oid=dtHashID,dtid=dateTimeID);
var retStr = ''; var pageData = getCalendarPageDataByUrlParams(urlParams=arguments.urlParams); if ( StructKeyExists(pageData,"title") AND LEN(TRIM(pageData.title)) ) retStr = pageData.title; return retStr; var retData = {}; //var viewParamName = getViewParamName(); var defaultView = getDefaultDisplayView(); var dataParts = {}; var viewTypeStr = defaultView; var thisYear = 0; var thisMonth = 0; var thisDay = 0; var useEventsCache = false; var dtHashID = ""; var dateTimeID = ""; var eventQry = QueryNew("tmp"); var eventData = {}; retData.title = ""; retData.description = ""; if ( LEN(TRIM(arguments.viewType)) ) viewTypeStr = TRIM(lcase(arguments.viewType)); if ( IsNumeric(arguments.theYear) AND IsValid("range",arguments.theYear,1900,3000) ) thisYear = arguments.theYear; if ( IsNumeric(arguments.theMonth) AND IsValid("range",arguments.theMonth,1,12) ) thisMonth = arguments.theMonth; if ( IsNumeric(arguments.theDay) AND IsValid("range",arguments.theDay,1,31) ) thisDay = arguments.theDay; if ( LEN(TRIM(arguments.oid)) ) dtHashID = arguments.oid; if ( LEN(TRIM(arguments.dtid)) ) dateTimeID = arguments.dtid; //WriteOutput("viewTypeStr:" & viewTypeStr & "
"); //WriteOutput("thisYear:" & thisYear & "
"); //WriteOutput("thisMonth:" & thisMonth & "
"); //WriteOutput("thisDay:" & thisDay & "
"); if ( viewTypeStr NEQ "eventdetails" ) { dataParts = application.ptCalendar.calRenderController.buildDateStructFromDateParts( theYear = thisYear ,theMonth = thisMonth ,theDay = thisDay ); if ( FindNoCase("month",viewTypeStr) ) retData.title = "Events for " & DateFormat(dataParts.firstOfThisMonth,'mmmm yyyy'); else if ( FindNoCase("week",viewTypeStr) ) retData.title = "Events for the week of " & dataParts.formattedThisWeek; else if ( FindNoCase("day",viewTypeStr) ) retData.title = "Events for " & dataParts.formattedDate; } else { if ( LEN(TRIM(dtHashID)) OR LEN(TRIM(dateTimeID)) ) { useEventsCache = application.ptCalendar.getEventsManagementEventCacheStatus(); eventQry = application.ptCalendar.calEventsDAO.getEvents( dateTimeID = dateTimeID ,hashID = dtHashID ,useCache = useEventsCache ); // Convert the Event Query data to and Array of Structs if ( eventQry.RecordCount ) { eventData = application.ptCalendar.data.queryRowToStruct(query=eventQry,rowNum=1); retData.title = "Event: "; if ( StructKeyExists(eventData,"title") ) retData.title = retData.title & eventData.title; if ( StructKeyExists(eventData,"eventDate") ) retData.title = retData.title & " (" & DateFormat(eventData.eventDate,'m/d/yyyy') & ")"; if ( StructKeyExists(eventData,"description") AND LEN(TRIM(eventData.description)) ) retData.description = eventData.description; } } // dtHashID or dateTimeID } //if ( LEN(TRIM(retData.title)) ) // retData.description = retData.title; return retData;
var retStr = ''; var pageData = getCalendarPageData(viewType=arguments.viewType,theYear=arguments.theYear,theMonth=arguments.theMonth,theDay=arguments.theDay,oid=arguments.oid,dtid=arguments.dtid); if ( StructKeyExists(pageData,"title") AND LEN(TRIM(pageData.title)) ) retStr = pageData.title; return retStr; var adminScriptStr = ""; var uiTheme = getUItheme(); var newEventlbTitle="Add New Event"; var newEventlbAction = "refreshparent"; var eventAddBean = "calEventsForms"; var eventAddMethod = "renderEventEditForm"; var formid = 0; application.ptCalendar.scripts.loadJQuery(); application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme); application.ptCalendar.scripts.loadADFLightbox(); application.ptCalendar.scripts.addFooterJS(adminScriptStr,"TERTIARY"); var catList = arguments.catTypeList; var classList = ""; var i = 1; var classItemPrefix = application.ptCalendar.getCatItemPrefix(); //"catType-"; if ( LEN(TRIM(catList)) ) { for (i=1;i LTE ListLen(catList); i=i+1) { catItem = classItemPrefix & stripEventTypeChars(ListGetAt(catList, i)); classList = ListAppend(classList, catItem, " "); } } return classList; var stripName = ""; if ( LEN(TRIM(arguments.itemName)) ) stripName = TRIM(LCASE(REReplace(arguments.itemName,"[\W]+","","ALL"))); return stripName;