Skip to content

Commit

Permalink
new core template updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Jun 18, 2013
1 parent a5eb87e commit 339223f
Show file tree
Hide file tree
Showing 17 changed files with 448 additions and 191 deletions.
28 changes: 14 additions & 14 deletions config/Coldbox.cfc
Expand Up @@ -29,7 +29,7 @@ limitations under the License.
// coldbox directives
coldbox = {
//Application Setup
appName = "ContentBox",
appName = "ContentBox Modular CMS",

//Development Settings
debugMode = false,
Expand All @@ -38,13 +38,13 @@ limitations under the License.
handlersIndexAutoReload = false,

//Implicit Events
defaultEvent = "General.index",
requestStartHandler = "",
requestEndHandler = "",
applicationStartHandler = "",
applicationEndHandler = "",
sessionStartHandler = "",
sessionEndHandler = "",
defaultEvent = "Main.index",
requestStartHandler = "",
requestEndHandler = "",
applicationStartHandler = "",
applicationEndHandler = "",
sessionStartHandler = "",
sessionEndHandler = "",
missingTemplateHandler = "",

//Extension Points
Expand All @@ -58,12 +58,12 @@ limitations under the License.
requestContextDecorator = "",

//Error/Exception Handling
exceptionHandler = "",
onInvalidEvent = "",
customErrorTemplate = "",
exceptionHandler = "",
onInvalidEvent = "",
customErrorTemplate = "",

//Application Aspects
handlerCaching = true,
handlerCaching = true,
eventCaching = true
};

Expand All @@ -76,7 +76,7 @@ limitations under the License.
// create a function with the name of the environment so it can be executed if that environment is detected
// the value of the environment is a list of regex patterns to match the cgi.http_host.
environments = {
development = "^cf9.,^railo.,^local"
development = "^local, jfetmac"
};

// Module Directives
Expand All @@ -101,7 +101,7 @@ limitations under the License.

//Layout Settings
layoutSettings = {
defaultLayout = "Layout.Main.cfm"
defaultLayout = "Main.cfm"
};

// ORM
Expand Down
1 change: 0 additions & 1 deletion handlers/General.cfc

This file was deleted.

