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
da5be247
Commit
da5be247
authored
Jul 11, 2014
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add storage insufficente notify when upload
parent
fd120a1c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
23 deletions
+29
-23
src/audioplayer/index.html
src/audioplayer/index.html
+18
-17
src/audioplayer_upload/index.html
src/audioplayer_upload/index.html
+1
-1
src/audioplayer_upload/upload.js
src/audioplayer_upload/upload.js
+10
-5
No files found.
src/audioplayer/index.html
View file @
da5be247
<!DOCTYPE html>
<
html
manifest=
"audioPlayer.appcache"
>
<
!--html manifest="audioPlayer.appcache"--
>
<head>
<!-- renderjs -->
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= curl.jquery.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= curl.jquerymobilejs.relative_dest %>"
></script>
<link
rel=
"stylesheet"
href=
"../<%= curl.jquerymobilecss.relative_dest %>"
>
<!-- custom script -->
<script
src=
"./audioplayer.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
href=
"./audioplayer.css"
media=
"screen"
></link>
</head>
<!-- renderjs -->
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= curl.jquery.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= curl.jquerymobilejs.relative_dest %>"
></script>
<link
rel=
"stylesheet"
href=
"../<%= curl.jquerymobilecss.relative_dest %>"
>
<!-- custom script -->
<script
src=
"./audioplayer.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
href=
"./audioplayer.css"
media=
"screen"
></link>
</head>
<body>
<div
class=
"nav"
data-role=
"header"
data-theme=
"b"
>
<h1>
music player
</h1>
<a
data-icon=
"plus"
href=
"#page=upload"
>
add
</a>
<a
data-icon=
"grid"
href=
"#page=playlist"
>
playlist
</a>
</div>
<div
class=
"page"
>
</div>
<div
class=
"offline"
data-gadget-url=
"../audioplayer_bridge/index.html"
data-gadget-scope=
"offline"
>
</div>
<div
class=
"localhost"
data-gadget-url=
"../audioplayer_bridge/index.html"
data-gadget-scope=
"localhost"
>
</div>
<div
class=
"online"
data-gadget-url=
"../audioplayer_bridge/index.html"
data-gadget-scope=
"online"
>
</div>
<article
class=
"gadget_container"
></article>
<article
class=
"gadget_container"
></article>
</body>
</html>
src/audioplayer_upload/index.html
View file @
da5be247
...
...
@@ -20,8 +20,8 @@
<body>
<h1>
the music uploaded is duplicated in browser, using of localhost or online is recommmended
</h1>
<input
type=
"file"
multiple
/>
<ul
class=
"info"
>
</ul>
</body>
...
...
src/audioplayer_upload/upload.js
View file @
da5be247
...
...
@@ -47,16 +47,21 @@
uploaded
+=
1
;
info_context
.
innerHTML
+=
"
<li>
"
+
input_context
.
files
[
uploaded
-
1
].
name
+
"
uploaded
"
+
uploaded
+
"
/
"
+
length
+
"
</li>
"
;
+
"
"
+
uploaded
+
"
/
"
+
length
+
"
</li>
"
;
if
(
uploaded
===
length
)
{
return
g
.
plEnablePage
();
}
queue
.
push
(
post
);
})
.
fail
(
function
(
e
)
{
uploaded
+=
1
;
console
.
log
(
"
error
"
);
return
post
();
.
fail
(
function
(
error
)
{
if
(
!
(
error
instanceof
RSVP
.
CancellationError
))
{
info_context
.
innerHTML
+=
input_context
.
files
[
uploaded
].
name
+
"
failed : storage insufficient
"
;
return
g
.
plEnablePage
();
}
document
.
getElementsByTagName
(
'
body
'
)[
0
].
textContent
=
JSON
.
stringify
(
error
);
});
}
queue
=
new
RSVP
.
Queue
();
...
...
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