Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
surfer-okd
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PUBLIC
surfer-okd
Commits
51723cdf
Commit
51723cdf
authored
Nov 06, 2016
by
Johannes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make breadcrumbs clickable
Fixes #2
parent
5f43935e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
index.html
app/index.html
+2
-2
app.js
app/js/app.js
+7
-4
No files found.
app/index.html
View file @
51723cdf
...
...
@@ -116,9 +116,9 @@
</div>
<div
class=
"col-lg-12"
>
<ol
class=
"breadcrumb"
>
<li><
i
class=
"fa fa-home"
></i>
</li>
<li><
a
href=
"#/"
><i
class=
"fa fa-home"
></i>
</a>
</li>
<li
v-for=
"part in pathParts"
>
{{ part }}
<a
href=
"{{ part.link }}"
>
{{ part.name }}
</a>
</li>
</ol>
</div>
...
...
app/js/app.js
View file @
51723cdf
...
...
@@ -77,9 +77,7 @@ function loadDirectory(filePath) {
filePath
=
filePath
?
sanitize
(
filePath
)
:
'/'
;
console
.
log
(
filePath
);
superagent
.
get
(
'/api/files/'
+
filePath
).
query
({
username
:
app
.
session
.
username
,
password
:
app
.
session
.
password
}).
end
(
function
(
error
,
result
)
{
superagent
.
get
(
'/api/files/'
+
encode
(
filePath
)).
query
({
username
:
app
.
session
.
username
,
password
:
app
.
session
.
password
}).
end
(
function
(
error
,
result
)
{
app
.
busy
=
false
;
if
(
result
&&
result
.
statusCode
===
401
)
return
logout
();
...
...
@@ -91,7 +89,12 @@ function loadDirectory(filePath) {
return
entry
;
});
app
.
path
=
filePath
;
app
.
pathParts
=
decode
(
filePath
).
split
(
'/'
).
filter
(
function
(
e
)
{
return
!!
e
;
});
app
.
pathParts
=
decode
(
filePath
).
split
(
'/'
).
filter
(
function
(
e
)
{
return
!!
e
;
}).
map
(
function
(
e
,
i
,
a
)
{
return
{
name
:
e
,
link
:
'#'
+
sanitize
(
'/'
+
a
.
slice
(
0
,
i
).
join
(
'/'
)
+
'/'
+
e
)
};
});
// update in case this was triggered from code
window
.
location
.
hash
=
app
.
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