3 changes: 1 addition & 2 deletions handlers/Main.cfc
@@ -1,2 +1 @@
<!--- /**********************************************************************************ContentBox - A Modular Content PlatformCopyright 2012 by Luis Majano and Ortus Solutions, Corpwww.gocontentbox.org | www.luismajano.com | www.ortussolutions.com********************************************************************************Apache License, Version 2.0Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*********************************************************************************/---><cfcomponent output="false"><!------------------------------------------- GLOBAL IMPLICIT EVENTS ONLY ------------------------------------------>
<!--- In order for these events to fire, you must declare them in the coldbox.xml.cfm ---> <cffunction name="index" returntype="void" output="false"> <cfargument name="event"> <cfargument name="rc"> <cfargument name="prc"> <cfset setNextEvent(getSetting('DefaultEvent'))> </cffunction> <cffunction name="onAppInit" returntype="void" output="false"> <cfargument name="event"> <cfargument name="rc"> <cfargument name="prc"> </cffunction> <cffunction name="onRequestStart" returntype="void" output="false"> <cfargument name="event"> <cfargument name="rc"> <cfargument name="prc"> </cffunction> <cffunction name="onRequestEnd" returntype="void" output="false"> <cfargument name="event"> <cfargument name="rc"> <cfargument name="prc"> </cffunction> <cffunction name="onSessionStart" returntype="void" output="false"> <cfargument name="event"> <cfargument name="rc"> <cfargument name="prc"> </cffunction> <cffunction name="onSessionEnd" returntype="void" output="false"> <cfargument name="event"> <cfargument name="rc"> <cfargument name="prc"> <cfset var sessionScope = event.getValue("sessionReference")> <cfset var applicationScope = event.getValue("applicationReference")> </cffunction> <cffunction name="onException" returntype="void" output="false"> <cfargument name="event"> <cfargument name="rc"> <cfargument name="prc"> <cfscript> //Grab Exception From request collection, placed by ColdBox var exceptionBean = event.getValue("ExceptionBean"); //Place exception handler below: </cfscript> </cffunction> <cffunction name="onMissingTemplate" returntype="void" output="false"> <cfargument name="event"> <cfargument name="rc"> <cfargument name="prc"> <cfscript> //Grab missingTemplate From request collection, placed by ColdBox var missingTemplate = event.getValue("missingTemplate"); </cfscript> </cffunction></cfcomponent>
component output="false" singleton{ // Default Action function index(event,rc,prc){ prc.welcomeMessage = "Welcome to ContentBox Modular CMS!"; event.setView("main/index"); } /************************************** IMPLICIT ACTIONS *********************************************/ function onAppInit(event,rc,prc){ } function onRequestStart(event,rc,prc){ } function onRequestEnd(event,rc,prc){ } function onSessionStart(event,rc,prc){ } function onSessionEnd(event,rc,prc){ var sessionScope = event.getValue("sessionReference"); var applicationScope = event.getValue("applicationReference"); } function onException(event,rc,prc){ //Grab Exception From request collection, placed by ColdBox var exceptionBean = event.getValue("ExceptionBean"); //Place exception handler below: } function onMissingTemplate(event,rc,prc){ //Grab missingTemplate From request collection, placed by ColdBox var missingTemplate = event.getValue("missingTemplate"); }}
Expand Down
27 changes: 1 addition & 26 deletions includes/helpers/ApplicationHelper.cfm
@@ -1,26 +1 @@
<!---
/**
********************************************************************************
ContentBox - A Modular Content Platform
Copyright 2012 by Luis Majano and Ortus Solutions, Corp
www.gocontentbox.org | www.luismajano.com | www.ortussolutions.com
********************************************************************************
Apache License, Version 2.0
Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
********************************************************************************
*/
--->
<!--- All methods in this helper will be available in all handlers,plugins,views & layouts --->
<!--- All methods in this helper will be available in all handlers,plugins,views & layouts --->
Binary file added includes/images/ColdBoxLogoSquare_125.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added includes/images/glyphicons-halflings-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added includes/images/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions includes/javascript/bootstrap.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions includes/javascript/jquery.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions includes/styles/bootstrap-responsive.min.css

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions includes/styles/bootstrap.min.css

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions includes/templates/404.html
@@ -0,0 +1,30 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>The page you requested does not exist</title>
<style type="text/css">
body { background-color: #fff; text-align: center; font-family: arial, sans-serif; }
div.infobox {
width: 30em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
background-color: #FFFFF0;
}
h1 { font-size: 100%; font-weight: bold; color: #000; line-height: 1.5em; }
</style>
</head>

<body>
<div class="infobox">
<h1>The page you requested does not exist.</h1>
<p>You may have mistyped the address or the page may have moved. Please check your address again.</p>
</div>
</body>
</html>
45 changes: 45 additions & 0 deletions includes/templates/generic_error.cfm
@@ -0,0 +1,45 @@
<cfset exceptionBean = event.getValue("ExceptionBean") />

<h3>An Unhandled Exception Occurred</h3>

<cfoutput>
<table>
<tr>
<td colspan="2">An unhandled exception has occurred. Please look at the diagnostic information below:</td>
</tr>
<tr>
<td valign="top"><strong>Type</strong></td>
<td valign="top">#exceptionBean.getType()#</td>
</tr>
<tr>
<td valign="top"><strong>Message</strong></td>
<td valign="top">#exceptionBean.getMessage()#</td>
</tr>
<tr>
<td valign="top"><strong>Detail</strong></td>
<td valign="top">#exceptionBean.getDetail()#</td>
</tr>
<tr>
<td valign="top"><strong>Extended Info</strong></td>
<td valign="top">#exceptionBean.getExtendedInfo()#</td>
</tr>
<tr>
<td valign="top"><strong>Message</strong></td>
<td valign="top">#exceptionBean.getMessage()#</td>
</tr>
<tr>
<td valign="top"><strong>Tag Context</strong></td>
<td valign="top">
<cfset variables.tagCtxArr = exceptionBean.getTagContext() />
<cfloop index="i" from="1" to="#ArrayLen(variables.tagCtxArr)#">
<cfset variables.tagCtx = variables.tagCtxArr[i] />
#variables.tagCtx['template']# (#variables.tagCtx['line']#)<br>
</cfloop>
</td>
</tr>
<tr>
<td valign="top"><strong>Stack Trace</strong></td>
<td valign="top">#exceptionBean.getStackTrace()#</td>
</tr>
</table>
</cfoutput>
1 change: 0 additions & 1 deletion layouts/Layout.Main.cfm

This file was deleted.

1 change: 1 addition & 0 deletions layouts/Main.cfm
@@ -0,0 +1 @@
<cfoutput>#html.doctype()#<html lang="en"><head> <meta charset="utf-8"> <title>Welcome to Coldbox!</title> <meta name="description" content="ColdBox Application Template"> <meta name="author" content="Ortus Solutions, Corp"> <!---Base URL ---> <base href="#getSetting("HTMLBaseURL")#" /> <!---css ---> <link href="includes/styles/bootstrap.min.css" rel="stylesheet"> <link href="includes/styles/bootstrap-responsive.min.css" rel="stylesheet"> <!---js ---> <script src="includes/javascript/jquery.js"></script> <script src="includes/javascript/bootstrap.min.js"></script> <style> /* Utility */ .centered { text-align: center !important; } .inline{ display: inline !important; } .margin10{ margin: 10px; } .padding10{ padding: 10px; } .margin0{ margin: 0px; } .padding0{ padding: 0px; } .footer { margin-top: 45px; padding: 35px 35px; border-top: 1px solid ##e5e5e5; } .footer p { margin-bottom: 0; color: ##555; } body{ padding-top: 50px; } </style></head><body data-spy="scroll"> <!---Top NavBar ---> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <!---Brand ---> <div class="container"> <!---Responsive Design ---> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <!---Branding ---> <a class="brand" href="#event.buildLink('')#"><strong>Home</strong></a> <!---About ---> <ul class="nav pull-right"> <li class="dropdown"> <a href="##" class="dropdown-toggle" data-toggle="dropdown"> <i class="icon-info-sign icon-white"></i> About <b class="caret"></b> </a> <ul id="actions-submenu" class="dropdown-menu"> <li class="nav-header">#getSetting("codename",1)# (#getsetting("suffix",1)#) </li> <li><a href="mailto:bugs@coldbox.org?subject=DataBoss Bug Report"><i class="icon-fire"></i> Report a Bug</a></li> <li><a href="mailto:info@coldbox.org?subject=DataBoss Feedback"><i class="icon-bullhorn"></i> Send Us Feedback</a></li> <li><a href="http://www.ortussolutions.com/products/coldbox"><i class="icon-home"></i> Professional Support</a></li> <li class="centered"> <img src="includes/images/ColdBoxLogoSquare_125.png" alt="logo"/> </li> </ul> </li> </ul> </div> <!---end container ---> </div> <!---end navbar-inner ---> </div> <!---end navbar ---> <!---Container And Views ---> <div class="container">#renderView()#</div> <footer class="footer"> <p class="pull-right"> <a href="##"><i class="icon-arrow-up"></i> Back to top</a> </p> <p> <a href="http://www.coldbox.org">ColdBox Platform</a> is a copyright-trademark software by <a href="http://www.ortussolutions.com">Ortus Solutions, Corp</a> </p> <p> Design thanks to <a href="http://twitter.github.com/bootstrap">Twitter Boostrap</a> </p> </footer> <script> $(function() { // activate all drop downs $('.dropdown-toggle').dropdown(); // Tooltips $("[rel=tooltip]").tooltip(); // Scroll spy $('##subnav').scrollspy(); }) </script></body></html></cfoutput>
Expand Down

0 comments on commit 339223f

Please sign in to comment.