lino.modlib.extjs.ext_renderer

Defines the ExtRenderer class.

(This module's source code is available here.)

Functions

jscompress(s)

prepare_label(mi)

Classes

ExtRenderer(plugin)

An HTML renderer that uses the ExtJS Javascript toolkit.

class lino.modlib.extjs.ext_renderer.ExtRenderer(plugin)

Bases: lino.core.renderer.JsRenderer, lino.core.renderer_mixins.JsCacheRenderer

An HTML renderer that uses the ExtJS Javascript toolkit.

py2js_converter(v)

Additional converting logic for serializing Python values to json.

window_action_button(ar, ba, status=None, label=None, title=None, **kw)

Return a HTML chunk for a button that will execute this action using a Javascript link to this action.

quick_manage_toolbar(ar, obj)

Returns a HTML chunk that displays a "toolbar" with a series of "quick manage buttons": one "Insert" and another to open the table.

unused_insert_button(ar, text=None, known_values=None, **options)

Called via lino.core.requests.ActionRequest.insert_button().

action_call_on_instance(obj, ar, ba, request_kwargs={}, **status)

Note that ba.actor may differ from ar.actor when defined on a different actor. Remember e.g. the "Must read eID card" action button in eid_info of newcomers.NewClients (20140422).

Obj

The database object

Ar

The action request

Ba

The bound action

Request_kwargs

keyword arguments to forwarded to the child action request

Any other keyword arguments are forwarded to ar2js().

get_request_url(ar, *args, **kw)

Called from ActionRequest.absolute_url() used in Team.eml.html

http://127.0.0.1:8000/api/cal/MyPendingInvitations?base_params=%7B%7D http://127.0.0.1:8000/api/cal/MyPendingInvitations

html_text(html)

Wrap the given html fragment into a <div class="htmlText"> which specifies that this fragment contains simple html text inside an ExtJS component. This is required because ExtJS does a lot of CSS magic which neutralizes the "usual" effects of most html tags.

html_page(request, *args, **kw)

Return a string with the index page. Content is mostly in the extjs/index.html template.

html_page_main_window(on_ready, request, site)

Called from lino/modlib/extjs/config/extjs/index.html.

html_page_user(request, site)

Build the "user menu", i.e. the menu in the top right corner.

toolbar(action_list)

This also manages action groups

build_on_render(main)

dh is a FormLayout or a ColumnsLayout

js_render_custom_action(rh, action)

Defines the non-window action handler used by row_action_button()

linolib_intro()

Called from linolib.js.

goto_instance(ar, obj, detail_action=None, **kw)

See JsRenderer.goto_instance(), but when this is called while the detail window is already open (only on another record), then we don't want to redirect to another page because that would take more time.

This is a utility wrapper around set_response() which sets either data_record or a record_id.

Usually data_record, except if it is a file upload where some mysterious decoding problems (2012-02-09) force us to return a record_id which has the same visible result but using an additional GET.

If the calling window is a detail on the same table, then it should simply get updated to the given record. Otherwise open a new detail window.

If the detail layout of the current actor can be used for the object to be displayed, we don't want to open a new detail window.