Read about our upcoming Code of Conduct on this issue

Commit ae552ec3 authored by Stan Hu's avatar Stan Hu
Browse files

Fix Markdown preview not working in Edit Milestone page

Closes #1687
parent a26d5372b3e6
Please view this file on the master branch, on stable branches it's out of date.
v 7.12.0 (unreleased)
- Fix Markdown preview not working in Edit Milestone page (Stan Hu)
- Add web hook support for note events (Stan Hu)
- Disable "New Issue" and "New Merge Request" buttons when features are disabled in project settings (Stan Hu)
- Allow to configure location of the `.gitlab_shell_secret` file. (Jakub Jirutka)
class @ZenMode
@fullscreen_prefix = 'fullscreen_'
constructor: ->
@active_zen_area = null
@active_checkbox = null
......@@ -23,7 +21,7 @@ class @ZenMode
if checkbox.checked
# Disable other keyboard shortcuts in ZEN mode
......@@ -32,14 +30,11 @@ class @ZenMode
$(window).on 'hashchange', @updateZenModeFromLocationHash
udpateActiveZenArea: (checkbox) =>
updateActiveZenArea: (checkbox) =>
@active_checkbox = $(checkbox)
@active_checkbox.prop('checked', true)
@active_zen_area = @active_checkbox.parent().find('textarea')
window.location.hash = ZenMode.fullscreen_prefix + @active_checkbox.prop('id')
exitZenMode: =>
if @active_zen_area isnt null
......@@ -51,17 +46,3 @@ class @ZenMode
window.scrollTo(window.pageXOffset, @scroll_position)
# Enable dropzone when leaving ZEN mode
checkboxFromLocationHash: (e) ->
id = $.trim(window.location.hash.replace('#' + ZenMode.fullscreen_prefix, ''))
if id
return $('.zennable input[type=checkbox]#' + id)[0]
return null
updateZenModeFromLocationHash: (e) =>
checkbox = @checkboxFromLocationHash()
if checkbox
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