//Path to open the ligthbox to
AjaxPath = application.ADF.ajaxProxy;
//Bean to preform add/edit
AjaxBean = "catalogForm";
AjaxMethod = "renderAddEditForm";
//Bean to preform deletion
AjaxDeleteBean = "forms_1_1";
AjaxDeleteMethod = "renderDeleteForm";
//*******Modification below this should not be needed.*******
formID = edata.MetadataForm;
mouseoverJS = "jQuery(this).addClass('ui-state-hover')";
mouseoutJS = "jQuery(this).removeClass('ui-state-hover')";
addEditLink = "#ajaxPath#?bean=#AjaxBean#&method=#AjaxMethod#&formid=#formID#&dataPageId=#Request.DatasheetRow.pageid#&lbAction=refreshparent&title=Edit";
deleteLink = "#ajaxPath#?bean=#AjaxDeleteBean#&method=#AjaxDeleteMethod#&formid=#formID#&dataPageid=#Request.DatasheetRow.pageid#&title=Delete";
viewLink = "";
currentUUID = "";
currentCSPageID = 0;
// Check if the uniqueID for this record has been defined
if ( StructKeyExists(Request.DatasheetRow,'uniqueID') AND LEN(TRIM(Request.DatasheetRow['uniqueID'][Request.DataSheetRow.CurrentRow])) )
currentUUID = TRIM(Request.DatasheetRow['uniqueID'][Request.DataSheetRow.CurrentRow]);
// Check if the CatalogPageID for this record has been defined
if ( StructKeyExists(Request.DatasheetRow,'catalogPageID') AND IsNumeric(Request.DatasheetRow['catalogPageID'][Request.DataSheetRow.CurrentRow]) )
currentCSPageID = TRIM(Request.DatasheetRow['catalogPageID'][Request.DataSheetRow.CurrentRow]);
// If a catalogPageID is defined and build the view page link and a delete page callback
if ( currentCSPageID GT 0 ) {
// Get the Page URL for the View Link
viewLink = application.ptCourseCatalog.csData.getCSPageURL(pageID=currentCSPageID);
// If we have a PageURL, and the Page Delete Callback to the deleteLink
if ( LEN(TRIM(viewLink)) ) {
deleteLink = deleteLink & "&callback=deletePage_cbFunct&cbIDlist=" & currentCSPageID;
// If contentType 'course' append the courseID to the cbIDList
// TODO: add javascript code to the header script to parse the csPageID and the CourseID comma-delimited list in the callback function
//if ( request.ptCourseCatalog.contentType EQ "course" AND LEN(TRIM(currentUUID)) )
// deleteLink = deleteLink & "," & currentUUID;
}
}
#application.ptCourseCatalog.scripts.loadJQuery()#
#application.ptCourseCatalog.scripts.loadJQueryUI()#
#application.ptCourseCatalog.scripts.loadADFLightbox()#
#headerData#
|