Permalink
Browse files

erase old inputs after upload

git-svn-id: svn://mislav.caboo.se/public/uploader@233 b38871a6-e216-0410-912a-b3827fb9e1fb
  • Loading branch information...
1 parent 77972d5 commit 82ec4e36431b930100430925b37c79d5278477dc @mislav committed Jul 24, 2007
Showing with 13 additions and 0 deletions.
  1. +13 −0 application.js
View
@@ -25,6 +25,8 @@ function processResponse(json) {
message('Successfully uploaded ' + json.saved.length + ' images')
}
+
+ $('inputs').update(inputHTML)
}
function messageFailed(msg) {
@@ -44,4 +46,15 @@ function message(msg, className) {
var el = new Element('div', { className:className }).update(msg)
$('messages').insert(el.setOpacity(0))
new Effect.Opacity(el, { duration:0.6 })
+ eraseMessage.delay(10, el)
+}
+
+function eraseMessage(el) {
+ new Effect.Opacity(el, {
+ duration: 1, to: 0,
+ afterFinish: function(o) {
+ o.element.remove()
+ console.info('removed!')
+ }
+ })
}

0 comments on commit 82ec4e3

Please sign in to comment.