summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2014-10-01 16:40:30 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2014-10-01 16:40:30 +0200
commit63377c9ba570ad71666cdd88cc776cd9c3d92231 (patch)
tree388df360a7c4153099761edca894e62915f48fd6
parent6fd00826d2f756bda6bd65928ae7b5d565903ebf (diff)
downloadgitlab-ce-63377c9ba570ad71666cdd88cc776cd9c3d92231.tar.gz
Disable dropzone in ZEN mode
-rw-r--r--app/assets/javascripts/zen_mode.js.coffee4
1 files changed, 4 insertions, 0 deletions
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, ''))