Class ::xo::Table::BootstrapTableRenderer::AnchorField

::xo::Table::BootstrapTableRenderer::AnchorField[i] create ...

In addition to the standard TableWidget's AnchorField, we also allow the attributes
  • onclick
  • target
Defined in /var/www/openacs.org/packages/xowiki/tcl/bootstrap-procs.tcl

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xo::Table::TABLE::Field[i]
::xotcl::Class create ::xo::Table::BootstrapTableRenderer::AnchorField \
     -superclass ::xo::Table::TABLE::Field

Methods (to be applied on instances)

  • render-data (scripted)

    set __name ${:name}
    if {[$line exists $__name.href]
        && [set href [$line set $__name.href]] ne ""
      } {
      $line instvar [list $__name.title title] [list $__name.target target]
      if {[$line exists $__name.onclick]} {
        set id [::xowiki::Includelet html_id $line]
        template::add_event_listener  -id $id  -script "[$line set $__name.onclick];"
      }
      #
      # The default class is from the field definition. Append to this value
      # the class coming from the entry line.
      #
      set CSSclass ${:CSSclass}
      if {[$line exists $__name.CSSclass]} {
        set lineCSSclass [$line set $__name.CSSclass]
        if {$lineCSSclass ne ""} {
          append CSSclass " " $lineCSSclass
        }
      }
      html::a [:get_local_attributes href title {CSSclass class} target id] {
        return [next]
      }
    }
    next