Tuesday, November 7th, 2006
Jack Slocum has updated his fantastic YAHOO.ext package yet again.
The main changes are:
First off, many of the images for the TabPanel, BasicDialog, BorderLayout and Button classes have been made into CSS sprites. This should improve loading time for images and prevent flickering. All components developed in the future will use CSS sprites from the beginning so I don’t have to go back and redo them!
There’s also a new theme for the components mentioned above “ytheme-gray”. It changes my nice blue color scheme into an equally smooth looking gray color scheme. :) To use it, you just add the class “ytheme-gray” to the body element or apply it to individual elements by putting it on a container element. Here’s a BasicDialog with the gray theme:
BasicDialog (New Class)
The YUI dialog classes are great for most implementations and relatively simple to implement. I have no desire to try to replace them with my own Dialog classes. Sometimes though, I need a lightweight dialog that displays something, looks nice and offers features like resizing, drag and drop and tabs. Kind of like my comments dialog on this blog. I got started with this idea, and in the end I ended up with a Dialog class that I find incredibly useful. It also mixes well with the rest of YAHOO.ext.
For more information, I would recommend taking a look at the BasicDialog.js file in the download. All of the public configuration options and methods are documented. Here’s a short list of features:
- Automatically create tabs from markup
- Automatic body height synchronization (for easy overflow scrolling)
- Animation targeting (to animate from any existing element, like the comments window)
- 4 way resizing
- Drag and drop moving
- Modal or non-modal
- Easy to use / nice looking custom button implementation
- Automatic state management across page views (location and size) via YAHOO.ext.state
- Easy key listeners
Check out some examples:
The new django book uses the inline comment system that Jack created.
Posted by Dion Almaer at 7:45 am