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
alecs_myu
erp5
Commits
90e26225
Commit
90e26225
authored
Oct 31, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Form view editable: use getUrlForList
parent
abc8008c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
35 deletions
+38
-35
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
...b_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
+36
-33
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
..._page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
View file @
90e26225
...
...
@@ -6,7 +6,7 @@
rJS
(
window
)
.
declareAcquiredMethod
(
"
submitContent
"
,
"
submitContent
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
List
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
...
...
@@ -79,46 +79,49 @@
// render the header
.
push
(
function
()
{
var
url_for_parameter_list
=
[
{
command
:
'
change
'
,
options
:
{
page
:
"
tab
"
}},
{
command
:
'
change
'
,
options
:
{
page
:
"
action
"
}},
{
command
:
'
history_previous
'
},
{
command
:
'
selection_previous
'
},
{
command
:
'
selection_next
'
},
{
command
:
'
change
'
,
options
:
{
page
:
"
export
"
}}
];
if
(
gadget
.
state
.
erp5_document
.
_links
.
action_object_new_content_action
)
{
url_for_parameter_list
.
push
({
command
:
'
change
'
,
options
:
{
view
:
gadget
.
state
.
erp5_document
.
_links
.
action_object_new_content_action
.
href
,
editable
:
true
}});
}
return
RSVP
.
all
([
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
page
:
"
tab
"
}}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
page
:
"
action
"
}}),
gadget
.
state
.
erp5_document
.
_links
.
action_object_new_content_action
?
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
view
:
gadget
.
state
.
erp5_document
.
_links
.
action_object_new_content_action
.
href
,
editable
:
true
}})
:
""
,
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
calculatePageTitle
(
gadget
,
gadget
.
state
.
erp5_document
),
gadget
.
isDesktopMedia
(),
(
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_report
||
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_exchange
||
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_print
)
?
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
page
:
"
export
"
}})
:
""
,
gadget
.
getUrlParameter
(
'
selection_index
'
)
gadget
.
getUrlParameter
(
'
selection_index
'
),
gadget
.
getUrlForList
(
url_for_parameter_list
)
]);
})
.
push
(
function
(
all_resul
t
)
{
var
header_dict
=
{
tab_url
:
all_result
[
0
],
actions_url
:
all_result
[
1
],
add_url
:
all_result
[
2
],
selection_url
:
all_result
[
3
]
,
// Only display previous/next links if url has a selection_index
,
// ie, if we can paginate the result list of the search
previous_url
:
all_result
[
9
]
?
all_result
[
4
]
:
''
,
next_url
:
all_result
[
9
]
?
all_result
[
5
]
:
''
,
page_title
:
all_result
[
6
]
},
is_desktop
=
all_result
[
7
]
;
.
push
(
function
(
result_lis
t
)
{
var
url_list
=
result_list
[
3
],
header_dict
=
{
tab_url
:
url_list
[
0
],
actions_url
:
url_list
[
1
],
add_url
:
url_list
[
6
]
||
''
,
selection_url
:
url_list
[
2
]
,
// Only display previous/next links if url has a selection_index,
// ie, if we can paginate the result list of the search
previous_url
:
result_list
[
2
]
?
url_list
[
3
]
:
''
,
next_url
:
result_list
[
2
]
?
url_list
[
4
]
:
''
,
page_title
:
result_list
[
0
]
}
;
if
(
gadget
.
state
.
save_action
===
true
)
{
header_dict
.
save_action
=
true
;
}
if
(
is_desktop
)
{
header_dict
.
export_url
=
all_result
[
8
];
if
(
result_list
[
1
])
{
header_dict
.
export_url
=
(
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_report
||
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_exchange
||
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_print
)
?
url_list
[
5
]
:
''
;
}
return
gadget
.
updateHeader
(
header_dict
);
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
View file @
90e26225
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
971.
7721.48108.61320
</string>
</value>
<value>
<string>
971.
20564.48309.33399
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
154099
1725.13
</float>
<float>
154099
5384.96
</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