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
Léo-Paul Géneau
erp5
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
Show 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 @@
...
@@ -108,7 +108,7 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*jslint indent: 2, maxerr: 3, nomen: true */\n
/*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
(function (window, document, rJS, URI, RSVP, UriTemplate) {\n
"use strict";\n
"use strict";\n
\n
\n
...
@@ -513,20 +513,24 @@
...
@@ -513,20 +513,24 @@
hide_form_elements,\n
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
checkbox;\n
checkbox;\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 (hide_form_elements.length > 0) {\n
selected_uid_query = "catalog.uid: (";\n
for (i = 0; i
< hide_form_elements.length
;
i
+=
1)
{\n
for (i = 0; i
< hide_form_elements.length
;
i
+=
1)
{\n
selected_uid_query
+=
hide_form_elements[i].parentElement.getAttribute("value");\n
query_list.push(new
SimpleQuery({\n
hide_form_elements[i].parentElement.removeChild(hide_form_elements[i]);\n
key:
"catalog.uid",\n
if
(i
!==
hide_form_elements.length
-
1)
{\n
type:
"simple",\n
selected_uid_query
+=
",
";\n
value:
hide_form_elements[i].parentElement.getAttribute("value")\n
}
else
{\n
}));\n
selected_uid_query
+=
")";\n
}\n
}\n
}\n
\n
selected_uid_query =
new
ComplexQuery({\n
operator:
"OR",\n
query_list:
query_list,\n
type:
"complex"\n
});\n
\n
\n
hide_form_elements =
gadget.props.element.querySelectorAll(".hide_form_element");\n
hide_form_elements =
gadget.props.element.querySelectorAll(".hide_form_element");\n
for
(
i =
0;
i
<
hide_form_elements.length;
i
+=
1)
{\n
for
(
i =
0;
i
<
hide_form_elements.length;
i
+=
1)
{\n
...
@@ -536,7 +540,7 @@
...
@@ -536,7 +540,7 @@
"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
"sort_list":
gadget.props.sort_list
||
"",\n
"sort_list":
gadget.props.sort_list
||
"",\n
"hide_item":
selected_uid_query
});\n
"hide_item":
Query.objectToSearchText(selected_uid_query)
});\n
}\n
}\n
\n
\n
hide_show_all.setAttribute("type",
"submit");\n
hide_show_all.setAttribute("type",
"submit");\n
...
@@ -747,7 +751,7 @@
...
@@ -747,7 +751,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -765,7 +769,7 @@
...
@@ -765,7 +769,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1443
190830.65
</float>
<float>
1443
430519.63
</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