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
5d342378
Commit
5d342378
authored
Jun 30, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor ZenMode to ES module syntax
parent
3b32313c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
8 deletions
+4
-8
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+1
-1
app/assets/javascripts/issuable_form.js
app/assets/javascripts/issuable_form.js
+1
-1
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+0
-1
app/assets/javascripts/zen_mode.js
app/assets/javascripts/zen_mode.js
+1
-3
spec/javascripts/zen_mode_spec.js
spec/javascripts/zen_mode_spec.js
+1
-2
No files found.
app/assets/javascripts/dispatcher.js
View file @
5d342378
...
...
@@ -4,7 +4,6 @@
/* global ShortcutsNavigation */
/* global IssuableIndex */
/* global ShortcutsIssuable */
/* global ZenMode */
/* global Milestone */
/* global IssuableForm */
/* global LabelsSelect */
...
...
@@ -54,6 +53,7 @@ import UsersSelect from './users_select';
import
RefSelectDropdown
from
'
./ref_select_dropdown
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
ZenMode
from
'
./zen_mode
'
;
import
initSettingsPanels
from
'
./settings_panels
'
;
import
initExperimentalFlags
from
'
./experimental_flags
'
;
import
OAuthRememberMe
from
'
./oauth_remember_me
'
;
...
...
app/assets/javascripts/issuable_form.js
View file @
5d342378
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, no-use-before-define, no-useless-escape, no-new, quotes, object-shorthand, no-unused-vars, comma-dangle, no-alert, consistent-return, no-else-return, prefer-template, one-var, one-var-declaration-per-line, curly, max-len */
/* global GitLab */
/* global ZenMode */
/* global Autosave */
/* global dateFormat */
/* global Pikaday */
import
UsersSelect
from
'
./users_select
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
ZenMode
from
'
./zen_mode
'
;
(
function
()
{
this
.
IssuableForm
=
(
function
()
{
...
...
app/assets/javascripts/main.js
View file @
5d342378
...
...
@@ -162,7 +162,6 @@ import './users_select';
import
'
./version_check_image
'
;
import
'
./visibility_select
'
;
import
'
./wikis
'
;
import
'
./zen_mode
'
;
// eslint-disable-next-line global-require, import/no-commonjs
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
require
(
'
./test_utils/
'
);
...
...
app/assets/javascripts/zen_mode.js
View file @
5d342378
...
...
@@ -35,7 +35,7 @@ window.Dropzone = Dropzone;
// **Target** a.js-zen-leave
//
class
ZenMode
{
export
default
class
ZenMode
{
constructor
()
{
this
.
active_backdrop
=
null
;
this
.
active_textarea
=
null
;
...
...
@@ -93,5 +93,3 @@ class ZenMode {
});
}
}
window
.
ZenMode
=
ZenMode
;
spec/javascripts/zen_mode_spec.js
View file @
5d342378
/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, object-shorthand, comma-dangle, no-return-assign, new-cap, max-len */
/* global Dropzone */
/* global Mousetrap */
/* global ZenMode */
import
'
~/zen_mode
'
;
import
ZenMode
from
'
~/zen_mode
'
;
(
function
()
{
var
enterZen
,
escapeKeydown
,
exitZen
;
...
...
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