Class ::xowiki::BootstrapCollapseButton

::xowiki::BootstrapCollapseButton[i] create ... \
           [ -direction:required direction:required ] \
           [ -id:required id:required ] \
           [ -label:required label:required ] \
           [ -toggle:required toggle:required ]

Class Relations

  • class: ::xo::tdom::Class[i]
  • superclass: ::xotcl::Object[i]
::xo::tdom::Class create ::xowiki::BootstrapCollapseButton \
     -superclass ::xotcl::Object

Methods (to be applied on instances)

  • direction (setter)

  • id (setter)

  • label (setter)

  • render (scripted)

    switch [::template::CSS toolkit] {
      "bootstrap" {
        template::add_script -src urn:ad:js:bootstrap3
        ::html::button -type button -class "btn btn-xs" -data-toggle ${:toggle} -data-target "#${:id}" {
          ::html::span -class "glyphicon glyphicon-chevron-${:direction}" {::html::t ${:label}}
        }
      }
      "bootstrap5" {
        template::add_script -src urn:ad:js:bootstrap5
        ::html::button -type button -class "btn btn-sm" -data-bs-toggle ${:toggle} -data-bs-target "#${:id}" {
          ::html::i -class "bi bi-chevron-${:direction}" {::html::t ${:label}}
        }
      }
    }
  • toggle (setter)