Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
jio-main
Commits
cc570aac
Commit
cc570aac
authored
Jan 16, 2015
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop not used code.
parent
cd8b24dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
35 deletions
+0
-35
src/jio.storage/erp5storage.js
src/jio.storage/erp5storage.js
+0
-35
No files found.
src/jio.storage/erp5storage.js
View file @
cc570aac
...
...
@@ -77,41 +77,6 @@
});
};
ERP5Storage
.
prototype
.
post
=
function
(
metadata
,
options
)
{
var
final_response
,
context
=
this
;
return
getSiteDocument
(
this
)
.
push
(
function
(
site_hal
)
{
var
post_action
=
site_hal
.
_actions
.
add
,
data
=
new
FormData
();
data
.
append
(
"
portal_type
"
,
metadata
.
portal_type
);
return
jIO
.
util
.
ajax
({
"
type
"
:
post_action
.
method
,
"
url
"
:
post_action
.
href
,
"
data
"
:
data
,
"
xhrFields
"
:
{
withCredentials
:
true
}
});
})
.
push
(
function
(
event
)
{
if
(
!
metadata
.
_id
)
{
// XXX Really depend on server response...
var
uri
=
new
URI
(
event
.
target
.
getResponseHeader
(
"
X-Location
"
));
final_response
=
uri
.
segment
(
2
);
metadata
.
_id
=
final_response
;
}
})
.
push
(
function
()
{
return
context
.
put
(
metadata
,
options
);
})
.
push
(
function
()
{
return
final_response
;
});
};
ERP5Storage
.
prototype
.
put
=
function
(
metadata
,
options
)
{
return
getDocumentAndHateoas
(
this
,
metadata
,
options
)
.
push
(
function
(
result
)
{
...
...
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