Skip to content

Commit

Permalink
Notify user when dragging file over upload target
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrove committed Apr 27, 2012
1 parent dc69109 commit 7577714
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/assets/javascripts/backbone/plugins/attachments.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Kandan.Plugins.Attachments

fileItemTemplate: _.template '''
<div class="file_item">
<a href="<%= url %>">
<a target="_blank" href="<%= url %>">
<img src="<%= iconUrl %>"/>
<span><%= fileName %></span>
</a>
Expand Down Expand Up @@ -59,7 +59,7 @@ class Kandan.Plugins.Attachments



# TODO this part is very bad for APIs! shoudnt be exposing a backbone collection in a plugin.
# TODO this part is very bad for APIs! Shouldn't be exposing a backbone collection in a plugin.
@render: ($widgetEl)->
$uploadForm = @templates.dropzone({
channelId: Kandan.Data.Channels.activeChannelId(),
Expand Down Expand Up @@ -121,6 +121,11 @@ class Kandan.Plugins.Attachments

dragOver: ->
console.log "reached dropzone!"
$(".dropzone").text("UPLOAD!")

dragLeave: ->
console.log "left dropzone!"
$(".dropzone").text("Drop file here to upload")
})


Expand Down

0 comments on commit 7577714

Please sign in to comment.