<%String VERSION = "Version 3.2
(released: 08-20-2012)"; //@@dw-date@@ dw updates date %><%-- _________________________________________________________________________________________ ***** NOTE: This file always included from plugins folder ***** NON DEVMODE: Javascript files, editpages and default css files used from plugins. The calendar_loading.css and calendar_app_loading.js files are included inline on all templates and edit pages by this include file. They contain bootstrap code to load all other resources once the page loads. RZloadRecources() called by setup() on all pages. -Home page loads all other Javascript and css files. -Tther pages load script and css files from the homepage window. DEVMODE AND NON DEVMODE: Edit pages load additional javascript via traditional < script...> tags or ajax. This Edit Page deviates from standard Revize editform as follows: 1. setup_editform_javascript.jsp is included below in the head section rather than after the body tag 2. /plugins/calendar/calendar.version_include.jsp finds the main page (homeframe) while page is loading and subsequently retrieves resources from the homeframe when loadResource() is called after all files are loaded. _________________________________________________________________________________________ --%><%! String LOADING = "Loading..."; //may be redefined e.g. calendar_app (index.html) %><% boolean DEVMODE = false; boolean isBeta = false; String calendar_options = "webspace_config does not have calendar_options field"; if (rz.isvalidfield("webspace_config","calendar_options")) { calendar_options = rz.fetch("webspace_config","calendar_options"); if (calendar_options.length() == 0) calendar_options = "No calendar_options defined in webspace_config"; if (rz.getvalue(calendar_options,"devmode").equals("true")) DEVMODE = true; } // Assume beta release if calendar_app_javascript_fullview template not found if (rz.gettemplate("calendar_app_javascript_fullview") == null) { DEVMODE = true; VERSION = "Version 3.1 (released: 04-20-2012)"; isBeta = true; } out.println(""); String loadingLayerFilename = "/plugins/calendar/calendar3.loading_layer_include.jsp"; String homeBodyFilename = "/plugins/calendar/calendar3.html_home_include.jsp"; if (DEVMODE) { loadingLayerFilename = rz.includefile("calendar_app/plugins/calendar3.loading_layer_include.jsp"); homeBodyFilename = rz.includefile("calendar_app/plugins/calendar3.html_home_include.jsp"); } boolean debug = false; if (request.getParameter("debug") != null) debug = true; String revizeDomain = ""; String revizeBaseUrl = rz.revizechannel.getBaseUrl(); int offset = revizeBaseUrl.indexOf("/revize/"); if (offset > 0) revizeDomain = revizeBaseUrl.substring(0,offset); boolean isEditPage = rz.checkoptions("form,list",rz.pagetype); boolean isRefreshData = false; String urlPrefix = ""; if (isEditPage) //common edit page URL arguments { urlPrefix = "../"; isRefreshData = (request.getParameter("refreshdata") != null); } String calendar_savereturn = StringUtils.getParameter(request,"savereturn"); // Following 2 variables not used as of 08-10-2012 but needed for backward compatibility String SETDEBUG_LINK = "   "; String DEBUGGER_LINK = "   "; String HELP_BUTTON_URL = "/revize/plugins/calendar/calendar3_admin_help.html"; String HELP_BUTTON = "RZpopupUrl('helpWin','" + HELP_BUTTON_URL + "','700','600','yes')"; HELP_BUTTON = ""; String[] monthNames = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; debugOptions = new HashMap(); if (session.getAttribute("RZdebugOptions") != null) debugOptions = (HashMap)session.getAttribute("RZdebugOptions");%><%! HashMap debugOptions; /*----------------------------------------------------------------------------- is debug option selected returns false if not debug mode (i.e. !RZ.debug) otherwise check RZ.debugOptions; if not defined, use default value assume true if defaultValue not specified. -----------------------------------------------------------------------------*/ boolean isDebugOption(String option) { return isDebugOption(option, false); } boolean isDebugOption(String option, boolean defaultValue) { boolean debugOption = false; //if (!debug) return false; //false if not debug mode if (option == null || option.length() == 0) return true; //true if option not specified if (debugOptions.get(option) == null) return defaultValue; else { String debugOptionStr = debugOptions.get(option) + ""; if (debugOptionStr.equals("true")) debugOption = true; } return debugOption; } %><% if (DEVMODE) { // following note published %><% } /*--------------------------------------------------------------------------------------- Following script used for DEVMODE or NON-DEVMODE as page is loaded before ---------------------------------------------------------------------------------------*/ %> <% /*************************************/ /*BOOKMARK Following for NON-DEVMODE*/ /***********************************/ if (!DEVMODE) { %> <% if (isEditPage || rz.pagetemplatename.equals("calendar_event_detail")) { %> <% } %> <% /*********************************/ /*BOOKMARK Following for DEVMODE*/ /*******************************/ } else { %> <% if (isBeta) { %> <% } if (!isEditPage) // editpages load via editlist or editform javascript include { if (!isBeta) { %> <% } %> <% } if (isEditPage || rz.pagetemplatename.equals("calendar_event_detail")) { %> <% } %> <% } %>