• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

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.

    StdMod (gallery-stdmod)

    Last Updated: 05/3/13
    + 0 -

    Satyam

    YUI Contributor

    See 12 more by this user.

    Created: 10/6/11
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.10.0
    Free for use.

    When using WidgetParent along with WidgetStdMod it feels a little odd that you have to adjust where WidgetParent adds its children so that it fits them into the BODY section of the StdMod extension, which is one level down from the contentBox. You can do that, there is the _childrenContainer property to specify that, but it still felt silly, I mean, what's the point of having the boundingBox containing the contentBox containing the three StdMod sections. After all, you might use the HEADER section or not, you may use the FOOTER section or not, but you are unlikely not to use the BODY section which, feels quite like the most obvious container for anything, much like the contentBox is.

    So, I created this as a subclass of WidgetStdMod and changed a few methods to make the BODY and the contentBox the same thing. Also, unlike regular WidgetStdMod, the BODY section always exists instead of having to explicitly create it, a silly annoyance for a section that is hardly ever left empty.

    The API docs for this extension point to the one for WidgetStdMod since there is no different in the public interface.

    • Tags:
    • satyam
    • StdMod
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    You simply need to use Y.StdMod instead of Y.WidgetStdMod in the list of extensions when defining a subclass of Y.Widget

    Code Sample

    YUI().use('widget','widget-parent','gallery-stdmod', function(Y) {
        Y.MyWidget= Y.Base.create(
            'mywidget',
            Y.Widget,
            [Y.StdMod, Y.WidgetParent],
            {
                // instance members
            },
            {
                // static members
            }
        });
    });

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info