Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
ac805c3c8879
Commit
ae552ec3
authored
May 25, 2015
by
Stan Hu
Browse files
Fix Markdown preview not working in Edit Milestone page
Closes #1687 Closes
https://github.com/gitlabhq/gitlabhq/issues/9325
parent
a26d5372b3e6
Changes
2
Show whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
ac805c3c
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)
...
...
app/assets/javascripts/zen_mode.js.coffee
View file @
ac805c3c
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
Mousetrap
.
pause
()
@
u
d
pateActiveZenArea
(
checkbox
)
@
up
d
ateActiveZenArea
(
checkbox
)
else
@
exitZenMode
()
...
...
@@ -32,14 +30,11 @@ class @ZenMode
@
exitZenMode
()
e
.
preventDefault
()
$
(
window
).
on
'hashchange'
,
@
updateZenModeFromLocationHash
udpateActiveZenArea
:
(
checkbox
)
=>
updateActiveZenArea
:
(
checkbox
)
=>
@
active_checkbox
=
$
(
checkbox
)
@
active_checkbox
.
prop
(
'checked'
,
true
)
@
active_zen_area
=
@
active_checkbox
.
parent
().
find
(
'textarea'
)
@
active_zen_area
.
focus
()
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
Dropzone
.
forElement
(
'.div-dropzone'
).
enable
()
checkboxFromLocationHash
:
(
e
)
->
id
=
$
.
trim
(
window
.
location
.
hash
.
replace
(
'#'
+
ZenMode
.
fullscreen_prefix
,
''
))
if
id
return
$
(
'.zennable input[type=checkbox]#'
+
id
)[
0
]
else
return
null
updateZenModeFromLocationHash
:
(
e
)
=>
checkbox
=
@
checkboxFromLocationHash
()
if
checkbox
@
udpateActiveZenArea
(
checkbox
)
else
@
exitZenMode
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment