Commit graph libervia-backend/src
Author SHA1 Message Date
Goffi
7de0ba6c64 plugin XEP-0060: use new findServiceEntity to get default pubsub service 2017-11-15 08:55:47 +01:00
Goffi
30768ce305 memory (disco): added findServiceEntity helper method to get first service of a kind 2017-11-15 08:54:32 +01:00
Goffi
774d9a37a4 plugin tickets: fill reporter field when it is not already filled 2017-11-11 18:39:26 +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
b6a97ced81 plugin identity: fixed jid.userhostJID call + capitalize user when jid is used. 2017-11-11 18:35:28 +01:00
Goffi
b3dcb3a490 plugin schema: prepend a "publisher" field after "id" in getDataFormItems with published given by PubSub service 2017-11-11 18:34:21 +01:00
Goffi
0b0bb0e2c9 template: added dict_ext filter to extend a dictionary 2017-11-09 07:54:28 +01:00
Goffi
a45a20ca34 XEP-0060: fixed bad attribute in getItems 2017-11-08 07:47:01 +01:00
Goffi
95508766f5 template: fixed the use of eval_context_filter in item_filter 2017-11-05 23:36:45 +01:00
Goffi
f3d19392ea plugin schema: separate lines of text-multi in different values as requested by XEP-0004 2017-11-05 20:34:51 +01:00
Goffi
3b9659e52e plugin tickets: added ticketsSet and ticketsSchemaGet methods:
those methods are high level methods specialised for tickets.

ticketsSet will use default tickets node if node is not set, set "created" and "updated" fields, create comments node if the ticket is new, and associate it with "comments_uri" field.

ticketsSchemaGet is like getUISchema with node defaulting to tickets default node.
2017-11-05 15:36:06 +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
06d5346714 plugin XEP-0277: minor id generation change 2017-11-04 22:10:01 +01:00
Goffi
f5f25e8ab5 misc: date update (yes it's a bit late :p ) 2017-11-03 14:31:42 +01:00
Goffi
a5f28ef7dd tmp: removed sat.tmp hierarchy and fixed references to it as it is now an independant sat_tmp repository 2017-11-03 14:19:10 +01:00
Goffi
7045ad3f1c core (disco): do not cache disco items when node is set 2017-10-31 23:11:58 +01:00
Goffi
a68772cdeb plugin XEP-0050: renamed "requestCommandsList" method to "list" + added a run command + fixes:
- XMLUI cancellation is fixed
- when called from bridge, "list" (adHocList) command doesn't prepend instructions
2017-10-31 23:11:13 +01:00
Goffi
fc08583152 core (xmlui): fixed data_form => XMLUI conversion when filters is None 2017-10-31 23:07:26 +01:00
Goffi
6e8375cda5 plugin tickets: high level tickets handling, first draft:
this plugin use plugin schema to handle tickets, and filter well known fields like created, updated and labels.
2017-10-27 18:24:35 +02: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
ada8d4756e plugin tickets import bugzilla: fixed parsing of "created" and "updated" fields 2017-10-27 18:08:53 +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
55a5b603fd plugins tickets import, jp (ticket/import): implemented mapping:
- mapping is an option allowing do map imported field to a specific field in the newly created item
- importers can now use complexe data types in options using JSON
2017-10-27 17:58:05 +02:00
Goffi
baaa4b1419 plugin pubsub schema: allow any data_form schema:
the schema is actually the schema needed for the items, so it should not in pubsub schema namespace.
2017-10-27 17:54:00 +02:00
Goffi
3c4dfb4636 template: added media_path to template data 2017-10-27 08:36:24 +02:00
Goffi
414665c76a plugin tickets import: create comments nodes with open access/publishing 2017-10-27 08:35:22 +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
08a14fa4ac plugins import, tickets import, bugzilla import: comments handling:
- comments are put in "comments" key in import data, it's a list of microblog data
- in resulting item, the comments uri is put in comments_uri field
- (plugin import) root_service and root_node are kept in session
- (plugin ticket) reporter name is now in "reporter" key instead of "reporter_name"
- (plugin bugizlla): if not reporter name is found, first part of email address is used
2017-10-20 08:48:41 +02:00
Goffi
363ee1db88 plugin XEP-0060: added createIfNewNode method which doesn't fail in case of conflict. 2017-10-20 08:44:09 +02:00
Goffi
a8f192a2e4 plugin schema: when publishing a schema, check that values of list are allowed, else use default value 2017-10-20 08:40:54 +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
158d61b84e plugin import ticket, import ticket bugzilla: some normalization in values:
normalization (i.e. recommandations for importer to have similar values) has been done for some values:
- "status" is now one of "queued", "started", "review", "closed"
- "priority" and "severity" must be stripped and lower case
2017-10-16 07:39:54 +02:00
Goffi
b5daa89208 plugin schema: use new "prepend" argument to put "id" widget first. 2017-10-16 07:36:41 +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
f97b08382f plugin schema: deserialise is now the last kw argument 2017-10-16 07:23:09 +02:00
Goffi
697bec616c plugin tickets import Bugzilla: Bugzilla tickets importer:
it imports tickets from Bugzilla's XML export format.
2017-10-06 10:55:54 +02:00
Goffi
748eed8ff1 plugin tickets import: specialized importer for tickets, first draft:
import tickets in a node with schema. Comments are not handled yet.
2017-10-06 10:55:54 +02:00
Goffi
9bca9328c3 plugin pubsub schema: values handling:
- "schema" attribute can now be specified directly as a data_form.Form (reparsing it will be avoided in this case)
- new "deserialise" parameter allows deserialisation from unicode strings in sendDataFormItem
- values can now be an iterable or directly the value to use (it will be put in a list automatically in the later case)
- "id" is now put directly in XMLUI's "id" field instea of "_id"
2017-10-06 10:55:51 +02:00
Goffi
1bcdca4a2f plugin import: node can now be specified + added a "session" dict to keep import session data:
import session data are data that can be used by importer to store anything which can be useful to keep between import methods.
2017-10-06 08:52:51 +02:00
Goffi
80eb458024 plugin import: generic data import plugin:
this plugin handle common task for importers. Specialized importers (e.g. blog import) use it as a basic, and specific importers (e.g. Dotclear) register to the specialized one.
Blog importer generic method have been moved to it.
2017-10-01 12:21:23 +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