Friday, January 13, 2017

After our yesterday’s work session,

There is more to do for #1378. The [ticket 1] links in notifications are now correctly stored as memo markup (and no longer as plain html), but I now need to write a subclass of HtmlRenderer which renders them as ExtJS permalinks (and not as javascript calls) because otherwise they won’t work when clicked in an email.

This caused quite an internal avalanche of code changes in lino.core.requests and lino.core.renderer.

A first series of commits does not yet change anything, it is just a reorganisation of code in order to prepare my coup. There is danger that these changes introduced bugs which are not covered by the test suite (but Wer nichts wagt, der nichts gewinnt). Here is an uncomplete list of these changes:

  • new class lino.core.renderer.JsRenderer contains things needed by both extjs3 and extjs6 renderer. The extjs6 renderer is a modified copy of the extjs3 renderer, and this will reduce the amount of duplicated code.

  • New method obj2url.

  • goto_instance() now implemented by the renderer, not by the request.

  • lino_xl.lib.countries now depends on lino_xl.lib.xl (that’s why belref didn’t translate strings like “Countries” or “Places” to German and French.

List of changes:

I then started to do what I actually wanted to do: get the links right for emails. Yet another series of dangerous code changes. For example, I changed signature of lino.core.rednerer.Renderer.get_detail_url(): no longer an obj, but the actor and the pk. Here are these changes: