add function so you need to confirm clear whiteboard
This commit is contained in:
parent
df21fa2314
commit
c5b67edf18
@ -28,9 +28,12 @@
|
||||
<!---Toolbar -!-->
|
||||
<div style="position: absolute; top: 10px; left: 10px;">
|
||||
<div class="btn-group">
|
||||
<button id="whiteboardTrashBtn" title="Clears the whiteboard" type="button" class="whiteboardBtn">
|
||||
<button id="whiteboardTrashBtn" title="Clear the whiteboard" type="button" class="whiteboardBtn">
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
<button style="position:absolute; left:0px; top:0px; width: 46px; display:none;" id="whiteboardTrashBtnConfirm" title="Confirm clear..." type="button" class="whiteboardBtn">
|
||||
<i class="fa fa-check"></i>
|
||||
</button>
|
||||
<button id="whiteboardUndoBtn" title="Undo your last step" type="button" class="whiteboardBtn">
|
||||
<i class="fa fa-undo"></i>
|
||||
</button>
|
||||
|
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user