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
f8909396
Commit
f8909396
authored
Jun 30, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor Wikis class to ES module syntax
parent
5d342378
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+2
-1
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+0
-1
app/assets/javascripts/wikis.js
app/assets/javascripts/wikis.js
+1
-5
No files found.
app/assets/javascripts/dispatcher.js
View file @
f8909396
...
@@ -53,6 +53,7 @@ import UsersSelect from './users_select';
...
@@ -53,6 +53,7 @@ import UsersSelect from './users_select';
import
RefSelectDropdown
from
'
./ref_select_dropdown
'
;
import
RefSelectDropdown
from
'
./ref_select_dropdown
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
Wikis
from
'
./wikis
'
;
import
ZenMode
from
'
./zen_mode
'
;
import
ZenMode
from
'
./zen_mode
'
;
import
initSettingsPanels
from
'
./settings_panels
'
;
import
initSettingsPanels
from
'
./settings_panels
'
;
import
initExperimentalFlags
from
'
./experimental_flags
'
;
import
initExperimentalFlags
from
'
./experimental_flags
'
;
...
@@ -483,7 +484,7 @@ import OAuthRememberMe from './oauth_remember_me';
...
@@ -483,7 +484,7 @@ import OAuthRememberMe from './oauth_remember_me';
new
NotificationsDropdown
();
new
NotificationsDropdown
();
break
;
break
;
case
'
wikis
'
:
case
'
wikis
'
:
new
gl
.
Wikis
();
new
Wikis
();
shortcut_handler
=
new
ShortcutsWiki
();
shortcut_handler
=
new
ShortcutsWiki
();
new
ZenMode
();
new
ZenMode
();
new
gl
.
GLForm
(
$
(
'
.wiki-form
'
),
true
);
new
gl
.
GLForm
(
$
(
'
.wiki-form
'
),
true
);
...
...
app/assets/javascripts/main.js
View file @
f8909396
...
@@ -161,7 +161,6 @@ import './username_validator';
...
@@ -161,7 +161,6 @@ import './username_validator';
import
'
./users_select
'
;
import
'
./users_select
'
;
import
'
./version_check_image
'
;
import
'
./version_check_image
'
;
import
'
./visibility_select
'
;
import
'
./visibility_select
'
;
import
'
./wikis
'
;
// eslint-disable-next-line global-require, import/no-commonjs
// eslint-disable-next-line global-require, import/no-commonjs
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
require
(
'
./test_utils/
'
);
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
require
(
'
./test_utils/
'
);
...
...
app/assets/javascripts/wikis.js
View file @
f8909396
/* eslint-disable no-param-reassign */
/* global Breakpoints */
/* global Breakpoints */
import
'
vendor/jquery.nicescroll
'
;
import
'
vendor/jquery.nicescroll
'
;
import
'
./breakpoints
'
;
import
'
./breakpoints
'
;
class
Wikis
{
export
default
class
Wikis
{
constructor
()
{
constructor
()
{
this
.
bp
=
Breakpoints
.
get
();
this
.
bp
=
Breakpoints
.
get
();
this
.
sidebarEl
=
document
.
querySelector
(
'
.js-wiki-sidebar
'
);
this
.
sidebarEl
=
document
.
querySelector
(
'
.js-wiki-sidebar
'
);
...
@@ -63,6 +62,3 @@ class Wikis {
...
@@ -63,6 +62,3 @@ class Wikis {
}
}
}
}
}
}
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
Wikis
=
Wikis
;
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