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
Show 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>
...
...
@@ -11,7 +11,8 @@
<!-- custom script -->
<script
src=
"./audioplayer.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
href=
"./audioplayer.css"
media=
"screen"
></link>
</head>
<link
rel=
"stylesheet"
href=
"./audioplayer.css"
media=
"screen"
></link>
</head>
<body>
<div
class=
"nav"
data-role=
"header"
data-theme=
"b"
>
<h1>
music player
</h1>
...
...
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