From 63377c9ba570ad71666cdd88cc776cd9c3d92231 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Wed, 1 Oct 2014 16:40:30 +0200 Subject: [PATCH] Disable dropzone in ZEN mode --- app/assets/javascripts/zen_mode.js.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/zen_mode.js.coffee b/app/assets/javascripts/zen_mode.js.coffee index 21ac212df0e..0c9942a4014 100644 --- a/app/assets/javascripts/zen_mode.js.coffee +++ b/app/assets/javascripts/zen_mode.js.coffee @@ -32,6 +32,8 @@ class @ZenMode @active_zen_area = @active_checkbox.parent().find('textarea') @active_zen_area.focus() window.location.hash = ZenMode.fullscreen_prefix + @active_checkbox.prop('id') + # Disable dropzone in ZEN mode + Dropzone.forElement('.div-dropzone').disable() exitZenMode: => if @active_zen_area isnt null @@ -41,6 +43,8 @@ class @ZenMode @active_checkbox = null window.location.hash = '' window.scrollTo(window.pageXOffset, @scroll_position) + # Enable dropzone when leaving ZEN mode + Dropzone.forElement('.div-dropzone').enable() checkboxFromLocationHash: (e) -> id = $.trim(window.location.hash.replace('#' + ZenMode.fullscreen_prefix, ''))