From 1801febfe6055102e8a55b98ada6130faa9de6b6 Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Fri, 12 Apr 2019 10:44:40 +0200 Subject: 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 --- public/js/lib/editor/index.js | 2 +- public/js/lib/editor/toolbar.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'public/js/lib') 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 @@ - - - + + + -- cgit v1.2.3 From 26dacde9591b4994529d8f536712b797cef5a36f Mon Sep 17 00:00:00 2001 From: Pedro Ferreira Date: Fri, 12 Apr 2019 11:45:44 +0200 Subject: Fix toolbar day mode Also moved the code to SCSS Signed-off-by: Pedro Ferreira --- public/js/lib/editor/index.js | 2 ++ public/js/lib/editor/toolbar.html | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'public/js/lib') diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js index c48faea2..8553caa9 100644 --- a/public/js/lib/editor/index.js +++ b/public/js/lib/editor/index.js @@ -3,6 +3,8 @@ import config from './config' import statusBarTemplate from './statusbar.html' import toolBarTemplate from './toolbar.html' +import '../../../css/ui/toolbar.css' + /* config section */ const isMac = CodeMirror.keyMap.default === CodeMirror.keyMap.macDefault const defaultEditorMode = 'gfm' diff --git a/public/js/lib/editor/toolbar.html b/public/js/lib/editor/toolbar.html index ea4dc572..dc5b8ad4 100644 --- a/public/js/lib/editor/toolbar.html +++ b/public/js/lib/editor/toolbar.html @@ -1,49 +1,49 @@