From 242c62a0cd4dd9a8b4088694d30a46e26b0651fc Mon Sep 17 00:00:00 2001 From: raphael Date: Mon, 13 May 2019 11:39:33 +0200 Subject: [PATCH] add option to minimize the toolbar --- public/index.html | 14 ++++++++++---- public/js/main.js | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index 4c1baad..a95bd2f 100644 --- a/public/index.html +++ b/public/index.html @@ -26,7 +26,7 @@
-
+
- + - +
+
+ +
\ No newline at end of file diff --git a/public/js/main.js b/public/js/main.js index 70a9d32..4ae08a6 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -181,6 +181,21 @@ $(document).ready(function () { alert("Copied Whiteboard-URL to clipboard.") }); + var btnsMini = false; + $("#minMaxBtn").click(function(){ + if(!btnsMini) { + $("#toolbar").find(".btn-group:not(.minGroup)").hide(); + $(this).find("#minBtn").hide(); + $(this).find("#maxBtn").show(); + } else { + $("#toolbar").find(".btn-group").show(); + $(this).find("#minBtn").show(); + $(this).find("#maxBtn").hide(); + } + btnsMini = !btnsMini; + + }) + // load json to whiteboard $("#myFile").on("change", function () { var file = document.getElementById("myFile").files[0];