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
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
alecs_myu
erp5
Commits
4a27ce80
Commit
4a27ce80
authored
Sep 29, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: improve hidden functionality
parent
07b7dfb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
...mplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
+23
-7
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
4a27ce80
...
@@ -526,13 +526,33 @@
...
@@ -526,13 +526,33 @@
i,\n
i,\n
th,\n
th,\n
hide_form_elements,\n
hide_form_elements,\n
all_hide_form_elements,\n
hide_submit_form = document.createElement("form"),\n
hide_submit_form = document.createElement("form"),\n
hide_show_all = document.createElement("button"),\n
hide_show_all = document.createElement("button"),\n
query_list = [],\n
query_list = [],\n
checkbox;\n
checkbox;\n
all_hide_form_elements = gadget.props.element.querySelectorAll(".hide_form_element");\n
hide_form_elements = gadget.props.element.querySelectorAll(".hide_form_element:checked");\n
hide_form_elements = gadget.props.element.querySelectorAll(".hide_form_element:checked");\n
\n
\n
if (hide_form_elements.length > 0) {\n
if (all_hide_form_elements.length > 0) {\n
//if nothing is selected, show all\n
if (hide_form_elements.length === 0) {\n
return gadget.redirect({jio_key: gadget.props.jio_key,\n
"extended_search": gadget.props.extended_search || "",\n
"domain_tree": gadget.props.domain_tree || "",\n
"sort_list": gadget.props.sort_list || ""});\n
}\n
\n
//all selected\n
//no need to submit\n
if (hide_form_elements.length + 1 === all_hide_form_elements.length) {\n
for (i = 0; i
< all_hide_form_elements.length
;
i
+=
1)
{\n
all_hide_form_elements[i].parentElement.removeChild(all_hide_form_elements[i]);\n
}\n
return;\n
}\n
\n
//a
part
is
selected\n
for
(
i =
0;
i
<
hide_form_elements.length;
i
+=
1)
{\n
for
(
i =
0;
i
<
hide_form_elements.length;
i
+=
1)
{\n
query_list.push(new
SimpleQuery({\n
query_list.push(new
SimpleQuery({\n
key:
"catalog.uid",\n
key:
"catalog.uid",\n
...
@@ -547,10 +567,6 @@
...
@@ -547,10 +567,6 @@
type:
"complex"\n
type:
"complex"\n
});\n
});\n
\n
\n
hide_form_elements =
gadget.props.element.querySelectorAll(".hide_form_element");\n
for
(
i =
0;
i
<
hide_form_elements.length;
i
+=
1)
{\n
hide_form_elements[i].parentElement.removeChild(hide_form_elements[i]);\n
}\n
return
gadget.redirect({jio_key:
gadget.props.jio_key,\n
return
gadget.redirect({jio_key:
gadget.props.jio_key,\n
"extended_search":
gadget.props.extended_search
||
"",\n
"extended_search":
gadget.props.extended_search
||
"",\n
"domain_tree":
gadget.props.domain_tree
||
"",\n
"domain_tree":
gadget.props.domain_tree
||
"",\n
...
@@ -766,7 +782,7 @@
...
@@ -766,7 +782,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
946.4
198.62902.20684
</string>
</value>
<value>
<string>
946.4
319.25695.31351
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -784,7 +800,7 @@
...
@@ -784,7 +800,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
144352
6476.63
</float>
<float>
144352
9209.21
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
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