Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
142
Merge Requests
142
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
0f71fa66
Commit
0f71fa66
authored
Dec 29, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: handle the "!=" query operator
parent
f99dadff
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
156 additions
and
10 deletions
+156
-10
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_html.html
...em/web_page_module/rjs_gadget_erp5_searcheditor_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_html.xml
...tem/web_page_module/rjs_gadget_erp5_searcheditor_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.js
...teItem/web_page_module/rjs_gadget_erp5_searcheditor_js.js
+7
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.xml
...eItem/web_page_module/rjs_gadget_erp5_searcheditor_js.xml
+2
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterItemSelectable.zpt
...ts/renderjs_ui_listbox_zuite/testFilterItemSelectable.zpt
+7
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterNotEqualOperator.xml
.../renderjs_ui_listbox_zuite/testFilterNotEqualOperator.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterNotEqualOperator.zpt
.../renderjs_ui_listbox_zuite/testFilterNotEqualOperator.zpt
+77
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testFilterEditor.zpt
...al_tests/renderjs_ui_translate_zuite/testFilterEditor.zpt
+1
-1
bt5/erp5_web_renderjs_ui_test_core/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test_core/Base_createBaseLanguage.py
...erp5_web_renderjs_ui_test_core/Base_createBaseLanguage.py
+1
-0
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_html.html
View file @
0f71fa66
...
...
@@ -10,6 +10,7 @@
data-i18n=At least one (OR)
data-i18n=Contains
data-i18n=Equal to
data-i18n=Not equal to
data-i18n=Equal to (at least one)
data-i18n=Greater than
data-i18n=Less than
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_html.xml
View file @
0f71fa66
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
1.59263.63131.63590
</string>
</value>
<value>
<string>
98
6.51245.10858.8089
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
1
581947972.8
</float>
<float>
1
609255883.37
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.js
View file @
0f71fa66
...
...
@@ -7,11 +7,13 @@
var
NUMERIC
=
[
[
"
Equal to
"
,
"
=
"
],
[
"
Greater than
"
,
"
>
"
],
[
"
Less than
"
,
"
<
"
],
[
"
Less than or Equal to
"
,
"
<=
"
],
[
"
Greater than or Equal to
"
,
"
>=
"
]
[
"
Greater than or Equal to
"
,
"
>=
"
],
[
"
Not equal to
"
,
"
!=
"
]
],
OTHER
=
[
[
"
Equal to
"
,
"
exact_match
"
],
[
"
Equal to (at least one)
"
,
"
at_least_one_exact_match
"
],
[
"
Not equal to
"
,
"
!=
"
],
[
"
Contains
"
,
"
keyword
"
]
],
DOMAIN
=
[
...
...
@@ -701,7 +703,8 @@
'
Less than or Equal to
'
,
'
Greater than or Equal to
'
,
'
Searchable Text
'
,
'
Search Expression
'
'
Search Expression
'
,
'
Not equal to
'
])
.
push
(
function
(
translation_list
)
{
var
duplicated_query_key_dict
=
{},
...
...
@@ -714,6 +717,7 @@
{
'
Contains
'
:
translation_list
[
7
],
'
Equal to
'
:
translation_list
[
8
],
'
Not equal to
'
:
translation_list
[
16
],
'
Equal to (at least one)
'
:
translation_list
[
9
],
'
Greater than
'
:
translation_list
[
10
],
'
Less than
'
:
translation_list
[
11
],
...
...
@@ -819,7 +823,7 @@
if
(
query
.
operator
===
'
keyword
'
)
{
query
.
value
=
'
%
'
+
query
.
value
+
'
%
'
;
query
.
operator
=
''
;
}
else
if
([
""
,
"
>
"
,
"
<
"
,
"
<=
"
,
"
>=
"
].
indexOf
(
query
.
operator
)
===
-
1
)
{
}
else
if
([
""
,
"
>
"
,
"
<
"
,
"
<=
"
,
"
>=
"
,
"
!=
"
].
indexOf
(
query
.
operator
)
===
-
1
)
{
query
.
operator
=
''
;
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.xml
View file @
0f71fa66
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
6.30784.11275.3089
</string>
</value>
<value>
<string>
98
8.64322.54806.6826
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1
599552227.76
</float>
<float>
1
609255951.43
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterItemSelectable.zpt
View file @
0f71fa66
...
...
@@ -99,12 +99,17 @@
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@class='filter_item_container']/div[1]//select[2]//option[3][@value='keyword' and text()='Contains']
</td>
<td>
//div[@class='filter_item_container']/div[1]//select[2]//option[3][@value='!=' and text()='Not equal to']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@class='filter_item_container']/div[1]//select[2]//option[4][@value='keyword' and text()='Contains']
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//div[@class='filter_item_container']/div[1]//select[2]//option[
4
]
</td>
<td>
//div[@class='filter_item_container']/div[1]//select[2]//option[
5
]
</td>
<td></td>
</tr>
<tr>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterNotEqualOperator.xml
0 → 100644
View file @
0f71fa66
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testFilterNotEqualOperator
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterNotEqualOperator.zpt
0 → 100644
View file @
0f71fa66
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test RenderJS UI
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test RenderJS UI
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<!-- Clean Up -->
<tr>
<td>
open
</td>
<td>
${base_url}/bar_module/ListBoxZuite_reset
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_createObjects
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Created Successfully.
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
<!-- Initialize -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"
/>
<tal:block
tal:define=
"search_query python: 'title:!="31085"'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
</tal:block>
<!-- Open the panel and submit it. Check that the new query string is not to much changed -->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'COLUMN_title', 'value': '31085', 'index': 0, 'operator': '!='}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"parsed_query python: 'title: != "31085"';
search_query python: ''"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
</tal:block>
<!-- Open the panel a second time and submit it. Check that the new query string is identical -->
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"parsed_query python: 'title: != "31085"';
search_query python: ''"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testFilterEditor.zpt
View file @
0f71fa66
...
...
@@ -66,7 +66,7 @@
<tr>
<td>
verifySelectOptions
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[2]
</td>
<td>
dengyu,dengyu(zhishaoyige),baohang
</td>
<td>
dengyu,dengyu(zhishaoyige),b
udengyu,b
aohang
</td>
</tr>
...
...
bt5/erp5_web_renderjs_ui_test_core/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test_core/Base_createBaseLanguage.py
View file @
0f71fa66
...
...
@@ -6,6 +6,7 @@ param_dict = [
{
'message'
:
'Proceed'
,
'translation'
:
'jixu'
,
'language'
:
'wo'
},
{
'message'
:
'Title'
,
'translation'
:
'biaoti'
,
'language'
:
'wo'
},
{
'message'
:
'Equal to'
,
'translation'
:
'dengyu'
,
'language'
:
'wo'
},
{
'message'
:
'Not equal to'
,
'translation'
:
'budengyu'
,
'language'
:
'wo'
},
{
'message'
:
'Equal to (at least one)'
,
'translation'
:
'dengyu(zhishaoyige)'
,
'language'
:
'wo'
},
{
'message'
:
'Contains'
,
'translation'
:
'baohang'
,
'language'
:
'wo'
},
{
'message'
:
'Search'
,
'translation'
:
'soushuo'
,
'language'
:
'wo'
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment