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
Lukas Niegsch
erp5
Commits
654b5a49
Commit
654b5a49
authored
Oct 31, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Form view: use getUrlForList
parent
e4eacdcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
38 deletions
+42
-38
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
+40
-36
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
View file @
654b5a49
...
...
@@ -29,7 +29,7 @@
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
List
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
'
isDesktopMedia
'
,
'
isDesktopMedia
'
)
.
declareAcquiredMethod
(
'
getUrlParameter
'
,
'
getUrlParameter
'
)
...
...
@@ -98,49 +98,53 @@
return
embedded_form_gadget
.
render
(
form_options
);
})
// 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
"
}},
{
command
:
'
change
'
,
options
:
{
editable
:
true
}}
];
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
:
{
editable
:
true
}}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
page
:
"
action
"
}}),
gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_previous
'
}),
gadget
.
getUrlFor
({
command
:
'
selection_next
'
}),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
page
:
"
tab
"
}}),
(
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
"
}})
:
""
,
calculatePageTitle
(
gadget
,
gadget
.
state
.
erp5_document
),
gadget
.
isDesktopMedia
(),
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
.
getUrlParameter
(
'
selection_index
'
)
gadget
.
getUrlParameter
(
'
selection_index
'
),
gadget
.
getUrlForList
(
url_for_parameter_list
)
]);
})
.
push
(
function
(
all_result
)
{
var
options
=
{
edit_url
:
all_result
[
0
],
actions_url
:
all_result
[
1
],
selection_url
:
all_result
[
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
:
all_result
[
10
]
?
all_result
[
3
]
:
''
,
next_url
:
all_result
[
10
]
?
all_result
[
4
]
:
''
,
tab_url
:
all_result
[
5
],
export_url
:
all_result
[
6
],
page_title
:
all_result
[
7
]
},
is_desktop
=
all_result
[
8
];
if
(
is_desktop
)
{
options
.
add_url
=
all_result
[
9
];
.
push
(
function
(
result_list
)
{
var
url_list
=
result_list
[
3
],
header_dict
=
{
edit_url
:
url_list
[
6
],
tab_url
:
url_list
[
0
],
actions_url
:
url_list
[
1
],
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
]
:
''
,
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
(
result_list
[
1
])
{
header_dict
.
add_url
=
url_list
[
7
]
||
''
;
}
return
gadget
.
updateHeader
(
options
);
return
gadget
.
updateHeader
(
header_dict
);
});
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
View file @
654b5a49
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
67.44748.35225.610
9
</string>
</value>
<value>
<string>
9
71.20608.16074.3624
9
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
15
36323414.72
</float>
<float>
15
41766962.45
</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