var rtnHTML = ""; var blogPostFormID = application.ptBlog2.getPostFormID(); // Get the Blog Post CE Form ID // Wrap the form HTML in the LB header/footer rtnHTML = application.ptBlog2.forms.renderAddEditForm( formID=blogPostFormID, dataPageId=arguments.dataPageId, formResultCallback="application.ptBlog2.blogForms.renderPostFormResult"); return rtnHTML; var formResultFooterJS = ""; var blogID = ""; var postID = ""; if ( StructKeyExists(arguments,"FormValues") ) { if ( StructKeyExists(arguments.FormValues,"blogID") ) blogID = arguments.FormValues.blogID; if ( StructKeyExists(arguments.FormValues,"postID") ) postID = arguments.FormValues.postID; } application.ptBlog2.scripts.loadJQuery(); application.ptBlog2.scripts.loadADFLightbox(); jQuery(document).ready(function(){ lbResizeWindow(); // Start the Blog Build Process syncBlogPost(); }); // Callback function to do our work function syncBlogPost(){ // Call the Ajax to sync the page for the post jQuery.ajax({ url: '#application.ADF.ajaxProxy#', data: { bean: 'PostService', method: 'syncPost', blogID: '#blogID#', postID: '#postID#' }, success: function(data) { // Check that the return is "true" if ( data == 'true' ) { // Refresh the parent window closeLBReloadParent(); } else { // write the return html to the div jQuery("div##retBlock").html("Error building the blog post page."); } }, error: function(data){ // write the return html to the div jQuery("div##retBlock").html("Error building the blog post page."); } }); } // Load the inline JavaScript after the libraries have loaded application.ptBlog2.scripts.addFooterJS(formResultFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
Building Blog Post...
var targetModule = ""; var CD_dialogName = ""; var CD_Title = ""; var blogDeleteFormJS = ""; application.ptBlog2.scripts.loadJQuery(noConflict=1); application.ptBlog2.scripts.loadADFLightbox(); if ( !StructKeyExists(request.params, "title") ) request.params.title = "Delete Blog Post"; application.ADF.scripts.addFooterJS(blogDeleteFormJS,"TERTIARY"); targetModule = "/ADF/apps/pt_blog/datasheet-modules/delete_element_handler_posts2.cfm"; // IF in CS6.1 or greater set into 'RealTargetModule' variable if ( application.ADF.csVersion GTE 6.1 ) realTargetModule = targetModule; request.params.pageID = arguments.dataPageID; request.params.formID = arguments.formID; request.params.postID = arguments.postID; CD_dialogName = encodeForHtml(request.params.title); CD_Title = CD_dialogName; var rtnHTML = ""; var blogFormID = application.ptBlog2.getBlogFormID(); // Get the Blog Post CE Form ID // Wrap the form HTML in the LB header/footer rtnHTML = application.ptBlog2.forms.renderAddEditForm( formID=blogFormID, dataPageId=arguments.dataPageId, formResultCallback="application.ptBlog2.blogForms.renderBlogFormResult" ); return rtnHTML; var formResultFooterHTML = ""; var blogID = ""; if ( StructKeyExists(arguments,"FormValues") AND StructKeyExists(arguments.FormValues,"blogID") ) blogID = arguments.FormValues.blogID; application.ptBlog2.scripts.loadJQuery(); application.ptBlog2.scripts.loadADFLightbox();
Building Blog...
// Load the inline JavaScript after the libraries have loaded application.ptBlog2.scripts.addFooterHTML(formResultFooterHTML, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
var targetModule = ""; var CD_dialogName = ""; var CD_Title = ""; var blogFormID = application.ptBlog2.getBlogFormID(); var blogDeleteFooterJS = ''; application.ptBlog2.scripts.loadJQuery(noConflict=1); application.ptBlog2.scripts.loadADFLightbox(); if ( !StructKeyExists(request.params, "title") ) request.params.title = "Delete Blog"; application.ADF.scripts.addFooterJS(blogDeleteFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY targetModule = "/ADF/apps/pt_blog/datasheet-modules/delete_element_handler_blog2.cfm"; // IF in CS6.1 or greater set into 'RealTargetModule' variable if ( application.ADF.csVersion GTE 6.1 ) realTargetModule = targetModule; request.params.pageID = arguments.dataPageID; request.params.formID = blogFormID; request.params.blogID = arguments.blogID; CD_dialogName = encodeForHtml(request.params.title); CD_Title = CD_dialogName;