var retData = StructNew();
var thisPageURL = arguments.pageURL;
var thisPageID = 0;
var viewParamName = application.ptCalendar.viewParamName;
var key = '';
if ( LEN(TRIM(thisPageURL)) ) {
if ( IsNumeric(thisPageURL) )
thisPageURL = application.ptCalendar.csData.getCSPageURL(thisPageURL);
// if a page URL still does exist use the cgi.script_name
if ( LEN(TRIM(thisPageURL)) EQ 0 AND StructKeyExists(cgi,"script_name") )
thisPageURL = cgi.script_name;
}
else {
thisPageID = request.page.id;
thisPageURL = application.ptCalendar.csData.getCSPageURL(thisPageID);
}
thisPageURL = thisPageURL & "?" & viewParamName & "=";
retData['detailPage'] = thisPageURL & "eventdetails";
retData['dailyPage'] = thisPageURL & "daylist";
retData['weeklyListPage'] = thisPageURL & "weeklist";
retData['weeklyGridPage'] = thisPageURL & "weekgrid";
retData['monthlyListPage'] = thisPageURL & "monthlist";
retData['monthlyGridPage'] = thisPageURL & "monthgrid";
// Append the PageParams on the the genereate page links
if ( LEN(TRIM(arguments.pageParams)) ) {
if ( Left(arguments.pageParams,1) NEQ "&" )
arguments.pageParams = "&" & arguments.pageParams;
for ( key IN retData ) {
retData[key] = retData[key] & arguments.pageParams;
}
}
return retData;
var typeData = variables.calRenderViewDAO.getCalendarViewNameTypeIDData();
var viewNameList = StructKeyList(typeData);
viewNameList = ListSort(viewNameList,"textnocase","desc");
return viewNameList;
var typeData = variables.calRenderViewDAO.getCalendarTypeIDViewNameData();
var typeIDList = StructKeyList(typeData);
typeIDList = ListSort(typeIDList,"textnocase","desc");
return typeIDList;
var currentDateQparams = "";
var hasSelectedDatePart = 0;
var qParamStartDelimiter = "?";
if ( application.ptCalendar.viewPageMode EQ "Single" )
qParamStartDelimiter = "&";
// Build the query params so the current date being viewed doesn't change when the VIEW changes
if ( StructKeyExists(request.params,"day") AND LEN(request.params.day) AND isNumeric(request.params.day) )
{
if ( LEN(TRIM(currentDateQparams)) )
currentDateQparams = currentDateQparams & "&";
currentDateQparams = currentDateQparams & "day=" & request.params.day;
hasSelectedDatePart = 1;
}
if ( StructKeyExists(request.params,"month") AND LEN(request.params.month) AND isNumeric(request.params.month) )
{
if ( LEN(TRIM(currentDateQparams)) )
currentDateQparams = currentDateQparams & "&";
currentDateQparams = currentDateQparams & "month=" & request.params.month;
hasSelectedDatePart = 1;
}
if ( StructKeyExists(request.params,"year") AND LEN(request.params.year) AND isNumeric(request.params.month) )
{
if ( LEN(TRIM(currentDateQparams)) )
currentDateQparams = currentDateQparams & "&";
currentDateQparams = currentDateQparams & "year=" & request.params.year;
hasSelectedDatePart = 1;
}
if ( hasSelectedDatePart )
{
if ( LEN(TRIM(currentDateQparams)) )
currentDateQparams = currentDateQparams & "&";
currentDateQparams = currentDateQparams & "clicked=1";
}
if ( LEN(TRIM(currentDateQparams)) )
currentDateQparams = qParamStartDelimiter & currentDateQparams;
return currentDateQparams;
var retStr = arguments.paramValue;
var viewDefault = variables.calRenderViewDAO.getCalendarDefaultViewTypeID();
var typeData = variables.calRenderViewDAO.getCalendarTypeIDViewNameData();
var key = '';
// Make currentView safe for output in HTML and JS Links
retStr = application.ptCalendar.data.tagValueCleanup(str=retStr,action="cleanup",tagEnds=true,comments=true);
retStr = Replace(Replace(retStr,"'",'','all'),'"','','all');
if ( FindNoCase("eventdetails",retStr) )
retStr = "eventdetails";
else
{
for (key IN typeData) {
if (FindNoCase(key, retStr)) {
retStr = key;
break;
}
}
if ( NOT structKeyExists(typeData,retStr) )
retStr = viewDefault;
}
return retStr;