Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
ece651db
Commit
ece651db
authored
Apr 14, 2015
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unionStorage: add support for attachments
parent
9273600e
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
458 additions
and
5 deletions
+458
-5
src/jio.storage/unionstorage.js
src/jio.storage/unionstorage.js
+30
-0
test/jio.storage/unionstorage.tests.js
test/jio.storage/unionstorage.tests.js
+428
-5
No files found.
src/jio.storage/unionstorage.js
View file @
ece651db
...
...
@@ -211,6 +211,36 @@
return
RSVP
.
all
(
promise_list
);
};
UnionStorage
.
prototype
.
getAttachment
=
function
()
{
var
argument_list
=
arguments
,
context
=
this
;
return
this
.
_getWithStorageIndex
.
apply
(
this
,
arguments
)
.
push
(
function
(
result
)
{
var
sub_storage
=
context
.
_storage_list
[
result
[
0
]];
return
sub_storage
.
getAttachment
.
apply
(
sub_storage
,
argument_list
);
});
};
UnionStorage
.
prototype
.
putAttachment
=
function
()
{
var
argument_list
=
arguments
,
context
=
this
;
return
this
.
_getWithStorageIndex
.
apply
(
this
,
arguments
)
.
push
(
function
(
result
)
{
var
sub_storage
=
context
.
_storage_list
[
result
[
0
]];
return
sub_storage
.
putAttachment
.
apply
(
sub_storage
,
argument_list
);
});
};
UnionStorage
.
prototype
.
removeAttachment
=
function
()
{
var
argument_list
=
arguments
,
context
=
this
;
return
this
.
_getWithStorageIndex
.
apply
(
this
,
arguments
)
.
push
(
function
(
result
)
{
var
sub_storage
=
context
.
_storage_list
[
result
[
0
]];
return
sub_storage
.
removeAttachment
.
apply
(
sub_storage
,
argument_list
);
});
};
jIO
.
addStorage
(
'
union
'
,
UnionStorage
);
}(
jIO
,
RSVP
));
test/jio.storage/unionstorage.tests.js
View file @
ece651db
This diff is collapsed.
Click to expand it.
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