Scriptaculous SortableTree
posted: May 30th, 2008 · by: Sven
For a project I’ve been working on recently I needed a sortable javascript tree widget that allows to drag and drop tree nodes and serialize an ajax call on drop events.
I’ve googled for solutions but did not find anything that implemented the simple things I wanted in a lightweight manner. So I started to check out the Scriptaculous sortable tree option but no matter what I tried I could not get it behave.
A couple of frustrating hours of reading the code and comments on the somewhat sparse Scriptaculous documentation (no offense!) I gave up and decided to implement this myself.
Here’s the result.
Read the rest of this entryJavascript/CSS asset bundling a prominent feature in Rails 2.0
posted: September 12th, 2007 · by: Sven
Hey, I just noticed that bundled Javascript and CSS assets will be supported natively in Rails 2.0! David even selected this feature as one of those prominent Rails 2.0 features that he presented during his keynote at the RailsConf Chicago 2007 on May 18th.
Read the rest of this entryHow to use the Bundled assets plugin with Rails' built-in tag helpers
posted: September 7th, 2007 · by: Sven
Nick Pearson has posted a great tip in the comments on how he uses the Bundled Assets plugin with Rails’ built-in Javascript and stylesheet helpers.
I myself have always been using this plugin with just hardcoded Javascript/CSS include tags … so I haven’t been aware that it’s that easy to do!
The original article is pretty long already and I guess it makes sense to post this tip as an article on its own. So here we go …
Read the rest of this entryServe CSS and Javascript even faster: improved Rails bundled_assets plugin
posted: April 27th, 2007 · by: Sven
I recently showed a Rails plugin that allows to transparently bundle your various CSS and Javascript resources (“assets” in Rails talk) into just one single CSS and Javascript file respectively.
I received some quite positive feedback on it and from various discussions some improvements have emerged that are now available in the repository.
Thanks go especially to Witold Rugowski who pointed me to the execution times of the Ruby implementation of JSMin with larger Javascript bundles. He also found a small bug in Uladzislau Latynski’s otherwise flawless JSMin implementation in Ruby that we are using by default.
Read the rest of this entrySafari's beautiful search tag is broken - let's fix that
posted: April 16th, 2007 · by: Sven
What?! Okay, you might well file this away as “Why in the world would I waste my time on this?” - “Ummmm, well … just because it’s cool, you know!” But watch carefully! As a matter of fact this is serious research and development stuff (of course) that deals with super-useful web technologies. :-)
Most probably everybody who’s high on Safari (you know, that “best browser in the world”) knows those beautiful search box HTML widgets that very much resemble Safari’s own search box in the address bar.
Read the rest of this entryRails plugin: Blazing fast page loads through bundled CSS and Javascript
posted: April 14th, 2007 · by: Sven
I recieved an interesting Sitepoint newsletter the other day which talked about bundling CSS and Javascript ressources (or “assets” like that’s called in Rails talk) to achieve faster page loads. This caught my attention specifically because I experienced the need to repackage many small CSS files on the fly a while back when I worked on a large CMS-type system.
Skimming through the PHP source article and code I thought that something similar could be done as a Rails plugin pretty easily and elegantly. I couldn’t resist, sat down and started coding away … so here are my results.
Read the rest of this entry