Commit graph

2,367 commits

Author SHA1 Message Date
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
Goffi
2f3727b85d plugin schema: PubSub node schema, first draft
node schema is a new SàT Pubsub experimental feature allowing to attach a schema to a node.
2017-09-06 07:38:39 +02:00
Goffi
607138befb tmp(wokkel/pubsub): allows getNodes to return names using tuples(node/names) 2017-08-27 20:14:59 +02:00
Goffi
c9c34550df jp (output/template): check if there is a template before initializing Renderer 2017-08-24 01:11:47 +02:00
Goffi
2801c01eca jp (info/disco): fixed headers order for items table 2017-08-23 00:52:36 +02:00
Goffi
c46bd004fc jp (info/disco): type selection + output improvments:
- type of discovery can now be specified (can be "infos", "items", or "both" which is the default)
    - a complex output is now used
    - default output has been improved by the use of colors an tables
2017-08-23 00:14:15 +02:00
Goffi
f4761fb1cc jp (common): added use_buffer argument in Table:
when use_buffer is True, the Table is not printed but put in a buffer. A unicode string can then be computed when string property is used.
2017-08-23 00:10:09 +02:00
Goffi
40fa0ed846 jp (common): fixed empty table display when headers are specified 2017-08-23 00:08:30 +02:00
Goffi
caa64d5118 jp (info/disco): added --no-cache option 2017-08-22 22:13:22 +02:00
Goffi
9f30634f14 core (memory/disco): added use_cache parameter to discoInfos/discoItems (set to False to ignore cache) 2017-08-22 22:12:57 +02:00
Goffi
6ad80151f9 plugin XEP-0277: added microblog namespace to disco info 2017-08-20 17:37:43 +02:00
Goffi
2964a74dda jp (info): fixed help for version and session 2017-08-20 15:01:35 +02:00
Goffi
1d07c6bdd7 jp (pubsub/node): added subscriptions subcommand:
added subscriptions commands for node owner, with get/set subcommands (work in a similar way as affiliations)
2017-08-20 10:33:33 +02:00
Goffi
7e826f6aae plugin XEP-0060: implemented subscriptions management method for node owner:
added getNodeSubscriptions and setNodeSubscriptions and their bridge method (psNodeSubscriptionsGet and psNodeSubscriptionsSet)
2017-08-20 10:31:53 +02:00
Goffi
8e8e619031 tmp (wokkel/pubsub): subscriptions improvments:
- added "none" state to Subscription, it is needed to remove existing subscription
- implemented subscriptionsGet and subscriptionsSet
- replaced "nodeOrEmpty" by "node" for affiliationsGet, affiliationsSet and subscriptionsGet as node is mandatory for these commands
2017-08-20 10:29:26 +02:00
Goffi
eebf6e50e7 jp (profile): added disconnect command 2017-08-20 10:26:10 +02:00
Goffi
4dea715ec5 primitivus(chat): fixed scroll down (was broken when Primitivus had not the focus and was receiving messages) 2017-07-17 16:20:55 +02:00
Goffi
b4312f210a jp (common): fixed decode error when item is not specified 2017-07-14 09:06:03 +02:00
Goffi
50ff24cc64 primitivus (chat): added "GOTO_BOTTOM" ("G") shortcut to scroll down to last message in history 2017-07-14 08:34:10 +02:00
Goffi
252e0e29f4 primitivus (chat): only scroll down if we are at the bottom of the discussion 2017-07-14 08:32:49 +02:00
Goffi
60700377b8 jp (blog/edit): avoid call to syntaxConvert if syntax is already XHTML 2017-07-13 22:49:37 +02:00
Goffi
bd6ac76b45 jp (blog/edit): pretty format XHTML before editing it 2017-07-13 21:54:15 +02:00
Goffi
5c7d273ebc jp (common): fixed encoding issue in URLs 2017-07-13 21:45:26 +02:00
Goffi
d5908b6ee6 tools(common/uri): fixed encoding in buildXMPPUri 2017-07-13 21:23:36 +02:00
Goffi
c05a0028b6 jp (blog/get): added "url" key, which compute xmpp: URL of items 2017-07-13 21:13:35 +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
da6bf7123a jp (blog/edit): syntax modifications:
- adapted to new behaviour (keys which are names in lower case en stripped are now used)
    - added --syntax so force a specific syntax. If not used, profile's default syntax will be used
2017-07-13 20:55:35 +02:00
Goffi
85d58f902b plugin text syntaxes: various improvments:
- syntaxes and default_syntax are now class attribute instead of members of params_data
    - removed local exception UnknownSyntax in favor of exceptions.NotFound
    - syntaxes are now saved with a key which is name in lower case and stripped, unmodified name is put in syntax's data
    - new getSyntax (syntaxGet in bridge) method to get syntax key and raise an error if not found. Can be used by frontends to check that a syntax is known.
2017-07-13 20:53:51 +02:00
Goffi
d8080c8ad2 template: print warning message and use DEFAULT_LOCALE on bad locale 2017-07-12 19:06:28 +02:00
Goffi
ef6c0c30f5 plugins invitation, XEP-0277: strip language, we don't want spaces 2017-07-12 19:05:33 +02:00
Goffi
72ba9316f2 jp (event/attendee/list): added --missing to show missing people (ones who didn't replied) and --no-rsvp to hide ones who answered 2017-07-09 16:17:16 +02:00
Goffi
1d3680445d jp (pubsub/search): fixed encoding for stdin in external commands 2017-07-09 15:20:31 +02:00
Goffi
4ec04b1fb0 plugin XEP-0060: remove max_items when item_ids is set on getItems 2017-07-08 23:21:01 +02:00
Goffi
90550ef38b jp (pubsub/search): profile is transmited to subcommand for "exec" action 2017-07-08 22:50:25 +02:00