refactor ZenMode to ES module syntax
This commit is contained in:
parent
3b32313cce
commit
5d34237854
5 changed files with 4 additions and 8 deletions
|
@ -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';
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/* 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() {
|
||||
|
|
|
@ -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/');
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
/* 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;
|
||||
|
|
Loading…
Reference in a new issue