Object ::YUI::loader (public)

 ::xotcl::Object ::YUI::loader[i]

Defined in

Testcases:
No testcase defined.
Source code:
namespace eval ::YUI {}
::nsf::object::alloc ::xotcl::Object ::YUI::loader {set :ajaxhelper 1}
::YUI::loader proc require {-module {-version "2.7.0b"}} {
    switch -- [string tolower $module] {

      utilities {
        # utilities.js: The utilities.js aggregate combines the Yahoo Global Object,
        # Dom Collection, Event Utility, Element Utility, Connection Manager,
        # Drag & Drop Utility, Animation Utility, YUI Loader and the Get Utility.
        # Use this file to reduce HTTP requests whenever you are including more
        # than three of its constituent components.
        ::xo::Page requireJS urn:ad:js:yui2:yahoo-dom-event/yahoo-dom-event
        ::xo::Page requireJS urn:ad:js:yui2:utilities/utilities
      }
      menubar {
        #
        # We should not have two different versions of the YUI
        # library on one page, because YUI2 (afaik) doesn't support
        # "sandboxing". If we use e.g. the yui-hosted utilities.js file here
        # we may end up with two YAHOO object definitions, because e.g.
        # the tree-procs uses the local yahoo-dom-event.

        # In future, the YUI loader object should be capable of
        # resolving such conflicts. For now, the simple fix is to stick to
        # the local versions, because then the requireJS function takes care
        # of duplicates.
        #
        :require -module "utilities"
        # todo : this is more than necessary
        foreach jsFile {
          container/container-min
          treeview/treeview-min
          button/button-min
          menu/menu-min
          datasource/datasource-min
          autocomplete/autocomplete-min
          datatable/datatable-min
          selector/selector-min
        } {
          ::xo::Page requireJS urn:ad:js:yui2:$jsFile
        }

        :require -module "reset-fonts-grids"
        :require -module "base"

        foreach cssFile {
          container/assets/container
          datatable/assets/skins/sam/datatable
          button/assets/skins/sam/button
          assets/skins/sam/skin
          menu/assets/skins/sam/menu
          treeview/assets/folders/tree
        } {
          ::xo::Page requireCSS urn:ad:css:yui2:$cssFile
        }
      }
      datatable {
        # see comment above
        :require -module "utilities"
        # todo : this is more than necessary
        foreach jsFile {
          container/container-min
          treeview/treeview-min
          button/button-min
          menu/menu-min
          datasource/datasource-min
          autocomplete/autocomplete-min
          datatable/datatable-min
          selector/selector-min
        } {
          ::xo::Page requireJS urn:ad:js:yui2:$jsFile
        }

        :require -module "reset-fonts-grids"
        :require -module "base"

        foreach cssFile {
          container/assets/container
          datatable/assets/skins/sam/datatable
          button/assets/skins/sam/button
          assets/skins/sam/skin
          menu/assets/skins/sam/menu
        } {
          ::xo::Page requireCSS urn:ad:css:yui2:$cssFile
        }
      }
      reset {
        ::xo::Page requireCSS urn:ad:css:yui2:reset/reset
      }
      fonts {
        ::xo::Page requireCSS urn:ad:css:yui2:fonts/fonts-min
      }
      grids {
        ::xo::Page requireCSS urn:ad:css:yui2:grids/grids
      }
      base {
        ::xo::Page requireCSS urn:ad:css:yui2:base/base
      }
      "reset-fonts-grids" {
        ::xo::Page requireCSS urn:ad:css:yui2:reset-fonts-grids/reset-fonts-grids
      }
    }
  }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: