Drop it.
-{this.state.fileError}
-Drag & drop image or video here to publish
-OR
-CHOOSE FILE
-Drop it.
+{this.state.fileError}
+Drag & drop image or video here to publish
+OR
+CHOOSE FILE
+diff --git a/public/assets/css/general.css b/public/assets/css/general.css index 629a999c..9625166f 100644 --- a/public/assets/css/general.css +++ b/public/assets/css/general.css @@ -483,26 +483,25 @@ table { cursor: pointer; } -#primary-dropzone-instructions, #dropbzone-dragover { - z-index: -1; -} - -.position-absolute { +#dropzone-text-holder { position: absolute; - top: 0px; - left: 0px; - height: 100%; + left: 0; + top: 0; width: 100%; + height: 100%; } -#asset-preview-holder { - position: relative; +#dropzone-dragover, #dropzone-instructions { + padding: 1em; } #asset-preview { display: block; - padding: 0.5rem; - width: calc(100% - 1rem); + width: 100%; +} + +.dim { + opacity: 0.2; } /* Assets */ diff --git a/public/assets/js/dropzoneFunctions.js b/public/assets/js/dropzoneFunctions.js index 57b8c47f..139597f9 100644 --- a/public/assets/js/dropzoneFunctions.js +++ b/public/assets/js/dropzoneFunctions.js @@ -1,10 +1,2 @@ -function preview_onmouseenter_handler () { - document.getElementById('asset-preview-dropzone-instructions').setAttribute('class', 'flex-container--column flex-container--center-center position-absolute'); - document.getElementById('asset-preview').style.opacity = 0.2; -} -function preview_onmouseleave_handler () { - document.getElementById('asset-preview-dropzone-instructions').setAttribute('class', 'hidden'); - document.getElementById('asset-preview').style.opacity = 1; -} diff --git a/react/components/PublishDropzone.jsx b/react/components/Dropzone.jsx similarity index 77% rename from react/components/PublishDropzone.jsx rename to react/components/Dropzone.jsx index d1a1b534..ef789061 100644 --- a/react/components/PublishDropzone.jsx +++ b/react/components/Dropzone.jsx @@ -3,12 +3,13 @@ import React from 'react'; import { selectFile } from '../actions'; import { connect } from 'react-redux'; -class PublishDropzone extends React.Component { +class Dropzone extends React.Component { constructor (props) { super(props); this.state = { fileError: null, dragOver : false, + } this.handleDrop = this.handleDrop.bind(this); this.handleDragOver = this.handleDragOver.bind(this); @@ -115,19 +116,21 @@ class PublishDropzone extends React.Component {
-Drop it.
-{this.state.fileError}
-Drag & drop image or video here to publish
-OR
-CHOOSE FILE
-Drop it.
+{this.state.fileError}
+Drag & drop image or video here to publish
+OR
+CHOOSE FILE
+Drag & drop image or video here
-OR
-CHOOSE FILE
+Drop it.
+{this.state.fileError}
+Drag & drop image or video here to publish
+OR
+CHOOSE FILE
+Drop it.
+{this.state.fileError}
+Drag & drop image or video here to publish
+OR
+CHOOSE FILE
+