- 11 Jul, 2024 40 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
The add-hoc assertin filter: -- from typing import List import lib2to3 from lib2to3.fixer_base import BaseFix from lib2to3.fixer_util import Comma, Name class FixAssertIn(BaseFix): PATTERN = """ power< any+ trailer< '.' meth=("assertTrue" | "assertFalse")> trailer< '(' comparison< (needle=any ( comp_op<'not' 'in'> | 'in' ) haystack=any) > ')' > > """ def transform(self, node: lib2to3.pytree.Node, results: List[lib2to3.pytree.Base]): needle = results['needle'] haystack = results['haystack'] meth = results["meth"][0] method_map = {True: 'assertIn', False: 'assertNotIn'} method_in = meth.value == 'assertTrue' if 'not' in str(needle.parent.children[1]): method_in = not method_in meth.replace(Name(method_map[method_in], prefix=meth.prefix)) needle.parent.children = [needle, Comma(), haystack]
-
Jérome Perrin authored
so that we can run 2to3.fix_assert
-
Jérome Perrin authored
this code was latin 1, causing issues for refactoring scripts
-
Jérome Perrin authored
Form.__call__ replaces page template call, so it is also responsible to set the content type in response. With Page Templates, ZopePageTemplate._exec (called by Shared.DC.Scripts.Bindings.__call__ and _bindAndExec) sets the response content type and calls pt_render. Form.__call__ also calls pt_render, so to behave like page template, it should also sets the response content type. In erp5_xhtml_style, we don't notice this, because global_definitions contains a setHeader call to set content type to html.
-
Jérome Perrin authored
Check that it correctly includes the web page and sets the content type header.
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
it would be good to rewrite this in a page template
-
Jérome Perrin authored
This method converts the HTML, so it should escape nasty HTML tags. Also add missing escaping when inserting the base
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
and move it to erp5_administration, this is not a "core" feature but just a developer tool. It was used in a few tests, move all the tests in testERP5Administration
-
Roque authored
-
Roque authored
-
Roque authored
-
Roque authored
-
Roque authored
-
Roque authored
-
Roque authored
-
Vincent Pelletier authored
Unindexation happens in a transation after the corresponding document was deleted. So there is no context available to check the type of the deleted document. So these filter expressions are meaningless.
-
Vincent Pelletier authored
Unindexation happens in a transation after the corresponding document was deleted. So there is no context available to check the type of the deleted document. So these filter expressions are meaningless.
-
Vincent Pelletier authored
Unindexation happens in a transation after the corresponding document was deleted. So there is no context available to check the type of the deleted document. So these filter expressions are meaningless.
-
Jérome Perrin authored
This updates the change to 32cead86 (xhtml_style: set a bottom margin for dialog action, 2019-05-31) that got impacted by a rule added on html and body in 5dde17a5 (xhtml_style: make editors in bottom group use full height, 2022-08-22)
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Julien Muchembled authored
See also nexedi/slapos.libnetworkcache@319b8b18
-
Jérome Perrin authored
gadget_html_viewer had styles to add a border for tables, so that they look similar to tables added in CKEditor. One problem is that all tables had borders, because HTML emails are often using tables to position the content, when viewing an Mail Message from ERP5 back office interface we could see all the borders, which looked a bit ugly. These changes bring back a behavior closer to default style sheet of browsers: tables have no border by default, but a rule is added to emulate the rendering of border="1" attributes, so that tables edited with CKEditor have borders and look the same in the editor or in the html viewer.
-
Jérome Perrin authored
-
Jérome Perrin authored
Make sure we don't set grouping reference on lines that have a valid group only for source (or destination) but not for the other side.
-
Eteri authored
-
Eteri authored
-
Jérome Perrin authored
Instead of add-hoc ", ".join
-
Jérome Perrin authored
-
Jérome Perrin authored
This reorganises a bit the tests to include the proxify feature of ERP5 Form in ERP5 Form test
-
Jérome Perrin authored
-