Changeset 2081
- Timestamp:
- 01/14/2010 06:43:54 AM (8 weeks ago)
- Location:
- framework/1-9-0/trunk
- Files:
-
- 2 modified
-
bootstrapper/defaultLoadingTemplate.cfm (modified) (1 diff)
-
mach-ii.cfc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
framework/1-9-0/trunk/bootstrapper/defaultLoadingTemplate.cfm
r2067 r2081 43 43 Notes: 44 44 ---> 45 </cfsilent> 46 <cfoutput> 47 </cfoutput> 45 </cfsilent><cfoutput><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 46 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 47 <head> 48 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 49 <meta http-equiv="refresh" content="10" /> 50 51 <title>Application Loading</title> 52 53 <style type="text/css"> 54 * { 55 margin: 0; 56 padding: 0; 57 } 58 59 html { 60 font-size: 100.1%; /* IE hack */ 61 } 62 63 body { 64 font: 100.1%/1.125em Arial, Tahoma, Verdana, Helvetica, sans-serif; /* the font size in EM */ 65 color: ##000; 66 text-align: center; 67 background-color: ##D0D0D0; 68 } 69 70 h1 { font-size: 155%; margin:0.25em 0 0.25em 0; padding: 0.5em 0 0.5em 0; } 71 72 p { margin: 0; padding: 0.5em 0 0.5em 0; } 73 74 ##container { 75 text-align: left; 76 margin: 0 auto 0 auto; 77 padding: 0; 78 width: 600px; 79 } 80 81 ##notice { 82 position: absolute; 83 top: 40%; 84 width: 600px; 85 text-align: center; 86 background-color: ##FFF; 87 border: 3px solid ##999; 88 padding: 0.5em; 89 -moz-border-radius: 12px; 90 -webkit-border-radius: 12px; 91 } 92 </style> 93 </head> 94 <body> 95 <div id="container"> 96 <div id="notice"> 97 <h1>Please Wait...</h1> 98 <p>The application is loading. We will retry your request again in 10 seconds.</p> 99 </div> 100 </div> 101 </body> 102 </html></cfoutput> -
framework/1-9-0/trunk/mach-ii.cfc
r2066 r2081 87 87 <!--- Set the request timeout for loading of the framework. Defaults to 240 ---> 88 88 <cfparam name="MACHII_ONLOAD_REQUEST_TIMEOUT" type="numeric" default="240" /> 89 <!--- Set if the framework should serve a "loading" template ---> 90 <cfparam name="MACHII_HANDLE_ONLOAD" type="boolean" default="true" /> 91 <!--- Set the template to show for loading of the framework. Defaults to Mach-II default template. ---> 92 <cfparam name="MACHII_ONLOAD_TEMPLATE" type="string" default="/MachII/bootstrapper/defaultLoadingTemplate.cfm" /> 89 93 <!--- Set the handle on missing template. Defaults to false for backward compatibility ---> 90 94 <cfparam name="MACHII_HANDLE_ONMISSINGTEMPLATE" type="boolean" default="false" /> … … 161 165 <!--- Create the AppLoader. No locking requires if called during the onApplicationStart() event. ---> 162 166 <cfset application[appKey] = StructNew() /> 163 <cfset application[appKey].appLoader = CreateObject("component", "MachII.framework.AppLoader").init(MACHII_CONFIG_PATH, MACHII_DTD_PATH, AppKey, MACHII_VALIDATE_XML) /> 167 <cfset application[appKey].loading = true /> 168 169 <cftry> 170 <cfset application[appKey].appLoader = CreateObject("component", "MachII.framework.AppLoader").init(MACHII_CONFIG_PATH, MACHII_DTD_PATH, AppKey, MACHII_VALIDATE_XML) /> 171 172 <cfcatch type="any"> 173 <cfset application[appKey].loading = false /> 174 <cfrethrow /> 175 </cfcatch> 176 </cftry> 177 178 <cfset application[appKey].loading = false /> 164 179 <cfset request.MachIIReload = FALSE /> 165 180 </cffunction> … … 178 193 <cfset variables.MACHII_CONFIG_MODE = request.MachIIConfigMode /> 179 194 </cfif> 195 196 <cfset handleOnLoadTemplate() /> 180 197 181 198 <!--- Check if AppLoader is available. Double check required for proper multi-threading. ---> … … 236 253 <cfprocessingdirective suppresswhitespace="true"><cfcontent reset="true" /><cfsetting enablecfoutputonly="true" /><cfset getAppManager().getRequestHandler().handleOnMissingTemplate(arguments.targetPage) /><cfsetting enablecfoutputonly="true" /></cfprocessingdirective> 237 254 </cffunction> 255 256 <cffunction name="handleOnLoadTemplate" access="public" returntype="void" output="true" 257 hint="Handles on load template serving."> 258 259 <cfset var appKey = getAppKey() /> 260 261 <cfif MACHII_HANDLE_ONLOAD AND IsDefined("application.#appKey#.loading") AND application[appKey].loading> 262 <cfinclude template="#MACHII_ONLOAD_TEMPLATE#" /> 263 <cfabort /> 264 </cfif> 265 </cffunction> 238 266 239 267 <!---
