OK, here is the client-side undo plugin demo that I mentioned earlier:

http://mg.to/znc/colortuner.html

This is the color tuner from the Zvents Network Calendar wizard. Normally you 
would get to the color tuner by going to a venue page
or your MyZvents page on www.zvents.com and then clicking "get this calendar 
for your website". This test page is a static version
of the calendar, using the featured events from www.boston.com.

To try it out, click in the Farbtastic color picker to change the entire theme, 
or click in one of the color patches below that to
choose a specific part of the theme and use the color picker to change that 
only. Or use the Customize... link to show all of the
individual color choices and change any of them. Then try the Undo and Redo 
buttons to move back and forth between your color
settings.

The undo plugin is the first thing in this file:

http://mg.to/znc/colortuner.js

And the same file includes the multi-color picker code that uses this plugin. 
Search the file for "undo" and you'll find all the
relevant code.

I'll tidy up the undo code to make a nice plugin release out of it, but there 
it is in case anyone wants to take a look at it now.
I'd be interested in any feedback on the issues I mentioned in my previous 
message. (I'd mentioned saving the undo/redo queue in a
hidden form field so it survives a soft reload, but now that I look at the 
code, it doesn't do that. Must have been something I was
thinking about doing. The code actually should work with either strings or 
objects or any type as the undo queue entries.)

I also plan to release the multi-color picker as a plugin, but that code not 
really ready for prime time. If anyone is curious about
it, it uses this file to define the color patches and their relationships:

http://mg.to/znc/tweaks.js

-Mike

Reply via email to