Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
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
Hardik Juneja
jio-main
Commits
93037dbc
Commit
93037dbc
authored
Jan 08, 2013
by
Tristan Cavelier
Committed by
Sven Franck
Jan 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples updated
parent
bbb8f75e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
23 deletions
+32
-23
examples/complex_example.html
examples/complex_example.html
+25
-20
examples/example.html
examples/example.html
+7
-3
No files found.
examples/complex_example.html
View file @
93037dbc
...
...
@@ -45,41 +45,41 @@ var clearlog = function () {
<table
border=
"1"
style=
"width: 100%;"
>
<tr
style=
"font-style:italic;"
>
<th>
simple storage
</th><th>
multi storage
</th><th>
distant storage
</th>
<th>
conflict
managing
</th><th>
custom storage description
</th>
<th>
revision
managing
</th><th>
custom storage description
</th>
</tr>
<tr>
<th>
local
</th><th>
crypt
&
local
</th><th>
dav
</th>
<th>
conflictmanager
&
local
</th><th>
custom
</th>
<th>
revision
&
local
</th><th>
custom
</th>
</tr>
<tr>
<th>
<input
type=
"text"
id=
"localuser"
value=
"localuser"
placeholder=
"username"
/><br
/>
<input
type=
"text"
id=
"localapp"
value=
"localapp"
placeholder=
"applicationname"
/><br
/>
<input
type=
"text"
id=
"localapp"
value=
"localapp"
placeholder=
"application
_
name"
/><br
/>
</th>
<th>
<input
type=
"text"
id=
"cryptuser"
value=
"cryptuser"
placeholder=
"username"
/><br
/>
<input
type=
"text"
id=
"cryptapp"
value=
"cryptapp"
placeholder=
"applicationname"
/><br
/>
<input
type=
"text"
id=
"cryptapp"
value=
"cryptapp"
placeholder=
"application
_
name"
/><br
/>
<input
type=
"password"
id=
"cryptpassword"
value=
"pwd"
placeholder=
"password"
/><br
/>
</th>
<th>
<input
type=
"text"
id=
"davuser"
value=
""
placeholder=
"username"
/><br
/>
<input
type=
"text"
id=
"davapp"
value=
""
placeholder=
"applicationname"
/><br
/>
<input
type=
"text"
id=
"davapp"
value=
""
placeholder=
"application
_
name"
/><br
/>
<input
type=
"password"
id=
"davpassword"
value=
""
placeholder=
"password"
/><br
/>
<input
type=
"text"
id=
"davurl"
value=
""
placeholder=
"url"
/><br
/>
</th>
<th>
<input
type=
"text"
id=
"
conflict
user"
value=
"localuser"
placeholder=
"username"
/><br
/>
<input
type=
"text"
id=
"
conflictapp"
value=
"localapp"
placeholder=
"application
name"
/><br
/>
<input
type=
"text"
id=
"
revision
user"
value=
"localuser"
placeholder=
"username"
/><br
/>
<input
type=
"text"
id=
"
revisionapp"
value=
"localapp"
placeholder=
"application_
name"
/><br
/>
</th>
<th
style=
"width:100%;"
>
<textarea
id=
"customstorage"
style=
"width:98%;"
>
{
"
type
"
:
"
local
"
,
"
username
"
:
"
customuser
"
,
"
applicationname
"
:
"
customapp
"
,
"
customkey
"
:
"
customvalue
"
}
</textarea>
<textarea
id=
"customstorage"
style=
"width:98%;"
>
{
"
type
"
:
"
local
"
,
"
username
"
:
"
customuser
"
,
"
application
_
name
"
:
"
customapp
"
,
"
customkey
"
:
"
customvalue
"
}
</textarea>
</th>
</tr>
<tr>
<th><button
onclick=
"newLocalJio()"
>
Create New jIO
</button></th>
<th><button
onclick=
"newCryptJio()"
>
Create New jIO
</button></th>
<th><button
onclick=
"newDavJio()"
>
Create New jIO
</button></th>
<th><button
onclick=
"new
Conflict
Jio()"
>
Create New jIO
</button></th>
<th><button
onclick=
"new
Revision
Jio()"
>
Create New jIO
</button></th>
<th><button
onclick=
"newCustomJio()"
>
Create New jIO
</button></th>
</tr>
</table>
...
...
@@ -139,11 +139,16 @@ var clearlog = function () {
</div>
<script
type=
"text/javascript"
src=
"../lib/md5/md5.js"
></script>
<script
type=
"text/javascript"
src=
"../jio.js"
></script>
<script
type=
"text/javascript"
src=
"../src/jio.storage/localstorage.js"
>
</script>
<script
type=
"text/javascript"
src=
"../lib/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"../lib/base64/base64.js"
></script>
<script
type=
"text/javascript"
src=
"../lib/sjcl/sjcl.min.js"
></script>
<script
type=
"text/javascript"
src=
"../src/jio.storage/davstorage.js"
>
</script>
<script
type=
"text/javascript"
src=
"../lib/jsSha2/sha2.js"
></script>
<script
type=
"text/javascript"
src=
"../jio.storage.js"
></script>
<script
type=
"text/javascript"
src=
"../src/jio.storage/revisionstorage.js"
>
</script>
<script
type=
"text/javascript"
src=
"../lib/sjcl/sjcl.min.js"
></script>
<script
type=
"text/javascript"
>
<!--
var
my_jio
=
null
;
...
...
@@ -151,7 +156,7 @@ var newLocalJio = function () {
var
localuser
,
localapp
;
localuser
=
$
(
'
#localuser
'
).
attr
(
'
value
'
);
localapp
=
$
(
'
#localapp
'
).
attr
(
'
value
'
);
var
spec
=
{
type
:
'
local
'
,
username
:
localuser
,
applicationname
:
localapp
};
var
spec
=
{
type
:
'
local
'
,
username
:
localuser
,
application
_
name
:
localapp
};
if
(
my_jio
)
{
log
(
'
closing older jio
'
);
my_jio
.
close
();
}
log
(
'
local storage description object:
'
+
JSON
.
stringify
(
spec
));
my_jio
=
jIO
.
newJio
(
spec
);
...
...
@@ -162,7 +167,7 @@ var newCryptJio = function () {
app
=
$
(
'
#cryptapp
'
).
attr
(
'
value
'
);
pwd
=
$
(
'
#cryptpassword
'
).
attr
(
'
value
'
);
var
spec
=
{
type
:
'
crypt
'
,
username
:
user
,
password
:
pwd
,
storage
:{
type
:
'
local
'
,
username
:
user
,
applicationname
:
app
type
:
'
local
'
,
username
:
user
,
application
_
name
:
app
}};
if
(
my_jio
)
{
log
(
'
closing older jio
'
);
my_jio
.
close
();
}
log
(
'
crypt storage description object:
'
+
JSON
.
stringify
(
spec
));
...
...
@@ -175,24 +180,24 @@ var newDavJio = function () {
pwd
=
$
(
'
#davpassword
'
).
attr
(
'
value
'
);
url
=
$
(
'
#davurl
'
).
attr
(
'
value
'
);
var
spec
=
{
type
:
'
dav
'
,
username
:
user
,
applicationname
:
app
,
type
:
'
dav
'
,
username
:
user
,
application
_
name
:
app
,
password
:
pwd
,
url
:
url
};
if
(
my_jio
)
{
log
(
'
closing older jio
'
);
my_jio
.
close
();
}
log
(
'
dav storage description object:
'
+
JSON
.
stringify
(
spec
));
my_jio
=
jIO
.
newJio
(
spec
);
};
var
new
Conflict
Jio
=
function
()
{
var
new
Revision
Jio
=
function
()
{
var
user
,
app
;
user
=
$
(
'
#
conflict
user
'
).
attr
(
'
value
'
);
app
=
$
(
'
#
conflict
app
'
).
attr
(
'
value
'
);
user
=
$
(
'
#
revision
user
'
).
attr
(
'
value
'
);
app
=
$
(
'
#
revision
app
'
).
attr
(
'
value
'
);
var
spec
=
{
type
:
'
conflictmanager
'
,
storage
:
{
type
:
'
local
'
,
username
:
user
,
applicationname
:
app
type
:
'
revision
'
,
sub_
storage
:
{
type
:
'
local
'
,
username
:
user
,
application
_
name
:
app
}
};
if
(
my_jio
)
{
log
(
'
closing older jio
'
);
my_jio
.
close
();
}
log
(
'
conflict manager
storage description object:
'
+
JSON
.
stringify
(
spec
));
log
(
'
revision
storage description object:
'
+
JSON
.
stringify
(
spec
));
my_jio
=
jIO
.
newJio
(
spec
);
};
var
newCustomJio
=
function
()
{
...
...
examples/example.html
View file @
93037dbc
...
...
@@ -16,14 +16,18 @@ var log = function (o) {
</script>
<div
id=
"log"
>
</div>
<script
type=
"text/javascript"
src=
"../localorcookiestorage.js"
></script>
<script
type=
"text/javascript"
src=
"../lib/md5/md5.js"
></script>
<script
type=
"text/javascript"
src=
"../jio.js"
></script>
<script
type=
"text/javascript"
src=
"../src/jio.storage/localstorage.js"
>
</script>
<script
type=
"text/javascript"
src=
"../lib/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"../lib/base64/base64.js"
></script>
<script
type=
"text/javascript"
src=
"../lib/sjcl/sjcl.min.js"
></script>
<script
type=
"text/javascript"
src=
"../src/jio.storage/davstorage.js"
>
</script>
<script
type=
"text/javascript"
src=
"../lib/jsSha2/sha2.js"
></script>
<script
type=
"text/javascript"
src=
"../jio.storage.js"
></script>
<script
type=
"text/javascript"
src=
"../src/jio.storage/revisionstorage.js"
>
</script>
<script
type=
"text/javascript"
src=
"../lib/sjcl/sjcl.min.js"
></script>
<script
type=
"text/javascript"
>
<!--
var
my_jio
=
null
;
...
...
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