From 8b0831ac5d5b424c0fec5e0acca3876c3a5656b6 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 2 Aug 2017 16:51:41 +0200 Subject: [PATCH] save images drawn with whiteboard to your CryptDrive --- www/common/common-file.js | 1 + www/common/cryptpad-common.js | 7 +++++++ www/whiteboard/main.js | 22 +++++++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/www/common/common-file.js b/www/common/common-file.js index a698f5b49..0093b9ef6 100644 --- a/www/common/common-file.js +++ b/www/common/common-file.js @@ -254,6 +254,7 @@ define([ var createAreaHandlers = File.createDropArea = function ($area, $hoverArea) { var counter = 0; if (!$hoverArea) { $hoverArea = $area; } + if (!$area) { return; } $hoverArea .on('dragenter', function (e) { e.preventDefault(); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 92416adc1..94499dbb5 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1243,6 +1243,13 @@ define([ style: 'font:'+size+' FontAwesome' }); break; + case 'savetodrive': + button = $('