• last updated 9 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Implement reset_to_default method to reset formfields in case of validation error

the current behavior of this method is currently a no-op for every formfield, except files, where we want to make sure the value has been reset. We also handle the case now of compound fields, as they might be compounds of file formfields

  1. … 1 more file in changeset.
strengthen parameter checking

  1. … 4 more files in changeset.
- Added new method extra_html_fields to provide an easy means to add

extra HTML fields to the form autogenerated for form pages

- bump version number to 5.10.0d79

  1. … 1 more file in changeset.
improve error messages for autosave-handler

write mutual overwrites to the system log

provide better error message

address issue #3460

  1. … 1 more file in changeset.
no need to use volatile, since these pages are marked for cleanup

in some combinations of tcl and nsf, these volatile operations might

lead to crashes

make end of resub options explicit

  1. … 12 more files in changeset.
improve spelling and comments

improved comments

change tcl arrays into dicts

  1. … 1 more file in changeset.
fix propagation of validate results in old-style (ad_form-based) forms. One should really switch to FormPages soon.

  1. … 1 more file in changeset.
FormPage->field_names: in case, not form is given, fall back for the needed field names to the field_name provided by form_constraints

  1. … 1 more file in changeset.
Use common interface for object reference in bulk actions

- use same interface in child-resources and form-usages (when bulk-actions are used)

- move "get_ids_for_bulk_actions" from page to package (to make in usable in www/admin)

- use consistently "get_ids_for_bulk_actions" (also in www/admin/*.tcl)

- provide backward compatibility (still support "name" and "-parent_id")

  1. … 8 more files in changeset.
distinguish between url and item_ref

whitespace changes

fix typoCVS: ----------------------------------------------------------------------

provide additional configuration hooks when creating new pages

- p.source (copy variables from that site-wide page upon creation)

- p.configure (call a method for configuration of the page)

  1. … 1 more file in changeset.
relax url detection

add check if item_id exists

fix typo in log statement

MenuBar reform

- MenuBars are now easier programmatically extensible (easier to maintain)

- refactored code, reduced scatted definitions (all configurations

at the same place)

- unified templating:

use body property @body.folderHTML@ instead of @folderhtml@

From the former API calls only "update_items" has changed,

all existing configurations (i.e. via folders or package parameter)

should continue to work.

== Changes:

One can now extend menubars via menu entry definition

{config -use YOURCONFIG -class YOURCLASS}

in two directions:

a) subclassing

define your own menubar class YOURCLASS, which should

be a subclass of ::xowiki::MenuBar

b) provide your own configuration method to provide

a more tailored configuration. This is performed

by defining a method "config=YOURCONFIG" for ::xowiki::MenuBar

The latter method is used for test-items, which can define a

test item folder by using

-- extra_menu_entries ---

{config -use test-items}

instead of

-- extra_menu_entries ---

{entry -name New.Item.TextInteraction -form en:edit-interaction.wf -query p.item_type=Text}

{entry -name New.Item.ShortTextInteraction -form en:edit-interaction.wf -query p.item_type=ShortText}

{entry -name New.Item.SCInteraction -form en:edit-interaction.wf -query p.item_type=SC}

{entry -name New.Item.MCInteraction -form en:edit-interaction.wf -query p.item_type=MC}

{entry -name New.Item.ReorderInteraction -form en:edit-interaction.wf -query p.item_type=Reorder}

{entry -name New.Item.UploadInteraction -form en:edit-interaction.wf -query p.item_type=Upload}

{entry -name New.App.OnlineExam -form en:online-exam.wf}

{entry -name New.App.InclassQuiz -form en:inclass-quiz.wf}

{entry -name New.App.InclassExam -form en:inclass-exam.wf}

See below for the definition of the "test-items" configuration method,

which is based on the default definitions. In general, the definition

in this method can be performed via menu-entries (same syntax as in

other menu entries) or via the MenuBar API (e.g. calling

":add_menu_item ...").

All configurations follow the following definition order

where later entries can refine earlier entries:

- package level: package parameter ExtraMenuEntries

- configuration method: use standard or tailored confguration methods

- per-folder definition: content of the extra_menu_entries

Note that the menu entry definition language supports as well

adding/clearing menus, etc., so almost everything can be refined.

I've noticed that the tlf* code has several scattered menu

definitions, which are as well done in every case differently.

By these definition one can define e.g. a learning-app folder (where

"New" can be used to define new app folders), and the app folders can

provide their own "New" entries, e.g. for clickers and

others. E.g. For "clickers" there is already on non-oo definition to

achieve similar things (which should be altered to the new method),

but on other places, there are some hard-coded definitions for root

folders, etc. The menubars of the learning-apps should be made this

way more consistent with the rest (e.g. using "New", supporting "table

of contents" for clipboard interactions, etc.)

namespace eval ::xowiki {

::xowiki::MenuBar instproc config=test-items {

{-bind_vars {}}

-current_page:required

-package_id:required

-folder_link:required

-return_url

} {

:config=default \

-bind_vars $bind_vars \

-current_page $current_page \

-package_id $package_id \

-folder_link $folder_link \

-return_url $return_url

return {

{clear_menu -menu New}

{entry -name New.Item.TextInteraction -form en:edit-interaction.wf -query p.item_type=Text}

{entry -name New.Item.ShortTextInteraction -form en:edit-interaction.wf -query p.item_type=ShortText}

{entry -name New.Item.SCInteraction -form en:edit-interaction.wf -query p.item_type=SC}

{entry -name New.Item.MCInteraction -form en:edit-interaction.wf -query p.item_type=MC}

{entry -name New.Item.ReorderInteraction -form en:edit-interaction.wf -query p.item_type=Reorder}

{entry -name New.Item.UploadInteraction -form en:edit-interaction.wf -query p.item_type=Upload}

{entry -name New.App.OnlineExam -form en:online-exam.wf}

{entry -name New.App.InclassQuiz -form en:inclass-quiz.wf}

{entry -name New.App.InclassExam -form en:inclass-exam.wf}

}

}

}

  1. … 16 more files in changeset.
improve comments

  1. … 4 more files in changeset.
accept as page_ref for an object as well an item_id

This change simplify resolving items. raw ids seem

fine, since the listing are not persisted or moved between

OpenACS instances.

  1. … 1 more file in changeset.
Use full URL paths for bulk actions.

This change allows one to mark items from multiple child-resources

displayed on one page and add these to the clipboard. Use the same

logic for bluk-delete and bulk adding to the clipboard.

  1. … 2 more files in changeset.
www-clipboard-add: allow object to be fully qualified

old conventions continue to work

Make ::xowiki::Package default_locale react to changes in the connection locale by caching only when the parameter use_connection_locale is not set, use ::xowiki::Package default_locale result instead of always the connection locale to determine nls_language for new Pages and FormPages, so that default language for a particular xowiki instance is decided by use_connection_locale parameter

  1. … 2 more files in changeset.
improve spelling

  1. … 4 more files in changeset.
improve wording