Welcome | Get started | Dive into Lino | Contribute | Topics | Reference | More

lino.modlib.extjs

This is the ExtJS Lino front end for Lino.

It is being automatically included by every Lino application unless you disable it (e.g. by overriding your get_plugin_modifiers or your get_installed_plugins method).

views

Summary from <http://en.wikipedia.org/wiki/Restful>:

ext_renderer

Defines the ExtRenderer class.

Classes

Plugin(site, app_label, app_name, ...)

Extends lino.core.plugin.Plugin.

class lino.modlib.extjs.Plugin(site, app_label, app_name, app_module, needed_by, configs: dict)

Bases: Plugin

Extends lino.core.plugin.Plugin.

enter_submits_form = False

Whether the ENTER key (or CTRL+ENTER when in a textarea field) should submit the form.

The default is False. For sites that were in production before October 2015, we recommend to explain to the users that a simple ENTER no longer submits a form, and that Ctrl-S is the preferred keyboard shortcut for submitting a form. Alternatively for backwards compatibility you can set it to True using something like this:

def setup_plugins(self):
    super(Site, self).setup_plugins()
    if self.is_installed('extjs'):
        self.plugins.extjs.configure(enter_submits_form=False)

When you set this to True linoweb.js adds a special mapping for ENTER. The problem then is that the ENTER key won't work in a plain textarea field because we didn't find a way to restore the default behaviour.

use_statusbar = False

Whether to use a status bar to display certain messages to the user. Default is False since currently this is not really useful.

media_name = 'ext-3.3.1'

The URL from where to include the ExtJS library files.

The default value points to the extjs-public repository and thus requires the clients to have an internet connection. This relieves newcomers from the burden of having to specify a download location in their settings.py.

On a production site you'll probably want to download and serve these files yourself by setting this to None and setting extjs_root (or a symbolic link "extjs" in your media directory) to point to the local directory where ExtJS 3.3.1 is installed).

autorefresh_seconds = 0

Number of seconds to wait between two refreshes of the dashboard. Default is 0, which deactivates the feature.

Be careful when uing this feature on a production site because it causes every connected client to refresh their dashboard every x seconds, independently of whether the window is visible or not.