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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
74a717ab
Commit
74a717ab
authored
Nov 04, 2019
by
Yuri Mataev
Committed by
Natalia Tepluhina
Nov 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zen_mode.js: remove IIFEs. Closes #34627
parent
8725f0ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
21 deletions
+11
-21
app/assets/javascripts/zen_mode.js
app/assets/javascripts/zen_mode.js
+11
-21
No files found.
app/assets/javascripts/zen_mode.js
View file @
74a717ab
/* eslint-disable
func-names,
consistent-return, camelcase, class-methods-use-this */
/* eslint-disable consistent-return, camelcase, class-methods-use-this */
// Zen Mode (full screen) textarea
//
...
...
@@ -47,26 +47,16 @@ export default class ZenMode {
e
.
preventDefault
();
return
$
(
e
.
currentTarget
).
trigger
(
'
zen_mode:leave
'
);
});
$
(
document
).
on
(
'
zen_mode:enter
'
,
(
function
(
_this
)
{
return
function
(
e
)
{
return
_this
.
enter
(
$
(
e
.
target
)
.
closest
(
'
.md-area
'
)
.
find
(
'
.zen-backdrop
'
),
);
};
})(
this
),
);
$
(
document
).
on
(
'
zen_mode:leave
'
,
(
function
(
_this
)
{
return
function
()
{
return
_this
.
exit
();
};
})(
this
),
);
$
(
document
).
on
(
'
zen_mode:enter
'
,
e
=>
{
this
.
enter
(
$
(
e
.
target
)
.
closest
(
'
.md-area
'
)
.
find
(
'
.zen-backdrop
'
),
);
});
$
(
document
).
on
(
'
zen_mode:leave
'
,
()
=>
{
this
.
exit
();
});
$
(
document
).
on
(
'
keydown
'
,
e
=>
{
// Esc
if
(
e
.
keyCode
===
27
)
{
...
...
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