JQuack for jQuery CFWheels Plugin

Manage and call your jQuery core files, plugin packages, UI and themes with a set of JQuack functions. Download it here..

It also adds a simple UI for configuring all your core and plugins
This plugin adds a set of functions to call your jQuery core files, plugin packages, UI and themes. You can can also call files from an external library (Eg: Google CDN).

There is also my standalone CFC for use outside of CFWheels (but why would you want to do that?)

Contributions
Feel free to contribute via GitHub or drop me an email.. I have also written a bunch of unit tests if you’re into that sort of thing, they’re all available on GitHub.

Credits
Tony Petruzzi for his many replies to all things CFWheels, plugins and unit testing
CFWheels and jQuery for all-round awesomeness
JQuack Roadmap
Better support for external file requests
Support for non minified versions of UI files
File verification tool
Unit test improvements

Function Syntax
JQuackCore([coreFileName, rootURL, head])
JQuackPlugin([key, file, pluginRootURL, delimiter, head])
JQuackUI([UIBundleName, themeName, rootURL, delimiter, head])
JQuackTheme(themeName, [UIBundleName, rootURL, head])
JQuackAll([delimiter, head])

Recommended Usage Example

<!--- 1. include all files as defined in your JQuack configuration --->
#JQuackAll()#

<!--- 2. include minimal files --->
#JQuackCore()#
#JQuackPlugin("foo,bar")#
#JQuackUI()#

<!--- 3. include a combination of files --->
#JQuackCore()#
#JQuackPlugin("foo,bar")#
#JQuackPlugin(file="jquery.foo.js", pluginRootURL="http://www.foobar.com/plugins/")#
#JQuackUI(themeName="barfoo")#
JQuackCore()
Usage Example
<!--- JQuackCore() Examples --->
<!--- call the core file as defined in config --->
#JQuackCore()#

<!--- write the output to the head area of the HTML page --->
#JQuackCore(head=true)#

<!--- call a different version of the core file from your javascripts/jquery/ folder --->
#JQuackCore(coreFileName="jquery-1.5.0.min.js")#

<!--- call from Google Libraries API --->
#JQuackCore(coreFileName="jquery.min.js", rootURL="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/")#
JQuackPlugin()
Usage Example
<!--- JQuackPlugin() Examples --->
<!--- call a single plugin package --->
#JQuackPlugin("foo")#

<!--- call multiple plugin packages --->
#JQuackPlugin("foo,bar,quack")#

<!--- don't worry, none of the 'foo' files will be included more than once --->
#JQuackPlugin("foo,bar")#
#JQuackPlugin("foo")#

<!--- write the output to the head area of the HTML page --->
#JQuackPlugin(key="foo,bar", head=true)#

<!--- call all plugins --->
#JQuackPlugin()#

<!--- remove line breaks between included files --->
#JQuackPlugin(delimiter="")#

<!--- call a plugin package from another location --->
#JQuackPlugin(key="foo", pluginRootURL="http://someserver.com/js/plugins/")#
#JQuackPlugin(key="bar", pluginRootURL="/javascripts/someotherfolder/")#

<!--- call a file not defined in your packages but located in the /javascripts/jquery/plugins/ folder --->
#JQuackPlugin(file="jquery.foobar.js")#

<!--- call a file from another location --->
#JQuackPlugin(file="jquery.foobar.js", pluginRootURL="http://someserver.com/js/plugins/")#
JQuackUI()
Usage Example
<!--- JQuackUI() Examples --->
<!--- call the UI bundle as defined in config --->
#JQuackUI()#

<!--- include the UI with a different theme --->
#JQuackUI(themeName="rainy")#

<!--- include a different UI bundle --->
#JQuackUI(UIBundleName="jquery-ui-1.2.34.custom")#

<!--- write the output to the head area of the HTML page --->
#JQuackUI(head=true)#
JQuackTheme()
NOTE: This function is called within JQuackUI(), so should only be used to override the theme used in JQuackUI()

Usage Example
<!--- JQuackTheme() Examples --->

<!--- include a different theme --->
#JQuackTheme(themeName="wacky")#

<!--- write the output to the head area of the HTML page --->
#JQuackTheme(themeName="wacky", head=true)#
JQuackAll()
Usage Example
<!--- JQuackAll() Examples --->
<!--- include all files --->
#JQuackAll()#

<!--- include all files without line breaks --->
#JQuackAll(delimiter="")#

<!--- write all output to the head area of the HTML page --->
#JQuackAll(head=true)#
Advertisements

One thought on “JQuack for jQuery CFWheels Plugin

  1. Pingback: DatePicker Plugin for CFWheels | Chapmandu, Adam's digital cesspool

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s