Appy 0.9.13

This release contains bugfixes, functional as well as performance improvements, on all framework parts.
Producing pod results is now 8.75% faster!

Detailed changelog

Appy 0.9.13 corresponds to revision 720. Details are hereafter.

pod

  • Allow to specify options for PDF conversion to the Renderer (parameter 'pdfOptions') and to converter.py (-f or --pdf option).
  • xhtml2odt: implemented keepWithNext with a number > 2: it will apply 'keep-with-next' property to the X last paragraphs, depending on the number of chars specified by 'keepWithNext'.
  • New module pod/xhtml allowing to implement 'keep-with-next' functionality, including table split, when the number of chars to keep implies cutting a table into 2 parts.
  • Added in converter.py a POD post-processor (PPP), implemented as a series of UNO commands (useful for the keep-with-next functionality, and maybe other future features)
  • Added parameter 'ooServer' to the Renderer, allowing to define another host name than 'localhost' for contacting LibreOffice in server mode.
  • converter.py: added the possibility to contact LibreOffice on a distant server and communicating the pod template and its result via the network (via file streams instead of files on disk).
  • Bugfix: page layout's width may not be defined on POD templates in DS format.
  • styles_manager: default values changed for ListProperties.
  • A list/tuple of finalize functions can now be specified in renderer's 'finalizeFunction' attribute (but a single function is still acceptable).
  • Rewritten method appy.shared.xml_parser.escapeXml, pod rendering is now 8.75% faster. For PX we have propably the same gain, but it was not measured.
  • Reify param 'format' for method Renderer::callLibreOffice.
  • 'do ... from pod': reuse, for a sub-pod, the same renderer every time a sub-document must be generated based on the same pod template.
  • doc_importers: allow to import images whose 'src' attribute starts with 'file://'.
  • xhtml2odt: support inexistent HTML tag 'footnote' to be able to dump ODF footnotes from a chunk of XHTML code.
  • xhtml2odt: support images encoded in base64 within img tags of the form <img src='data:image/png;base64,Yyyy6GT4REZS...'/>.
  • meta-if statements: bugfix (reification of the note at the right place).
  • Added, to the renderer as well as the converter, parameter 'stream' allowing to configure the communication between Appy and LibreOffice for exchanging the template and the result: either via streams over the network or via files on disk.

px

  • When 'compiling' a PX, every unnecessary space is removed.

gen

  • Ref field and searches: splitted field [Ref|Search].showActions info fields [Ref|Search].showActions and [Ref|Search].actionsDisplay. Field 'showActions' can now be 'all' (all actions are shown), 'standard' (actions being on the main page and whose layout is 'buttons' are not shown) or False (no action at all is shown). The 'block' or 'inline' value for CSS property 'display' to apply to the 'div' tag containing actions is now defined in the additional attribute 'actionsDisplay'.
  • Ref field and searches: allow to change position of standard Appy columns 'checkboxes' and 'number' anywhere within the other columns representing fields.
  • Ref field: added the possibility, within a list of tied objects (with render=='list') to add separators (via attribute Ref.separator and class Ref.Separator.
  • Ref field: PX optimization.
  • Pod field: attribute 'confirm' can now be a method.
  • Pod field: bugfixes (freezing and more).
  • String field: bugfix.
  • File field: allow to display images in the UI with a specified max-width.
  • Added a layout tailored for displaying warning messages via Computed fields.
  • CSS class 'focus' more flashy.
  • Allow to define static method MyAppyClass.titleMode that must return 'link' or 'text' ('link' being the default). If 'text' is returned (ie, for a category of users), within lists of results for instances of that class, titles will not be clickable.
  • Force local users to change their password at first login.
  • Added field User.lastLoginDate.
  • Avoid the 'browser incompatibility message' for modern IEs set in older compatibility modes.
  • In a column specifier, one may express the fact that the column header must be empty.
  • mail.py: support the 'reply-to' header.
  • Allow to delete an object without calling the custom 'onDelete' method.
  • Added one more value in class appy.gen.Show.
  • Allow to create an object with a forced initial state (that may be different from the workflow initial state).
  • Base model: bugfixes (include User fields on XML layouts).
  • Added new class FieldTranslations allowing to provide custom translation in Python code for a given field (in new attribute 'translations') instead of letting Appy generate i18n labels for this field.
  • Refactoring within the validation system: class appy.gen.validate.Errors has evolved to class appy.gen.validator.Validator and is now responsible for the complete validation process (code was moved from the base mixin to it)
  • Added new field 'Switch', a complex field made of several sub-sets of fields among which only one is chosen. This field allows to have a part of a form being variable. The selected sub-set depends on a master/slave relationship that must be established between a Switch field and some other master field.
  • Improved master/slave system for Ajax-refreshable fields, allowing to reduce the number of Ajax requests when an object containing such slaves is created or modified (the master/slave system had to evolve due to the new Switch field)
  • Adapted to allow the use of lambda functions in field attributes like 'show'.
  • Improved method appy.fields.Field::doRender.
  • Refactoring: defined base PX variables in new method appy.px.Px.setBaseVariables. This is used in pxTemplate and pxAjax, and also in the rewritten method appy.fields.Field.doRender, that can now be used outside the context of executing some PX for the UI, for example in order to dump a field in a POD template vi a 'do ... from xhtml()' statement.
  • Field layouts do not contain an entry for cell layouts anymore. Instead, a static Field.cellLayout is defined, and only used when using inline editing. In all other cases, the cell layout only contains the field content ('f'), so it can be bypassed. This way, we avoid surrounding, in cell layouts, every field value with a one-cell table.
  • Added parameter Field.generateLabel, used to force Appy to generate a label for a field for which 'hasLabel' is False (can be useful to use it in non-standard places, like in a pod or in a custom report).
  • Search: allow to define a custom method klass.getResultsTop for showing a custom element on search results for a given Appy class.
  • Management of custom searches: refactored and abandoned the session in order to carry search criteria. Such criteria are now all sent via HTTP POST requests. Indeed, since custom search criteria are carried as request parameters, by using HTTP GET requests, we may exceed the limit of 2056 bytes for HTTP GET requests.
  • Search: do not compute custom code (getResultsTop) when ajax-refreshing search results (avoid performance problems).
  • Allow to send a HTTP POST request to an Appy site but whose content is not XML.
  • Optimisation: cache dynamic searches on the request object.
  • Object creation: bugfix: when user group membership changes via 'onEdit', value of user.getLogins() cached in request.userLogins was still used.
  • GroupWrapper: added a method for getting mail recipients for all group members.

shared

  • xml_parser::XhtmlCleaner: bugfix. One of the implications of this bug was errors while parsing ckeditor content containing 'a' tags including an ampersand.
  • xml_parser::XmlMarshaller: more error handling.
  • sso.py: allow to specify a function to customize local user initialisation when a SSO user performs its first visit in the app. Refactoring.
  • dav.py: better error handling (JSON).
  • Added method utils::grammarJoin, a variant of ''.join for handling a recurrent problem.
  • xhtml2odt: rendering of tables within 'li' tags: bugfix.
  • functions escapeXhtml and escapeXml refactored into class Escape with static methods 'xml' and 'xhtml': escapeXml(s) becomes Escape.xml(s).
  • Removed unused code.

bin

  • backup.py: send mail: bugfix (when several mail addresses were specified).
Ajouter une image à partir du presse-papier (Taille maximale: 31,25 Mo)