Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
jio
Commits
c636da2f
Commit
c636da2f
authored
Mar 07, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add default view to erp5storage
parent
4130b7af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/jio.storage/erp5storage.js
src/jio.storage/erp5storage.js
+4
-3
No files found.
src/jio.storage/erp5storage.js
View file @
c636da2f
...
@@ -169,6 +169,7 @@
...
@@ -169,6 +169,7 @@
"
which contains more than one character.
"
);
"
which contains more than one character.
"
);
}
}
this
.
_url
=
spec
.
url
;
this
.
_url
=
spec
.
url
;
this
.
_default_view
=
spec
.
default_view
;
}
}
// XXX docstring
// XXX docstring
...
@@ -176,7 +177,7 @@
...
@@ -176,7 +177,7 @@
return
function
(
command
,
param
,
options
)
{
return
function
(
command
,
param
,
options
)
{
RSVP
.
resolve
().
RSVP
.
resolve
().
then
(
function
()
{
then
(
function
()
{
var
view
=
ERP5Storage
.
onView
[
options
.
_view
]
||
var
view
=
ERP5Storage
.
onView
[
options
.
_view
||
this
.
_default_view
]
||
ERP5Storage
.
onView
.
default
;
ERP5Storage
.
onView
.
default
;
if
(
typeof
view
[
method
]
!==
"
function
"
)
{
if
(
typeof
view
[
method
]
!==
"
function
"
)
{
view
=
ERP5Storage
.
onView
.
default
;
view
=
ERP5Storage
.
onView
.
default
;
...
@@ -227,7 +228,7 @@
...
@@ -227,7 +228,7 @@
ERP5Storage
.
onView
.
default
=
{};
ERP5Storage
.
onView
.
default
=
{};
// XXX docstring
// XXX docstring
function
onViewDefaultGet
(
param
)
{
function
onViewDefaultGet
(
param
,
options
)
{
return
getSiteDocument
(
this
.
_url
).
return
getSiteDocument
(
this
.
_url
).
then
(
function
(
site_hal
)
{
then
(
function
(
site_hal
)
{
return
jIO
.
util
.
ajax
({
return
jIO
.
util
.
ajax
({
...
@@ -235,7 +236,7 @@
...
@@ -235,7 +236,7 @@
"
url
"
:
UriTemplate
.
parse
(
site_hal
.
_links
.
traverse
.
href
)
"
url
"
:
UriTemplate
.
parse
(
site_hal
.
_links
.
traverse
.
href
)
.
expand
({
.
expand
({
relative_url
:
param
.
_id
,
relative_url
:
param
.
_id
,
view
:
"
metadata
"
view
:
options
.
_view
||
"
view
"
}),
}),
"
xhrFields
"
:
{
"
xhrFields
"
:
{
withCredentials
:
true
withCredentials
:
true
...
...
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