Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request #122 from jmohler1970/ColdFusion-2016
Browse files Browse the repository at this point in the history
ColdFusion 2016
  • Loading branch information
jmohler1970 authored Aug 31, 2016
2 parents 7cda9cc + c3a53ca commit f19b630
Show file tree
Hide file tree
Showing 114 changed files with 108 additions and 95 deletions.
10 changes: 5 additions & 5 deletions application.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@


component extends="framework.one" accessors="true" {


this.name="bs-4-cf-349";

this.name="bs-4-cf-355";
this.applicationManagement = true;
this.sessionManagement = true;



variables.framework = {
home = "docs.home", // For PlumaCMS, change this to wiki.home or main.home aka login OR wiki.home
baseURL = 'useCGIScriptName',
Expand All @@ -31,7 +32,6 @@ variables.framework.routes = [
{ "wiki/:id" = "wiki/home/slug/:id" },

// documentation
{ "_bootstrap" = "302:/main/home" },
{ "common" = "docs/common" },
{ "theme" = "theme/home" },
{ "bootswatch/:id" = "bootswatch/home/bootswatch/:id" }
Expand Down Expand Up @@ -72,7 +72,7 @@ fileclose(objAppFile);
application.objFormUtilities = new framework.formUtilities();
application.GSConfig = new model.services.settings().getWebsite();

invoke("views._bootstrap.bootstrap", "setupApplication");
invoke("vendor.tags.bootstrap.bootstrap", "setupApplication");
} // end setupApplication


Expand All @@ -87,7 +87,7 @@ function setupSession() {

function setupRequest() {

invoke("views._bootstrap.bootstrap", "setupRequest");
invoke("vendor.tags.bootstrap.bootstrap", "setupRequest");
} // end setupRequest


Expand Down
4 changes: 2 additions & 2 deletions layouts/default.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../views/_bootstrap">
<cfimport prefix="b" taglib="../vendor/tags/bootstrap">



Expand All @@ -24,7 +24,7 @@
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha/css/bootstrap.min.css" rel="stylesheet">
</cfcase>
<cfdefaultcase>
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/<cfoutput>#lcase(session.bootswatch)#</cfoutput>/bootstrap.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/<cfoutput>#lcase(session.bootswatch)#</cfoutput>/bootstrap.min.css" rel="stylesheet">
</cfdefaultcase>
</cfswitch>

Expand Down
4 changes: 2 additions & 2 deletions layouts/docs.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../views/_bootstrap">
<cfimport prefix="b" taglib="../vendor/tags/bootstrap">



Expand All @@ -8,7 +8,7 @@

<b:dropMenu value="Getting Started">
<b:navLink key="Installation" active="#getItem().find('getting_started')#" href="~/docs/getting_started" />
<b:navLink value="Setup" active="#getItem().find('setup')#" href="~/docs/setup" />
<b:navLink value="Setup & Layouts" active="#getItem().find('setup')#" href="~/docs/setup" />
<b:navLink value="I18n" active="#getItem().find('i18n')#" href="~/docs/i18n" />
<b:navLink value="Directory Structure" active="#getItem().find('structure')#" href="~/docs/structure" />
<b:navLink value="Smart tags & common features" active="#getItem().find('common')#" href="~/common" />
Expand Down
2 changes: 1 addition & 1 deletion layouts/innovation.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../views/_bootstrap">
<cfimport prefix="b" taglib="../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion layouts/pages.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../views/_bootstrap">
<cfimport prefix="b" taglib="../vendor/tags/bootstrap">


<b:jumbotron tight="true">
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ case "start" :
break;
case "end" :
if(attributes?.key != "") {
thisTag.GeneratedContent = application.geti18n(attributes.key, attributes?.placeholder);
attributes.isSafeHTML = true;
}
if( attributes?.value != "") thisTag.generatedContent = attributes.value;
variables.result &= '<blockquote class="';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void function setupApplication() {
isSafeHTML = [ "cf_buttongroup", "cf_buttontoolbar", "cf_column", "cf_container", "cf_dropmenu",
"cf_fieldset", "cf_formgroup", "cf_head", "cf_include",
"cf_jumbotron", "cf_modal", "cf_navbar", "cf_navbarlinks", "cf_navlink",
"cf_panel", "cf_row", "cf_table", "cf_tabview", "cf_tr","cf_well"], // these tags to not run through getSafeHTML
"cf_panel", "cf_row", "cf_table", "cf_tabview", "cf_tr", "cf_well"], // these tags to not run through getSafeHTML
profile = "", // blank means use system default
throwOnError = false, // Default behavior for getSafeHTML()

Expand Down Expand Up @@ -155,11 +155,11 @@ string function filterAttributes(required struct attr, string attributeFilter =
if(arguments.attr?.disabled == true) arguments.attr.disabled = "disabled";
if(arguments.attr?.readonly == true) arguments.attr.readonly = "readonly";
if(arguments.attr?.required == true) arguments.attr.required = "required";

var prev = "";

local.result = arguments.attr.filter(function(key, value) {
return (attributeFilter.ListFind(key) || key.reFindNoCase("data\-|ng\-|on") );
return (attributeFilter.ListFind(key) || key.reFindNoCase("data\-|ng\-|on" && key != "throwonError") );

})?.reduce(function(string prev, string key, string value) {
return prev & ' #key.lcase()# = "#value.encodeForHTMLAttribute()#"';
Expand All @@ -185,8 +185,8 @@ string function filterAttributes(required struct attr, string attributeFilter =

string function generateContent(required string Content, required array tagstack, required struct attr) output="false" {


if(arguments.attr?.key != "" ) {
if(arguments.attr?.key != "" ) {
arguments.Content = application.geti18n(arguments.attr.key, arguments.attr?.placeholder);
arguments.attr.isSafeHTML = true;
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 6 additions & 3 deletions views/_bootstrap/h1.cfm → vendor/tags/bootstrap/h1.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ case "start" :
case "end" :
if(attributes?.value != "") { thisTag.GeneratedContent = attributes.value; }
if(attributes?.key != "" ) {
thisTag.GeneratedContent = application.geti18n(attributes.key, attributes?.placeholder);
attributes.isSafeHTML = true;
}
thisTag.GeneratedContent = application.geti18n(attributes.key, attributes?.placeholder);
attributes.isSafeHTML = true;
}
if(attributes?.pageHeader == true) variables.result &= '<div class="page-header">';
Expand Down
3 changes: 3 additions & 0 deletions views/_bootstrap/h2.cfm → vendor/tags/bootstrap/h2.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ case "start" :
case "end" :
if(attributes?.value != "") { thisTag.GeneratedContent = attributes.value; }
if(attributes?.key != "" ) {
thisTag.GeneratedContent = application.geti18n(attributes.key, attributes?.placeholder);
attributes.isSafeHTML = true;
Expand Down
6 changes: 5 additions & 1 deletion views/_bootstrap/h3.cfm → vendor/tags/bootstrap/h3.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ case "start" :
break;
case "end" :
case "end" :
if(attributes?.value != "") { thisTag.GeneratedContent = attributes.value; }
if(attributes?.key != "" ) {
thisTag.GeneratedContent = application.geti18n(attributes.key, attributes?.placeholder);
attributes.isSafeHTML = true;
Expand Down
4 changes: 3 additions & 1 deletion views/_bootstrap/h4.cfm → vendor/tags/bootstrap/h4.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ case "start" :
break;
case "end" :
if(attributes?.value != "") { thisTag.GeneratedContent = attributes.value; }
if(variables.myClass == "") variables.result &= '<h4';
if(variables.myClass != "") variables.result &= '<h4 class="#variables.myClass.encodeForHTMLAttribute()#"';
Expand Down
2 changes: 2 additions & 0 deletions views/_bootstrap/h5.cfm → vendor/tags/bootstrap/h5.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ case "start" :
case "end" :
if(attributes?.value != "") { thisTag.GeneratedContent = attributes.value; }
if(variables.myClass == "") variables.result &= '<h5';
if(variables.myClass != "") variables.result &= '<h5 class="#variables.myClass.encodeForHTMLAttribute()#"';
Expand Down
6 changes: 3 additions & 3 deletions views/_bootstrap/h6.cfm → vendor/tags/bootstrap/h6.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ case "start" :
break;
case "end" :
case "end" :
if(attributes?.value != "") { thisTag.GeneratedContent = attributes.value; }
if(variables.myClass == "") variables.result &= '<h6';
if(variables.myClass != "") variables.result &= '<h6 class="#variables.myClass.encodeForHTMLAttribute()#"';
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@


<cfsavecontent variable="variables.result">
<cfinclude template="../#attributes.template#">
<cfinclude template="../../../views/#attributes.template#">
</cfsavecontent>

<cfscript>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ case "end" :
variables.result &= crlf;
variables.result &= '<script ';
variables.result &= ' src="' & application?.Bootstrap?.ScriptLibrary[attributes.library] & attributes?.name & '"';
variables.result &= ' type="#encodeForHTMLAttribute(attributes.type)#"';
variables.result &= ' type="#attributes.type.encodeForHTMLAttribute()#"';
variables.result &= '>';
variables.result &= thisTag.GeneratedContent.trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ case "end" :
variables.result &= crlf;
variables.result &= '<link type="#attributes.type#"';
variables.result &= ' href="' & application?.Bootstrap?.StylesheetLibrary[attributes.library] & attributes?.name & '"';
if(attributes?.media != "") variables.result &= ' media="#attributes.media#"';
variables.result &= ' rel="#attributes.rel#"';
if(attributes?.media != "") variables.result &= ' media="#attributes.media.encodeForHTMLAttribute()#"';
variables.result &= ' rel="#attributes.rel.encodeForHTMLAttribute()#"';
variables.result &= '>';
variables.result &= thisTag.GeneratedContent.trim();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case "start" :
break;
case "end" :
if(attributes?.value != "") thisTag.generatedContent = attributes.value;
if (attributes?.value != "") thisTag.generatedContent = attributes.value;
variables.result &= variables.crlf;
if (attributes.usespan) {
Expand Down
2 changes: 2 additions & 0 deletions views/_bootstrap/p.cfm → vendor/tags/bootstrap/p.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ case "start" :
case "end" :
if(attributes?.value != "") { thisTag.GeneratedContent = attributes.value; }
variables.result &= variables.crlf;
if(variables.myClass == "") variables.result &= '<p';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion views/backups/edit.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">


<h1><b:outputText key="BACKUP_OF" /> &lsquo;<em><cfoutput>#encodeforHTML(rc.slug)#</cfoutput></em>&rsquo;</h1>
Expand Down
2 changes: 1 addition & 1 deletion views/backups/home.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">


<b:h1 key="BAK_MANAGEMENT" />
Expand Down
4 changes: 2 additions & 2 deletions views/bootswatch/home.cfm
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">



<div class="page-header">
<b:row>
<b:column span="12">

<b:h1 value="#rc.theme#" />
<b:h1 value="#session.bootswatch#" />
<p>All themes are from Bootswatch and are not a part of this distribution.</p>
</b:column>
</b:row>
Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/button.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">


<!-- Buttons
Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/containers.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/dialogs.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/forms.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/indicators.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/nav.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/navbar.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">


<b:row>
Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/table.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">


<!-- Tables
Expand Down
2 changes: 1 addition & 1 deletion views/bootswatch/theme/typography.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../../_bootstrap">
<cfimport prefix="b" taglib="../../../vendor/tags/bootstrap">


<cfset rc = { heading = "This is a sample heading using bind" }>
Expand Down
2 changes: 1 addition & 1 deletion views/docs/alert.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/docs/antisamy.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">


<b:row>
Expand Down
2 changes: 1 addition & 1 deletion views/docs/awesomecheckbox.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/docs/buttonGroups.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/docs/buttons.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">


<b:row>
Expand Down
2 changes: 1 addition & 1 deletion views/docs/cache.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">

<b:row>
<b:column span="12">
Expand Down
2 changes: 1 addition & 1 deletion views/docs/common.cfm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/docs/dropdowns.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">



Expand Down
2 changes: 1 addition & 1 deletion views/docs/forms.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<cfimport prefix="b" taglib="../_bootstrap">
<cfimport prefix="b" taglib="../../vendor/tags/bootstrap">



Expand Down
Loading

0 comments on commit f19b630

Please sign in to comment.