Class ::xowiki::TreeRenderer=bootstrap3

::xowiki::TreeRenderer=bootstrap3[i] create ...

Class Relations

  • class: ::xowiki::TreeRenderer[i]
  • superclass: ::xotcl::Object[i]
  • subclass: ::xowiki::TreeRenderer=bootstrap3-folders[i]
::xowiki::TreeRenderer create ::xowiki::TreeRenderer=bootstrap3 \
     -superclass ::xotcl::Object

Methods (to be applied on the object)

Methods (to be applied on instances)

  • render_href (scripted)

    if {${:href} ne ""} {
      set jsHref "href: '[::xowiki::Includelet js_encode $href]',"
    } else {
      set jsHref ""
    }
    return $jsHref
  • render_item (scripted)

    :log "======UNTESTED============ highlight $highlight item $item"
    $item instvar title href prefix suffix
    set label  [::xowiki::Includelet js_encode "$prefix$title$suffix"]
    set jsHref [:render_href $href]
    set selected [expr {$highlight ? "true" : "false"}]
    return "\n{text: '$label', $jsHref state: {selected: $selected}},"
  • render_node (scripted)

    if {${:verbose}} {:log "======bootstrap3==render_node========== ${:label}"}
    if {${:verbose}} {:log "open $open cat_content $cat_content"}
    
    if {[info exists :count]} {
      set jsTags "tags: \['${:count}'\],"
    } else {
      set jsTags ""
    }
    set jsHref [:render_href ${:href}]
    if {$cat_content ne ""} {
      set cat_content [string trimright $cat_content ", \n"]
      set content ", \nnodes: \[$cat_content\]\n"
    } else {
      set content ""
    }
    set label [::xowiki::Includelet js_encode ${:label}]
    set expanded [expr {${:expanded} ? "true" : "false"}]
    set selected [expr {${:highlight} ? "true" : "false"}]
    return "\n{text: '${label}', $jsTags $jsHref state: {expanded: $expanded, selected: $selected$content},"