Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
35fbec53
Commit
35fbec53
authored
Nov 17, 2017
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Search Editor: add an empty search parameter by default
parent
71f70c7a
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
53 additions
and
21 deletions
+53
-21
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
+23
-0
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/testComplexFilter.zpt
...tal_tests/renderjs_ui_listbox_zuite/testComplexFilter.zpt
+0
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilter.zpt
...tem/portal_tests/renderjs_ui_listbox_zuite/testFilter.zpt
+23
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterItemAutoBuild.zpt
...sts/renderjs_ui_listbox_zuite/testFilterItemAutoBuild.zpt
+0
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterItemDelete.zpt
..._tests/renderjs_ui_listbox_zuite/testFilterItemDelete.zpt
+0
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterWithPager.zpt
...l_tests/renderjs_ui_listbox_zuite/testFilterWithPager.zpt
+0
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterWithPreviousNext.zpt
.../renderjs_ui_listbox_zuite/testFilterWithPreviousNext.zpt
+0
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testFilterEditor.zpt
...al_tests/renderjs_ui_translate_zuite/testFilterEditor.zpt
+5
-11
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageFront.zpt
...ortal_tests/renderjs_ui_translate_zuite/testPageFront.zpt
+0
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.js
View file @
35fbec53
...
@@ -162,6 +162,21 @@
...
@@ -162,6 +162,21 @@
for
(
i
=
0
;
i
<
query_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
query_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
createFilterItemTemplate
(
gadget
,
"
auto
"
,
query_list
[
i
]));
promise_list
.
push
(
createFilterItemTemplate
(
gadget
,
"
auto
"
,
query_list
[
i
]));
}
}
}
else
if
(
gadget
.
state
.
search_column_list
.
length
>
0
)
{
// No search query was provided
// Add an empty search parameter for the first searchable column
promise_list
.
push
(
createFilterItemTemplate
(
gadget
,
"
auto
"
,
new
SimpleQuery
({
key
:
gadget
.
state
.
search_column_list
[
0
][
1
],
operator
:
""
,
type
:
"
simple
"
,
value
:
''
})
)
);
}
}
return
RSVP
.
all
(
promise_list
);
return
RSVP
.
all
(
promise_list
);
})
})
...
@@ -178,9 +193,17 @@
...
@@ -178,9 +193,17 @@
}
}
container
.
appendChild
(
div
);
container
.
appendChild
(
div
);
return
gadget
.
focusOnLastInput
();
});
});
})
})
.
declareJob
(
'
focusOnLastInput
'
,
function
()
{
var
input_list
=
this
.
element
.
querySelectorAll
(
'
input
'
);
if
(
input_list
.
length
)
{
input_list
[
input_list
.
length
-
1
].
focus
();
}
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
return
this
.
changeState
({
return
this
.
changeState
({
search_column_list
:
options
.
search_column_list
,
search_column_list
:
options
.
search_column_list
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searcheditor_js.xml
View file @
35fbec53
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
55.38135.49149.41489
</string>
</value>
<value>
<string>
9
63.33713.16839.14114
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
480342558.79
</float>
<float>
1
510929709.6
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testComplexFilter.zpt
View file @
35fbec53
...
@@ -50,7 +50,6 @@
...
@@ -50,7 +50,6 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section"
/>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
</tal:block>
</tal:block>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilter.zpt
View file @
35fbec53
...
@@ -53,7 +53,29 @@
...
@@ -53,7 +53,29 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section"
/>
<tr>
<td
colspan=
"3"
><b>
Check that a default filter section is displayed
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//div[@class='filter_item_container']/div[1]
</td>
<td></td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//div[@class='filter_item_container']/div[1]//select
</td>
<td>
id
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//div[@class='filter_item_container']/div[1]//input
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b></b></td>
</tr>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
</tal:block>
</tal:block>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterItemAutoBuild.zpt
View file @
35fbec53
...
@@ -54,7 +54,6 @@
...
@@ -54,7 +54,6 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section"
/>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
</tal:block>
</tal:block>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterItemDelete.zpt
View file @
35fbec53
...
@@ -50,7 +50,6 @@
...
@@ -50,7 +50,6 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section"
/>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
</tal:block>
</tal:block>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterWithPager.zpt
View file @
35fbec53
...
@@ -54,7 +54,6 @@
...
@@ -54,7 +54,6 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section"
/>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
</tal:block>
</tal:block>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterWithPreviousNext.zpt
View file @
35fbec53
...
@@ -52,7 +52,6 @@
...
@@ -52,7 +52,6 @@
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section"
/>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
</tal:block>
</tal:block>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testFilterEditor.zpt
View file @
35fbec53
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/create_translation_data"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/create_translation_data"
/>
<tr>
<tr>
<td>
open
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/wo/#/foo_bar_module
</td>
<td>
${base_url}/web_site_module/renderjs_runner/wo/#/foo_bar_module
</td>
...
@@ -46,48 +45,43 @@
...
@@ -46,48 +45,43 @@
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section"
/>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[1]
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[1]
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verifySelectOptions
</td>
<td>
verifySelectOptions
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[1]
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[1]
</td>
<td>
ID,biaoti,soushuowenben
</td>
<td>
ID,biaoti,soushuowenben
</td>
</tr>
</tr>
<tr>
<tr>
<td>
verifySelectOptions
</td>
<td>
verifySelectOptions
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[2]
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[2]
</td>
<td>
baohang
</td>
<td>
wangquanfuhe,guanjianchi
</td>
</tr>
</tr>
<tr>
<tr>
<td>
select
</td>
<td>
select
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[1]
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[1]
</td>
<td>
index=
1
</td>
<td>
index=
2
</td>
</tr>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//option[@data-i18n='
Exact Match
']
</td>
<td>
//option[@data-i18n='
Contain
']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
verifySelectOptions
</td>
<td>
verifySelectOptions
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[2]
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select[2]
</td>
<td>
wangquanfuhe,guanjianchi
</td>
<td>
baohang
</td>
</tr>
</tr>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageFront.zpt
View file @
35fbec53
...
@@ -68,8 +68,6 @@
...
@@ -68,8 +68,6 @@
<td></td>
<td></td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section"
/>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select
</td>
<td>
//div[@class="filter_item_container"]/div[1]//select
</td>
...
...
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