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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
7271e12e
Commit
7271e12e
authored
Oct 10, 2017
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: mappingstorage: save filename
parent
f63ffb28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_mappingstorage_js.js
...PathTemplateItem/web_page_module/jio_mappingstorage_js.js
+18
-6
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/jio_mappingstorage_js.js
View file @
7271e12e
...
...
@@ -391,13 +391,25 @@
&&
mapping_dict
[
attachment_id
]
!==
undefined
&&
mapping_dict
[
attachment_id
].
put
!==
undefined
&&
mapping_dict
[
attachment_id
].
put
.
erp5_put_template
!==
undefined
)
{
return
getSubStorageId
(
storage
,
id
)
.
push
(
function
(
sub_id
)
{
var
url
=
UriTemplate
.
parse
(
mapping_dict
[
attachment_id
].
put
.
erp5_put_template
).
expand
({
id
:
sub_id
}),
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
getSubStorageId
(
storage
,
id
),
storage
.
get
(
id
)
]);
})
.
push
(
function
(
result
)
{
var
sub_id
=
result
[
0
],
doc
=
result
[
1
],
url
=
UriTemplate
.
parse
(
mapping_dict
[
attachment_id
].
put
.
erp5_put_template
).
expand
({
id
:
sub_id
}),
data
=
new
FormData
();
data
.
append
(
"
field_my_file
"
,
blob
);
if
(
doc
.
filename
)
{
data
.
append
(
"
field_my_file
"
,
blob
,
doc
.
filename
);
}
else
{
data
.
append
(
"
field_my_file
"
,
blob
);
}
data
.
append
(
"
form_id
"
,
"
File_view
"
);
return
jIO
.
util
.
ajax
({
"
type
"
:
"
POST
"
,
...
...
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