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

Commit

Permalink
Merge branch 'Bootstrap-3.3.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
jmohler1970 committed Sep 9, 2015
2 parents 07d0f50 + 196517e commit ffebf55
Show file tree
Hide file tree
Showing 32 changed files with 1,355 additions and 723 deletions.
24 changes: 19 additions & 5 deletions application.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,24 @@

component {

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


function onApplicationStart() {
application.Bootstrap = {

actionRoot = cgi.script_name,
IconLibrary = {"default" = "glyphicon glyphicon-", "awesome" = "fa fa-"},
ImageLibrary = {"default" = replace(cgi.script_name, "/index.cfm", "") & "/assets/"},
StyleSheetLibrary = {"default" = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"},
ScriptLibrary = {"default" = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"}
};


} // end onApplicationStart


function onRequestStart() {

Expand All @@ -15,9 +31,7 @@ function onRequestStart() {

session.theme = url.theme;
}
} // end onRequestStart



} // onRequestStart
}

4 changes: 4 additions & 0 deletions assets/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@



.birthday { color : purple !important; font-size : 30pt; } // a festive color
16 changes: 11 additions & 5 deletions bootstrap/button.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ case "start" :
param attributes.dismiss = false;
param attributes.icon = "";
param attributes.iconAlign = "left";
param attributes.iconAwesome = "";
param attributes.id = "";
param attributes.lang = "";
param attributes.library = "default"; // for icon
param attributes.look = "default";
param attributes.outline = false;
param attributes.processed = true;
param attributes.rendered = true;
param attributes.role = "button";
Expand Down Expand Up @@ -57,6 +58,7 @@ case "end" :
variables.result &= '<button type="button" class="btn btn-#lcase(attributes.look)#';
if(attributes.outline) variables.result &= "-outline";
if(attributes.size != "") variables.result &= ' btn-#attributes.size#';
if(attributes.styleClass != "") variables.result &= ' #attributes.styleClass#';
variables.result &= '"';
Expand All @@ -79,13 +81,17 @@ case "end" :
variables.result &= '>';
// space on end is not an accident
if (attributes.icon != "" && attributes.iconAlign == "left") variables.result &= '<i class="glyphicon glyphicon-#attributes.icon#"></i> ';
if (attributes.iconAwesome != "" && attributes.iconAlign == "left") variables.result &= '<i class="fa fa-#attributes.iconAwesome#"></i> ';
if (attributes.icon != "" && attributes.iconAlign == "left") {
variables.result &= '<i class="#application.Bootstrap.IconLibrary[attributes.library]##attributes.icon#"></i> ';
}
variables.result &= thisTag.generatedContent; // pass through of content
// space at start is not an accident
if (attributes.icon != "" && attributes.iconAlign == "right") variables.result &= ' <i class="glyphicon glyphicon-#attributes.icon#"></i>';
if (attributes.iconAwesome != "" && attributes.iconAlign == "right") variables.result &= ' <i class="fa fa-#attributes.iconAwesome#"></i>';
if (attributes.icon != "" && attributes.iconAlign == "right") {
variables.result &= ' <i class="#application.Bootstrap.IconLibrary[attributes.library]##attributes.icon#"></i>';
}
variables.result &= '</button>';
Expand Down
4 changes: 3 additions & 1 deletion bootstrap/buttonGroup.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ case "start" :
param attributes.justified = false;
param attributes.look = ""; // this is the default unless over ridden
param attributes.name = "";
param attributes.orientation = "horizontal";
param attributes.orientation = "horizontal"; // horizontal, vertical, up
param attributes.processed = true;
param attributes.pull = "";
param attributes.rendered = true;
Expand All @@ -38,6 +38,8 @@ case "end" :
if(attributes.orientation == "horizontal") variables.result &= '<div class="btn-group';
if(attributes.orientation == "vertical") variables.result &= '<div class="btn-group-vertical';
if(attributes.orientation == "up") variables.result &= '<div class="btn-group dropup';
if(attributes.size != "") variables.result &= ' btn-group-#attributes.size#';
if(attributes.justified) variables.result &= ' btn-group-justified';
Expand Down
18 changes: 12 additions & 6 deletions bootstrap/commandButton.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ case "start" :
param attributes.disabled = false;
param attributes.icon = "";
param attributes.iconAlign = "left";
param attributes.iconAwesome = "";
param attributes.id = "";
param attributes.lang = "";
param attributes.library = "default"; // for icon
param attributes.look = "default";
param attributes.name = "";
param attributes.outline = false;
param attributes.processed = true;
param attributes.rendered = true;
param attributes.rel = "";
Expand Down Expand Up @@ -61,6 +62,7 @@ case "end" :
if(attributes.binding != "" && isDefined("caller.rc.#attributes.binding#")) thisTag.generatedContent = xmlFormat(evaluate("caller.rc.#attributes.binding#"));
variables.result &= '<button type="#attributes.type#" class="btn btn-#lcase(attributes.look)#';
if(attributes.outline) variables.result &= "-outline";
if(attributes.size != "") variables.result &= ' btn-#attributes.size#';
if(attributes.styleClass != "") variables.result &= ' #attributes.styleClass#';
variables.result &= '"';
Expand All @@ -79,13 +81,17 @@ case "end" :
variables.result &= '>';
// space on end is not an accident
if (attributes.icon != "" && attributes.iconAlign == "left") variables.result &= '<i class="glyphicon glyphicon-#attributes.icon#"></i> ';
if (attributes.iconAwesome != "" && attributes.iconAlign == "left") variables.result &= '<i class="fa fa-#attributes.iconAwesome#"></i> ';
variables.result &= thisTag.generatedContent; // pass through of content
if (attributes.icon != "" && attributes.iconAlign == "left") {
variables.result &= '<i class="#application.Bootstrap.IconLibrary[attributes.library]##attributes.icon#"></i> ';
}
variables.result &= thisTag.generatedContent; // pass through of content
// space at start is not an accident
if (attributes.icon != "" && attributes.iconAlign == "right") variables.result &= ' <i class="glyphicon glyphicon-#attributes.icon#"></i>';
if (attributes.iconAwesome != "" && attributes.iconAlign == "right") variables.result &= ' <i class="fa fa-#attributes.iconAwesome#"></i>';
if (attributes.icon != "" && attributes.iconAlign == "right") {
variables.result &= ' <i class="#application.Bootstrap.IconLibrary[attributes.library]##attributes.icon#"></i>';
}
variables.result &= '</button>';
Expand Down
36 changes: 20 additions & 16 deletions bootstrap/commandLink.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ case "start" :
variables.result = "";
variables.crlf = chr(13) & chr(10);
if (!structKeyExists(attributes, "id") && !structKeyExists(attributes, "action")) throw("b:commandLink tag must have either an id or an action. Neither have been provided");
param attributes.action = "";
param attributes.action = ""; // powered by application.Bootstrap.actionRoot;
param attributes.binding = "";
param attributes.disabled = false;
param attributes.dropdown = false;
param attributes.href = ""; // any target
param attributes.icon = "";
param attributes.iconAlign = "left";
param attributes.iconAwesome = "";
param attributes.id = "";
param attributes.library = "default"; // for icon
param attributes.look = "default";
param attributes.outline = false;
param attributes.processed = true;
param attributes.rel = "";
param attributes.rendered = true;
Expand Down Expand Up @@ -63,40 +63,44 @@ case "end" :
if(attributes.value != "") thisTag.generatedContent = xmlFormat(attributes.value);
if(attributes.binding != "" && isDefined("caller.rc.#attributes.binding#")) thisTag.generatedContent = xmlFormat(evaluate("caller.rc.#attributes.binding#"));
// no target of any kind was set AND this is not an anchor
if((attributes.action != "" || attributes.href == "") && attributes.id == "") attributes.href = application.Bootstrap.actionRoot & attributes.action;
if(attributes.look == 'link') variables.result &= '<a class="'; // we don't do anything special so that link look like links
if(attributes.look != 'link') variables.result &= '<a class="btn btn-#lcase(attributes.look)#';
if(attributes.disabled) variables.result &= ' disabled';
if(attributes.dropdown) variables.result &= ' datatoggle';
if(attributes.size != "") variables.result &= ' btn-#attributes.size#';
if(attributes.styleClass != "") variables.result &= ' #attributes.styleClass#';
if(attributes.outline) variables.result &= "-outline ";
if(attributes.disabled) variables.result &= 'disabled="disabled" ';
if(attributes.dropdown) variables.result &= 'datatoggle ';
if(attributes.size != "") variables.result &= 'btn-#attributes.size# ';
if(attributes.styleClass != "") variables.result &= '#attributes.styleClass#';
variables.result &= '"';
if(attributes.action != "") variables.result &= ' href="#attributes.action#"';
if(attributes.href != "") variables.result &= ' href="#attributes.href#"';
if(attributes.id != "") variables.result &= ' id="#attributes.id#"';
for(variables.myAttr in variables.arAttrSeries) variables.result &= ' #lcase(variables.myAttr.key)#="#variables.myAttr.value#"';
if(attributes.rel != "") variables.result &= ' rel="#attributes.rel#"';
if(attributes.role != "") variables.result &= ' role="#attributes.role#"';
if(attributes.target != "") variables.result &= ' target="#attributes.target#"';
if(attributes.tooltip != "") variables.result &= ' tooltip="#attributes.tooltip#"';
if(attributes.tooltip != "") variables.result &= ' title="#attributes.tooltip#"';
if(attributes.style != "") variables.result &= ' style="#attributes.style#"';
if(attributes.dropdown) variables.result &= ' data-toggle="dropdown"';
variables.result &= '>';
// space on end is not an accident
if (attributes.icon != "" && attributes.iconAlign == "left") variables.result &= '<i class="glyphicon glyphicon-#attributes.icon#"></i> ';
if (attributes.iconAwesome != "" && attributes.iconAlign == "left") variables.result &= '<i class="fa fa-#attributes.iconAwesome#"></i> ';
if (attributes.icon != "" && attributes.iconAlign == "left") {
variables.result &= '<i class="#application.Bootstrap.IconLibrary[attributes.library]##attributes.icon#"></i> ';
}
variables.result &= thisTag.generatedContent; // pass through of content
// space at start is not an accident
if (attributes.icon != "" && attributes.iconAlign == "right") variables.result &= ' <i class="glyphicon glyphicon-#attributes.icon#"></i>';
if (attributes.iconAwesome != "" && attributes.iconAlign == "right") variables.result &= ' <i class="fa fa-#attributes.iconAwesome#"></i>';
if (attributes.icon != "" && attributes.iconAlign == "right") {
variables.result &= ' <i class="#application.Bootstrap.IconLibrary[attributes.library]##attributes.icon#"></i>';
}
if(attributes.dropdown) variables.result &= '<span class="caret"></span>';
variables.result &= '</a>';
Expand Down
17 changes: 14 additions & 3 deletions bootstrap/dropButton.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,35 @@ case "start" :
variables.result = "";
variables.crlf = chr(13) & chr(10);
variables.parentTag = lcase(ListGetAt(getBaseTagList(), 2));
variables.validTag = ["cf_buttongroup","cf_tabview"];
if(!ArrayContains(variables.validTag, variables.parentTag ) ) {
throw "This tag must be in #ArrayToList(variables.validTag)#. It appears to be #variables.parentTag#";
}
param attributes.look = "default";
param attributes.processed = true;
param attributes.rendered = true;
param attributes.role = "button";
param attributes.value = "";
if (!attributes.processed) exit "exitTag";
break;
case "end" :
variables.result &= crlf & '<a class="btn btn-#lcase(attributes.look)# dropdown-toggle" ';
variables.result &= 'data-toggle="dropdown" role="button">#attributes.value# <b class="caret"></b></a>';
case "end" :
if (attributes.look == "tab") variables.result &= crlf & '<a class="dropdown-toggle" ';
if (attributes.look != "tab") variables.result &= crlf & '<a class="btn btn-#lcase(attributes.look)# dropdown-toggle" ';
variables.result &= 'data-toggle="dropdown" role="#attributes.role#">#attributes.value# <b class="caret"></b></a>';
variables.result &= crlf & '<ul class="dropdown-menu" role="menu">';
variables.result &= crlf & thisTag.generatedContent;
variables.result &= crlf & '</ul>';
variables.result &= crlf & '<!-- /.end dropdown -->';
thisTag.GeneratedContent = "";
if (attributes.rendered) writeOutput(variables.result);
Expand Down
5 changes: 3 additions & 2 deletions bootstrap/graphicImage.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ case "start" :
param attributes.binding = "";
param attributes.height = ""; //creates CSS
param attributes.id = "";
param attributes.library = "default";
param attributes.processed = true;
param attributes.rendered = true;
param attributes.shape = ""; //rounded, circle, thumbnail
param attributes.src;
param attributes.name;
param attributes.style = "";
param attributes.styleClass = "";
param attributes.text = "";
Expand Down Expand Up @@ -57,7 +58,7 @@ case "end" :
for(variables.myAttr in variables.arAttrSeries) variables.result &= ' #lcase(variables.myAttr.key)#="#variables.myAttr.value#"';
variables.result &= ' src="#attributes.src#"';
variables.result &= ' src="#application.Bootstrap.ImageLibrary[attributes.library]##attributes.name#"';
// start style
if(attributes.style != "" || attributes.height != "" || attributes.width != "") {
Expand Down
3 changes: 2 additions & 1 deletion bootstrap/icon.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ case "start" :
param attributes.addon = false;
param attributes.binding = "";
param attributes.id = "";
param attributes.library = "default";
param attributes.look = "";
param attributes.name = "";
param attributes.processed = true;
Expand Down Expand Up @@ -45,7 +46,7 @@ case "end" :
if(attributes.binding != "" && isDefined("caller.rc.#attributes.binding#")) attributes.name = xmlFormat(evaluate("caller.rc.#attributes.binding#"));
if(attributes.addon) variables.result &= '<span class="input-group-addon">';
variables.result &= '<i class="glyphicon glyphicon-#attributes.name#';
variables.result &= '<i class="#application.Bootstrap.IconLibrary[attributes.library]##attributes.name#';
if(attributes.look != "") variables.result &= ' text-#lcase(attributes.look)#';
if(attributes.size != "") variables.result &= ' fa-#attributes.size#';
if(attributes.spin) variables.result &= ' fa-spin';
Expand Down
77 changes: 0 additions & 77 deletions bootstrap/iconAwesome.cfm

This file was deleted.

Loading

0 comments on commit ffebf55

Please sign in to comment.