From c5b67edf18e2f574246f8015b42c0aa018876abf Mon Sep 17 00:00:00 2001 From: raphael Date: Mon, 11 Feb 2019 14:09:21 +0100 Subject: [PATCH] add function so you need to confirm clear whiteboard --- public/index.html | 5 ++++- public/js/main.js | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 05e9c6b..456433c 100644 --- a/public/index.html +++ b/public/index.html @@ -28,9 +28,12 @@
- + diff --git a/public/js/main.js b/public/js/main.js index fad2a96..a461b62 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -57,6 +57,15 @@ $(document).ready(function () { // whiteboard clear button $("#whiteboardTrashBtn").click(function () { + $("#whiteboardTrashBtnConfirm").show().focus(); + }); + + $("#whiteboardTrashBtnConfirm").focusout(function() { + $(this).hide(); + }); + + $("#whiteboardTrashBtnConfirm").click(function () { + $(this).hide(); whiteboard.clearWhiteboard(); });