Index: openacs-4/packages/xowiki/tcl/folder-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/folder-procs.tcl,v diff -u -r1.55.2.11 -r1.55.2.12 --- openacs-4/packages/xowiki/tcl/folder-procs.tcl 27 Jun 2019 08:06:14 -0000 1.55.2.11 +++ openacs-4/packages/xowiki/tcl/folder-procs.tcl 28 Jun 2019 10:30:27 -0000 1.55.2.12 @@ -235,7 +235,7 @@ set package_id [::xo::cc package_id] set with_links [::$package_id get_parameter "MenuBarSymLinks" 0] - #my ds [::xo::cc serialize] + #:ds [::xo::cc serialize] set lang [::xo::cc lang] #set lang en set return_url [::xo::cc url] Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.284.2.14 -r1.284.2.15 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 24 Jun 2019 11:28:29 -0000 1.284.2.14 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 28 Jun 2019 10:30:27 -0000 1.284.2.15 @@ -124,7 +124,7 @@ } FormField instproc validation_check {validator_method value} { - return [:uplevel [list my $validator_method $value]] + return [:uplevel [list :$validator_method $value]] } FormField instproc validate {obj} { @@ -282,7 +282,7 @@ switch -glob -- $s { optional {set :required false} - required {set :required true; my remove_omit} + required {set :required true; :remove_omit} omit {:mixin add ::xowiki::formfield::omit} noomit {:remove_omit} disabled {:set_disabled true} @@ -310,7 +310,7 @@ if {[string match {\[*\]} $value]} { set value [subst $value] } - my $attribute $value + :$attribute $value } on error {errMsg} { error "Error during setting attribute '$attribute' to value '$value': $errMsg" } @@ -1208,7 +1208,7 @@ Class create omit -superclass FormField omit instproc render_item {} { # don't render the labels - #my render_form_widget + #:render_form_widget } omit instproc render_help_text {} { } @@ -1244,7 +1244,7 @@ text instproc initialize {} { :type text set :widget_type text - foreach p [list size maxlength] {if {[info exists :$p]} {set :html($p) [my $p]}} + foreach p [list size maxlength] {if {[info exists :$p]} {set :html($p) [:$p]}} } ########################################################### @@ -1625,7 +1625,7 @@ textarea instproc initialize {} { set :widget_type text(textarea) set :booleanHTMLAttributes {required readonly disabled formnovalidate} - foreach p [list rows cols style] {if {[info exists :$p]} {set :html($p) [my $p]}} + foreach p [list rows cols style] {if {[info exists :$p]} {set :html($p) [:$p]}} if {![:istype ::xowiki::formfield::richtext] && [info exists :editor]} { # downgrading #:msg "downgrading [:info class]" @@ -1714,7 +1714,7 @@ } richtext instproc initialize {} { - #my display_field false + #set :display_field false switch -- ${:displayMode} { inplace - inline - @@ -1896,7 +1896,7 @@ set id ${:id} set name ${:name} set package_id [${:object} package_id] - #my extraPlugins {timestamp xowikiimage} + #set :extraPlugins {timestamp xowikiimage} if {"xowikiimage" in [:extraPlugins]} { :js_image_helper @@ -2833,7 +2833,7 @@ abstract_page instproc initialize {} { set :package_id [${:object} package_id] - #my compute_options + #:compute_options next } Index: openacs-4/packages/xowiki/tcl/weblog-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/weblog-procs.tcl,v diff -u -r1.75.2.9 -r1.75.2.10 --- openacs-4/packages/xowiki/tcl/weblog-procs.tcl 8 May 2019 19:59:57 -0000 1.75.2.9 +++ openacs-4/packages/xowiki/tcl/weblog-procs.tcl 28 Jun 2019 10:30:27 -0000 1.75.2.10 @@ -302,7 +302,7 @@ set :prev_page_link [::xo::cc url]?$query } } - #my proc destroy {} {:log "--W"; next} + #:proc destroy {} {:log "--W"; next} if {${:sort_composite} ne ""} { lassign [split ${:sort_composite} ,] kind att direction Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.147.2.3 -r1.147.2.4 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 8 May 2019 14:33:40 -0000 1.147.2.3 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 28 Jun 2019 10:30:28 -0000 1.147.2.4 @@ -34,23 +34,23 @@ {folderspec ""} {autoname 0} } -ad_doc { - Form Class for XoWiki Pages. - - You can manipulate the form elements shown by editing the field_list. + Form Class for XoWiki Pages. + + You can manipulate the form elements shown by editing the field_list. The following elements are mandatory in field_list and should never be left out: - + } WikiForm instproc mkFields {} { set __fields "" set field_list [:field_list] set show_page_order [[${:data} package_id] show_page_order] - if {!$show_page_order} { :f.page_order "= hidden" } + if {!$show_page_order} { :f.page_order "= hidden" } if {${:autoname}} { :f.name "= hidden,optional"} set form_fields [list] @@ -89,7 +89,7 @@ set __spec $__newspec } } elseif {[lindex $__wspec 0] eq "="} { - # + # # Get the information from the attribute definitions and given # specs. # @@ -187,8 +187,8 @@ proc ::xowiki::guesstype {fn} { set mime [ns_guesstype $fn] - if {$mime eq "*/*" - || $mime eq "application/octet-stream" + if {$mime eq "*/*" + || $mime eq "application/octet-stream" || $mime eq "application/force-download"} { # # ns_guesstype was failing, which should not be the case with @@ -213,7 +213,7 @@ upvar duration duration set form ::xowiki::f1 ;# form has to be named this way for the time being #set form [lindex [::xowiki::WikiForm info instances -closure] 0] - $form instvar data + $form instvar data $data instvar package_id if {[$data istype ::xowiki::PodcastItem] && $duration eq "" && [$data exists import_file]} { set filename [expr {[$data exists full_file_name] ? [$data full_file_name] : [$data set import_file]}] @@ -246,13 +246,13 @@ if {[$data istype ::xowiki::File] && [$data exists mime_type]} { #$data log "--mime validate_name MIME [$data set mime_type]" set name [$data build_name $name [$data set upload_file]] - # + # # Check, if the user is allowed to create a file with the specified # name. Files ending in .css or .js might require special permissions. # Caveat: the error message is always the same. # set package_id [$cc package_id] - set computed_link [export_vars -base [::$package_id package_url] {{edit-new 1} name + set computed_link [export_vars -base [::$package_id package_url] {{edit-new 1} name {object_type ::xowiki::File}}] set granted [::$package_id check_permissions -link $computed_link $package_id edit-new] #$data msg computed_link=$computed_link,granted=$granted @@ -318,7 +318,7 @@ set validation_error [$f validate $data] # # If we get an error, we report it as well via util-user message - # + # #$form msg "***** field_name = $field_name, cls=[$f info class] validation_error=$validation_error" if {$validation_error ne ""} { util_user_message -message "Error in field [$f label]: $validation_error" @@ -349,7 +349,7 @@ } } } - + WikiForm instproc data_from_form {{-new 0}} { if {[${:data} exists_form_parameter text.format]} { ${:data} set mime_type [${:data} form_parameter text.format] @@ -400,21 +400,21 @@ -text [${:data} set text] } } - - + + WikiForm instproc new_request {} { # # get the defaults from the slots and set it in the data. # This should not be necessary with xotocl 1.6.* # foreach f [:field_list] { - set s [${:data} find_slot $f] + set s [${:data} find_slot $f] if {$s ne "" && [$s exists default] && [$s default] ne ""} { #:msg "new_request $f default = '[$s default]'" ${:data} set $f [$s default] } } - # + # # set the following defaults manually # ${:data} set creator [::xo::get_user_name [::xo::cc user_id]] @@ -432,7 +432,7 @@ } WikiForm instproc new_data {} { - :data_from_form -new 1 + :data_from_form -new 1 ${:data} set __autoname_prefix [string range [${:data} set nls_language] 0 1]: set item_id [next] ${:data} set creation_user [::xo::cc user_id] @@ -450,7 +450,7 @@ WikiForm instproc after_submit {item_id} { set link [:submit_link] if {$link eq "."} { - # we can determine submit link only after nls_language + # we can determine submit link only after nls_language # is returned from the user :submit_link [${:data} pretty_link] } @@ -478,13 +478,13 @@ {f.name "= optional,help_text=#xowiki.File-name-help_text#"} {f.title "= optional"} {f.text - {upload_file:file(file) + {upload_file:file(file) {label #xowiki.content#} {html {size 30}} }} {validate { {upload_file {\[::xowiki::validate_file\]} {For new entries, \ a upload file must be provided}} - {page_order {\[::xowiki::validate_form_field page_order\]} {Page Order invalid; + {page_order {\[::xowiki::validate_form_field page_order\]} {Page Order invalid; might only contain upper and lower case letters, underscore, digits and dots}} {name {\[::xowiki::validate_name\]} {Another item with this name exists \ already in this folder}} @@ -504,8 +504,8 @@ set mime_type [${:data} form_parameter upload_file.content-type] if {[::xo::dc 0or1row check_mimetype { select 1 from cr_mime_types where mime_type = :mime_type - }] == 0 - || $mime_type eq "application/octet-stream" + }] == 0 + || $mime_type eq "application/octet-stream" || $mime_type eq "application/force-download"} { set guessed_mime_type [::xowiki::guesstype $upload_file] #:msg guess=$guessed_mime_type @@ -524,40 +524,40 @@ ${:data} set import_file [${:data} full_file_name] # :log "--F upload_file $upload_file import_file [${:data} full_file_name]" #:log " import_type=[${:data} set import_file]" - } + } } else { # :log "--F no name and no upload file" ${:data} set upload_file "" } } FileForm instproc new_data {} { - #my get_uploaded_file + #:get_uploaded_file return [next] } FileForm instproc edit_data {} { - #my get_uploaded_file + #:get_uploaded_file return [next] } - # {f.pub_date + # {f.pub_date # {pub_date:date,optional {format "YYYY MM DD HH24 MI"} {html {id date}} - # {after_html { Y-M-D} # }} # } Class create PodcastForm -superclass FileForm \ -parameter { {html { enctype multipart/form-data }} \ - {field_list {item_id name page_order text title subtitle creator pub_date duration keywords + {field_list {item_id name page_order text title subtitle creator pub_date duration keywords description}} {validate { {upload_file {\[::xowiki::validate_file\]} {For new entries, \ a upload file must be provided}} {name {\[::xowiki::validate_name\]} {Another item with this name exists \ already in this folder}} - {page_order {\[::xowiki::validate_form_field page_order\]} {Page Order invalid; + {page_order {\[::xowiki::validate_form_field page_order\]} {Page Order invalid; might only contain upper and lower case letters, underscore, digits and dots}} {duration {\[::xowiki::validate_duration\]} {Check duration and provide default}} }} @@ -572,7 +572,7 @@ # # be sure to avoid bad side effects from LANG environment variable # - set ::env(LANG) en_US.UTF-8 + set ::env(LANG) en_US.UTF-8 return [clock format $t] #return [clock format $t -format "%y-%m-%d %T"] } @@ -636,7 +636,7 @@ } ObjectForm instproc edit_request {item_id} { - #my f.name {{name:text {label #xowiki.Page-name#}}} + #:f.name {{name:text {label #xowiki.Page-name#}}} permission::require_permission \ -party_id [ad_conn user_id] -object_id [${:data} set parent_id] \ -privilege "admin" @@ -654,7 +654,7 @@ Class create PageTemplateForm -superclass WikiForm \ -parameter { {field_list { - item_id name page_order title creator text anon_instances + item_id name page_order title creator text anon_instances description nls_language }} } @@ -780,7 +780,7 @@ set :field_list [concat [:field_list_top] ${:page_instance_form_atts} [:field_list_bottom]] # - # get widget specs from folder. + # get widget specs from folder. # All other specs are taken form attributes or form constraints. # The widget_spec functionality might be deprecated in the future. # @@ -824,7 +824,7 @@ Class create FormForm -superclass ::xowiki::PageTemplateForm \ -parameter { - {field_list {item_id name page_order title creator text form form_constraints + {field_list {item_id name page_order title creator text form form_constraints anon_instances description nls_language}} {f.text "= richtext,height=150px,label=#xowiki.Form-template#"} {f.form "= richtext,editor=none,height=150px"} @@ -833,16 +833,16 @@ {name {\[::xowiki::validate_name\]} {Another item with this name exists \ already in this folder}} {text {\[::xowiki::validate_form_text\]} {Form must contain a valid template}} - {page_order {\[::xowiki::validate_form_field page_order\]} {Page Order invalid; + {page_order {\[::xowiki::validate_form_field page_order\]} {Page Order invalid; might only contain upper and lower case letters, underscore, digits and dots}} {form {\[::xowiki::validate_form_form\]} {Form must contain a toplevel HTML form element}} {form_constraints {\[::xowiki::validate_form_field form_constraints\]} {Invalid form constraints}} }} } - + FormForm instproc new_data {} { set item_id [next] - + # provide unique ids and names, if form is provided # set form [${:data} set form] # if {$form ne ""} { @@ -866,7 +866,7 @@ } -::xo::library source_dependent +::xo::library source_dependent # # Local variables: 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 -r1.16.2.1 --- openacs-4/packages/xowiki/tcl/yui-procs.tcl 3 Nov 2018 18:59:55 -0000 1.16 +++ openacs-4/packages/xowiki/tcl/yui-procs.tcl 28 Jun 2019 10:30:28 -0000 1.16.2.1 @@ -227,7 +227,7 @@ ${:__parent} append extrajs ${:extrajs} } } - + # # YUIContextMenu # @@ -273,7 +273,7 @@ if {$menu_att eq "id"} continue set kind [:get_prop $menu kind] #ns_log notice "entry: kind $kind <$menu_att> <$menu>" - + if {$kind ne "MenuButton"} continue ::xowiki::YUIMenuBarItem -text [:get_prop $menu label] { ::xowiki::YUIMenu { @@ -299,7 +299,7 @@ ############################################################################### -# YUI loader +# YUI loader ############################################################################### namespace eval ::YUI { @@ -309,7 +309,7 @@ dependencies. Also, it combines numerous files into one single file to increase page loading performance. This works only for the "hosted" YUI library. This Loader module should - basically do the same (in future). For two simple calls like e.g. + basically do the same (in future). For two simple calls like e.g. "::YUI::loader require menu" and "::YUI::loader require datatable" it should take care of selecting all the files needed and assemble them into one single resource, that may be delivered. @@ -328,7 +328,7 @@ {-version "2.7.0b"} } { This is the key function of the loader, that will be used by other packages. - @param module + @param module The YUI Module to be loaded } { switch -- [string tolower $module] { @@ -544,7 +544,7 @@ html::tr -class [expr {[incr :__rowcount]%2 ? ${:css.tr.odd-class} : ${:css.tr.even-class} }] { foreach field [[self]::__columns children] { if {[$field hide]} continue - html::td [concat [list class list] [$field html]] { + html::td [concat [list class list] [$field html]] { $field render-data $line } } @@ -566,12 +566,12 @@ # TODO: maybe use skin everywhere? When to use style/CSSclass or skin? set skin [expr {[info exists :skin] ? ${:skin} : ""}] html::div -id ${:id}_wrapper -class $skin { - html::form -name $name -id $name -method POST { + html::form -name $name -id $name -method POST { html::div -id ${:id}_container { html::table -id ${:id} -class ${:css.table-class} { # TODO do i need that? - my render-actions - my render-body + :render-actions + :render-body } if {[llength $bulkactions]>0} { :render-bulkactions } } @@ -600,7 +600,7 @@ set CSSclass ${:CSSclass} $line instvar [list $__name.title title] \ [list $__name.target target] \ - [list $__name.onclick onclick] + [list $__name.onclick onclick] html::a [:get_local_attributes href title {CSSclass class} target onclick] { return "[next]" }