So - in case folks are curious - I now have both a dishwasher and the Internet back at my house. I feel like I've returned to the modern world. (Yes, I'm spoiled.)
Last night instead of my normal useless browsing, I worked up a quick set of tags that will make it easier for folks to use Spry widgets. So for example, to create tabs (with the not yet officially released Spry Tab code), you can do this:
<cf_tab id="demo0">
<cf_page title="Tab 1">
Orig Ganster
</cf_page>
<cf_page title="Tab 2">
Tab 2
</cf_page>
</cf_tab>
Accordions are much more difficult:
<cf_accordion id="demo1">
<cf_page title="Page One">
This is the content for the first accordion panel.
</cf_page>
<cf_page title="Page Two">
This is the second page with some dynamic content, <cfoutput>#timeFormat(now())#</cfoutput>
</cf_page>
</cf_accordion>
The custom tags are smart enough to know when they have been run once in the request and will not re-include the JavaScript files more than once. Before I tell you where to download this - please note that this is very rough code. It doesn't have documentation (bah, docs are for wimps!) or proper error handling, or even strong testing. It really is just something I was playing with.
This all stemmed from a long talk I had with Charlie Arehart about CF and Spry and he will be working on this project as well. The project is being hosted - where else - at RIAForge: http://cfspry.riaforge.org
I also have some ideas for how to work with Spry datasets as well - but that is still way in the planning stages.
p.s. I said the code was a bit ugly - and it is - but check out how the custom tags are written, especially page.cfm. Notice how it checks for the parent and based on this can check to see if it properly wrapped. Custom tags are cool. Don't let them CFC folks fool ya!
Archived Comments
Ray,
I think I want in on this as well.
ap
Hi Ray,
Are there any place that we can download Spry 1.4? :)
It remember something to me :)
Oguz - labs.adobe.com, although the tab code is NOT in it. It is in the preview they released before MAX.
Andrea - your comment made absolutely no sense to me. :)
Cool, will take a look at this.
BTW, there's a typo in the footer on the project pages:
"This project is sharing it's code via Subversion."
There shouldn't be an apostrophe in the "it's". Minor point, I know :P
Typo? What typo? I don't see any typo.
-whistles innocently-
Ray, I know where is the Spry files and I know labs.adobe.com.
I have already seen some Spry 1.4 samples and I know it will be published within some time. I just wondered that whether I missed them or not?
Anyway thanks. :)
If I look at http://svn.riaforge.org/cfs... in a browser, it says revision 0 and there are no directories.
I've never been able to get code out of subversion on the first try, but is there really code in there this time?
I've not yet put the code in SVN. Use the DOwnload link at top by the project name.
SVN currently is for BROWSING only (unless you get via a SVN client).
I like it. Pretty cool, thanks Ray.
Great to see it posted on riaforge now. As for my contributions, I have to say that it may be a couple of weeks before I can do much. I'm traveling in Europe (speaking several times over a couple of weeks, http://carehart.org/blog/cl..., so limited free time and connectivity. Glad to see others wanting in on things.
The zip is updated. I'll be adding to the repo in a few moments. In general, I _wont_ be posting here for small updates like this, but will use the blog at http://cfspry.riaforge.org.
Alan said: "If I look at http://svn.riaforge.org/cfs... in a browser..."
I'm just learning about svn myself Alan. Here's one way to get tapped in. Go to: http://tortoisesvn.net/down... and install TortoiseSVN (It's "the coolest Interface to (Sub)Version Control").
It installs two new menu items in the windows explorer context menu (when you right-click on a folder).
Create a new folder C:\svn
This will be the root download directory for all things subversion.
Create a new folder C:\svn\cfSpry
This will be this project's folder syncronized with the repository.
Right-click on the cfSpry folder.
Choose SVN Checkout
The dialog box will ask "URL of repository".
Paste: http://svn.riaforge.org/cfspry
You now have the latest copy.
If you want to change the ColdFusion code (for instance the colors and what-not), then (I think) the way to do that is to copy the folder into an area under your web root and change to your hearts content. That way, you don't lose your changes when you get the latest version from the repository again.
I use Beyond Compare by scootersoftware.com to see what changes have been made, but apparently there is a diff function built into subversion as well.
Be careful not to click on the Google ads at
http://tortoisesvn.net/down....
The ads are for some kind of "Windows Installer Program".
The program you want to download is named something like
TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi