%
theme = Request.Cookies("theme")
IF theme = "" THEN
theme="bg-theme1"
END IF
%>
from breaking the JS block
notifTitle = Replace(notifTitle, "<", "\u003c")
notifTitle = Replace(notifTitle, ">", "\u003e")
notifStart = FormatDateISO(rs("starttime"))
' Handle NULL endtime - show ongoing notifications until end of current day
If IsNull(rs("endtime")) Or rs("endtime") = "" Then
' Indefinite notification - show until end of today (updates each day)
' This prevents ongoing notifications from cluttering future calendar dates
Dim todayDate
todayDate = Date() ' Current date without time
notifEnd = Year(todayDate) & "-" & _
Right("0" & Month(todayDate), 2) & "-" & _
Right("0" & Day(todayDate), 2) & "T23:59:59"
Else
notifEnd = FormatDateISO(rs("endtime"))
End If
' Determine event class based on notification type
Dim typeClass, typeName
If IsNull(rs("typename")) Or rs("typename") = "" Then
typeName = "TBD"
Else
typeName = rs("typename")
End If
' Map type name to CSS class
Select Case UCase(typeName)
Case "TBD"
notifClass = "event-type-tbd"
Case "AWARENESS"
notifClass = "event-type-awareness"
Case "CHANGE"
notifClass = "event-type-change"
Case "INCIDENT"
notifClass = "event-type-incident"
Case Else
notifClass = "event-type-tbd"
End Select
' Add indicator for indefinite notifications in title
Dim displayTitle
If IsNull(rs("endtime")) Or rs("endtime") = "" Then
displayTitle = notifTitle & " [ONGOING]"
Else
displayTitle = notifTitle
End If
Response.Write(" {" & vbCrLf)
Response.Write(" id: '" & rs("notificationid") & "'," & vbCrLf)
Response.Write(" title: '" & displayTitle & "'," & vbCrLf)
Response.Write(" start: '" & notifStart & "'," & vbCrLf)
Response.Write(" end: '" & notifEnd & "'," & vbCrLf)
Response.Write(" className: '" & notifClass & "'," & vbCrLf)
Response.Write(" allDay: false" & vbCrLf)
Response.Write(" }")
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
objConn.Close
%>
],
eventClick: function(event) {
// Redirect to edit notification page
window.location.href = './editnotification.asp?notificationid=' + event.id;
},
eventRender: function(event, element) {
// Add tooltip with full event details
element.attr('title', event.title);
}
});
});