var retHTML = ""; var photoTempDirPath = ""; var photoTempURLPath = ""; var serverTempFile = ""; var errorFlag = false; var errorMsg = ""; var errorAppMsg = ""; application.ptPhotoGallery.scripts.loadJQuery(); application.ptPhotoGallery.scripts.loadADFLightbox(); // Read the original image imageData = ImageRead(photoTempDirPath); // Check if the file extension is not the Destination Doc Type if ( LEN(application.ptPhotoGallery.appConfig.DEST_DOC_TYPE) AND fileExtension NEQ application.ptPhotoGallery.appConfig.DEST_DOC_TYPE ) { try { // Replace the extension in the temp file name serverTempFile = ReplaceNocase(serverTempFile,".#fileExtension#", ".#application.ptPhotoGallery.appConfig.DEST_DOC_TYPE#" ); // Create the new image paths newPhotoTempDirPath = "#application.ptPhotoGallery.appConfig.upload_path#temp/#serverTempFile#"; newPhotoTempURLPath = "#application.ptPhotoGallery.appConfig.upload_URL#temp/#serverTempFile#"; // Convert the image to Destination Doc Type ImageWrite(imageData, newPhotoTempDirPath); // Delete the old image format fileDeleteOp = application.ptPhotoGallery.csdata.CSFile(action="delete", file="#photoTempDirPath#"); // Store the new image paths back into the paths photoTempDirPath = newPhotoTempDirPath; photoTempURLPath = newPhotoTempURLPath; // Reload the image data for processing imageData = ImageRead(photoTempDirPath); } catch (any cfcatch) { errorFlag = true; errorMsg = cfcatch.detail; errorAppMsg = "Please contact the administrator to check the Photo Gallery configuration for the Destination File Type."; } } errorFlag = true; errorMsg = cfcatch.detail; errorAppMsg = "Error uploading the file.";

An error occurred while trying to upload the photo.

#errorMsg#

#errorAppMsg#

Close Dialog

#loadPhotoUploadDialog( category = arguments.category, fieldName = arguments.fieldName, serverFileName = serverTempFile, formSource = arguments.formSource, imgReplace = arguments.imgReplace )#
var retHTML = ""; var catData = structNew(); // Check if are passed a valid category if ( LEN(arguments.category) ) { // Verify the category by getting the data catData = application.ptPhotoGallery.photoService.loadCategoryData(arguments.category, application.ptPhotoGallery.appConfig.upload_Path, application.ptPhotoGallery.appConfig.upload_URL); } application.ptPhotoGallery.scripts.loadADFLightbox();
Please select a category for the uploaded photo.

var retHTML = ""; var catData = StructNew(); var photoUploaded = false; var photoTempDirPath = application.ptPhotoGallery.appConfig.upload_path_temp & arguments.serverFileName; var photoTempURLPath = application.ptPhotoGallery.appConfig.upload_url_temp & arguments.serverFileName; var UploadFormURL = application.ptPhotoGallery.csData.decipherCPPAGEID(application.ptPhotoGallery.appConfig.UPLOAD_FORM_URL); var formFooterJS = ""; application.ptPhotoGallery.scripts.loadJQuery(); application.ptPhotoGallery.scripts.loadADFLightbox();


Saving Photo...

#uploadTemp.errorMsg#
Possible photo upload dimensions are the following:
   #catData.initialSizeArray[initSize_l].Values.title# = #catData.initialSizeArray[initSize_l].Values.width# X #catData.initialSizeArray[initSize_l].Values.height#


Browse for file:
Valid document types are: .#docType#
// Load the inline JavaScript after the libraries have loaded application.ptPhotoGallery.scripts.addFooterJS(formFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
var retPhoto = StructNew(); var objImageInfo = StructNew(); var photoInitSizeMatch = false; var initSize_j = 1; var currPhotoDir = ""; var dirOp = ""; retPhoto.error = false; retPhoto.tempURLPath = ""; retPhoto.tempDirPath = ""; retPhoto.error = false; retPhoto.tempURLPath = arguments.tempURLPath; retPhoto.tempDirPath = arguments.tempDirPath; retPhoto.error = true; retPhoto.errorMsg = ""; The uploaded photo does not meet any of the dimension requirements.

Possible photo upload dimensions are the following:
   #arguments.categoryData.initialSizeArray[initSize_l].Values.title# = #arguments.categoryData.initialSizeArray[initSize_l].Values.width# X #arguments.categoryData.initialSizeArray[initSize_l].Values.height#
retPhoto.error = true; retPhoto.errorMsg = cfcatch.message;
var reHTML = ""; var dataStruct = StructNew(); var createStatus = ""; var photoData = ""; var pageIDResult = ""; var jsonObj = server.ADF.objectFactory.getBean("json"); var retPhotoData = ""; var formFooterJS = ""; // Build the data struct to create the photo record dataStruct.photoID = createUUID(); dataStruct.category = arguments.categoryID; dataStruct.photo = arguments.tempURL; dataStruct.title = arguments.categoryTitle & " Photo " & request.site.idMaster.getID(); // Call the CCAPI to create the photo record createStatus = application.ptPhotoGallery.photoDAO.photoCCAPI(dataStruct);


Processing Photo...

Error processing the photo. Please try again.

Close Dialog

// Load the inline JavaScript after the libraries have loaded application.ptPhotoGallery.scripts.addFooterJS(formFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY