Commit graph

2,400 commits

Author SHA1 Message Date
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
bfc27d68dd jp (pubsub/delete): show deleted node + handle URIs 2017-10-27 08:33:48 +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
3fe93a1b45 frontends (xmlui): added ValueGetter.keys 2017-10-20 08:39:58 +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
d78aa6f922 frontends (xmlui): new _xmlui_for_name attribute:
_xmlui_for_name is an attribute which can be set to Label widgets to indicate the name of the linked widget.
This attribute is set automatically for LabelContainer.
data argument in _parseChilds is now a dict (or None)
2017-10-16 07:21:44 +02:00
Goffi
5a34d090b3 frontends (xmlui): new widget_value dict to get first value of widget by name 2017-10-16 07:18:07 +02:00
Goffi
d1a44e1501 jp (file): typo 2017-10-16 07:16:11 +02:00
Goffi
151faf6a73 jp (ticket): ticket command first draft:
only has an "import" subcommand for now
2017-10-06 10:55:54 +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
3c79544cc4 jp (base): fixed CommandAnswering and progress bar 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
Goffi
83aa722103 frontends (xmlui): a dict of named widgets is kept, so they can be easily be retrieved 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
499f2525cc plugin PubSub Schema: schema helper methods:
3 new methods are introduced by this patch:
- psSchemaUIGet to get XMLUI from node schema
- psItemsFormGet to get items as XMLUI when we know they are data forms
- psItemFormSend to set item from values when we know it's a node with schema. For this method, schema can be specified, and if it is not it will be retrieved from node (which imply an additional XMPP request)
2017-10-01 12:21:21 +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
3f2c1046eb plugin XEP-0060: use client instead of profile_key in getItems 2017-09-24 16:32:22 +02:00
Goffi
c7ccdde0c9 jp (pubsub/node/schema): check that a schema exists before parsing it (fix issue on new schema edition) 2017-09-24 16:29:18 +02:00
Goffi
3d6cac0403 core (memory/sqlite): typo 2017-09-22 18:04:14 +02:00
Goffi
ab2e625607 core (memory/sqlite): better stability:
- timeout increased to 15 s
    - if a query fail, it's retried up to 5 times
    - foreign key PRAGMA is executed on every new connection object (should fix non working foreign keys)

those are Q&D workarounds for issues with Sqlite, before switching to a higher level module to handle it correctly.
2017-09-21 21:53:28 +02:00
Goffi
4602edfb4f tmp (wokkel): fixed subscriptions node handling 2017-09-08 07:58:10 +02:00
Goffi
dcb60b3709 jp (shell): changed prompt colour 2017-09-08 07:58:10 +02:00
Goffi
15ff6aedf4 jp (shell): fixed use of profile + added EOF handling:
- main profile (i.e. the one specified on command line when invocating "jp shell") was not used. It is now added to arguments if the value is not overriden on command line or in use
- EOF (i.e. when user press C-d) is now understood as "quit" command
2017-09-08 07:58:10 +02:00
Goffi
e33d68bcf1 jp (pubsub): added subscribe, unsubscribe and subscriptions methods:
those methods are added in pubsub directly instead of being subcommands of pubsub/subscription to make them more easy/natural to use. The node owner versions are in pubsub/node/subscriptions though.
2017-09-08 07:58:08 +02:00
Goffi
b567e87e9b plugin XEP-0060: added/fixed subscribe/unsubscribe and subscriptions methods/bridge methods:
subscriptions now returns Subscription instances, and psSubscriptionsGet return dict with subscription data (node, subscriber, state)
2017-09-08 07:57:57 +02:00
Goffi
e9c0f5e127 jp (pubsub/node): added schema (set/edit/get) commands to manipulate PubSub node schema 2017-09-06 07:39:10 +02:00