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
Labels
Merge Requests
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
cd369929
Commit
cd369929
authored
Jan 26, 2022
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: fix navigation after move back to graphic
parent
41b64275
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
34 deletions
+44
-34
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
...emplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
+5
-5
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
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
+3
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.js
...ateItem/web_page_module/rjs_gadget_erp5_searchfield_js.js
+15
-14
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
...teItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
...PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
+13
-6
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_erp5_listbox_js.js
View file @
cd369929
...
...
@@ -1203,16 +1203,16 @@
}
if
(
gadget
.
state
.
option_list
.
length
>
0
&&
gadget
.
state
.
enable_graphic
)
{
if
(
gadget
.
state
.
enable_graphic
)
{
domsugar
(
gadget
.
element
.
querySelector
(
"
.graphic_section
"
),
[
domsugar
(
"
div
"
,
{
"
class
"
:
"
graphic_area
"
})
]);
}
}
});
});
if
(
gadget
.
state
.
enable_graphic
&&
gadget
.
state
.
graphic_type
&&
!
gadget
.
state
.
extended_search
&&
gadget
.
state
.
option_list
.
length
>
0
&&
gadget
.
state
.
graphic_type
!==
""
)
{
result_queue
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
cd369929
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
997.49
449.8762.59733
</string>
</value>
<value>
<string>
997.49
726.7840.16145
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>
1643
148086.35
</float>
<float>
1643
213057.93
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
View file @
cd369929
...
...
@@ -174,7 +174,7 @@
return
RSVP
.
all
([
form_gadget
.
getDeclaredGadget
(
"
erp5_searchfield
"
),
erp5_form
.
getGraphicType
()
])
])
;
})
.
push
(
function
(
result_list
)
{
var
search_gadget
=
result_list
[
0
],
...
...
@@ -190,6 +190,7 @@
}
search_options
.
graphic_type
=
result_list
[
1
];
search_options
.
jio_key
=
form_gadget
.
state
.
jio_key
;
return
search_gadget
.
render
(
search_options
);
})
...
...
@@ -323,6 +324,7 @@
return
gadget
.
renderEditorPanel
(
"
gadget_erp5_graphic_editor.html
"
,
{
graphic_option_list
:
result_dict
.
graphic_option_list
,
jio_key
:
gadget
.
state
.
jio_key
,
graphic_type
:
result_list
[
1
]
});
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
View file @
cd369929
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
997.
49226.31411.58880
</string>
</value>
<value>
<string>
997.
50436.16456.55552
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1643
150091.84
</float>
<float>
1643
208720.28
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.js
View file @
cd369929
...
...
@@ -33,7 +33,8 @@
var
state_dict
=
{
extended_search
:
options
.
extended_search
||
""
,
enable_graphic
:
options
.
enable_graphic
||
false
,
graphic_type
:
options
.
graphic_type
graphic_type
:
options
.
graphic_type
,
jio_key
:
options
.
jio_key
};
return
this
.
changeState
(
state_dict
);
})
...
...
@@ -45,7 +46,7 @@
len
,
button_container
=
gadget
.
element
.
querySelector
(
'
div.search_parsed_value
'
),
button_graphic
=
gadget
.
element
.
querySelector
(
"
.graphic-button
"
),
select
_button_graphic
=
gadget
.
element
.
querySelector
(
"
.change-graphic-button
"
),
change
_button_graphic
=
gadget
.
element
.
querySelector
(
"
.change-graphic-button
"
),
graphic_css_class
=
"
ui-screen-hidden
"
,
button
,
operator
=
'
AND
'
,
...
...
@@ -59,15 +60,15 @@
continue_full_text_query_search
=
true
;
if
(
gadget
.
state
.
extended_search
)
{
console
.
log
(
modification_dict
);
if
(
modification_dict
.
enable_graphic
&&
modification_dict
.
graphic_type
&&
button_graphic
)
{
button_graphic
.
classList
.
add
(
graphic_css_class
);
select_button_graphic
.
classList
.
remove
(
graphic_css_class
);
modification_dict
.
extended_search
&&
modification_dict
.
graphic_type
)
{
button_graphic
.
classList
.
remove
(
graphic_css_class
);
change_button_graphic
.
classList
.
add
(
graphic_css_class
);
}
else
{
button_graphic
.
classList
.
remove
(
graphic_css_class
);
select
_button_graphic
.
classList
.
add
(
graphic_css_class
);
change
_button_graphic
.
classList
.
add
(
graphic_css_class
);
}
// Parse the raw query
...
...
@@ -130,13 +131,13 @@
button_graphic
&&
!
button_graphic
.
classList
.
contains
(
graphic_css_class
))
{
button_graphic
.
classList
.
add
(
graphic_css_class
);
select
_button_graphic
.
classList
.
remove
(
graphic_css_class
);
}
else
if
(
select
_button_graphic
&&
change
_button_graphic
.
classList
.
remove
(
graphic_css_class
);
}
else
if
(
change
_button_graphic
&&
modification_dict
.
enable_graphic
&&
!
modification_dict
.
extended_search
){
select
_button_graphic
.
classList
.
remove
(
graphic_css_class
);
change
_button_graphic
.
classList
.
remove
(
graphic_css_class
);
}
console
.
log
(
modification_dict
);
button_container
.
innerHTML
=
''
;
len
=
query_text_list
.
length
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
...
...
@@ -262,15 +263,15 @@
return
this
.
triggerSubmit
({
focus_on
:
parseInt
(
evt
.
target
.
value
,
10
)});
}
else
if
(
evt
.
target
.
classList
.
contains
(
"
graphic-button
"
))
{
return
gadget
.
redirect
({
command
:
"
store_and_change
"
,
command
:
"
display_with_history
"
,
options
:
{
jio_key
:
gadget
.
state
.
jio_key
,
graphic_type
:
gadget
.
state
.
graphic_type
}
});
}
else
if
(
evt
.
target
.
classList
.
contains
(
"
change-graphic-button
"
))
{
return
gadget
.
triggerListboxGraphicSelection
();
}
}
},
false
,
false
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
View file @
cd369929
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
997.
49459.47071.9267
</string>
</value>
<value>
<string>
997.
50526.4785.59750
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1643
150086.6
</float>
<float>
1643
213115.75
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.js
View file @
cd369929
...
...
@@ -16,14 +16,21 @@
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
allowPublicAcquisition
(
"
chartItemClick
"
,
function
(
params
)
{
var
gadget
=
this
;
return
gadget
.
getSearchCriteria
(
params
[
0
][
0
],
params
[
0
][
1
])
.
push
(
function
(
result
)
{
return
new
RSVP
.
Queue
(
RSVP
.
all
([
gadget
.
getSearchCriteria
(
params
[
0
][
0
],
params
[
0
][
1
]),
gadget
.
getUrlParameter
(
"
graphic_type
"
)
]))
.
push
(
function
(
result_list
)
{
var
options
=
{
extended_search
:
result_list
[
0
],
jio_key
:
gadget
.
state
.
jio_key
}
if
(
result_list
[
1
])
{
options
.
graphic_type
=
result_list
[
1
];
}
return
gadget
.
redirect
({
command
:
'
display_with_history
'
,
options
:
{
jio_key
:
gadget
.
state
.
jio_key
,
extended_search
:
result
}
options
:
options
});
});
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_graphic_js.xml
View file @
cd369929
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
997.
48057.37984.27733
</string>
</value>
<value>
<string>
997.
50503.16089.7338
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
1643
148004.23
</float>
<float>
1643
211674.58
</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