- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::TreeRenderer=bootstrap3
::xowiki::TreeRenderer=bootstrap3 create ...
Class Relations
- class: ::xowiki::TreeRenderer
- superclass: ::xotcl::Object
- subclass: ::xowiki::TreeRenderer=bootstrap3-folders
::xowiki::TreeRenderer create ::xowiki::TreeRenderer=bootstrap3 \ -superclass ::xotcl::ObjectMethods (to be applied on the object)
include_head_entries (scripted)
::xo::Page requireJS urn:ad:js:jquery ::xo::Page requireCSS urn:ad:css:bootstrap3-treeview ::xo::Page requireJS urn:ad:js:bootstrap3-treeview security::csp::require style-src cdnjs.cloudflare.com security::csp::require script-src cdnjs.cloudflare.comrender (scripted)
set jsTree [string trimright [next] ", \n"] set id [$tree id] set options "" lappend options "enableLinks: true" template::add_body_script -script "\n\$('#$id').treeview({data: \[$jsTree\], [join $options ,] });" return "<div id='$id'></div>"Methods (to be applied on instances)
render_href (scripted)
if {${:href} ne ""} { set jsHref "href: '[::xowiki::Includelet js_encode $href]'," } else { set jsHref "" } return $jsHrefrender_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},"
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables