Commit 63377c9b authored by Robert Schilling's avatar Robert Schilling

Disable dropzone in ZEN mode

parent 6fd00826
...@@ -32,6 +32,8 @@ class @ZenMode ...@@ -32,6 +32,8 @@ class @ZenMode
@active_zen_area = @active_checkbox.parent().find('textarea') @active_zen_area = @active_checkbox.parent().find('textarea')
@active_zen_area.focus() @active_zen_area.focus()
window.location.hash = ZenMode.fullscreen_prefix + @active_checkbox.prop('id') window.location.hash = ZenMode.fullscreen_prefix + @active_checkbox.prop('id')
# Disable dropzone in ZEN mode
Dropzone.forElement('.div-dropzone').disable()
exitZenMode: => exitZenMode: =>
if @active_zen_area isnt null if @active_zen_area isnt null
...@@ -41,6 +43,8 @@ class @ZenMode ...@@ -41,6 +43,8 @@ class @ZenMode
@active_checkbox = null @active_checkbox = null
window.location.hash = '' window.location.hash = ''
window.scrollTo(window.pageXOffset, @scroll_position) window.scrollTo(window.pageXOffset, @scroll_position)
# Enable dropzone when leaving ZEN mode
Dropzone.forElement('.div-dropzone').enable()
checkboxFromLocationHash: (e) -> checkboxFromLocationHash: (e) ->
id = $.trim(window.location.hash.replace('#' + ZenMode.fullscreen_prefix, '')) id = $.trim(window.location.hash.replace('#' + ZenMode.fullscreen_prefix, ''))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment