Commit graph libervia-backend/src/tools
Author SHA1 Message Date
Goffi
6f64d7d0a3 core (trigger): new returnPoint method:
Normally trigger return value is a boolean used to check if normal workflow must be continued or stopped.
This method add a way to also specify a return value to the method, in addition to the "continue or not" boolean.
2018-02-28 18:28:39 +01:00
Goffi
60b8c8fa73 plugin pipe/stream, file transfert: refactoring and improvments:
this is a big patch as things had to be changed at the same time.

- changed methods using profile argument to use client instead
- move SatFile in a new tools.stream module, has it should be part of core, not a plugin
- new IStreamProducer interface, to handler starting a pull producer
- new FileStreamObject which create a stream producer/consumer from a SatFile
- plugin pipe is no more using unix named pipe, as it complicate the thing,
  special care need to be taken to not block, and it's generally not necessary.
  Instead a socket is now used, so the plugin has been renomed to jingle stream.
- bad connection/error should be better handler in jingle stream plugin, and code should not block anymore
- jp pipe commands have been updated accordingly

fix bug 237
2018-02-08 00:37:42 +01:00
Goffi
387c10cc0d dates update 2018-01-26 11:14:13 +01:00
Goffi
4d7bc8aaa1 tools (common/data_objects): accept same parameters as format en quote their values in OnClick.formatUrl 2018-01-24 09:12:12 +01:00
Goffi
773b9b8948 tools (common/data_objects): use lists instead of generators for BlogItem.groups and BlogItem.tags 2018-01-21 20:20:38 +01:00
Goffi
ba046b33dd tool (utils): import directly parser from dateutil 2018-01-21 13:04:16 +01:00
Goffi
7b833e62a6 tools (common/data_objects): BlogItem has now a uri property to generate its own XMPP URI 2018-01-19 17:41:10 +01:00
Goffi
a979fce2fc tools (utils): new "partial" function which is a hack to workaround issue with functools.partial while using it with dbus module. 2018-01-12 15:45:37 +01:00
Goffi
8845cc682f tools (common/data_objects): added Room class 2018-01-05 13:00:34 +01:00
Goffi
fa1654964d template: date filter improvments:
new format (i.e. format after date limit has been reached) can now be specified.
0 can now be used for "auto_limit" to use last midnight as date limit.
A new "auto_day" format can be used as shortcut to use last midnight as date limit, short datetime for old format, and time only for new format.
2018-01-03 00:29:18 +01:00
Goffi
f2b0051004 template: boolean attribute can now be specified when importing a script, and default to "defer" 2018-01-03 00:23:36 +01:00
Goffi
f2b942371a tools (common/data_objects): added classes for messages 2018-01-03 00:21:21 +01:00
Goffi
d3eb77bdaf template (xmlui): added labels property in ValueWidget (actually return values) and values property in OptionsWidget 2017-12-04 00:45:07 +01:00
Goffi
87690d88ce core, template (filters): added pygments as a dependency + new highlight filter to use it. 2017-11-30 21:00:24 +01:00
Goffi
5aec6ed680 template (filters): don't crash on invalid date in date_fmt 2017-11-30 20:59:24 +01:00
Goffi
6020cae869 template: remove extension from elements while looking for a path:
this way, extension doesn't need to be provided for a CSS file for a single page.
2017-11-30 20:58:34 +01:00
Goffi
a01bec718e tools (config): complexe data can now be set using json and the "_json" suffix 2017-11-30 20:53:47 +01:00
Goffi
b845f7d49e core (XMLUI): added value property for StringWidget and ListWidget 2017-11-30 20:29:25 +01:00
Goffi
a8b302b27d template (XMLUI): added JidInputWidget 2017-11-15 08:58:56 +01:00
Goffi
c336351115 core (XMLUI): form's XMLUI is use as first arguments for filters in dataForm2Widgets 2017-11-11 18:39:26 +01:00
Goffi
243ffb9400 core (XMLUI): added a "value" property in TextWidget 2017-11-11 18:39:24 +01:00
Goffi
0b0bb0e2c9 template: added dict_ext filter to extend a dictionary 2017-11-09 07:54:28 +01:00
Goffi
95508766f5 template: fixed the use of eval_context_filter in item_filter 2017-11-05 23:36:45 +01:00
Goffi
fc2af0da9e frontends (xmlui): added an attribute to ignore some widgets (and their label) in create 2017-11-05 13:53:28 +01:00
Goffi
f5f25e8ab5 misc: date update (yes it's a bit late :p ) 2017-11-03 14:31:42 +01:00
Goffi
fc08583152 core (xmlui): fixed data_form => XMLUI conversion when filters is None 2017-10-31 23:07:26 +01:00
Goffi
ecb3ba897e template: improved date formatter:
the date filter is now named "date_fmt" and can be use to specify several useful formats (see docstring), using the current locale.
The "relative" format return the whole human readable relative date.

The new in_the_past test allow to check if a date is passed.
2017-10-27 18:20:10 +02:00
Goffi
dde17b2b06 template: new item_value filter
this filter is used with XMLUI to specify filters before using a generate method.
2017-10-27 18:17:35 +02:00
Goffi
26751b4f89 template: improved attribute escaping, and added it to filters under the name "attr_escape" 2017-10-27 18:13:25 +02:00
Goffi
d308bbfd6b template(XMLUI): added items property to ListWidget:
this property get values and labels from items relevant for the current list, according to styles.
2017-10-27 18:11:20 +02:00
Goffi
0a33ab2d1d core (XMLUI): filters can now be used when converting data form to XMLUI:
they can be used to modify created widgets, this is specially useful to customise well known field.
2017-10-27 18:06:58 +02:00
Goffi
3ccb4c1038 core (XMLUI), template(XMLUI): added flags to ListWidget:
following flags have been added:
- noselect: list selection is not allowed (options are the important data)
- extensible: user can add elements to the list
- reducible: user can remove elements from the list
- inline: presentation hint: the list should be displayed horizontally
2017-10-27 18:03:35 +02:00
Goffi
3c4dfb4636 template: added media_path to template data 2017-10-27 08:36:24 +02:00
Goffi
8a71ea34b9 template: new "adv_format" filter which use Python's format and return whole value if template is None 2017-10-20 08:49:39 +02:00
Goffi
25a66ec8d2 plugin schema, core(xmlui): deep copy base form when reused to avoid accidental modification 2017-10-20 08:39:05 +02:00
Goffi
789a3056d9 template: gidx methods improvment:
gidx methods now use the filtered name to return global indexes.
For instance, if "widget" is filtered name, first index will be "widget", then "widget_1", "widget_2" and so one.
If an other name is used, it restart (e.g. for "label": "label", "label_1", "label_2", etc.).
2017-10-16 07:48:09 +02:00
Goffi
07d5a18b79 template: new "xmlui_class" filter compute class names from name/values of requested fields. 2017-10-16 07:44:08 +02:00
Goffi
c7984f60ec tools (common/data_objects): new OnClick class
OnClick is used to specify what do to when clicking on element.
For now it only handles target URL.
2017-10-16 07:41:36 +02:00
Goffi
b8839b97e4 core (xmlui): new "prepend" argument for dataForm2Widgets and dataFormResult2XMLUI:
This argument allow to create widgets which will be put first in LabelContainer of generated XMLUI.
An iterable of *args for XMLUI.addWidget must be used.
2017-10-16 07:36:03 +02:00
Goffi
59c6ab9973 template (xmlui): new properties + inheritance fix:
- "values" property in OptionsWidget return selected values.
- "labels" property in OptionsWidget return list of labels
- "for_name" property in LabelWidget return name of associated widget if set, else None
- fixed inheritance for StringWidget and TextBoxWidget
2017-10-16 07:28:36 +02:00
Goffi
fa1680a119 template (xmlui): added values property to be able to use always values even when there is only one value 2017-10-01 12:21:23 +02:00
Goffi
3ec8f283cb core (xmlui): container now keep a list of children 2017-10-01 12:21:23 +02:00
Goffi
df038ad3d4 core (xmlui): added method to convert data form result to XMLUI:
- former method was misnamed as it was used to convert data form element to XMLUI, so it has been renamed to dataFormEltResult2XMLUI
    - dataFormResult2XMLUI is now use to convert wokkel.data_form.Form instances to XMLUI
2017-10-01 12:21:23 +02:00
Goffi
04d851c5c5 template: template XMLUI first draft:
this module prepares an object which can be easily used in templates to construct interface from XMLUI.
2017-09-24 16:39:36 +02:00
Goffi
506f948214 core, frontends (xmlui): new LabelContainer:
LabelContainer is like a PairContainer where first widget can only be LabelWidget or EmptyWidget. This case is the most common, and allow to generate better code when label can be associated to widget (e.g. in HTML).
2017-09-24 16:36:11 +02:00
Goffi
d5908b6ee6 tools(common/uri): fixed encoding in buildXMPPUri 2017-07-13 21:23:36 +02:00
Goffi
da75f58453 tools (common/uri): buildXMPPUri: use XEP-0277 namespace as node if node is empty or None for microblog subtype 2017-07-13 21:12:46 +02:00
Goffi
d8080c8ad2 template: print warning message and use DEFAULT_LOCALE on bad locale 2017-07-12 19:06:28 +02:00
Goffi
359b3a1b43 core (tools/email): an unicode "to" email (instead of a list) can now be used 2017-07-05 15:02:52 +02:00
Goffi
eaa420fb03 jp (event/invitee): added list command to get R.S.V.P. :
RSVP are gotten for invitees node, and R.S.V.P. are displayed. Then a summary display the number of yes, maybe and no, and the expected number of guests.
2017-07-02 20:09:25 +02:00