BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
dbafcc06
Unverified
Commit
dbafcc06
authored
Jul 21, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed param mutation for removeChildFilesOfTree
parent
636b2425
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
repo_sidebar.js
app/assets/javascripts/repo/repo_sidebar.js
+3
-4
repo_store.js
app/assets/javascripts/repo/repo_store.js
+8
-6
No files found.
app/assets/javascripts/repo/repo_sidebar.js
View file @
dbafcc06
...
...
@@ -40,12 +40,11 @@ export default class RepoSidebar {
});
},
linkClicked
(
f
ile
)
{
linkClicked
(
clickedF
ile
)
{
let
url
=
''
;
let
file
=
clickedFile
;
if
(
typeof
file
===
'object'
)
{
if
(
file
.
type
===
'tree'
&&
file
.
opened
)
{
Store
.
removeChildFilesOfTree
(
file
);
}
if
(
file
.
type
===
'tree'
&&
file
.
opened
)
file
=
Store
.
removeChildFilesOfTree
(
file
);
url
=
file
.
url
;
Service
.
url
=
url
;
Helper
.
getContent
(
file
);
...
...
app/assets/javascripts/repo/repo_store.js
View file @
dbafcc06
...
...
@@ -95,20 +95,22 @@ const RepoStore = {
RepoStore
.
activeFileLabel
=
'Display source'
;
},
/* eslint-disable no-param-reassign */
removeChildFilesOfTree
(
tree
)
{
let
foundTree
=
false
;
const
newTree
=
tree
;
RepoStore
.
files
=
RepoStore
.
files
.
filter
((
file
)
=>
{
if
(
file
.
url
===
t
ree
.
url
)
foundTree
=
true
;
if
(
file
.
url
===
newT
ree
.
url
)
foundTree
=
true
;
if
(
foundTree
)
return
file
.
level
<=
t
ree
.
level
;
if
(
foundTree
)
return
file
.
level
<=
newT
ree
.
level
;
return
true
;
});
tree
.
opened
=
false
;
tree
.
icon
=
'fa-folder'
;
newTree
.
opened
=
false
;
newTree
.
icon
=
'fa-folder'
;
return
newTree
;
},
/* eslint-enable no-param-reassign */
removeFromOpenedFiles
(
file
)
{
if
(
file
.
type
===
'tree'
)
return
;
...
...
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