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
Alexander Emmerich
erp5
Commits
df18d3ad
Commit
df18d3ad
authored
Jun 30, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_support_request_ui: Simplify code to get always the first action of the list
parent
49caf172
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
30 deletions
+13
-30
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_js.js
...dule/gadget_supportrequest_pt_form_view_discussable_js.js
+10
-27
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_js.xml
...ule/gadget_supportrequest_pt_form_view_discussable_js.xml
+3
-3
No files found.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_js.js
View file @
df18d3ad
...
...
@@ -24,30 +24,21 @@
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
getImageUrl
'
,
function
(
raw_url
)
{
var
gadget
=
this
;
return
gadget
.
jio_getAttachment
(
raw_url
,
"
links
"
)
.
push
(
function
(
links
)
{
var
full_size_url
=
links
.
_links
.
view
[
1
].
href
;
return
gadget
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
jio_key
:
"
image_module
"
,
view
:
full_size_url
}
});
});
})
.
declareMethod
(
'
getDocumentUrl
'
,
function
(
raw_url
)
{
var
gadget
=
this
;
return
gadget
.
jio_getAttachment
(
raw_url
,
"
links
"
)
.
push
(
function
(
links
)
{
var
full_size_url
=
links
.
_links
.
view
[
4
].
href
;
var
jio_key
;
if
(
raw_url
.
indexOf
(
"
image_module
"
)
!==
-
1
)
{
jio_key
=
"
image_module
"
;
}
else
{
jio_key
=
"
document_module
"
;
}
return
gadget
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
jio_key
:
"
document_module
"
,
view
:
full_size_url
jio_key
:
jio_key
,
view
:
links
.
_links
.
view
[
0
].
href
}
});
});
...
...
@@ -175,14 +166,6 @@
if
(
post
.
attachment_link
===
null
)
{
return
post
;
}
if
(
post
.
attachment_link
.
indexOf
(
"
image_module
"
)
!==
-
1
)
{
return
gadget
.
getImageUrl
(
post
.
attachment_link
).
push
(
function
(
attachment_link
)
{
post
.
attachment_link
=
attachment_link
;
return
post
;
}
);
}
return
gadget
.
getDocumentUrl
(
post
.
attachment_link
).
push
(
function
(
attachment_link
)
{
post
.
attachment_link
=
attachment_link
;
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_js.xml
View file @
df18d3ad
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
62.47417.29437.25668
</string>
</value>
<value>
<string>
9
84.63101.11896.51882
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,8 +256,8 @@
</tuple>
<state>
<tuple>
<float>
15
42273914.05
</float>
<string>
GMT+9
</string>
<float>
15
93630405.16
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
...
...
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