Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.toolbox
Commits
72d1cc53
Commit
72d1cc53
authored
Nov 25, 2012
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GsFileManager: breadcrumb with link
parent
c7f4f377
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
slapos/runner/static/css/gsFileManager.css
slapos/runner/static/css/gsFileManager.css
+2
-1
slapos/runner/static/js/jquery/gsFileManager.js
slapos/runner/static/js/jquery/gsFileManager.js
+21
-2
No files found.
slapos/runner/static/css/gsFileManager.css
View file @
72d1cc53
UL
.jqueryFileTree
{
UL
.jqueryFileTree
{
font-family
:
Verdana
,
sans-serif
;
font-family
:
Verdana
,
sans-serif
;
font-size
:
12px
;
font-size
:
12px
;
line-height
:
18px
;
line-height
:
18px
;
padding
:
0px
;
padding
:
0px
;
...
@@ -134,6 +134,7 @@ div.browser div.gs_dir_content_files{min-height:330px;}
...
@@ -134,6 +134,7 @@ div.browser div.gs_dir_content_files{min-height:330px;}
.rowSelected
a
{
.rowSelected
a
{
color
:
#FFF
;
color
:
#FFF
;
}
}
.pathlink
{
cursor
:
pointer
;
font-size
:
13px
;
margin-right
:
2px
;
margin-left
:
2px
;}
.gs_delimiter
{
.gs_delimiter
{
height
:
16px
;
height
:
16px
;
...
...
slapos/runner/static/js/jquery/gsFileManager.js
View file @
72d1cc53
...
@@ -525,6 +525,21 @@ if (jQuery) (function(jQuery){
...
@@ -525,6 +525,21 @@ if (jQuery) (function(jQuery){
}
}
function
splitPath
(
path
)
{
var
list
=
path
.
split
(
'
/
'
),
html
=
""
;
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
){
var
subList
=
new
Array
();
if
(
list
[
i
]
!==
''
)
{
for
(
var
j
=
0
;
j
<=
i
;
j
++
){
subList
.
push
(
list
[
j
]);
}
html
+=
"
<a class='pathlink' rel='
"
+
subList
.
join
(
'
/
'
)
+
"
/'>
"
+
list
[
i
]
+
"
</a>/
"
;
}
}
return
html
;
}
function
showTree
(
c
,
t
)
{
function
showTree
(
c
,
t
)
{
var
cObject
=
jQuery
(
c
);
var
cObject
=
jQuery
(
c
);
cObject
.
addClass
(
'
wait
'
);
cObject
.
addClass
(
'
wait
'
);
...
@@ -541,7 +556,8 @@ if (jQuery) (function(jQuery){
...
@@ -541,7 +556,8 @@ if (jQuery) (function(jQuery){
success
:
function
(
data
)
{
success
:
function
(
data
)
{
//remember current dir id
//remember current dir id
jQuery
(
"
#curDir
"
).
html
(
unescape
(
t
));
jQuery
(
"
#curDir
"
).
html
(
splitPath
(
unescape
(
t
)));
jQuery
(
"
#curDir
"
).
attr
(
'
val
'
,
unescape
(
t
));
jQuery
(
"
#curDir
"
).
attr
(
'
rel
'
,
jQuery
(
'
a
'
,
cObject
).
attr
(
'
id
'
));
jQuery
(
"
#curDir
"
).
attr
(
'
rel
'
,
jQuery
(
'
a
'
,
cObject
).
attr
(
'
id
'
));
gs_cur_items
=
new
Array
();
gs_cur_items
=
new
Array
();
...
@@ -587,6 +603,9 @@ if (jQuery) (function(jQuery){
...
@@ -587,6 +603,9 @@ if (jQuery) (function(jQuery){
jQuery
(
t
).
find
(
'
LI > A
'
).
bind
(
'
click
'
,
function
()
{
jQuery
(
t
).
find
(
'
LI > A
'
).
bind
(
'
click
'
,
function
()
{
showTree
(
jQuery
(
this
).
parent
(),
encodeURIComponent
(
jQuery
(
this
).
attr
(
'
rel
'
).
match
(
/.*
\/
/
)));
showTree
(
jQuery
(
this
).
parent
(),
encodeURIComponent
(
jQuery
(
this
).
attr
(
'
rel
'
).
match
(
/.*
\/
/
)));
});
});
jQuery
(
'
a.pathlink
'
).
bind
(
'
click
'
,
function
()
{
showTree
(
jQuery
(
'
#gs_dir_list
'
),
jQuery
(
this
).
attr
(
'
rel
'
));
});
}
}
function
showRoot
(){
function
showRoot
(){
...
@@ -630,7 +649,7 @@ if (jQuery) (function(jQuery){
...
@@ -630,7 +649,7 @@ if (jQuery) (function(jQuery){
});
});
return
false
;
return
false
;
}
}
var
curDir
=
jQuery
(
"
#curDir
"
).
html
(
);
var
curDir
=
jQuery
(
"
#curDir
"
).
attr
(
'
val
'
);
var
dataForSend
=
null
;
var
dataForSend
=
null
;
var
gsitem
=
gs_get_cur_item
(
jQuery
(
this
).
attr
(
'
rel
'
));
var
gsitem
=
gs_get_cur_item
(
jQuery
(
this
).
attr
(
'
rel
'
));
...
...
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