summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Ferreira2019-04-12 10:44:40 +0200
committerPedro Ferreira2019-05-12 20:15:46 +0200
commit1801febfe6055102e8a55b98ada6130faa9de6b6 (patch)
treef855ff2a1ad231ece128d8a8b260db38508ad13a
parent5bb69297678c38d0793238edf4d04cad5ec7d4d4 (diff)
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>
-rw-r--r--public/js/lib/editor/index.js2
-rw-r--r--public/js/lib/editor/toolbar.html6
2 files changed, 4 insertions, 4 deletions
diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js
index 17d30ca4..c48faea2 100644
--- a/public/js/lib/editor/index.js
+++ b/public/js/lib/editor/index.js
@@ -219,8 +219,8 @@ export default class Editor {
makeComment.click(() => {
utils.insertText(this.editor, '> []')
})
+
uploadImage.bind('change', function (e) {
- console.log("tiggered")
var files = e.target.files || e.dataTransfer.files
e.dataTransfer = {}
e.dataTransfer.files = files
diff --git a/public/js/lib/editor/toolbar.html b/public/js/lib/editor/toolbar.html
index 9ea1aacc..ea4dc572 100644
--- a/public/js/lib/editor/toolbar.html
+++ b/public/js/lib/editor/toolbar.html
@@ -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">
<i class="fa fa-image fa-fw"></i>
</a>
- <span 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>
- </span>
+ <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 title="Upload Image">
+ </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">
<i class="fa fa-table fa-fw"></i>
</a>