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
e9254adc
Commit
e9254adc
authored
May 28, 2019
by
Alexandra Rogova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
custom jio storage
parent
43722c16
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
25 deletions
+21
-25
gadget_parser.js
gadget_parser.js
+0
-1
jio-parser-test.html
jio-parser-test.html
+2
-1
jio-parser-test.js
jio-parser-test.js
+19
-23
No files found.
gadget_parser.js
View file @
e9254adc
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
var
xmlhttp
=
new
XMLHttpRequest
();
var
xmlhttp
=
new
XMLHttpRequest
();
xmlhttp
.
onreadystatechange
=
function
()
{
xmlhttp
.
onreadystatechange
=
function
()
{
if
(
xmlhttp
.
status
==
200
&&
xmlhttp
.
readyState
==
4
)
return
xmlhttp
.
responseText
;
if
(
xmlhttp
.
status
==
200
&&
xmlhttp
.
readyState
==
4
)
return
xmlhttp
.
responseText
;
else
return
null
;
}
}
xmlhttp
.
open
(
"
GET
"
,
link
,
true
);
xmlhttp
.
open
(
"
GET
"
,
link
,
true
);
xmlhttp
.
send
();
xmlhttp
.
send
();
...
...
jio-parser-test.html
View file @
e9254adc
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<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=
"../jio/dist/jio-latest.js"
></script>
<script
src=
"../renderjs/dist/renderjs-latest.js"
></script>
<script
src=
"../renderjs/dist/renderjs-latest.js"
></script>
<script
src=
"jio.my_parser_storage.js"
></script>
<script
src=
"jio-parser-test.js"
></script>
<script
src=
"jio-parser-test.js"
></script>
</head>
</head>
<body>
<body>
...
...
jio-parser-test.js
View file @
e9254adc
...
@@ -7,8 +7,9 @@
...
@@ -7,8 +7,9 @@
.
ready
(
function
(){
.
ready
(
function
(){
var
gadget
=
this
;
var
gadget
=
this
;
gadget
.
test_storage
=
jIO
.
createJIO
({
gadget
.
test_storage
=
jIO
.
createJIO
({
type
:
"
parser
"
,
type
:
"
my_
parser
"
,
document_id
:
"
doc_id
"
,
document_id
:
"
doc_id
"
,
attachment_id
:
"
att_id
"
,
attachment_id
:
"
att_id
"
,
parser
:
"
rss
"
,
parser
:
"
rss
"
,
...
@@ -20,27 +21,22 @@
...
@@ -20,27 +21,22 @@
return
gadget
.
test_storage
.
put
(
"
doc_id
"
,
{})
return
gadget
.
test_storage
.
put
(
"
doc_id
"
,
{})
.
push
(
function
(){
.
push
(
function
(){
return
gadget
.
get_test_rss
();
var
xmlhttp
=
new
XMLHttpRequest
();
})
xmlhttp
.
onreadystatechange
=
function
()
{
.
push
(
function
(
test_rss
){
if
(
xmlhttp
.
status
==
200
&&
xmlhttp
.
readyState
==
4
){
return
gadget
.
test_storage
.
putAttachment
(
"
doc_id
"
,
"
att_id
"
,
new
Blob
([
test_rss
]));
return
gadget
.
test_storage
.
putAttachment
(
"
doc_id
"
,
"
att_id
"
,
new
Blob
([
xmlhttp
.
responseText
],
{
type
:
"
text/xml
"
}))
})
.
push
(
function
(){
.
push
(
function
(){
return
gadget
.
test_storage
.
get
(
"
doc_id
"
);
return
gadget
.
test_storage
.
get
(
"
/0/1
"
);
})
})
.
push
(
function
(
result
){
.
push
(
function
(
result
){
console
.
log
(
"
get result :
"
);
console
.
log
(
"
get result :
"
);
console
.
log
(
result
);
console
.
log
(
result
);
});
});
})
}
.
declareMethod
(
"
get_test_rss
"
,
function
(){
var
xmlhttp
=
new
XMLHttpRequest
();
xmlhttp
.
onreadystatechange
=
function
()
{
if
(
xmlhttp
.
status
==
200
&&
xmlhttp
.
readyState
==
4
)
return
xmlhttp
.
responseText
;
else
return
null
;
}
}
xmlhttp
.
open
(
"
GET
"
,
"
./test-files/vivelessvt.rss
"
,
true
);
xmlhttp
.
open
(
"
GET
"
,
"
./test-files/vivelessvt.rss
"
,
true
);
xmlhttp
.
send
();
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