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
Levin Zimmermann
erp5
Commits
a3fc5406
Commit
a3fc5406
authored
Jan 12, 2022
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: fix code to support cases of queries with two parameters
parent
1567b352
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
12 deletions
+31
-12
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
...PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
+29
-10
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
...athTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
View file @
a3fc5406
...
...
@@ -27,22 +27,35 @@
});
})
.
declareMethod
(
'
getSearchCriteria
'
,
function
(
a
,
b
)
{
var
key
,
value
;
if
(
this
.
state
.
extended_search_mapping
.
hasOwnProperty
(
b
))
{
var
key
,
value
,
query
;
if
(
this
.
state
.
extended_search_mapping
.
hasOwnProperty
(
a
)
&&
this
.
state
.
extended_search_mapping
.
hasOwnProperty
(
b
))
{
query
=
new
ComplexQuery
({
operator
:
"
AND
"
,
type
:
"
complex
"
,
query_list
:
[
new
SimpleQuery
({
operator
:
""
,
key
:
this
.
state
.
extended_search_mapping
[
a
].
key
,
type
:
"
simple
"
,
value
:
this
.
state
.
extended_search_mapping
[
a
].
value
}),
new
SimpleQuery
({
operator
:
""
,
key
:
this
.
state
.
extended_search_mapping
[
b
].
key
,
type
:
"
simple
"
,
value
:
this
.
state
.
extended_search_mapping
[
b
].
value
})
]
});
}
else
if
(
this
.
state
.
extended_search_mapping
.
hasOwnProperty
(
b
))
{
key
=
this
.
state
.
extended_search_mapping
[
b
].
value
;
value
=
a
;
}
else
{
key
=
this
.
state
.
extended_search_mapping
[
a
].
key
;
value
=
this
.
state
.
extended_search_mapping
[
a
].
value
;
}
return
Query
.
objectToSearchText
(
new
SimpleQuery
({
operator
:
""
,
key
:
key
,
type
:
"
simple
"
,
value
:
value
})
);
return
Query
.
objectToSearchText
(
query
);
})
/////////////////////////////////////////////////////////////////
// declared methods
...
...
@@ -187,6 +200,7 @@
"
select_list
"
:
select_list
};
}
return
gadget
.
getUrlParameter
(
'
extended_search
'
)
.
push
(
function
(
extended_search
)
{
if
(
extended_search
)
{
...
...
@@ -310,6 +324,11 @@
data_mapping
[
label_list
[
i
-
1
]][
state
]
=
result_list
[
i
].
data
.
rows
[
j
].
value
[
gadget
.
state
.
y
];
}
// Can I change state here?
gadget
.
state
.
extended_search_mapping
[
state
]
=
{
key
:
gadget
.
state
.
x
,
value
:
state
};
if
(
state_list
.
indexOf
(
state
)
===
-
1
)
{
state_list
.
push
(
state
);
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
View file @
a3fc5406
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
997.299
49.14410.11229
</string>
</value>
<value>
<string>
997.299
83.5320.38758
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
16419
79761.56
</float>
<float>
16419
80191.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