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
f59eca6a
Commit
f59eca6a
authored
Sep 09, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix find file navigation links
parent
2b3a1da6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
21 deletions
+13
-21
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/project_find_file.js
app/assets/javascripts/project_find_file.js
+3
-21
app/assets/stylesheets/pages/tree.scss
app/assets/stylesheets/pages/tree.scss
+9
-0
No files found.
CHANGELOG
View file @
f59eca6a
...
@@ -12,6 +12,7 @@ v 8.12.0 (unreleased)
...
@@ -12,6 +12,7 @@ v 8.12.0 (unreleased)
- Add two-factor recovery endpoint to internal API !5510
- Add two-factor recovery endpoint to internal API !5510
- Remove vendor prefixes for linear-gradient CSS (ClemMakesApps)
- Remove vendor prefixes for linear-gradient CSS (ClemMakesApps)
- Add font color contrast to external label in admin area (ClemMakesApps)
- Add font color contrast to external label in admin area (ClemMakesApps)
- Fix find file navigation links (ClemMakesApps)
- Change logo animation to CSS (ClemMakesApps)
- Change logo animation to CSS (ClemMakesApps)
- Instructions for enabling Git packfile bitmaps !6104
- Instructions for enabling Git packfile bitmaps !6104
- Fix pagination on user snippets page
- Fix pagination on user snippets page
...
...
app/assets/javascripts/project_find_file.js
View file @
f59eca6a
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
function
ProjectFindFile
(
element1
,
options
)
{
function
ProjectFindFile
(
element1
,
options
)
{
this
.
element
=
element1
;
this
.
element
=
element1
;
this
.
options
=
options
;
this
.
options
=
options
;
this
.
goToBlob
=
bind
(
this
.
goToBlob
,
this
);
this
.
goToTree
=
bind
(
this
.
goToTree
,
this
);
this
.
goToTree
=
bind
(
this
.
goToTree
,
this
);
this
.
selectRowDown
=
bind
(
this
.
selectRowDown
,
this
);
this
.
selectRowDown
=
bind
(
this
.
selectRowDown
,
this
);
this
.
selectRowUp
=
bind
(
this
.
selectRowUp
,
this
);
this
.
selectRowUp
=
bind
(
this
.
selectRowUp
,
this
);
...
@@ -36,16 +35,6 @@
...
@@ -36,16 +35,6 @@
}
}
};
};
})(
this
));
})(
this
));
return
this
.
element
.
find
(
"
.tree-content-holder .tree-table
"
).
on
(
"
click
"
,
function
(
event
)
{
var
path
;
if
(
event
.
target
.
nodeName
!==
"
A
"
)
{
path
=
this
.
element
.
find
(
"
.tree-item-file-name a
"
,
this
).
attr
(
"
href
"
);
if
(
path
)
{
return
location
.
href
=
path
;
}
}
});
// init event
};
};
ProjectFindFile
.
prototype
.
findFile
=
function
()
{
ProjectFindFile
.
prototype
.
findFile
=
function
()
{
...
@@ -121,11 +110,12 @@
...
@@ -121,11 +110,12 @@
// make tbody row html
// make tbody row html
ProjectFindFile
.
prototype
.
makeHtml
=
function
(
filePath
,
matches
,
blobItemUrl
)
{
ProjectFindFile
.
prototype
.
makeHtml
=
function
(
filePath
,
matches
,
blobItemUrl
)
{
var
$tr
;
var
$tr
;
$tr
=
$
(
"
<tr class='tree-item'><td class='tree-item-file-name
'><i class='fa fa-file-text-o fa-fw'></i><span class='str-truncated'><a></a></span
></td></tr>
"
);
$tr
=
$
(
"
<tr class='tree-item'><td class='tree-item-file-name
link-container'><a><i class='fa fa-file-text-o fa-fw'></i><span class='str-truncated'></span></a
></td></tr>
"
);
if
(
matches
)
{
if
(
matches
)
{
$tr
.
find
(
"
a
"
).
replaceWith
(
highlighter
(
$tr
.
find
(
"
a
"
),
filePath
,
matches
).
attr
(
"
href
"
,
blobItemUrl
));
$tr
.
find
(
"
a
"
).
replaceWith
(
highlighter
(
$tr
.
find
(
"
a
"
),
filePath
,
matches
).
attr
(
"
href
"
,
blobItemUrl
));
}
else
{
}
else
{
$tr
.
find
(
"
a
"
).
attr
(
"
href
"
,
blobItemUrl
).
text
(
filePath
);
$tr
.
find
(
"
a
"
).
attr
(
"
href
"
,
blobItemUrl
);
$tr
.
find
(
"
.str-truncated
"
).
text
(
filePath
);
}
}
return
$tr
;
return
$tr
;
};
};
...
@@ -164,14 +154,6 @@
...
@@ -164,14 +154,6 @@
return
location
.
href
=
this
.
options
.
treeUrl
;
return
location
.
href
=
this
.
options
.
treeUrl
;
};
};
ProjectFindFile
.
prototype
.
goToBlob
=
function
()
{
var
path
;
path
=
this
.
element
.
find
(
"
.tree-item.selected .tree-item-file-name a
"
).
attr
(
"
href
"
);
if
(
path
)
{
return
location
.
href
=
path
;
}
};
return
ProjectFindFile
;
return
ProjectFindFile
;
})();
})();
...
...
app/assets/stylesheets/pages/tree.scss
View file @
f59eca6a
...
@@ -55,6 +55,15 @@
...
@@ -55,6 +55,15 @@
}
}
.tree-item
{
.tree-item
{
.link-container
{
padding
:
0
;
a
{
padding
:
10px
$gl-padding
;
display
:
block
;
}
}
.tree-item-file-name
{
.tree-item-file-name
{
max-width
:
320px
;
max-width
:
320px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
...
...
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