- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::Table::TABLE::Field
::xo::Table::TABLE::Field create ...
Class Relations
- class: ::xotcl::Class
- superclass: ::xo::Drawable
- subclass: ::xo::Table::YUIDataTableRenderer::Field, ::xo::Table::BootstrapTableRenderer::AnchorField, ::xo::Table::BootstrapTableRenderer::Field, ::xo::Table::YUIDataTableRenderer::AnchorField, ::xo::Table::TABLE3::Field, ::xo::Table::TABLE::AnchorField, ::xo::Table::TABLE2::Field, ::xo::Table::TABLE::ImageAnchorField, ::xo::Table::TABLE::ImageField
::xotcl::Class create ::xo::Table::TABLE::Field \ -superclass ::xo::DrawableMethods (to be applied on instances)
get_orderby (scripted)
# # First, try to get the sort-order from the including ordered # composite, which is supposed to be always the data source. # Only, when this fails, fall back to the old style based on the # adp-level, which is less robust and warn about this usage. # set ordered_composite [${:__parent} info parent] if {[::nsf::is object $ordered_composite] && [$ordered_composite hasclass ::xo::OrderedComposite]} { if {![$ordered_composite exists __orderby] || ![$ordered_composite exists __order]} { # # Tables must always have a defined ordering to ensure stable # appearance and correct setup of sorting arrows. # ad_log warning "downstream application issue: invalid usage of ordered composite:" "definition of ordering is missing (call method 'orderby' on the ordered composite)." set orderby "" } else { set ordered_composite_orderby [$ordered_composite set __orderby] set ordered_composite_order [$ordered_composite set __order] if {$ordered_composite_order eq "increasing"} { set orderby $ordered_composite_orderby,asc } else { set orderby $ordered_composite_orderby,desc } } } else { ad_log warning "renderSortLabels is still relying on addressing variables on the template::adp_level" set lvl [template::adp_level] if {$lvl ne ""} { upvar #$lvl $orderby_name orderby } if {![info exists orderby]} { set orderby "" } } return $orderbyrender (scripted)
set CSSclass [list "list" {*}${:CSSclass}] #ns_log notice "FIELD: ${:name}: orderby '${:orderby}' '[:get_orderby]'" html::th [concat [list class $CSSclass] ${:html}] { if {${:orderby} eq ""} { html::t [:_ label] } else { :renderSortLabels } :render_localizer ;# run this before th is closed }render-data (scripted)
$line instvar [list ${:name}.richtext richtext] if {![info exists richtext] || $richtext eq ""} { set richtext [:richtext] } if {$richtext} { html::t -disableOutputEscaping [$line set ${:name}] } else { html::t [$line set ${:name}] }renderSortLabels (scripted)
set field ${:orderby} set orderby_name orderby set orderby [:get_orderby] set sort_up "sort-inactive" set sort_down "sort-inactive" if {$orderby eq "$field,desc"} { set new_orderby $field,asc set title [_ xotcl-core.Sort_by_this_column_ascending] #set img /resources/acs-templating/sort-ascending.png set sort_up "sort-active" } elseif {$orderby eq "$field,asc"} { set new_orderby $field,desc set title [_ xotcl-core.Sort_by_this_column_descending] #set img /resources/acs-templating/sort-descending.png set sort_down "sort-active" } else { set new_orderby $field,asc set title [_ xotcl-core.Sort_by_this_column] #set img /resources/acs-templating/sort-neither.png } set query [list [list $orderby_name $new_orderby]] if {[ns_conn isconnected]} { # # Called interactively # set base [ad_conn url] set query [ns_conn query] } else { # # Called in the background (e.g. from search renderer) # set base . set query "" } set href $base?[::xo::update_query $query $orderby_name $new_orderby] html::a -href $href -title $title { html::t [:_ label] html::span -class "sort-up $sort_up" {html::t "↑"} html::span -class "sort-down $sort_down" {html::t "↓"} #html::img -src $img -alt "" }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables