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
128c6e70
Commit
128c6e70
authored
Jun 30, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor UsernameValidator class to ES module syntax
parent
5530d801
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
5 deletions
+2
-5
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+1
-1
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+0
-1
app/assets/javascripts/username_validator.js
app/assets/javascripts/username_validator.js
+1
-3
No files found.
app/assets/javascripts/dispatcher.js
View file @
128c6e70
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */
/* global UsernameValidator */
/* global ActiveTabMemoizer */
/* global ActiveTabMemoizer */
/* global ShortcutsNavigation */
/* global ShortcutsNavigation */
/* global IssuableIndex */
/* global IssuableIndex */
...
@@ -53,6 +52,7 @@ import UsersSelect from './users_select';
...
@@ -53,6 +52,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
UsernameValidator
from
'
./username_validator
'
;
import
VersionCheckImage
from
'
./version_check_image
'
;
import
VersionCheckImage
from
'
./version_check_image
'
;
import
Wikis
from
'
./wikis
'
;
import
Wikis
from
'
./wikis
'
;
import
ZenMode
from
'
./zen_mode
'
;
import
ZenMode
from
'
./zen_mode
'
;
...
...
app/assets/javascripts/main.js
View file @
128c6e70
...
@@ -157,7 +157,6 @@ import './tree';
...
@@ -157,7 +157,6 @@ import './tree';
import
'
./usage_ping
'
;
import
'
./usage_ping
'
;
import
'
./user
'
;
import
'
./user
'
;
import
'
./user_tabs
'
;
import
'
./user_tabs
'
;
import
'
./username_validator
'
;
import
'
./users_select
'
;
import
'
./users_select
'
;
// eslint-disable-next-line global-require, import/no-commonjs
// eslint-disable-next-line global-require, import/no-commonjs
...
...
app/assets/javascripts/username_validator.js
View file @
128c6e70
...
@@ -8,7 +8,7 @@ const successMessageSelector = '.username .validation-success';
...
@@ -8,7 +8,7 @@ const successMessageSelector = '.username .validation-success';
const
pendingMessageSelector
=
'
.username .validation-pending
'
;
const
pendingMessageSelector
=
'
.username .validation-pending
'
;
const
invalidMessageSelector
=
'
.username .gl-field-error
'
;
const
invalidMessageSelector
=
'
.username .gl-field-error
'
;
class
UsernameValidator
{
export
default
class
UsernameValidator
{
constructor
()
{
constructor
()
{
this
.
inputElement
=
$
(
'
#new_user_username
'
);
this
.
inputElement
=
$
(
'
#new_user_username
'
);
this
.
inputDomElement
=
this
.
inputElement
.
get
(
0
);
this
.
inputDomElement
=
this
.
inputElement
.
get
(
0
);
...
@@ -129,5 +129,3 @@ class UsernameValidator {
...
@@ -129,5 +129,3 @@ class UsernameValidator {
$inputErrorMessage
.
show
();
$inputErrorMessage
.
show
();
}
}
}
}
window
.
UsernameValidator
=
UsernameValidator
;
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