This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent extends="Controller"> | |
<!-------------------------------------> | |
<!--- Public ---> | |
<cffunction name="init"> | |
<cfset filters(through="findPost", only="show,edit,update,destroy")> | |
</cffunction> | |
<cffunction name="show"> | |
<!--- ... ---> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local.queryService = new Query(datasource=get('dataSourceName')); | |
local.queryService.setSql(" | |
SELECT DISTINCT | |
A.* | |
FROM | |
apps A | |
JOIN appgroupmemberships G | |
ON A.id = G.appid | |
WHERE | |
G.usergroupid IN (#local.groupIds#) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="render404" hint="Renders a 404 error page."> | |
<cfset renderPage(controller="main", action="error404")> | |
</cffunction> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction | |
name="autoLink" | |
returntype="string" | |
access="public" | |
output="false" | |
hint="Turns all URLs and e-mail addresses into clickable links." | |
examples=' | |
##autoLink("Download Wheels from http://cfwheels.org/download")## | |
-> Download Wheels from <a href="http://cfwheels.org/download">http://cfwheels.org/download</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component extends="Controller" { | |
/** | |
@hint Shows form for registering for social network. | |
*/ | |
public function register() { | |
user = model("user").new(); | |
} | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$(”.focus”).focus(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- URL to RSS feed ---> | |
<cfparam name="arguments.articlesRss" type="url"> | |
<!--- URL to Delicious page ---> | |
<cfparam name="arguments.articlesUrl" type="url"> | |
<!--- Number of items to display from feed ---> | |
<cfparam name="arguments.numToDisplay" type="numeric" default="10"> | |
<!--- Note: we are breaking the convention of data access in the view here so that we can cache this partial ---> | |
<cfset articles = articles(arguments.articlesRss)> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent extends="Model" output="false"> | |
<cfset this.modelName = ListLast(GetMetaData(this).name, ".")> | |
<cffunction name="init"> | |
<cfset table(name="calls")> | |
<!--- Validations ---> | |
<cfset validatesPresenceOf(properties="callStatusId") /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfparam name="arguments.focus" type="string" default=""> | |
<cfif Len(arguments.focus)> | |
<cfoutput> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$("#arguments.focus#").focus(); | |
}); | |
</script> | |
</cfoutput> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cffunction name="add"> | |
<cfset user = model("user").new()> | |
<cfset header = "Create a New User"> | |
<cfset formAction = "create"> | |
<cfset submitLabel = "Create"> | |
<cfset renderPage(template="form")> | |
</cffunction> | |
<cffunction name="edit"> | |
<cfset user = model("user").findByKey(params.key)> |