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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
f6d214e1
Commit
f6d214e1
authored
May 08, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary indexOf polyfills
parent
e0c6ea87
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+3
-4
app/assets/javascripts/merge_request_widget.js
app/assets/javascripts/merge_request_widget.js
+1
-3
app/assets/javascripts/new_branch_form.js
app/assets/javascripts/new_branch_form.js
+2
-2
No files found.
app/assets/javascripts/gl_dropdown.js
View file @
f6d214e1
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, one-var-declaration-per-line, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, prefer-template, no-param-reassign, no-loop-func, no-mixed-operators */
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, one-var-declaration-per-line, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, prefer-template, no-param-reassign, no-loop-func, no-mixed-operators */
/* global fuzzaldrinPlus */
/* global fuzzaldrinPlus */
var
GitLabDropdown
,
GitLabDropdownFilter
,
GitLabDropdownRemote
,
var
GitLabDropdown
,
GitLabDropdownFilter
,
GitLabDropdownRemote
;
indexOf
=
[].
indexOf
||
function
(
item
)
{
for
(
var
i
=
0
,
l
=
this
.
length
;
i
<
l
;
i
+=
1
)
{
if
(
i
in
this
&&
this
[
i
]
===
item
)
return
i
;
}
return
-
1
;
};
GitLabDropdownFilter
=
(
function
()
{
GitLabDropdownFilter
=
(
function
()
{
var
ARROW_KEY_CODES
,
BLUR_KEYCODES
,
HAS_VALUE_CLASS
;
var
ARROW_KEY_CODES
,
BLUR_KEYCODES
,
HAS_VALUE_CLASS
;
...
@@ -626,8 +625,8 @@ GitLabDropdown = (function() {
...
@@ -626,8 +625,8 @@ GitLabDropdown = (function() {
};
};
GitLabDropdown
.
prototype
.
highlightTextMatches
=
function
(
text
,
term
)
{
GitLabDropdown
.
prototype
.
highlightTextMatches
=
function
(
text
,
term
)
{
var
occurrences
;
const
occurrences
=
fuzzaldrinPlus
.
match
(
text
,
term
)
;
occurrences
=
fuzzaldrinPlus
.
match
(
text
,
term
)
;
const
indexOf
=
[].
indexOf
;
return
text
.
split
(
''
).
map
(
function
(
character
,
i
)
{
return
text
.
split
(
''
).
map
(
function
(
character
,
i
)
{
if
(
indexOf
.
call
(
occurrences
,
i
)
!==
-
1
)
{
if
(
indexOf
.
call
(
occurrences
,
i
)
!==
-
1
)
{
return
"
<b>
"
+
character
+
"
</b>
"
;
return
"
<b>
"
+
character
+
"
</b>
"
;
...
...
app/assets/javascripts/merge_request_widget.js
View file @
f6d214e1
...
@@ -7,8 +7,6 @@ import './smart_interval';
...
@@ -7,8 +7,6 @@ import './smart_interval';
import
MiniPipelineGraph
from
'
./mini_pipeline_graph_dropdown
'
;
import
MiniPipelineGraph
from
'
./mini_pipeline_graph_dropdown
'
;
((
global
)
=>
{
((
global
)
=>
{
var
indexOf
=
[].
indexOf
||
function
(
item
)
{
for
(
var
i
=
0
,
l
=
this
.
length
;
i
<
l
;
i
+=
1
)
{
if
(
i
in
this
&&
this
[
i
]
===
item
)
return
i
;
}
return
-
1
;
};
const
DEPLOYMENT_TEMPLATE
=
`<div class="mr-widget-heading" id="<%- id %>">
const
DEPLOYMENT_TEMPLATE
=
`<div class="mr-widget-heading" id="<%- id %>">
<div class="ci_widget ci-success">
<div class="ci_widget ci-success">
<%= ci_success_icon %>
<%= ci_success_icon %>
...
@@ -258,7 +256,7 @@ import MiniPipelineGraph from './mini_pipeline_graph_dropdown';
...
@@ -258,7 +256,7 @@ import MiniPipelineGraph from './mini_pipeline_graph_dropdown';
let
stateClass
=
'
btn-danger
'
;
let
stateClass
=
'
btn-danger
'
;
if
(
!
hasCi
)
{
if
(
!
hasCi
)
{
stateClass
=
'
btn-create
'
;
stateClass
=
'
btn-create
'
;
}
else
if
(
indexOf
.
call
(
allowed_states
,
state
)
!==
-
1
)
{
}
else
if
(
allowed_states
.
indexOf
(
state
)
!==
-
1
)
{
switch
(
state
)
{
switch
(
state
)
{
case
"
failed
"
:
case
"
failed
"
:
case
"
canceled
"
:
case
"
canceled
"
:
...
...
app/assets/javascripts/new_branch_form.js
View file @
f6d214e1
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, prefer-rest-params, max-len, vars-on-top, wrap-iife, consistent-return, comma-dangle, one-var-declaration-per-line, quotes, no-return-assign, prefer-arrow-callback, prefer-template, no-shadow, no-else-return, max-len, object-shorthand */
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, prefer-rest-params, max-len, vars-on-top, wrap-iife, consistent-return, comma-dangle, one-var-declaration-per-line, quotes, no-return-assign, prefer-arrow-callback, prefer-template, no-shadow, no-else-return, max-len, object-shorthand */
(
function
()
{
(
function
()
{
var
indexOf
=
[].
indexOf
||
function
(
item
)
{
for
(
var
i
=
0
,
l
=
this
.
length
;
i
<
l
;
i
+=
1
)
{
if
(
i
in
this
&&
this
[
i
]
===
item
)
return
i
;
}
return
-
1
;
};
this
.
NewBranchForm
=
(
function
()
{
this
.
NewBranchForm
=
(
function
()
{
function
NewBranchForm
(
form
,
availableRefs
)
{
function
NewBranchForm
(
form
,
availableRefs
)
{
this
.
validate
=
this
.
validate
.
bind
(
this
);
this
.
validate
=
this
.
validate
.
bind
(
this
);
...
@@ -94,6 +92,8 @@
...
@@ -94,6 +92,8 @@
NewBranchForm
.
prototype
.
validate
=
function
()
{
NewBranchForm
.
prototype
.
validate
=
function
()
{
var
errorMessage
,
errors
,
formatter
,
unique
,
validator
;
var
errorMessage
,
errors
,
formatter
,
unique
,
validator
;
const
indexOf
=
[].
indexOf
;
this
.
branchNameError
.
empty
();
this
.
branchNameError
.
empty
();
unique
=
function
(
values
,
value
)
{
unique
=
function
(
values
,
value
)
{
if
(
indexOf
.
call
(
values
,
value
)
===
-
1
)
{
if
(
indexOf
.
call
(
values
,
value
)
===
-
1
)
{
...
...
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