xowiki::YUIMenu instproc render (public)
<instance of xowiki::YUIMenu> render
Defined in /var/www/openacs.org/packages/xowiki/tcl/yui-procs.tcl
http://developer.yahoo.com/yui/menu/
- Testcases:
- No testcase defined.
Source code: append :CSSclass " yuimenu" set :extrajs "" # I want the menu to show up when JS is disabled # This gets overridden by JS, so its only relevant for the non-JS version #set :style "visibility: visible; position: relative;" html::div [:get_attributes {CSSclass class} id style] { # Header html::t \n if {[info exists :header]} { html::div -class "hd" { html::t [:header] } } # Body html::t \n html::div -class "bd" { foreach group [:split_menu_groups [:children]] { html::ul -class yuiml { foreach menuitemlist $group {$menuitemlist render} } } } # Footer if {[info exists :footer]} { html::div -class "ft" { html::t [:footer] } } # Shadow if {[info exists :shadow]} { html::div -class "yui-menu-shadow" {} } # JavaScript # only "root-level" menus need JS # TODO: is this parent-check sufficient / future-safe? if {[info exists :__parent]} { # # propagate extrajs from rendering # #ns_log notice "### propagate extrajs <${:extrajs}> from [:info class] to [${:__parent} info class]" ${:__parent} append extrajs ${:extrajs} } else { html::script -nonce [security::csp::nonce] -type "text/javascript" { html::t "var [:js_name] = new YAHOO.widget.Menu(\"[:id]\", ${:configuration});" html::t " [:js_name].render(); [:js_name].show(); ${:extrajs} " } } }XQL Not present: Generic, PostgreSQL, Oracle