Commit graph libervia-backend/src/tools/xml_tools.py
Author SHA1 Message Date
Goffi
243ffb9400 core (XMLUI): added a "value" property in TextWidget 2017-11-11 18:39:24 +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
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
25a66ec8d2 plugin schema, core(xmlui): deep copy base form when reused to avoid accidental modification 2017-10-20 08:39:05 +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
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
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
791be3a4ad core (xml_tools): fixed findAll
- names and namespases arguments haven been inverted to be in the same order as for domish.Element.elements
    - fixed bad copy of elements in recursions
    - check if childrens are IElements
    - namespaces and names can now be basestrings instead of iterables
2017-01-03 18:51:50 +01:00
Goffi
44933e1a60 core (stdui): fixed cancellation of ContactList forms 2016-09-11 23:17:31 +02:00
Goffi
527e561a3e core (xmlui): added a quickNote method to easily send notes 2016-08-28 18:16:03 +02:00
Goffi
6bbcbaf522 use of /usr/bin/env instead of /usr/bin/python in shebang 2016-04-17 14:45:26 +02:00
Goffi
c4ac825c8f plugin XEP-0060: service, node and uri are added to metadata when doing a getItems 2016-03-09 16:59:29 +01:00
Goffi
99894bd6f2 core (xml_tools): added a method to find all elements corresponding to criteria 2016-01-22 20:24:17 +01:00
Goffi
6c11191230 core (xml_tools): unescape HTML sequences to avoid parsing error in ElementParser 2016-01-22 20:24:17 +01:00
Goffi
4a44b41793 core (xml_tools), plugin XEP-0277: ElementParser element now manage automatically the wrapping with <div/> element when needed + fixed content_xhtml/title_xhtml in XEP-0277 2016-01-22 20:24:17 +01:00
Goffi
7a2b6fa909 tools (xml_tools): removed unused import 2016-01-13 13:12:50 +01:00
Goffi
fbb50a025d reverted patch 3770d13776e8 2016-01-13 13:11:20 +01:00
Goffi
348be27934 copyright update 2016-01-03 16:28:30 +01:00
souliane
3cc6e41ad6 tools, plugins XEP-0071, XEP-0277: remove recently added expandNewLinesToXHTML, just leave it to the convertors 2015-12-15 20:29:19 +01:00
souliane
9e0b24a4a5 memory (params): parameter jids_list values are specified with <jid>...</jid> 2015-12-15 14:12:19 +01:00
Goffi
18b1ca3d31 core (xmlui): fixed deferConfirm 2015-12-15 12:41:07 +01:00
Goffi
2a5a33df1f core (xmlui): fixed bad call of deferredUI in deferXMLUI 2015-12-15 12:20:55 +01:00
souliane
d38543029f tools: expandNewLinesToXHTML replaces two or more \n instead of each ones 2015-12-11 07:54:14 +01:00
souliane
2df5519eda plugin XEP-0277, xml_tools: restore decapsulation of XHTML content
- to avoid successive nesting of the content in <div>
    - otherwise there is a new <div> at each item modification
2015-12-10 14:21:51 +01:00
souliane
ca5c913ce2 xml_tools, plugin XEP-0071, XEP-0277: add method expandNewLinesToXHTML:
- \n in XHTML content should not be converted to <br /> by the frontend
    - save it directly in the Atom payload for better compatibility with other clients
2015-12-10 14:00:21 +01:00
Goffi
6a44221a83 core (xmlui): new deferredUI method allows to manage XMLUI with a Deferred insteand of manual submit_id handling:
- this differ from deferXMLUI, as it can be used in ui returned to frontend after a bridge call (deferXMLUI use actionNew only)
    - the "chained" argument  allow to manage series of XMLUIs
    - this argument is also present in deferXMLUI
2015-11-27 16:45:55 +01:00
Goffi
6b7272c5b3 core (xmlui): fixed security_limit in deferXMLUI 2015-11-22 21:24:23 +01:00
Goffi
a42452ff57 core, bridge: actionsGet:
- added a new mechanism to keep actions until they are answered (or timeout-ed)
    - keep_id must be explicitly used on actionNew
    - actionsGet is used to retrive these actions
    - the mechanism is used in deferXMLUI
2015-11-17 21:28:58 +01:00
Goffi
de85e24577 core (xmlui), plugin file: added action_extra param to deferXMLUI/deferDialog which is merged to the action data dict when actionNew is called 2015-11-15 23:11:27 +01:00
Goffi
fbbb081425 backend, bridge, frontends: actionNew has now a security_limit argument + added some docstring to explain data argument 2015-11-14 19:21:56 +01:00
Goffi
c0bc337c40 core (xmlui): fixed submit_id returning None when its value is '' 2015-09-26 18:39:05 +02:00
Goffi
ea0eb492d5 core (XMLUI): restorer submit_id:
- submit_id was missing due to a previous change in commit a2e4b976e707
    - XMLUI.submit_id can now be None (not set) or empty string in addition to normal values
    fix bug 102
2015-09-26 15:00:27 +02:00
Goffi
9e6646949a core (xmlui): deferDialog can now manage additional dialog options through the "options" argument 2015-09-25 19:19:12 +02:00
souliane
9dad292328 tools (xml_tools): split dataFormResult2AdvancedList in dataFormResult2XMLUIData and XMLUIData2AdvancedList 2015-09-02 13:56:34 +02:00
Goffi
22808f8c63 core (xmlui): added helper method to easily manage dialogs with a deferred 2015-08-27 17:59:22 +02:00
souliane
56dc4840a6 tools (xml_tools): keeps data form result headers sorted 2015-08-26 12:24:38 +02:00
souliane
822798d965 tools (xml_tools): fixes JidElement.__init__ 2015-08-26 12:23:55 +02:00
Goffi
2319ce59fb core (xmlui): reverted change from 039d96e131be: we should be able to recreate the same container with changeContainer 2015-08-25 15:39:16 +02:00
souliane
ab6b04b898 tools (xmlui): changeContainer do not create a new one when the current one already fits 2015-08-21 14:58:42 +02:00
souliane
a90bcacfe9 tools, frontends (xmlui): allow to select a tab when adding it 2015-08-21 14:17:41 +02:00
Goffi
8e37cf55ed core (xmlui): added JidsListWidget to manage editable list of jids:
- can be used to manage XEP-0004's jid-multi
    - can be used in the future for search result to display found entities (need a read-only style)
    - generaly usefull to manage list of entites
    - implemented in params too
2015-08-20 18:33:52 +02:00
Goffi
31582c98f9 core(xmlui): removed useless parenthesis around assert 2015-08-18 10:52:18 +02:00
Goffi
7f14e1865d core , privmitivus (xmlui): add jidInput handling, with a simple String for now 2015-08-18 10:35:44 +02:00
Goffi
2c37acf27f xmlui: minor docstring fixes 2015-08-18 10:04:47 +02:00
Goffi
7cbcc26d7d xml_tools: minor attribute renaming 2015-08-15 22:27:39 +02:00
souliane
7c4bed58c5 tools (xml_tools): better PEP-8 compliance 2015-07-21 15:36:40 +02:00
souliane
67ff77e5de massive (preventive) addition of 'u' (unicode) before the strings passed to logging functions 2015-04-16 14:57:57 +02:00