Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
Commits
9e56822f
Commit
9e56822f
authored
Sep 28, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: use Jio Query to build search query
parent
3c50cd4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
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
+16
-12
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
9e56822f
...
...
@@ -108,7 +108,7 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*jslint indent: 2, maxerr: 3, nomen: true */\n
/*global window, document, rJS, URI, RSVP, UriTemplate, QueryFactory, loopEventListener, Query
*/\n
/*global window, document, rJS, URI, RSVP, UriTemplate, QueryFactory, loopEventListener, Query
, SimpleQuery, ComplexQuery
*/\n
(function (window, document, rJS, URI, RSVP, UriTemplate) {\n
"use strict";\n
\n
...
...
@@ -513,20 +513,24 @@
hide_form_elements,\n
hide_submit_form = document.createElement("form"),\n
hide_show_all = document.createElement("button"),\n
query_list = [],\n
checkbox;\n
hide_form_elements = gadget.props.element.querySelectorAll(".hide_form_element:checked");\n
\n
if (hide_form_elements.length > 0) {\n
selected_uid_query = "catalog.uid: (";\n
for (i = 0; i
< hide_form_elements.length
;
i
+=
1)
{\n
selected_uid_query
+=
hide_form_elements[i].parentElement.getAttribute("value");\n
hide_form_elements[i].parentElement.removeChild(hide_form_elements[i]);\n
if
(i
!==
hide_form_elements.length
-
1)
{\n
selected_uid_query
+=
",
";\n
}
else
{\n
selected_uid_query
+=
")";\n
}\n
query_list.push(new
SimpleQuery({\n
key:
"catalog.uid",\n
type:
"simple",\n
value:
hide_form_elements[i].parentElement.getAttribute("value")\n
}));\n
}\n
\n
selected_uid_query =
new
ComplexQuery({\n
operator:
"OR",\n
query_list:
query_list,\n
type:
"complex"\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
...
...
@@ -536,7 +540,7 @@
"extended_search":
gadget.props.extended_search
||
"",\n
"domain_tree":
gadget.props.domain_tree
||
"",\n
"sort_list":
gadget.props.sort_list
||
"",\n
"hide_item":
selected_uid_query
});\n
"hide_item":
Query.objectToSearchText(selected_uid_query)
});\n
}\n
\n
hide_show_all.setAttribute("type",
"submit");\n
...
...
@@ -747,7 +751,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
5.64213.19729.53691
</string>
</value>
<value>
<string>
94
6.2679.13824.6365
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -765,7 +769,7 @@
</tuple>
<state>
<tuple>
<float>
1443
190830.65
</float>
<float>
1443
430519.63
</float>
<string>
UTC
</string>
</tuple>
</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