Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
47130116
Commit
47130116
authored
Jun 19, 2012
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into demo
parents
bcac7a65
5aebc8b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
+74
-0
OfficeJS/index.html
OfficeJS/index.html
+1
-0
OfficeJS/src/jio.waitstorage.js
OfficeJS/src/jio.waitstorage.js
+73
-0
No files found.
OfficeJS/index.html
View file @
47130116
...
...
@@ -16,6 +16,7 @@
<script
type=
"text/javascript"
src=
"lib/sjcl/sjcl.min.js"
></script>
<script
type=
"text/javascript"
src=
"lib/jio/jio.storage.js"
></script>
<script
type=
"text/javascript"
src=
"src/jio.dummystorages.js"
></script>
<script
type=
"text/javascript"
src=
"src/jio.waitstorage.js"
></script>
</head>
<body>
...
...
OfficeJS/src/jio.waitstorage.js
0 → 100644
View file @
47130116
(
function
()
{
var
jioWaitStorageLoader
=
function
(
Jio
)
{
var
newWaitStorage
=
function
(
spec
,
my
)
{
var
that
=
Jio
.
storage
(
spec
,
my
,
'
handler
'
),
priv
=
{};
var
validatestate_secondstorage
=
spec
.
storage
||
false
;
priv
.
secondstorage_spec
=
spec
.
storage
||
{
type
:
'
base
'
};
priv
.
delay
=
spec
.
delay
||
5000
;
priv
.
save
=
spec
.
save
||
true
;
priv
.
load
=
spec
.
load
||
false
;
priv
.
getlist
=
spec
.
getlist
||
false
;
priv
.
remove
=
spec
.
remove
||
false
;
that
.
validateState
=
function
()
{
if
(
!
validatestate_secondstorage
)
{
return
'
Need at least one parameter: "storage"
'
+
'
containing storage specifications.
'
;
}
return
''
;
};
var
super_serialized
=
that
.
serialized
;
that
.
serialized
=
function
()
{
var
o
=
super_serialized
();
o
.
delay
=
priv
.
delay
;
o
.
storage
=
priv
.
secondstorage_spec
;
o
.
save
=
priv
.
save
;
o
.
load
=
priv
.
load
;
o
.
getlist
=
priv
.
getlist
;
o
.
remove
=
priv
.
remove
;
return
o
;
};
priv
.
doJob
=
function
(
command
,
timeout_or_not_timeout
)
{
var
delay
=
0
;
if
(
timeout_or_not_timeout
)
{
delay
=
priv
.
delay
;
}
setTimeout
(
function
()
{
that
.
addJob
(
that
.
newStorage
(
priv
.
secondstorage_spec
),
command
);
that
.
end
();
},
delay
);
};
that
.
saveDocument
=
function
(
command
)
{
priv
.
doJob
(
command
,
priv
.
save
);
};
// end saveDocument
that
.
loadDocument
=
function
(
command
)
{
priv
.
doJob
(
command
,
priv
.
load
);
};
// end loadDocument
that
.
getDocumentList
=
function
(
command
)
{
priv
.
doJob
(
command
,
priv
.
getlist
);
};
// end getDocumentList
that
.
removeDocument
=
function
(
command
)
{
priv
.
doJob
(
command
,
priv
.
remove
);
};
// end removeDocument
return
that
;
};
Jio
.
addStorageType
(
'
wait
'
,
newWaitStorage
);
};
if
(
window
.
requirejs
)
{
define
(
'
JIOWaitStorages
'
,[
'
JIO
'
],
jioWaitStorageLoader
);
}
else
{
jioWaitStorageLoader
(
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