// Set the default text for no records. var retHTML = ""; // Get the data for the link builder data var dtDataArray = ArrayNew(1); var i = 1; var currText = ""; var currURL = ""; var currEditLink = ""; var currRemoveLink = ""; var editDeleteLinks = ""; var noRecordsText = "Date/Times have not been selected for this event.
Please click '#arguments.buttonText#'."; // check that we have a UUID List values if ( ListLen(arguments.uuidList) ) { dtDataArray = buildDateTimeRenderData(arguments.uuidlist); // Check that we have linkDataArray if ( ArrayLen(dtDataArray) ) { // Loop over the linkDataArray records for ( i = 1; i LTE ArrayLen(dtDataArray); i = i + 1 ) { // Build the Edit and Delete Links for each DateTime block editDeleteLinks = "
"; editDeleteLinks = editDeleteLinks & ""; editDeleteLinks = editDeleteLinks & ""; // Do Not Render the Delete Button if the is a broken recurrence dateTime record if ( LEN(TRIM(dtDataArray[i].dtHashID)) EQ 0 ) editDeleteLinks = editDeleteLinks & ""; editDeleteLinks = editDeleteLinks & "
"; // Build the DateTime blocks retHTML = retHTML & "
#Trim(dtDataArray[i].renderString)#" & editDeleteLinks & "
"; } // Check if we have built data if ( LEN(retHTML) ) { // Prepend and Append the div block for the styles retHTML = "
" & retHTML & "
"; } } } // Set the default text for no records. if ( NOT LEN(retHTML) ) { retHTML = "
#noRecordsText#
"; } return retHTML;
var dateTimeArray = ArrayNew(1); var i=1; var retArray = ArrayNew(1); var tmpData = StructNew(); //var cfDateFormatMask = "M/D/YYYY"; // TODO: move to APP.cfc or to the Config element //var cfTimeFormatMask = "h:mm tt"; // TODO: move to APP.cfc or to the Config element var cfDateDisplayMask = application.ptCalendar.getDisplayCFdateMask(); // "M/D/YYYY" - DATE FORMAT FOR DISPLAY var cfTimeDisplayMask = application.ptCalendar.getDisplayCFtimeMask(); // "h:mm tt" - TIME FORMAT FOR DISPLAY var cfDateSortMask = application.ptCalendar.getSortingCFdateMask(); // "YYYY/MM/DD" - DATE FORMAT FOR SORTING var cfTimeSortMask = application.ptCalendar.getSortingCFtimeMask(); // "HH:mm" - TIME FORMAT FOR SORTING // Make sure we have DateTimeIDs before going to get records... or we will get them all if ( LEN(TRIM(arguments.dateTimeIDList)) ) dateTimeArray = application.ptCalendar.dateTimeBuilderDAO.getDateTimeData(uuid=arguments.dateTimeIDList); for (i=1; i LTE ArrayLen(dateTimeArray); i=i+1){ tmpData = StructNew(); tmpData.uniqueID = dateTimeArray[i].Values.uniqueID; tmpData.dtHashID = dateTimeArray[i].Values.dtHashID; //tmpData.eventDate = DateFormat(dateTimeArray[i].Values.date, "M/D/YY"); tmpData.eventDate = DateFormat(dateTimeArray[i].Values.eventDate, cfDateSortMask); // "YYYY/MM/DD" - DATE FORMAT FOR SORTING if ( StructKeyExists(dateTimeArray[i].Values,"startTime") AND LEN(dateTimeArray[i].Values.startTime) ) tmpData.StartTime = TimeFormat(dateTimeArray[i].Values.startTime, cfTimeSortMask); // 'HH:mm' - TIME FORMAT FOR SORTING else tmpData.StartTime = ""; if ( StructKeyExists(dateTimeArray[i].Values,"endTime") AND LEN(dateTimeArray[i].Values.endTime) ) tmpData.EndTime = TimeFormat(dateTimeArray[i].Values.endTime, cfTimeSortMask); // 'HH:mm' - TIME FORMAT FOR SORTING else tmpData.EndTime = ""; if ( StructKeyExists(dateTimeArray[i].Values,"allDay") AND dateTimeArray[i].Values.allDay EQ 1 ) tmpData.AllDay = 1; else tmpData.AllDay = 0; // Build the render string tmpData.RenderString = DateFormat(dateTimeArray[i].Values.eventDate, cfDateDisplayMask); // Determine if all day event or has start and end time if ( dateTimeArray[i].Values.allDay EQ 1 ) { tmpData.RenderString = tmpData.RenderString & " [All Day]"; } else if ( LEN(dateTimeArray[i].Values.startTime) ) { if ( LEN(dateTimeArray[i].Values.endTime) ) tmpData.RenderString = tmpData.RenderString & " [#TimeFormat(dateTimeArray[i].Values.startTime,cfTimeDisplayMask)# - #TimeFormat(dateTimeArray[i].Values.endTime,cfTimeDisplayMask)#]"; // TIME FORMAT FOR DISPLAY else tmpData.RenderString = tmpData.RenderString & " [#TimeFormat(dateTimeArray[i].Values.startTime,cfTimeDisplayMask)#]"; // TIME FORMAT FOR DISPLAY } // Replace all the spaces with a   tmpData.RenderString = REREPLACE(tmpData.RenderString,"[\s]"," ","all"); // Build the SORTING string tmpData.SortingString = DateFormat(dateTimeArray[i].Values.eventDate, cfDateSortMask); // Determine if all day event or has start and end time if ( dateTimeArray[i].Values.allDay EQ 1 ) { tmpData.SortingString = tmpData.SortingString & " 00:00:00-23:59:59"; } else if ( LEN(dateTimeArray[i].Values.startTime) ) { if ( LEN(dateTimeArray[i].Values.endTime) ) tmpData.SortingString = tmpData.SortingString & " #TimeFormat(dateTimeArray[i].Values.startTime,cfTimeSortMask)#-#TimeFormat(dateTimeArray[i].Values.endTime,cfTimeSortMask)#"; // TIME FORMAT FOR SORTING else tmpData.SortingString = tmpData.SortingString & " #TimeFormat(dateTimeArray[i].Values.startTime,cfTimeSortMask)#"; // TIME FORMAT FOR SORTING } // Replace all the spaces with a   //tmpData.SortingString = REREPLACE(tmpData.SortingString,"[\s]"," ","all"); // Add the tmpData structure to the retrun Array ArrayAppend(retArray,tmpData); } // Check if we have data to sort (Running the sort AFTER kills the formatting) if ( ArrayLen(retArray) ) { // Sort the retArray retArray = application.ptCalendar.data.arrayOfStructsSortMultiKeys( aOfS=retArray, orderByKeyList="eventDate,AllDay DESC,StartTime", forceColsToVarchar=1 ); } return retArray; var reHTML = ""; var deleteItemsList = application.ptCalendar.dateTimeBuilderService.deleteDateTimesByParentID(parentID=arguments.parentID); // Check to see if any DateTime records were deleted if ( ListLen(deleteItemsList) ) reHTML = "The Event and the Date Time Records have been Deleted!"; else reHTML = "The Event has been Deleted!"; // Process Close window (!!not working with the CS delete Delete dialog!!) // reHTML = lightBoxMessage(reHTML,arguments.lbAction); return reHTML; var retHTML = ""; var lightBoxActionOptions = "closeLB,closeLBrefreshParent,clickToCloseLB,clickToCloseLBrefreshParent"; var ligthBoxAction = "none"; // Make sure the lbAction is one of the available options if ( ListFindNoCase(lightBoxActionOptions,arguments.lbAction) ) ligthBoxAction = arguments.lbAction; // Load the jQuery scripts application.ptCalendar.scripts.loadJQuery(); application.ptCalendar.scripts.loadADFLightbox(force=true);
style="#arguments.lbStyle#" class="#arguments.lbClass#"> #arguments.msgHTML#

Click here to close and refresh. Click here to close.