Index: openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl,v diff -u -r1.11.2.17 -r1.11.2.18 --- openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl 29 Jul 2021 17:27:01 -0000 1.11.2.17 +++ openacs-4/packages/xowiki/tcl/bootstrap-procs.tcl 5 Oct 2021 19:21:22 -0000 1.11.2.18 @@ -455,41 +455,43 @@ BootstrapTableRenderer instproc render-bulkactions {} { set bulkactions [[self]::__bulkactions children] - html::div -class "btn-group" -role group -aria-label "Bulk actions" { - html::t "#xotcl-core.Bulk_actions#:" - set bulkaction_container [[lindex $bulkactions 0] set __parent] - set name [$bulkaction_container set __identifier] + if {[llength $bulkactions] > 0} { + html::div -class "btn-group" -role group -aria-label "Bulk actions" { + html::t "#xotcl-core.Bulk_actions#:" + set bulkaction_container [[lindex $bulkactions 0] set __parent] + set name [$bulkaction_container set __identifier] - foreach bulk_action $bulkactions { - set id [::xowiki::Includelet html_id $bulk_action] - html::ul -class compact { - html::li { - # - # For some reason, btn-secondary seems not to be available - # for the "a" tag, so we set the border-color manually. - # - html::a -class "btn btn-secondary" -rule button \ - -title [$bulk_action tooltip] -href # \ - -style "border-color: #ccc;" \ - -id $id { - html::t [$bulk_action label] - } + foreach bulk_action $bulkactions { + set id [::xowiki::Includelet html_id $bulk_action] + html::ul -class compact { + html::li { + # + # For some reason, btn-secondary seems not to be available + # for the "a" tag, so we set the border-color manually. + # + html::a -class "btn btn-secondary" -rule button \ + -title [$bulk_action tooltip] -href # \ + -style "border-color: #ccc;" \ + -id $id { + html::t [$bulk_action label] + } + } } - } - set script [subst { - acs_ListBulkActionClick("$name","[$bulk_action url]"); - }] - if {[$bulk_action confirm_message] ne ""} { set script [subst { - if (confirm('[$bulk_action confirm_message]')) { - $script - } + acs_ListBulkActionClick("$name","[$bulk_action url]"); }] + if {[$bulk_action confirm_message] ne ""} { + set script [subst { + if (confirm('[$bulk_action confirm_message]')) { + $script + } + }] + } + template::add_event_listener \ + -id $id \ + -preventdefault=false \ + -script $script } - template::add_event_listener \ - -id $id \ - -preventdefault=false \ - -script $script } } } @@ -500,7 +502,7 @@ if {![nsf::is object [self]::__actions]} {:actions {}} if {![nsf::is object [self]::__bulkactions]} {:__bulkactions {}} set bulkactions [[self]::__bulkactions children] - if {[llength $bulkactions] > 0} { + if {[[self]::__bulkactions exists __identifier]} { set name [[self]::__bulkactions set __identifier] html::div -id ${:id}_wrapper -class "table-responsive" { html::form -name $name -id $name -method POST { Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.239.2.72 -r1.239.2.73 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 9 Aug 2021 09:55:57 -0000 1.239.2.72 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 5 Oct 2021 19:21:22 -0000 1.239.2.73 @@ -4368,6 +4368,7 @@ {-renderer ""} {-return_url} {-date_format} + {-allow_clipboard:boolean false} }} } -ad_doc { Show usages of the specified form. @@ -4557,7 +4558,8 @@ -hidden_field_names $hidden_field_names \ -bulk_actions $bulk_actions \ -renderer $renderer \ - -orderby $orderby] + -orderby $orderby \ + -allow_clipboard $allow_clipboard] # # Handling voting_forms # @@ -4642,7 +4644,7 @@ -uc $uc \ -view_field $view_field \ -buttons $buttons \ - -include_object_id_attribute [expr {[llength $bulk_actions] > 0}] \ + -include_object_id_attribute [expr {$allow_clipboard || [llength $bulk_actions] > 0}] \ -form_item_ids $form_item_ids \ -with_form_link $with_form_link \ -csv $csv \ Index: openacs-4/packages/xowiki/tcl/table-widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/table-widget-procs.tcl,v diff -u -r1.1.2.12 -r1.1.2.13 --- openacs-4/packages/xowiki/tcl/table-widget-procs.tcl 29 Jul 2021 17:27:01 -0000 1.1.2.12 +++ openacs-4/packages/xowiki/tcl/table-widget-procs.tcl 5 Oct 2021 19:21:22 -0000 1.1.2.13 @@ -13,12 +13,13 @@ ::xowiki::TableWidget proc create_from_form_fields { {-form_field_objs:required} - {-package_id} + {-package_id:required} {-buttons {}} {-hidden_field_names ""} {-bulk_actions ""} {-renderer ""} {-orderby ""} + {-allow_clipboard:boolean false} } { set actions "" @@ -32,14 +33,14 @@ set bulk_action_cols "" foreach bulk_action $bulk_actions { if {$bulk_action eq "export"} { - append actions [list Action bulk-delete \ - -label [_ xowiki.export] \ - -tooltip [_ xowiki.export] \ + append actions [list Action create bulk-$bulk_action \ + -label [_ xowiki.$bulk_action] \ + -tooltip [_ xowiki.$bulk_action] \ -url [::$package_id package_url]admin/export \ ] \n } } - if {[llength $bulk_actions] > 0} { + if {$allow_clipboard || [llength $bulk_actions] > 0} { append cols [subst {BulkAction create objects -id ID -actions {$actions}}] \n append cols {HiddenField create ID} \n } Index: openacs-4/packages/xowiki/tcl/yui-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/yui-procs.tcl,v diff -u -r1.16.2.4 -r1.16.2.5 --- openacs-4/packages/xowiki/tcl/yui-procs.tcl 29 Jul 2021 17:27:02 -0000 1.16.2.4 +++ openacs-4/packages/xowiki/tcl/yui-procs.tcl 5 Oct 2021 19:21:23 -0000 1.16.2.5 @@ -7,6 +7,7 @@ @cvs-id $Id$ } +::xo::library require -package xotcl-core 30-widget-procs ::xo::library require menu-procs namespace eval ::xowiki { @@ -533,7 +534,8 @@ html::thead { html::tr -class list-header { foreach o [[self]::__columns children] { - if {[$o hide]} continue + ns_log notice "YUIDataTableRenderer $o [$o set name] HIDE [$o hide] RENDER [$o procsearch render]" + if {[$o hide]} continue $o render } } @@ -558,7 +560,7 @@ if {![nsf::is object [self]::__actions]} {:actions {}} if {![nsf::is object [self]::__bulkactions]} {:__bulkactions {}} set bulkactions [[self]::__bulkactions children] - if {[llength $bulkactions]>0} { + if {[[self]::__bulkactions exists __identifier] || [llength $bulkactions]>0} { set name [[self]::__bulkactions set __identifier] } else { set name [::xowiki::Includelet js_name [self]]