Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
63377c9b
Commit
63377c9b
authored
Oct 01, 2014
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable dropzone in ZEN mode
parent
6fd00826
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
app/assets/javascripts/zen_mode.js.coffee
app/assets/javascripts/zen_mode.js.coffee
+4
-0
No files found.
app/assets/javascripts/zen_mode.js.coffee
View file @
63377c9b
...
@@ -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
,
''
))
...
...
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