YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub
  • Home
  • Gallery
  • Forums
  • YUI 2
  • YUI 3
  • YUI Compressor
  • YUI Doc
  • More
  • Gallery Forums
  • Gallery Stats
  • Gallery Calendar
  • Register
  • Login

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

port html5 slideshow jafl rgrove event form adam ajax overlay jsonp skinnable widget plugin yui2 caridy lsmith filter foxxtrot nzakas node ericf animation io apipkin davglass

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Undo/Redo Framework (gallery-undo) on cdn

    Last Updated: 05/12/10
    + 1 -

    Iliyan Peychev

    YUI Contributor

    See 1 more by this user.

    Created: 12/10/09
    Last CDN Push: 04/8/10
    Build Tag: gallery-2010.04.08-12-35
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.1.1
    Free for use.

    YUI3 Undo Framework allows adding undo/redo functionality to an application.
    It consists of two classes:

    • UndoManager
    • UndoableAction

    In addition to standard undo/redo functionality, YUI3 Undo Framework supports asynchronous actions too.

    • Tags:
    • redo
    • undo
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Code Sample

    <script src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2010.04.08-12-35'
    }).use('gallery-undo', function(Y) {
     
        var undoManager = new Y.UndoManager();
     
        function MyAction(config){
            MyAction.superclass.constructor.apply( this, arguments );
        }
     
        MyAction.NAME = "MyAction";
     
        MyAction.ATTRS = {
            ...
        };
     
        Y.extend( MyAction, Y.UndoableAction, {
            undo : function(){
                ...
            },
     
            redo : function() {
                ...
            },
     
            merge : function( newAction ) {
                ...
            },
     
            cancel : function() {
                ...
            }
        } );
     
        Y.MyAction = MyAction;
     
        var myAction = new Y.MyAction({
            label: "My undoable action"
        });
     
        undoManager.add( myAction );
     
        undoManager.undo();
        undoManager.redo();
    });

    Forum Posts

    No forum posts for this module.

    YUI Projects
    • All YUI Downloads
    • YUI 2
    • YUI 3
    • YUI Doc
    • YUI Compressor
    • YUILibrary.com
    • YUI Build Tool
    • YUI PHP Loader
    Pages & Links
    • All YUI Downloads
    • Git FAQ
    • Graded Browser Support
    • Contribute to YUI
    • Forum Stats
    • Gallery Stats
    • YUI Calendar
    Contribute
    • Submit a Bug
    • Request a Feature
    • Write Code
    • Meet the Team
    Follow YUI
    • on GitHub
    • on Twitter
    • on FriendFeed
    • on Facebook
    • on IRC
    • YUI Blog
    • YUI Theater
    • YUI Forums

    © 2010 YUI Library - Site Credits