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
c040c3ae
Commit
c040c3ae
authored
May 23, 2014
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add audioplayer I/O gadget
parent
2f84b110
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
1 deletion
+73
-1
Gruntfile.js
Gruntfile.js
+3
-1
src/audioplayer_io/index.html
src/audioplayer_io/index.html
+25
-0
src/audioplayer_io/io.js
src/audioplayer_io/io.js
+45
-0
No files found.
Gruntfile.js
View file @
c040c3ae
...
...
@@ -109,10 +109,12 @@ module.exports = function (grunt) {
src
:
[
'
node_modules/jio/src/sha1.amd.js
'
,
'
node_modules/jio/src/sha2.amd.js
'
,
'
node_modules/jio/src/sha256.amd.js
'
,
//xxx
'
node_modules/jio/jio.js
'
,
'
node_modules/jio/complex_queries.js
'
,
'
node_modules/jio/src/jio.storage/localstorage.js
'
,
'
node_modules/jio/src/jio.storage/erp5storage.js
'
'
node_modules/jio/src/jio.storage/erp5storage.js
'
,
'
node_modules/jio/src/jio.storage/indexeddbstorage.js
'
//xxx
],
relative_dest
:
"
lib/jio.js
"
,
dest
:
"
<%= global_config.dest %>/<%= concat.jio.relative_dest %>
"
...
...
src/audioplayer_io/index.html
0 → 100644
View file @
c040c3ae
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
audioplayer io
</title>
<!-- renderjs -->
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<!-- jio core dependencies -->
<script
src=
"../<%= copy.uri.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.uritemplate.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= concat.jio.relative_dest %>"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"./io.js"
type=
"text/javascript"
></script>
</head>
<body>
</body>
</html>
src/audioplayer_io/io.js
0 → 100644
View file @
c040c3ae
/*global window, rJS, RSVP, jIO, JSON */
(
function
(
window
,
jIO
,
rJS
)
{
"
use strict
"
;
var
gk
=
rJS
(
window
);
gk
.
declareMethod
(
'
createIO
'
,
function
(
description
,
key
)
{
this
.
jio
=
jIO
.
createJIO
(
description
);
this
.
key
=
key
;
this
.
jio
.
put
({
"
_id
"
:
key
}).
then
(
function
()
{
description
=
JSON
.
stringify
(
description
,
null
,
"
"
);
return
(
"
JIO created:
"
+
description
+
"
\n
with key:
"
+
key
);
}).
catch
(
function
(
e
)
{
return
"
jio created error:
"
+
e
.
target
.
result
;
});
})
.
declareMethod
(
'
getIO
'
,
function
(
attachment
)
{
var
gadget
=
this
;
return
gadget
.
jio
.
getAttachment
({
"
_id
"
:
gadget
.
key
,
"
_attachment
"
:
attachment
}).
then
(
function
(
response
)
{
return
response
.
data
;
}).
fail
(
function
(
response
)
{
return
"
jio getIO error :
"
+
response
.
target
.
result
;
});
})
.
declareMethod
(
'
setIO
'
,
function
(
attachment
,
file
)
{
var
gadget
=
this
;
return
gadget
.
jio
.
putAttachment
({
"
_id
"
:
gadget
.
key
,
"
_attachment
"
:
attachment
,
"
_blob
"
:
file
});
})
.
declareMethod
(
'
showAllIO
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
jio
.
allDoc
({
"
include_docs
"
:
"
m
"
});
});
}(
window
,
jIO
,
rJS
));
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