Index: openacs-4/packages/xowiki/tcl/folder-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/folder-procs.tcl,v diff -u -N -r1.27.2.6 -r1.27.2.7 --- openacs-4/packages/xowiki/tcl/folder-procs.tcl 15 Apr 2014 06:47:00 -0000 1.27.2.6 +++ openacs-4/packages/xowiki/tcl/folder-procs.tcl 15 Apr 2014 07:05:37 -0000 1.27.2.7 @@ -630,315 +630,7 @@ } } -##################### -# # -# YUI stuff # -# # -##################### -namespace eval ::YUI { - - Object loader -ad_doc { - The YUI Library comes with a "Loader" module, that resolves YUI-module - dependencies. Also, it combines numerous files into one single file to - increase page loading performance. - This works only for the "hosted" YUI library. This Loader module should - basically do the same (in future). For two simple calls like e.g. - "::YUI::loader require menu" and "::YUI::loader require datatable" - it should take care of selecting all the files needed and assemble them - into one single resource, that may be delivered. - Note, that this is not implemented yet. - } - - loader set ajaxhelper 1 - - # TODO: Make "::YUI::loader require -module XYZ" work everywhere "out-of-the-box" - # Now, as we use "::xo:Page require_JS" we have to include the generated - # header_stuff "manually" (e.g. in tcl-adp pairs), whereas ::template::head... - # includes it directly, which is nice. - - loader ad_proc require { - -module - {-version "2.7.0b"} - } { - This is the key function of the loader, that will be used by other packages. - @param module - The YUI Module to be loaded - } { - my instvar ajaxhelper - 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. - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "yahoo-dom-event/yahoo-dom-event.js" - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper "utilities/utilities.js" - } - menubar { - # - # We should not have two different versions of the YUI - # library on one page, because YUI2 (afaik) doesnt 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. - # - my require -module "utilities" - # todo : this is more than necessary - foreach jsFile { - "container/container-min.js" - "treeview/treeview-min.js" - "button/button-min.js" - "menu/menu-min.js" - "datasource/datasource-min.js" - "autocomplete/autocomplete-min.js" - "datatable/datatable-min.js" - "selector/selector-min.js" - } { - ::xowiki::Includelet require_YUI_JS -ajaxhelper $ajaxhelper $jsFile - } - - my require -module "reset-fonts-grids" - my require -module "base" - - foreach cssFile { - "container/assets/container.css" - "datatable/assets/skins/sam/datatable.css" - "button/assets/skins/sam/button.css" - "assets/skins/sam/skin.css" - "menu/assets/skins/sam/menu.css" - } { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper $cssFile - } - ::xowiki::Includelet require_YUI_CSS -ajaxhelper 1 "treeview/assets/folders/tree.css" - } - datatable { - # see comment above - my require -module "utilities" - # todo : this is more than necessary - foreach jsFile { - "container/container-min.js" - "treeview/treeview-min.js" - "button/button-min.js" - "menu/menu-min.js" - "datasource/datasource-min.js" - "autocomplete/autocomplete-min.js" - "datatable/datatable-min.js" - "selector/selector-min.js" - } { - ::xowiki::Includelet require_YUI_JS -version "2.7.0b" -ajaxhelper $ajaxhelper $jsFile - } - - my require -module "reset-fonts-grids" - my require -module "base" - - foreach cssFile { - "container/assets/container.css" - "datatable/assets/skins/sam/datatable.css" - "button/assets/skins/sam/button.css" - "assets/skins/sam/skin.css" - "menu/assets/skins/sam/menu.css" - } { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper $cssFile - } - #::xowiki::Includelet require_YUI_CSS -ajaxhelper 1 "treeview/assets/skins/sam/treeview.css" - #::xowiki::Includelet require_YUI_CSS -ajaxhelper 1 "treeview/assets/folders/tree.css" - } - reset { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper "reset/reset.css" - } - fonts { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper "fonts/fonts.css" - } - grids { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper "grids/grids.css" - } - base { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper "base/base.css" - } - "reset-fonts-grids" { - ::xowiki::Includelet require_YUI_CSS -ajaxhelper $ajaxhelper "reset-fonts-grids/reset-fonts-grids.css" - } - } - } - - Class ::xowiki::YUIDataTable \ - -superclass ::xo::Table \ - -parameter { - {skin "yui-skin-sam"} - } - - ::xowiki::YUIDataTable instproc init {} { - set trn_mixin [expr {[lang::util::translator_mode_p] ?"::xo::TRN-Mode" : ""}] - my render_with YUIDataTableRenderer $trn_mixin - next - } - - Class AnchorField \ - -superclass ::xo::Table::AnchorField \ - -ad_doc " - In addition to the standard TableWidget's AnchorField, we also allow the attributes -