Indicate the wait for a response from sys.4chan.org after an upload with some ellipsis.

This commit is contained in:
Nicolas Stepien 2012-01-24 23:53:22 +01:00
parent 58da6d4e18
commit 53d3197c6a
2 changed files with 15 additions and 5 deletions

View File

@ -1262,7 +1262,7 @@
value = 404;
disabled = true;
} else if (data) {
if (data.progress != null) value = "" + data.progress + "%";
if (data.progress) value = data.progress;
}
qr.status.input.value = value || 'Submit';
return qr.status.input.disabled = disabled || false;
@ -1727,10 +1727,16 @@
form: form,
type: 'post',
upCallbacks: {
onload: function() {
return qr.message.send({
status: true,
progress: '...'
});
},
onprogress: function(e) {
return qr.message.send({
status: true,
progress: Math.floor(e.loaded / e.total * 100)
progress: "" + (Math.round(e.loaded / e.total * 100)) + "%"
});
}
}

View File

@ -912,8 +912,8 @@ qr =
value = 404
disabled = true
else if data
if data.progress?
value = "#{data.progress}%"
if data.progress
value = data.progress
qr.status.input.value = value or 'Submit'
qr.status.input.disabled = disabled or false
@ -1310,10 +1310,14 @@ qr =
form: form
type: 'post'
upCallbacks:
onload: ->
qr.message.send
status: true
progress: '...'
onprogress: (e) ->
qr.message.send
status: true
progress: Math.floor e.loaded / e.total * 100
progress: "#{Math.round e.loaded / e.total * 100}%"
options =
init: ->