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

3159"Skinning" the YUI

Expand Messages
  • mori57
    Jul 21, 2006
      I have something that's a cross between a request and a suggestion.

      My apps reside behind a firewall, and I can't rely on the idea that
      users will always have access to the public internet. Causing an app
      to call back to Yahoo! for the images poses a potential security
      issue. The images are included in the package that we download.

      I'm loathe to have to re-edit the YUI files that I've had to edit to
      make images work properly for my apps... if I want to use the compact
      versions, I have to edit those as well, or compress the Javascript
      files myself.

      My question to the community is: How are you dealing with these issues
      (if at all)? Are you simply biting the bullet and letting your apps
      call back to Yahoo! for the images, or have you manually edited your

      One idea: In the yahoo.js file, at the top level, provide a
      configuration object that each user can modify to provide global,
      application-specific, functions to the dependent .js files. Populate
      it with your defaults, by all means, with IMG_ROOT set to whatever you
      normally want it to be, but placing it at that level should make it
      easier for changes like root urls to be set in one place and
      propagated to the dependent modules without forcing users to have to
      re-edit every time a new version of the YUI comes out.

      Or, instead of creating actual <img> tags (in the Widgets, like the
      Calendar), you might use class'd <span>s with a background:url()
      specified in a separate .css file (say, "YUISkin.css" or somesuch?).
      Then, users need only modify the .css file to point at the images they
      want to use. This, however, does make it necessary to know and keep
      track of the sizes of the images so that they display properly.

      Anyhow, thoughts, suggestions on ways this could be done?
    • Show all 5 messages in this topic