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
17209b78
Commit
17209b78
authored
Jan 13, 2022
by
Phil Hughes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cngo-delete-unused-files' into 'master'
Delete unused JS files See merge request gitlab-org/gitlab!78077
parents
64373744
be48b3b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
79 deletions
+0
-79
app/assets/javascripts/experimental_flags.js
app/assets/javascripts/experimental_flags.js
+0
-15
app/assets/javascripts/tree.js
app/assets/javascripts/tree.js
+0
-64
No files found.
app/assets/javascripts/experimental_flags.js
deleted
100644 → 0
View file @
64373744
import
$
from
'
jquery
'
;
import
Cookies
from
'
js-cookie
'
;
export
default
()
=>
{
$
(
'
.js-experiment-feature-toggle
'
).
on
(
'
change
'
,
(
e
)
=>
{
const
el
=
e
.
target
;
Cookies
.
set
(
el
.
name
,
el
.
value
,
{
expires
:
365
*
10
,
});
document
.
body
.
scrollTop
=
0
;
window
.
location
.
reload
();
});
};
app/assets/javascripts/tree.js
deleted
100644 → 0
View file @
64373744
/* eslint-disable func-names, consistent-return, one-var, class-methods-use-this */
import
$
from
'
jquery
'
;
import
{
visitUrl
}
from
'
./lib/utils/url_utility
'
;
export
default
class
TreeView
{
constructor
()
{
this
.
initKeyNav
();
// Code browser tree slider
// Make the entire tree-item row clickable, but not if clicking another link (like a commit message)
$
(
'
.tree-content-holder .tree-item
'
).
on
(
'
click
'
,
function
(
e
)
{
const
$clickedEl
=
$
(
e
.
target
);
const
path
=
$
(
'
.tree-item-file-name a
'
,
this
).
attr
(
'
href
'
);
if
(
!
$clickedEl
.
is
(
'
a
'
)
&&
!
$clickedEl
.
is
(
'
.str-truncated
'
))
{
if
(
e
.
metaKey
||
e
.
which
===
2
)
{
e
.
preventDefault
();
return
window
.
open
(
path
,
'
_blank
'
);
}
return
visitUrl
(
path
);
}
});
// Show the "Loading commit data" for only the first element
$
(
'
span.log_loading
'
).
first
().
removeClass
(
'
hide
'
);
}
initKeyNav
()
{
const
li
=
$
(
'
tr.tree-item
'
);
let
liSelected
=
null
;
return
$
(
'
body
'
).
keydown
((
e
)
=>
{
let
next
,
path
;
if
(
$
(
'
input:focus
'
).
length
>
0
&&
(
e
.
which
===
38
||
e
.
which
===
40
))
{
return
false
;
}
if
(
e
.
which
===
40
)
{
if
(
liSelected
)
{
next
=
liSelected
.
next
();
if
(
next
.
length
>
0
)
{
liSelected
.
removeClass
(
'
selected
'
);
liSelected
=
next
.
addClass
(
'
selected
'
);
}
}
else
{
liSelected
=
li
.
eq
(
0
).
addClass
(
'
selected
'
);
}
return
$
(
liSelected
).
focus
();
}
else
if
(
e
.
which
===
38
)
{
if
(
liSelected
)
{
next
=
liSelected
.
prev
();
if
(
next
.
length
>
0
)
{
liSelected
.
removeClass
(
'
selected
'
);
liSelected
=
next
.
addClass
(
'
selected
'
);
}
}
else
{
liSelected
=
li
.
last
().
addClass
(
'
selected
'
);
}
return
$
(
liSelected
).
focus
();
}
else
if
(
e
.
which
===
13
)
{
path
=
$
(
'
.tree-item.selected .tree-item-file-name a
'
).
attr
(
'
href
'
);
if
(
path
)
{
return
visitUrl
(
path
);
}
}
});
}
}
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