adjust styling

This commit is contained in:
Albert Yi
2018-06-14 17:50:41 -07:00
parent a6e972a6e6
commit 9f33b14fa8
2 changed files with 10 additions and 5 deletions

View File

@@ -37,13 +37,17 @@ div#c-uploads {
#filedropzone {
border: 4px dashed #DDD;
padding: 10px;
max-width: 700px;
min-height: 50px;
padding: 0;
min-height: 100px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
.placeholder {
font-style: italic;
color: #333;
height: 100%;
}
&.error {

View File

@@ -33,13 +33,13 @@
</div>
<% end %>
<div class="input">
<div class="input fallback">
<%= f.label :file %>
<%= f.file_field :file, :size => 50 %>
</div>
<div class="input" id="filedropzone">
<span class="placeholder">Drag and drop a file here</span>
<div class="placeholder"><span>Drag and drop a file here</span></div>
</div>
<div class="input">
@@ -173,6 +173,7 @@
acceptedFiles: "image/jpeg,image/png,image/gif",
previewTemplate: '<div class="dz-preview dz-file-preview"><div class="dz-details"><div class="dz-filename"><span data-dz-name></span></div><div class="dz-size" data-dz-size></div></div><div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div><div class="dz-error-message"><span data-dz-errormessage></span></div></div>',
init: function() {
$(".fallback").hide();
this.on("drop", function(event) {
$("#filedropzone .placeholder").hide();
});