Friday, September 29, 2017

New option auto_apply_params

The problem in lino_xl.lib.ledger.AccountingReport (see Wednesday, September 27, 2017) is now fixed in a pragmatical way: changing a single parameter field no longer automatically triggers a refresh. You must explicitly click the refresh button to see your result. And when no starting period is given, the report just says “you must specify at least a starting period” instead of rendering a meaningless report. As a side effect this report now always uses the appypdf print method which produces the best result.

Code changes:

  • New option lino.core.actors.Actor.auto_apply_params.
  • (side effect) I removed the put_button() method from renderer and Request and from the Lino.put() in both linoweb.js files.
  • lino.modlib.printing.actions.BasePrintAction now supports the case that the printable object’s get_build_method returns a string. Until now this was allowed only for print actions.
  • a lino.utils.reports.Report can now specify its print method. build_method
  • As an experimental new feature we now have a ButtonElement, and you can specify an action as a data element of a layout. Currently however this is quite limited since it works only for actions that have an explicit js_handler. And the only candidate action is ExplicitRefresh, but this doesn’t work because in linoweb.js a parameter panel currently doesn’t know the main panel it is sitting on and therefore the button cannot call the refresh method of that panel. I finally abandoned the idea of an explicit “Go!” button because (1) it turned out to be difficult to implement and (2) i realized that it wasn’t a good idea.
  • I applied the changes in lino.modlib.extjs also to lino_extjs6.

Default image size

The images produced by sigal_image have now a hard-coded default width of 280 pixel. Until now they had no width specified, which meant that the result depended on the actual thumnbnail size.