%String VERSION = "Version 3.2 (released: 01-20-2014)";%><%--
_________________________________________________________________________________________
***** 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.
_________________________________________________________________________________________
--%><%!
String LOADING = "Loading..."; //may be redefined e.g. calendar_app (index.html)
%><%
boolean DEVMODE = false;
boolean isBeta = false;
boolean isRepeatContentOverride = true;
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;
//isRepeatContentOverride = rz.checkoptions(calendar_options,"repeat_content_override");
isRepeatContentOverride = 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 homeStyleFilename = "/plugins/calendar/css/calendar_style_home.css";
String loadingLayerFilename = "/plugins/calendar/calendar3.loading_layer_include.jsp";
String homeBodyFilename = "/plugins/calendar/calendar3.html_home_include.jsp";
if (DEVMODE)
{
homeStyleFilename = rz.includefile("calendar_app/css/calendar_style_home.css");
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;
//----- Get domain for login
String revizeDomain = "";
String revizeBaseUrl = "";
if (rz.revizechannel != null) //only null if no webspace on editlist
{
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"))
{ // contains delete event code used by detail template %>
<%
} %>
<%
}%>