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
dd7729ec
Commit
dd7729ec
authored
May 22, 2014
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add audioplayer title gadget
parent
ca314ca2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
6 deletions
+103
-6
src/audioplayer/audioplayer.js
src/audioplayer/audioplayer.js
+8
-1
src/audioplayer/index.html
src/audioplayer/index.html
+4
-5
src/audioplayer_title/index.html
src/audioplayer_title/index.html
+23
-0
src/audioplayer_title/title.css
src/audioplayer_title/title.css
+1
-0
src/audioplayer_title/title.js
src/audioplayer_title/title.js
+67
-0
No files found.
src/audioplayer/audioplayer.js
View file @
dd7729ec
...
...
@@ -5,7 +5,14 @@
rJS
(
window
).
ready
(
function
(
g
)
{
// First, load the progress gadget
g
.
declareGadget
(
'
../audioplayer_progress/index.html
'
)
var
div_context
=
g
.
__element
.
getElementsByTagName
(
'
div
'
)[
0
];
g
.
declareGadget
(
'
../audioplayer_progress/index.html
'
,
{
element
:
div_context
// sandbox: 'iframe'
}
)
.
then
(
function
(
progress
)
{
progress
.
setValue
(
50
);
progress
.
setMax
(
100
);
...
...
src/audioplayer/index.html
View file @
dd7729ec
...
...
@@ -14,11 +14,10 @@
<link
rel=
"stylesheet"
href=
"../../src/audioplayer/audioplayer.css"
media=
"screen"
></link>
</head>
<body>
<progress>
<id
="
progress
"
>
</progress>
<div
style=
"color:#00FF00"
id=
"div"
>
</div>
...
...
src/audioplayer_title/index.html
0 → 100644
View file @
dd7729ec
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
title
</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=
"./title.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
href=
"../../src/audioplayer_title/title.css"
media=
"screen"
></link>
</head>
<body>
<form
name=
"noticeForm"
action=
""
>
<p><input
type=
"text"
name=
"notice"
size=
"40"
></p>
</form>
</body>
</html>
src/audioplayer_title/title.css
0 → 100644
View file @
dd7729ec
/*todo */
\ No newline at end of file
src/audioplayer_title/title.js
0 → 100644
View file @
dd7729ec
/*global window, rJS, RSVP, console */
/*jslint maxlen:80, nomen: true */
(
function
(
window
,
rJS
)
{
"
use strict
"
;
var
gk
=
rJS
(
window
),
scroll
;
function
BannerObject
()
{
this
.
msg
=
"
it's a test
"
;
this
.
out
=
"
"
;
this
.
Position
=
50
;
this
.
pos
=
this
.
Position
;
this
.
delay
=
100
;
this
.
i
=
0
;
this
.
size
=
0
;
this
.
reset
=
function
()
{
this
.
pos
=
this
.
Position
;
};
}
gk
.
declareMethod
(
'
setMessage
'
,
function
(
msg
)
{
scroll
.
msg
=
msg
;
})
.
declareMethod
(
'
setDelay
'
,
function
(
delay
)
{
scroll
.
delay
=
delay
;
})
.
declareMethod
(
'
setPosition
'
,
function
(
position
)
{
if
(
position
>
this
.
size
)
{
position
=
this
.
size
;
}
scroll
.
Position
=
position
;
})
.
declareMethod
(
'
setMaxSize
'
,
function
(
size
)
{
this
.
input
.
size
=
size
;
scroll
.
size
=
size
;
});
gk
.
ready
(
function
(
g
)
{
scroll
=
new
BannerObject
();
g
.
input
=
g
.
__element
.
getElementsByTagName
(
'
input
'
)[
0
];
scroll
.
size
=
g
.
input
.
size
;
function
scroller
()
{
scroll
.
out
+=
"
"
;
if
(
scroll
.
pos
>
0
)
{
for
(
scroll
.
i
=
0
;
scroll
.
i
<
scroll
.
pos
;
scroll
.
i
+=
1
)
{
scroll
.
out
+=
"
"
;
}
}
if
(
scroll
.
pos
>=
0
)
{
scroll
.
out
+=
scroll
.
msg
;
}
else
{
scroll
.
out
=
scroll
.
msg
.
substring
(
-
scroll
.
pos
,
scroll
.
msg
.
length
);
}
g
.
input
.
value
=
scroll
.
out
;
scroll
.
out
=
"
"
;
scroll
.
pos
-=
2
;
if
(
scroll
.
pos
<
-
(
scroll
.
msg
.
length
))
{
scroll
.
reset
();
}
}
window
.
setInterval
(
function
()
{
scroller
();
},
scroll
.
delay
);
});
}(
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