Make upload button respect night mode

Also set a title in the input field, so that the file name doesn't show
up.

Signed-off-by: Pedro Ferreira <pedro@dete.st>
This commit is contained in:
Pedro Ferreira 2019-04-12 10:44:40 +02:00
parent 5bb6929767
commit 1801febfe6
2 changed files with 4 additions and 4 deletions

View file

@ -219,8 +219,8 @@ export default class Editor {
makeComment.click(() => { makeComment.click(() => {
utils.insertText(this.editor, '> []') utils.insertText(this.editor, '> []')
}) })
uploadImage.bind('change', function (e) { uploadImage.bind('change', function (e) {
console.log("tiggered")
var files = e.target.files || e.dataTransfer.files var files = e.target.files || e.dataTransfer.files
e.dataTransfer = {} e.dataTransfer = {}
e.dataTransfer.files = files e.dataTransfer.files = files

View file

@ -34,9 +34,9 @@
<a id="makeImage" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Image"> <a id="makeImage" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Image">
<i class="fa fa-image fa-fw"></i> <i class="fa fa-image fa-fw"></i>
</a> </a>
<span id="uploadImage" class="btn btn-sm btn-dark btn-file ui-upload-image" title="Upload Image"> <a id="uploadImage" class="btn btn-sm btn-dark btn-file ui-upload-image" title="Upload Image">
<i class="fa fa-upload fa-fw"></i><input type="file" accept="image/*" name="upload" multiple> <i class="fa fa-upload fa-fw"></i><input type="file" accept="image/*" name="upload" multiple title="Upload Image">
</span> </a>
<a id="makeTable" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Table"> <a id="makeTable" class="btn btn-sm btn-dark text-uppercase" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Table">
<i class="fa fa-table fa-fw"></i> <i class="fa fa-table fa-fw"></i>
</a> </a>