// 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 = "Days and Times have not been selected for this class.
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 ) { editDeleteLinks = ""; // Build the Edit and Delete Links for each DateTime block //editDeleteLinks = "
"; editDeleteLinks = editDeleteLinks & ""; editDeleteLinks = editDeleteLinks & ""; editDeleteLinks = editDeleteLinks & ""; editDeleteLinks = editDeleteLinks & "
"; // Build the DateTime blocks retHTML = retHTML & "
"; retHTML = retHTML & editDeleteLinks; retHTML = retHTML & " " & TRIM(dtDataArray[i].renderString) & ""; retHTML = retHTML & "
 " & TRIM(dtDataArray[i].renderMetaInfoString); /* if ( LEN(TRIM(dtDataArray[i].renderMetaInfoString)) ) retHTML = retHTML & "
 " & TRIM(dtDataArray[i].renderMetaInfoString); else retHTML = retHTML & "
"; */ retHTML = retHTML & "
"; //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 d=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.ptCourseCatalog.getDisplayCFdateMask(); // "M/D/YYYY" - DATE FORMAT FOR DISPLAY var cfTimeDisplayMask = application.ptCourseCatalog.getDisplayCFtimeMask(); // "h:mm tt" - TIME FORMAT FOR DISPLAY var cfDateSortMask = application.ptCourseCatalog.getSortingCFdateMask(); // "YYYY/MM/DD" - DATE FORMAT FOR SORTING var cfTimeSortMask = application.ptCourseCatalog.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 = variables.scheduleBuilderDAO.getDateTimeData(uuid=arguments.dateTimeIDList); for (i=1; i LTE ArrayLen(dateTimeArray); i=i+1 ) { tmpData = StructNew(); tmpData.uniqueID = dateTimeArray[i].Values.uniqueID; tmpData.buildingName = application.ptCourseCatalog.buildingDAO.getBuildingName(buildingID=dateTimeArray[i].Values.buildingID); tmpData.buildingCode = application.ptCourseCatalog.buildingDAO.getBuildingCode(buildingID=dateTimeArray[i].Values.buildingID); //tmpData.campusCode = application.ptCourseCatalog.buildingDAO.getCampusCodeByBuildingID(buildingID=dateTimeArray[i].Values.buildingID); tmpData.roomName = dateTimeArray[i].Values.room; tmpData.schedDays = dateTimeArray[i].Values.schedDays; tmpData.schedDaysAbbrList = variables.scheduleDaysService.weekdayListSerializer(weekdayList=dateTimeArray[i].Values.schedDays,convertFrom="name",convertTo="abbr",delimiterOut=", "); tmpData.schedDaysSortList = variables.scheduleDaysService.weekdayListSerializer(weekdayList=dateTimeArray[i].Values.schedDays,convertFrom="name",convertTo="index",delimiterOut="-"); 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 = ""; // Build the render string tmpData.RenderString = tmpData.schedDaysAbbrList; // Determine if the record has start and/or end time 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 } /* if ( LEN(tmpData.buildingName) ) { tmpData.RenderString = tmpData.RenderString & " - B: " & tmpData.buildingName; } if ( LEN(tmpData.RoomName) ) { tmpData.RenderString = tmpData.RenderString & " - R: " & tmpData.RoomName; }*/ // Replace all the spaces with a   tmpData.RenderString = REREPLACE(tmpData.RenderString,"[\s]"," ","all"); tmpData.RenderMetaInfoString = ""; if ( LEN(tmpData.buildingName) ) { tmpData.RenderMetaInfoString = tmpData.RenderMetaInfoString & "Building: " & tmpData.buildingName; } if ( LEN(tmpData.RoomName) ) { tmpData.RenderMetaInfoString = tmpData.RenderMetaInfoString & " - Room: " & tmpData.RoomName; } // Replace all the spaces with a   tmpData.RenderMetaInfoString = REREPLACE(tmpData.RenderMetaInfoString,"[\s]"," ","all"); // Build the SORTING string tmpData.SortingString = tmpData.schedDaysSortList; // Determine if the record has start and/or end time 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 } if ( LEN(tmpData.buildingName) ) { tmpData.SortingString = tmpData.SortingString & "-" & tmpData.buildingName; } if ( LEN(tmpData.RoomName) ) { tmpData.SortingString = tmpData.SortingString & "-" & tmpData.RoomName; } // 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.ptCourseCatalog.data.arrayOfStructsSortMultiKeys( aOfS=retArray, orderByKeyList="schedDaysSortList,StartTime,buildingName,RoomName", forceColsToVarchar=1 ); // SortingString } return retArray; var reHTML = ""; var deleteItemsList = variables.scheduleBuilderService.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.ptCourseCatalog.scripts.loadJQuery(); application.ptCourseCatalog.scripts.loadADFLightbox(force=true);
style="#arguments.lbStyle#" class="#arguments.lbClass#"> #arguments.msgHTML#

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