Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Akash Manohar J <akash@akash.im>
  • Loading branch information
HashNuke committed Apr 10, 2012
1 parent 2e05bd9 commit e6214f1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/assets/javascripts/backbone/plugins/attachments.js.coffee
Expand Up @@ -86,17 +86,18 @@ class Kandan.Plugins.Attachments
@initDropzone: ->
$(".dropzone").filedrop({
fallback_id: "file"
url : ->
"/channels/#{ Kandan.Data.Channels.activeChannelId() }/attachments.json"

paramname : "file"
maxfilesize: 1000
queuefiles : 1

url: ->
"/channels/#{ Kandan.Data.Channels.activeChannelId() }/attachments.json"

uploadStarted: ->
$(".dropzone").text("Uploading...")

uploadFinished: (i, file, response, time)->
console.log "Upload finished!"

error: (err, file)->
if err == "BrowserNotSupported"
Expand All @@ -107,10 +108,6 @@ class Kandan.Plugins.Attachments
$(".dropzone").text("Sorry bud! couldn't upload")


uploadFinished: (i, file, response, time)->
console.log "Upload finished!"


progressUpdated: (i, file, progress)->
$(".dropzone").text("#{progress}% Uploaded")
if progress == 100
Expand Down

0 comments on commit e6214f1

Please sign in to comment.