• last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
improve robustness also for not fully correctly setup includelet classes

New CSS abstraction: xowiki::CSS

Before this change, the application developer was responsible to

initialize the CSS-speficic settings (such as setting default values

for parameter classes). The new object xowiki::CSS is initialized

automatically, when an xowiki class (or one of its subclasses) is

initialized. Furthermore, it provides a per-thread caching to reduce

double work. Furthermore, the xowiki::CSS provides a mapping between

abstract and concrete CSS class names, such that switching between

different CSS toolkits becomes easier (e.g. upgrade from bootstrap 3

to newer versions).

xowiki::CSS initialize ;# make sure, everything is in line with PreferredCSSToolkit

xowiki::CSS clear ;# reset the mapping

xowiki::CSS toolkit ;# return the toolkit name

xowiki::CSS class /classname/ ;# perform CSS class name mapping

The methods "setCSSDefaults" and "preferredCSSToolkit" as deprecated.

The version number was bumped to 5.10.0d81

  1. … 7 more files in changeset.
improved code comments

prefer variable resolver over method calls for unset

prefer usage of "xo::write_tmp_file" over "xo::write_file" for writing tmp files

  1. … 4 more files in changeset.
add warning to log file, when a HTML form-data is passed in fro which we have no form-fields defined

Refine regular expression used for the detection of Includelets

improve comments

added instance variable storage_type

added storage_type to xowiki_form_instance_item_view

  1. … 2 more files in changeset.
reduce verbosity

  1. … 1 more file in changeset.
use "ad_try" instead of plain "try" in include_content

make end of resub options explicit

  1. … 12 more files in changeset.
improve spelling

  1. … 4 more files in changeset.
change tcl arrays into dicts

  1. … 1 more file in changeset.
stylistic changes

Improved handling of link and child resources of forms

- test-item-procs: use resolve context to resolve e.g. images in the context of the original form

(many thanks to Thomas Renner for the suggestion)

- added extra argument "-context_obj" to substitute_markup to ease client code

- inclass-exam-answer.wf: reduced the db interactions by using form_info for form generation

  1. … 4 more files in changeset.
don't clobber xo::cc url when already initialized

Provide a URL when requiring a connection context

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.
Reinstate retrieval of the package_id from the connection context in child-resources, the problem was that, when we required a connection context in create_form_page_instance, we did with no information whatsoever, which was then retrieved by e.g. ns_conn, sometimes wrongly (e.g. when one is running under the test package)

  1. … 1 more file in changeset.
Ensure a minimal connection context before checking for user_id

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.
add transtional code to support semi-upgraded folders (having no description field set)

switch to simple new group::update call with dict as argument

This change fixes as well a bug in install::xml::action::set-join-policy

since group::get returns a member "text" which is not accepted by

group::update.

  1. … 5 more files in changeset.
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.
Port of downstream behavior:

create_link instproc is supposed to return an object. In case of error, just crash and let the anchor insproc handle the exception, instead of trying to use the error message as an object.

undo recent changes on too global localizations

The new form-field class localized_text text solves the goals

of for providing a formfield interface to message keys in a

loca fashion rather than altering the behavior of all form

field and of all property interfaces.

  1. … 1 more file in changeset.
New form-field class: localized_text

This class can be used to provide an interface for specifying

internationalized text strings saved in message keys via input

from a form. When editing the content provided via the input field

is saved together with an item-specific message keys in the

message key tables via lang::util::convert_to_i18n.

This formfield class is especially useful for xowiki items which

have no language-prefix (e.g. folders or links). In other cases it

is probably still a better idea to create same named pages with

different language prefixes.

  1. … 1 more file in changeset.
Implement 'language_specific' formfields and 'localized' FormPage properties:

- properties can be stored and retrieved specifying a -localized flag: this flag will make transparently store and retrieve the property value from a custom message key created in the acs-translations package referencing the FormPage. This localization mechanism is additional to that of language-prefixed pages and can address the need of multi-language content for non-prefixable objects such as folders

- via specifying language_specific in the formfield spec, one can enable this new localization mechanism when interacting with the FormPage via a xowiki::Form

TODO: handle export/import of pages (e.g. serializing available translation and generate the new message keys for the imported page), add some nicer UI to make the user aware of e.g. current translation context

  1. … 1 more file in changeset.