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

Skinning with the loader? Does the example work?

Expand Messages
  • John
    I m trying to skin a treeview. I m using the Loader. I follow the example here http://developer.yahoo.com/yui/yuiloader/#usingskins So my code reads... var
    Message 1 of 3 , Jul 30, 2008
    View Source
    • 0 Attachment
      I'm trying to skin a treeview.
      I'm using the Loader.
      I follow the example here
      http://developer.yahoo.com/yui/yuiloader/#usingskins

      So my code reads...

      var loader = new YAHOO.util.YUILoader({
      require: ["treeview"],
      skin: { overrides: { treeview: ['myTVSkin'] } },
      loadoptional: false,
      onSuccess: function() {
      // do stuff ...
      }
      });
      loader.insert();

      The result shows the tree without any styles (so I guess the override is
      seen).
      Firebug reveals that the call for 'myTVSkin' is turned in to a 404 for
      http://yui.yahooapis.com/2.5.2/build/treeview/undefinedmyTVSkin/treeview\
      .css

      and two other 404's appear with it for
      "...container/undefinedundefined/container.css" and "...button.css".

      1) Does anyone know what I'm doing wrong? I think I'm doing it as per
      the official example but obviously I haven't.

      2) Can anyone tell me where to find the configuration options? These
      configs like "skin" "overrides" etc don't seem to be in the api docs.

      Initially, without the override above, I've tried putting the styles
      directly into the document which works for .ygtvitem but not for
      .ygtvlabel; I believe the former worked because sam does set a style,
      and the latter not because when sam sets a style, due to where the
      loader places the sam css in the css hierachy it comes later, and thus
      overrides, the inline style.

      Using the override from the example, without the inline style, just
      breaks the tree style altogether and it renders undecorated. So just in
      writing this post I've realised I can override the treeview style, but
      put the styles inline. Which works as a hack. I'll have to find all
      the other treeview styles and insert them into my document until I work
      out my problem.

      help?
    • John
      Can anyone tell me if the example at http://developer.yahoo.com/yui/yuiloader/#usingskins actually works? Mine shows 404 errors asking yui for files with
      Message 2 of 3 , Jul 30, 2008
      View Source
      • 0 Attachment
        Can anyone tell me if the example at

        http://developer.yahoo.com/yui/yuiloader/#usingskins

        actually works?

        Mine shows 404 errors asking yui for files with 'undefinedmyTreeSkin'
        in the path.
      • jerry_gagliano
        I can t get it to work. I also tried with the addModule functionality. I find it very difficult to use the CSS with yahoo UI. Don t know why they have to
        Message 3 of 3 , Aug 30, 2008
        View Source
        • 0 Attachment
          I can't get it to work. I also tried with the addModule functionality.
          I find it very difficult to use the CSS with yahoo UI. Don't know why
          they have to include this sam default in the YUI Loader. If you decide
          to use it then include the path if not inlclude your own paths.

          When you override the css files by using this:
          overrides: {
          colorpicker: ['myCPSkin'],
          treeview: ['myTVSkin']
          }

          In exactly which folder do u place your css files? in the sam's folder?

          --- In ydn-javascript@yahoogroups.com, "John" <john_2095@...> wrote:
          >
          > Can anyone tell me if the example at
          >
          > http://developer.yahoo.com/yui/yuiloader/#usingskins
          >
          > actually works?
          >
          > Mine shows 404 errors asking yui for files with 'undefinedmyTreeSkin'
          > in the path.
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.