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
ffb9eb4a
Commit
ffb9eb4a
authored
May 21, 2014
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add audioplayer progress gadget
parent
8c58241e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
114 additions
and
0 deletions
+114
-0
src/audioplayer/audioplayer.css
src/audioplayer/audioplayer.css
+0
-0
src/audioplayer/audioplayer.js
src/audioplayer/audioplayer.js
+21
-0
src/audioplayer/index.html
src/audioplayer/index.html
+27
-0
src/audioplayer_progress/index.html
src/audioplayer_progress/index.html
+26
-0
src/audioplayer_progress/progress.css
src/audioplayer_progress/progress.css
+13
-0
src/audioplayer_progress/progress.js
src/audioplayer_progress/progress.js
+27
-0
No files found.
src/audioplayer/audioplayer.css
0 → 100644
View file @
ffb9eb4a
src/audioplayer/audioplayer.js
0 → 100644
View file @
ffb9eb4a
/*global window, rJS, RSVP, console */
/*jslint maxlen:80, nomen: true */
(
function
(
window
,
rJS
)
{
"
use strict
"
;
rJS
(
window
).
ready
(
function
(
g
)
{
// First, load the progress gadget
g
.
declareGadget
(
'
../audioplayer_progress/index.html
'
)
.
then
(
function
(
progress
)
{
progress
.
setValue
(
50
);
progress
.
setMax
(
100
);
return
[
50
,
100
];
})
.
then
(
function
(
e
)
{
console
.
log
(
e
[
0
]
+
e
[
1
]);
})
.
fail
(
function
(
e
)
{
console
.
log
(
"
error
"
+
e
);
});
});
}(
window
,
rJS
));
src/audioplayer/index.html
0 → 100644
View file @
ffb9eb4a
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
audioPlayer
</title>
<!-- renderjs -->
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"./audioplayer.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
href=
"../../src/audioplayer/audioplayer.css"
media=
"screen"
></link>
</head>
<body>
<progress>
<id
="
progress
"
>
</progress>
</body>
</html>
src/audioplayer_progress/index.html
0 → 100644
View file @
ffb9eb4a
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
Progress
</title>
<!-- renderjs -->
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"./progress.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
href=
"../../src/audioplayer_progress/progress.css"
media=
"screen"
></link>
</head>
<body>
<progress>
<id
="
progress
"
>
</progress>
</body>
</html>
src/audioplayer_progress/progress.css
0 → 100644
View file @
ffb9eb4a
progress
{
height
:
25px
;
padding
:
5px
;
width
:
350px
;
margin
:
50px
0
20px
0
;
-moz-border-radius
:
5px
;
-webkit-border-radius
:
5px
;
border-radius
:
5px
;
-moz-box-shadow
:
0
1px
5px
#000
inset
,
0
1px
0
#444
;
-webkit-box-shadow
:
0
1px
5px
#000
inset
,
0
1px
0
#444
;
box-shadow
:
0
1px
5px
#000
inset
,
0
1px
0
#444
;
}
src/audioplayer_progress/progress.js
0 → 100644
View file @
ffb9eb4a
/*global window, rJS, RSVP, console */
/*jslint maxlen:80, nomen: true */
(
function
(
window
,
rJS
)
{
"
use strict
"
;
var
gk
=
rJS
(
window
);
gk
.
declareMethod
(
'
setValue
'
,
function
(
value
)
{
this
.
bar
.
value
=
value
;
})
.
declareMethod
(
'
setMax
'
,
function
(
max
)
{
this
.
bar
.
max
=
max
;
})
.
declareMethod
(
'
getValue
'
,
function
()
{
return
this
.
bar
.
value
;
})
.
declareMethod
(
'
getMax
'
,
function
()
{
return
this
.
bar
.
max
;
});
gk
.
ready
(
function
(
g
)
{
g
.
bar
=
g
.
__element
.
getElementsByTagName
(
'
progress
'
)[
0
];
g
.
bar
.
value
=
10
;
g
.
bar
.
max
=
100
;
});
}(
window
,
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