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
Paul Graydon
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 @@
...
@@ -29,7 +29,7 @@
// Acquired methods
// Acquired methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
getUrlFor
List
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
'
isDesktopMedia
'
,
'
isDesktopMedia
'
)
.
declareAcquiredMethod
(
'
isDesktopMedia
'
,
'
isDesktopMedia
'
)
.
declareAcquiredMethod
(
'
getUrlParameter
'
,
'
getUrlParameter
'
)
.
declareAcquiredMethod
(
'
getUrlParameter
'
,
'
getUrlParameter
'
)
...
@@ -98,49 +98,53 @@
...
@@ -98,49 +98,53 @@
return
embedded_form_gadget
.
render
(
form_options
);
return
embedded_form_gadget
.
render
(
form_options
);
})
})
// render the header
// render the header
.
push
(
function
()
{
.
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
([
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
),
calculatePageTitle
(
gadget
,
gadget
.
state
.
erp5_document
),
gadget
.
isDesktopMedia
(),
gadget
.
isDesktopMedia
(),
gadget
.
state
.
erp5_document
.
_links
.
action_object_new_content_action
?
gadget
.
getUrlParameter
(
'
selection_index
'
),
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
gadget
.
getUrlForList
(
url_for_parameter_list
)
view
:
gadget
.
state
.
erp5_document
.
_links
.
action_object_new_content_action
.
href
,
editable
:
true
}})
:
""
,
gadget
.
getUrlParameter
(
'
selection_index
'
)
]);
]);
})
})
.
push
(
function
(
all_result
)
{
.
push
(
function
(
result_list
)
{
var
options
=
{
var
url_list
=
result_list
[
3
],
edit_url
:
all_result
[
0
],
header_dict
=
{
actions_url
:
all_result
[
1
],
edit_url
:
url_list
[
6
],
selection_url
:
all_result
[
2
],
tab_url
:
url_list
[
0
],
// Only display previous/next links if url has a selection_index,
actions_url
:
url_list
[
1
],
// ie, if we can paginate the result list of the search
export_url
:
(
previous_url
:
all_result
[
10
]
?
all_result
[
3
]
:
''
,
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_report
||
next_url
:
all_result
[
10
]
?
all_result
[
4
]
:
''
,
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_exchange
||
tab_url
:
all_result
[
5
],
gadget
.
state
.
erp5_document
.
_links
.
action_object_jio_print
export_url
:
all_result
[
6
],
)
?
url_list
[
5
]
:
''
,
page_title
:
all_result
[
7
]
selection_url
:
url_list
[
2
],
},
// Only display previous/next links if url has a selection_index,
is_desktop
=
all_result
[
8
];
// ie, if we can paginate the result list of the search
if
(
is_desktop
)
{
previous_url
:
result_list
[
2
]
?
url_list
[
3
]
:
''
,
options
.
add_url
=
all_result
[
9
];
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 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
36323414.72
</float>
<float>
15
41766962.45
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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