- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::YUIMenu
::xowiki::YUIMenu create ... \
[ -autorender (default "false") ] \
[ -configuration (default "{}") ] \
[ -footer footer ] \
[ -header header ] \
[ -shadow shadow ]
Defined in
Class Relations
- class: ::xo::tdom::Class
- superclass: ::xowiki::Menu
- subclass: ::xowiki::YUIContextMenu, ::xowiki::YUIMenuBar
::xo::tdom::Class create ::xowiki::YUIMenu \ -superclass ::xowiki::MenuMethods (to be applied on instances)
render (scripted, public)
<instance of xowiki::YUIMenu> renderhttp://developer.yahoo.com/yui/menu/
- Testcases:
- No testcase defined.
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} " } } }Variables
::xowiki::YUIMenu set __default_metaclass ::xotcl::Class ::xowiki::YUIMenu set __default_superclass ::xotcl::Object
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables