File tree 3 files changed +419
-5
lines changed
3 files changed +419
-5
lines changed Original file line number Diff line number Diff line change 13
13
//= require jquery
14
14
//= require jquery-ui
15
15
//= require jquery_ujs
16
+ //= require lib/jquery.filedrop
16
17
//= require jquery.remotipart
17
18
//= require lib/underscore
18
19
//= require lib/backbone
Original file line number Diff line number Diff line change @@ -4,14 +4,19 @@ class Kandan.Plugins.Attachments
4
4
@plugin_namespace : " Kandan.Plugins.Attachments"
5
5
6
6
@template : _ .template ('''
7
- <form accept-charset="UTF-8" action="/channels/<%= channel_id %>/attachments.json" data-remote="true" html="{:multipart=>true}" id="file_upload" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓">
8
- <input name="<%=csrf_param %>" type="hidden" value="<%= csrf_token %>"></div>
9
- <input id="channel_id_<%= channel_id %>" name="channel_id[<%= channel_id %>]" type="hidden">
10
- <input id="file" name="file" type="file">
11
- <input name="commit" type="submit" value="Upload">
7
+ <form accept-charset="UTF-8" action="/channels/<%= channel_id %>/attachments.json" data-remote="true" html="{:multipart=>true}" id="file_upload" method="post">
8
+ <div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓">
9
+ <input name="<%=csrf_param %>" type="hidden" value="<%= csrf_token %>"/>
10
+ </div>
11
+ <input id="channel_id_<%= channel_id %>" name="channel_id[<%= channel_id %>]" type="hidden"/>
12
+ <input id="file" name="file" type="file"/>
13
+ <input name="commit" type="submit" value="Upload"/>
12
14
</form>
13
15
''' )
14
16
17
+ @ supports_drop_upload: ()->
18
+ !! (window .File && window .FileList && window .FileReader )
19
+
15
20
@ channel_id: ()->
16
21
Kandan .Data .Channels .active_channel_id ()
17
22
You can’t perform that action at this time.
0 commit comments