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
Mikolaï Krol
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
Hide 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 @@
operator,\n
query,\n
value,\n
key,\n
simple_query_list = [],\n
complex_query,\n
select,\n
...
...
@@ -143,23 +144,32 @@
//build simple&complex query\n
for (i = 0; i < filterforms.length; i += 1) {\n
value = filterforms[i][2].value;\n
select = filterforms[i][1][filterforms[i][1].selectedIndex].value;\n
if (select === "keyword") {\n
value = "%" + value + "%";\n
if (value !== "") {\n
select = filterforms[i][1][filterforms[i][1].selectedIndex].value;\n
if (select === "keyword") {\n
value = "%" + value + "%";\n
}\n
if (filterforms[i][0][filterforms[i][0].selectedIndex].value === "Searchable Text") {\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
value: value}));\n
}\n
\n
simple_query_list.push(new SimpleQuery({key: filterforms[i][0][filterforms[i][0].selectedIndex].value,\n
type: "simple",\n
value: value}));\n
}\n
\n
if (gadget.props.tree_path[0] !== "--") {\n
value = "";\n
for (i = 0; i < gadget.props.tree_path.length; i += 1) {\n
if (i !== 0) {\n
value += "/";\n
if (gadget.props.tree_path[i] !== "--") {\n
if (i !== 0) {\n
value += "/";\n
}\n
value += gadget.props.tree_path[i];\n
}\n
value += gadget.props.tree_path[i];\n
}\n
simple_query_list.push(new SimpleQuery({key: "Domain",\n
type: "simple",\n
...
...
@@ -697,7 +707,7 @@
</item>
<item>
<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>
<key>
<string>
state
</string>
</key>
...
...
@@ -715,7 +725,7 @@
</tuple>
<state>
<tuple>
<float>
14429
24165.3
</float>
<float>
14429
30119.85
</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