Commit 3c5348b8 authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Sebastien Robin

Add localStorage or Cookie support.

localStorage job list is a rescue job list now.
job list and LocalStorage are inserted to localStorage differently.
...
parent a1f3c2e9
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<title>JIO</title> <title>JIO</title>
<script type="text/javascript" src="js/jquery/jquery.js"></script> <script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="unhosted/jio.js"></script> <script type="text/javascript" src="unhosted/jio.js"></script>
<script type="text/javascript" src="unhosted/jquery.storage.js"></script>
<script type="text/javascript" src="unhosted/base64.js"></script> <script type="text/javascript" src="unhosted/base64.js"></script>
<script type="text/javascript" src="unhosted/jio.storage.js"></script> <script type="text/javascript" src="unhosted/jio.storage.js"></script>
<!-- <script type="text/javascript" src="unhosted/sjcl.js"></script> --> <!-- <script type="text/javascript" src="unhosted/sjcl.js"></script> -->
...@@ -70,25 +72,30 @@ $.jio('subscribe',{'event':'start_gettingList', 'func': function ( o ) { ...@@ -70,25 +72,30 @@ $.jio('subscribe',{'event':'start_gettingList', 'func': function ( o ) {
}}); }});
$.jio('subscribe',{'event':'stop_gettingList', 'func': function ( o ) { $.jio('subscribe',{'event':'stop_gettingList', 'func': function ( o ) {
$('#divmessage').html($('#divmessage').html() + '<br />' + $('#divmessage').html($('#divmessage').html() + '<br />' +
'Getting list ended: ' + toString(o.job.list) ); 'Getting list ended: ' + toString(o) );
}}); }});
// $.jio({'storage':{'type':'local','userName':'tristan'}, $.jio({'storage':{'type':'local','userName':'tristan'},
// 'applicant':{'ID':'www.ungproject.org'}});
$.jio({'storage':{'type':'dav','userName':'tristan','password':'test',
'location':'https://ca-davstorage:8080','provider':'Unknown'},
'applicant':{'ID':'www.ungproject.org'}}); 'applicant':{'ID':'www.ungproject.org'}});
// $.jio({'storage':{'type':'dav','userName':'tristan','password':'test',
// 'location':'https://ca-davstorage:8080','provider':'Unknown'},
// 'applicant':{'ID':'www.ungproject.org'}});
// TODO
// doc string
// localStorage.status
// $.jio('isAvailable',{'userName':'toto'}); // $.jio('isAvailable',{'userName':'toto'});
// $.jio('isAvailable',{'userName':'tristan'}); // $.jio('isAvailable',{'userName':'tristan'});
// $.jio('save',{'fileName':'SonNom','fileContent':'SonContenu'}); // $.jio('saveDocument',{'fileName':'SonNom','fileContent':'SonContenu'});
// $.jio({'fileName':'SonNom','fileContent':'SonContenu','method':'save'}); // $.jio({'fileName':'SonNom','fileContent':'SonContenu','method':'saveDocument'});
// $.jio({'fileName':'SonNom2','fileContent':'SonContenu2','method':'save'}); // $.jio({'fileName':'SonNom2','fileContent':'SonContenu2','method':'saveDocument'});
// $.jio('load',{'fileName':'SonNom'}); // $.jio('loadDocument',{'fileName':'SonNom'});
$.jio('getList'); // $.jio('removeDocument',{'fileName':'SonNom'});
// $.jio('getDocumentList');
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment