- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::Table::TABLE
::xo::Table::TABLE create ...
Class Relations
::xotcl::Class create ::xo::Table::TABLE \ -superclass ::xo::DrawableMethods (to be applied on instances)
init_renderer (scripted)
#:log "--" set :__rowcount 0 set :css.table-class list set :css.tr.even-class list-even set :css.tr.odd-class list-oddrender (scripted)
if {![nsf::is object [self]::__actions]} {:actions {}} if {![nsf::is object [self]::__bulkactions]} {:bulkactions {}} set bulkactions [[self]::__bulkactions children] if {[llength $bulkactions] == 0} { html::table -class ${:css.table-class} { :render-actions :render-body } } else { set name [[self]::__bulkactions set __identifier] html::form -name $name -method POST { html::table -class ${:css.table-class} { :render-actions :render-body } :render-bulkactions } }render-actions (scripted)
html::tr -class list-button-bar { set cols [llength [[self]::__columns children]] html::td -colspan $cols -class list-button-bar { set children [[self]::__actions children] set last [lindex $children end] foreach o $children { $o render if {$o ne $last} { html::t -disableOutputEscaping "·" } } } }render-body (scripted)
html::thead { html::tr -class list-header { foreach o [[self]::__columns children] { $o render } } } set children [:children] if {[llength $children] == 0} { html::tr {html::td { html::t ${:no_data}}} } else { html::tbody { foreach line [:children] { #:log "--LINE vars=[:info vars] cL: [[self class] info vars] r=[:renderer]" html::tr -class [expr {[incr :__rowcount]%2 ? ${:css.tr.odd-class} : ${:css.tr.even-class}}] { foreach field [[self]::__columns children] { if {[$field istype HiddenField]} continue if {![$field exists CSSclass]} { # TODO: remove me when message does not show up ns_log warning "CSSclass missing $field\n[$field serialize]" $field set CSSclass "" } set CSSclass [list "list" {*}[$field CSSclass]] html::td [concat [list class $CSSclass] [$field html]] { $field render-data $line } } } } } }render-bulkactions (scripted)
set bulkactions [[self]::__bulkactions children] html::div -class "list-button-bar-bottom" { html::t "#xotcl-core.Bulk_actions#:" set bulkaction_container [[lindex $bulkactions 0] set __parent] set name [$bulkaction_container set __identifier] html::ul -class compact { foreach ba $bulkactions { set id [::xowiki::Includelet html_id $ba] html::li { html::a -title [$ba tooltip] -id $id -class button -href # { html::t [$ba label] } } set script [subst { acs_ListBulkActionClick("$name","[$ba url]"); }] if {[$ba confirm_message] ne ""} { set script [subst { if (confirm('[$ba confirm_message]')) { $script } }] } template::add_event_listener -id $id -preventdefault=false -script $script } } }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables