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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
4a81afaf
Commit
4a81afaf
authored
Sep 22, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: don't create SimpleQuery for empty value
parent
5bd1ad6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
...eItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
+22
-12
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_filtereditor_js.xml
View file @
4a81afaf
...
@@ -133,6 +133,7 @@
...
@@ -133,6 +133,7 @@
operator,\n
operator,\n
query,\n
query,\n
value,\n
value,\n
key,\n
simple_query_list = [],\n
simple_query_list = [],\n
complex_query,\n
complex_query,\n
select,\n
select,\n
...
@@ -143,24 +144,33 @@
...
@@ -143,24 +144,33 @@
//build simple&complex query\n
//build simple&complex query\n
for (i = 0; i < filterforms.length; i += 1) {\n
for (i = 0; i < filterforms.length; i += 1) {\n
value = filterforms[i][2].value;\n
value = filterforms[i][2].value;\n
if (value !== "") {\n
select = filterforms[i][1][filterforms[i][1].selectedIndex].value;\n
select = filterforms[i][1][filterforms[i][1].selectedIndex].value;\n
if (select === "keyword") {\n
if (select === "keyword") {\n
value = "%" + value + "%";\n
value = "%" + value + "%";\n
}\n
}\n
\n
if (filterforms[i][0][filterforms[i][0].selectedIndex].value === "Searchable Text") {\n
simple_query_list.push(new SimpleQuery({key: filterforms[i][0][filterforms[i][0].selectedIndex].value,\n
key = "";\n
} else {\n
key = filterforms[i][0][filterforms[i][0].selectedIndex].value;\n
}\n
simple_query_list.push(new SimpleQuery({\n
key: key,\n
type: "simple",\n
type: "simple",\n
value: value}));\n
value: value}));\n
}\n
}\n
}\n
\n
\n
if (gadget.props.tree_path[0] !== "--") {\n
if (gadget.props.tree_path[0] !== "--") {\n
value = "";\n
value = "";\n
for (i = 0; i < gadget.props.tree_path.length; i += 1) {\n
for (i = 0; i < gadget.props.tree_path.length; i += 1) {\n
if (gadget.props.tree_path[i] !== "--") {\n
if (i !== 0) {\n
if (i !== 0) {\n
value += "/";\n
value += "/";\n
}\n
}\n
value += gadget.props.tree_path[i];\n
value += gadget.props.tree_path[i];\n
}\n
}\n
}\n
simple_query_list.push(new SimpleQuery({key: "Domain",\n
simple_query_list.push(new SimpleQuery({key: "Domain",\n
type: "simple",\n
type: "simple",\n
value: value}));\n
value: value}));\n
...
@@ -697,7 +707,7 @@
...
@@ -697,7 +707,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
945.59
775.20113.30310
</string>
</value>
<value>
<string>
945.59
871.22998.37307
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -715,7 +725,7 @@
...
@@ -715,7 +725,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
14429
24165.3
</float>
<float>
14429
30119.85
</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