Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
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
Stefane Fermigier
jio
Commits
8a2bae4a
Commit
8a2bae4a
authored
Feb 22, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Storage: drop usage of deprecated _id property
parent
6bc97e8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
28 deletions
+1
-28
src/jio.storage/erp5storage.js
src/jio.storage/erp5storage.js
+1
-26
test/jio.storage/erp5storage.tests.js
test/jio.storage/erp5storage.tests.js
+0
-2
No files found.
src/jio.storage/erp5storage.js
View file @
8a2bae4a
...
...
@@ -311,7 +311,6 @@
{
"
_view
"
:
this
.
_default_view_reference
})
.
push
(
function
(
response
)
{
var
result
=
JSON
.
parse
(
response
.
target
.
responseText
);
result
.
_id
=
id
;
result
.
portal_type
=
result
.
_links
.
type
.
name
;
// Remove all ERP5 hateoas links / convert them into jIO ID
...
...
@@ -371,34 +370,10 @@
return
jIO
.
util
.
ajax
(
request_options
);
})
.
push
(
function
(
evt
)
{
var
content_type
=
evt
.
target
.
getResponseHeader
(
"
Content-Type
"
);
if
(
content_type
===
"
application/json
"
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
if
(
evt
.
target
.
responseText
===
undefined
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
jIO
.
util
.
readBlobAsText
(
evt
.
target
.
response
);
})
.
push
(
function
(
evt
)
{
return
evt
.
target
.
result
;
});
}
return
evt
.
target
.
responseText
;
})
.
push
(
function
(
response_text
)
{
var
result
=
JSON
.
parse
(
response_text
);
result
.
_id
=
id
;
return
new
Blob
(
[
JSON
.
stringify
(
result
)],
{
"
type
"
:
content_type
}
);
});
}
if
(
evt
.
target
.
response
===
undefined
)
{
return
new
Blob
(
[
evt
.
target
.
responseText
],
{
"
type
"
:
content_type
}
{
"
type
"
:
evt
.
target
.
getResponseHeader
(
"
Content-Type
"
)
}
);
}
return
evt
.
target
.
response
;
...
...
test/jio.storage/erp5storage.tests.js
View file @
8a2bae4a
...
...
@@ -744,7 +744,6 @@
})
.
then
(
function
(
result
)
{
var
expected
=
JSON
.
parse
(
document_hateoas
);
expected
.
_id
=
id
;
expected
.
portal_type
=
"
Person
"
;
deepEqual
(
JSON
.
parse
(
result
.
target
.
result
),
expected
,
"
Attachment correctly fetched
"
);
...
...
@@ -905,7 +904,6 @@
})
.
then
(
function
(
result
)
{
var
expected
=
JSON
.
parse
(
document_hateoas
);
expected
.
_id
=
id
;
deepEqual
(
JSON
.
parse
(
result
.
target
.
result
),
expected
,
"
Attachment correctly fetched
"
);
})
...
...
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