Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Mynij-test
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
Mynij
Mynij-test
Commits
131452c4
Commit
131452c4
authored
May 28, 2019
by
Alexandra Rogova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
union storage test
parent
f8e8422e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
4 deletions
+51
-4
jio-parser-test.html
jio-parser-test.html
+2
-1
jio-parser-test.js
jio-parser-test.js
+49
-3
No files found.
jio-parser-test.html
View file @
131452c4
...
...
@@ -2,10 +2,11 @@
<html>
<head>
<title>
Jio parser test
</title>
<script
src=
"../jio/external/rsvp-2.0.4.js"
></script>
<script
src=
"../jio/external/rsvp-2.0.4.js"
></script>
<script
src=
"../jio/dist/jio-latest.js"
></script>
<script
src=
"../renderjs/dist/renderjs-latest.js"
></script>
<script
src=
"jio.my_parser_storage.js"
></script>
<script
src=
"jio.my_union_storage.js"
></script>
<script
src=
"jio-parser-test.js"
></script>
</head>
<body>
...
...
jio-parser-test.js
View file @
131452c4
...
...
@@ -8,7 +8,7 @@
.
ready
(
function
(){
var
gadget
=
this
;
gadget
.
test_storage
=
jIO
.
createJIO
(
{
var
tmp
=
{
type
:
"
my_parser
"
,
document_id
:
"
doc_id
"
,
attachment_id
:
"
att_id
"
,
...
...
@@ -17,9 +17,55 @@
type
:
"
indexeddb
"
,
database
:
"
test
"
}
}
gadget
.
test_storage_1
=
jIO
.
createJIO
(
tmp
);
gadget
.
test_storage_2
=
jIO
.
createJIO
({
type
:
"
my_parser
"
,
document_id
:
"
doc_id
"
,
attachment_id
:
"
att2_id
"
,
parser
:
"
rss
"
,
sub_storage
:
{
type
:
"
indexeddb
"
,
database
:
"
test
"
}
});
gadget
.
union_test
=
jIO
.
createJIO
({
type
:
'
union
'
,
"
storage_list
"
:
[
tmp
]
});
return
gadget
.
test_storage
.
put
(
"
doc_id
"
,
{})
console
.
log
(
gadget
.
union_test
);
console
.
log
(
gadget
.
union_test
.
addSubStorage
);
/*return gadget.test_storage_1.put("doc_id", {})
.push(function(){
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.status == 200 && xmlhttp.readyState == 4){
return gadget.test_storage_1.putAttachment("doc_id", "att_id", new Blob([xmlhttp.responseText], {type: "text/xml"}))
.push (function(){
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.status == 200 && xmlhttp.readyState == 4){
return gadget.test_storage_2.putAttachment("doc_id", "att2_id", new Blob([xmlhttp.responseText], {type: "text/xml"}));
}
}
xmlhttp.open("GET", "./test-files/allemandfacile.rss", true);
xmlhttp.send();
})
}
}
xmlhttp.open("GET", "./test-files/vivelessvt.rss", true);
xmlhttp.send();
});*/
/*return gadget.test_storage_1.put("doc_id", {})
.push (function(){
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
...
...
@@ -49,7 +95,7 @@
}
xmlhttp.open("GET", "./test-files/vivelessvt.rss", true);
xmlhttp.send();
});
});
*/
});
}(
window
,
RSVP
,
rJS
,
jIO
));
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