Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Override Tree refresh function, call parent refresh()

Expand Messages
  • Yaron Shapira
    Hello, I try to understand the idea of the skins in the YUI widgets (autocomplete for example). I want to give my own UI design to the component. If I
    Message 1 of 3 , Oct 1, 2007
    • 0 Attachment

      Hello,

       

      I try to understand the idea of the skins in the YUI widgets (autocomplete for example).

      I want to give my own UI design to the component.

      If I understood correctly I need to define the same classes again but with my own prefix.

      For example:

      .my-skin .yui-ac {...} instead of

      .yui-skin-sam .yui-ac {...}

       

      Then I need to add to my body element (or any other container element) the name of the skin I created. Like that: <body class="my-skin">

       

      First, am I correct in my understanding? or should I use another approach to override the yui skin.

      Second, what will happen in the next version of the YUI widget? in the new .css file the YAHOO will supply there will be new classes for which I did not supply a matching override in my own skin?

       

      Thanks,

      Yaron

       



      Luggage? GPS? Comic books?
      Check out fitting gifts for grads at Yahoo! Search.
    • dlublink
      I found the answer in the doc. YAHOO.widget.TextNode.superclass.refresh.call(this);
      Message 2 of 3 , Oct 1, 2007
      • 0 Attachment
        I found the answer in the doc.

        YAHOO.widget.TextNode.superclass.refresh.call(this);


        --- In ydn-javascript@yahoogroups.com, "dlublink" <dlublink@...> wrote:
        >
        > Hello,
        >
        > I have written my own object which extends the Yahoo TextNode object
        > for use with the tree view:
        >
        > YAHOO.extend(YAHOO.widget.MyCustomerNode, YAHOO.widget.TextNode, {
        >
        > refresh : function () {
        >
        > // does something here
        > }
        > });
        >
        > From within the function refresh, how do I invoke the overriden method?
        >
        > Thanks,
        >
        > David
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.