Skip to content

Commit

Permalink
Made sure the 'browser-not-supported' view looks good.
Browse files Browse the repository at this point in the history
  • Loading branch information
enyo committed Feb 4, 2013
1 parent 758aaf1 commit 12f7c03
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 34 deletions.
14 changes: 0 additions & 14 deletions downloads/css/dropzone.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,6 @@
filter: alpha(opacity=0);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
}
.dropzone.browser-not-supported {
padding: 30px;
}
.dropzone.browser-not-supported .message {
position: relative;
background: url("../images/spritemap.png") no-repeat 0 0;
width: 204px;
height: 108px;
top: 0;
left: 0;
margin-left: 0;
margin-top: 0;
margin-bottom: 20px;
}
.dropzone .preview {
-webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
Expand Down
14 changes: 0 additions & 14 deletions downloads/css/stylus/dropzone.styl
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@
display block
opacity 0 // Rather fade out nicely

&.browser-not-supported
padding 30px
.message
position relative
background url("../images/spritemap.png") no-repeat 0 0
width 204px
height 108px
top 0
left 0
margin-left 0
margin-top 0
margin-bottom 20px



.preview
box-shadow 1px 1px 4px rgba(0, 0, 0, 0.16)
Expand Down
6 changes: 3 additions & 3 deletions lib/dropzone.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/dropzone.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ class Dropzone extends Em

# Can be a jQuery or HTML element that will hold the file previews
# If null, the dropzone element will be used
previewsContainer: null
#
# Not implemented yet.
#
# previewsContainer: null

# If `done()` is called without argument the file is accepted
# If you call it with an error message, the file is rejected
Expand All @@ -103,8 +106,9 @@ class Dropzone extends Em
# Called when the browser does not support drag and drop
fallback: ->
@element.addClass "browser-not-supported"
@element.find(".message").removeClass "default"
@element.find(".message span").html "Your browser does not support drag'n'drop file uploads."
@element.append """<p>Sadly your dusty browser does not support nice drag'n'drop file uploads.<br />Please use the fallback form below to upload your files like in the olden days.</p>"""
@element.append """Please use the fallback form below to upload your files like in the olden days.</p>"""
@element.append @getFallbackForm()


Expand Down Expand Up @@ -224,7 +228,7 @@ class Dropzone extends Em
@element.attr "enctype", "multipart/form-data"

if @element.find(".message").length == 0
@element.append o """<div class="default message"><span>Drop files here to upload</span></div>"""
@element.append o """<div class="message"><span>Drop files here to upload</span></div>"""

capableBrowser = yes

Expand Down

0 comments on commit 12f7c03

Please sign in to comment.