Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
4d9f7723
Commit
4d9f7723
authored
Oct 31, 2014
by
asseldonk
Browse files
filebrowser: pathbar: make pathbar responsible (part 1)
parent
e61692d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
vispa/extensions/file/static/css/base/base.css
View file @
4d9f7723
...
...
@@ -95,8 +95,10 @@
position
:
absolute
!important
;
left
:
0px
!important
;
bottom
:
0px
!important
;
height
:
3
0
px
!important
;
height
:
3
2
px
!important
;
background-color
:
#fcfcfc
;
overflow-x
:
auto
;
overflow-y
:
hidden
;
/* following entry has to be removed when bookmarks leave this place */
border-top
:
1px
solid
#d3d3d3
;
}
...
...
@@ -125,4 +127,4 @@
.breadcrumb
>
li
+
li
:before
{
color
:
#333
;
}
\ No newline at end of file
}
vispa/extensions/file/static/css/base/views/table/table.css
View file @
4d9f7723
...
...
@@ -53,7 +53,7 @@
/* div around the filelist */
.file-table-list-container
{
position
:
absolute
;
bottom
:
3
0
px
;
bottom
:
3
2
px
;
right
:
0px
;
top
:
34px
;
left
:
0px
;
...
...
@@ -166,7 +166,8 @@
/* selected rows */
.files-table
.file-table-row
[
selected
]
{
background-color
:
#D6D6D6
;
/*background-color: #D6D6D6;*/
background-color
:
#f9f9f9
;
}
...
...
vispa/extensions/file/static/html/pathbar.html
View file @
4d9f7723
<div
class=
"file-path-bar"
>
<div
class=
"bookmark-opener text-center"
>
<i
class=
"glyphicon glyphicon-bookmark"
></i>
</div>
<div
class=
"bookmark-opener text-center"
>
<i
class=
"glyphicon glyphicon-bookmark"
></i>
</div>
<ul
class=
"file-path-parts breadcrumb"
>
<li><a
href=
"#"
data-bind=
"pathPart"
></a></li>
<li><a
href=
"#"
nowrap
class=
"file-path-bar-item"
data-bind=
"pathPart"
></a></li>
</ul>
</div>
\ No newline at end of file
vispa/extensions/file/static/js/base/view.js
View file @
4d9f7723
...
...
@@ -153,24 +153,19 @@ var FileBaseView = Class.extend({
dfd
.
done
(
function
()
{
var
pathParts
=
self
.
FileBase
.
helper
.
splitPath
(
dfd
.
responseText
);
// to make path readable: replace first pathPart to disk
if
(
pathParts
[
0
].
pathPart
==
""
)
{
pathParts
[
0
].
pathPart
=
"
"
;
}
// build pathes to pathParts
// build links to pathParts
var
pathPartsLinks
=
[]
var
t
=
""
;
var
item
=
""
;
$
.
each
(
pathParts
,
function
(
idx
,
part
)
{
if
(
idx
==
0
)
{
t
=
"
/
"
;
item
=
"
/
"
;
}
else
{
t
=
t
+
"
/
"
+
part
.
pathPart
;
item
=
item
+
"
/
"
+
part
.
pathPart
;
}
t
=
t
.
replace
(
/
\/{2,}
/g
,
"
/
"
);
item
=
item
.
replace
(
/
\/{2,}
/g
,
"
/
"
);
pathPartsLinks
.
push
({
"
pathPart
"
:
part
.
pathPart
,
"
pathPartLink
"
:
t
"
pathPartLink
"
:
item
});
})
...
...
@@ -196,8 +191,15 @@ var FileBaseView = Class.extend({
}
self
.
FileBase
.
updateView
();
})
});
// make path bar responsive, also on resizing window
self
.
resizePathBar
(
self
.
filePathBar
);
$
(
window
).
resize
(
function
()
{
self
.
resizePathBar
(
self
.
filePathBar
);
});
});
// bookmarks. remove following lines, when bookmarks are thrown out
$
(
"
.bookmark-opener
"
,
self
.
filePathBar
).
on
(
clicktype
,
function
(
event
)
{
event
.
stopPropagation
();
self
.
FileBase
.
bookmarkcontainer
.
changeVisibility
();
...
...
@@ -205,7 +207,33 @@ var FileBaseView = Class.extend({
});
},
// toggleViewMenu: function(prevView, newView) {
resizePathBar
:
function
(
pathBar
)
{
var
replaceWith
=
"
...
"
;
var
pathPartItems
=
$
(
"
li
"
,
pathBar
);
var
replace
=
false
;
pathPartItems
.
each
(
function
(
index
,
value
)
{
var
heightPathbarItems
=
$
(
"
ul
"
,
pathBar
).
height
();
if
(
heightPathbarItems
<
20
)
{
}
else
{
if
(
index
>
0
&&
index
<
pathPartItems
.
length
-
2
)
{
$
(
this
).
hide
();
if
(
replace
===
false
)
{
$
(
this
).
after
(
replaceWith
);
replace
=
true
;
}
}
}
});
// TO DO: the other way round (upper code works when browser is getting smaller, not when it is getting wider..)
// TO DO: shorten li:last-child when folder name is to long
},
// toggleViewMenu: function(preView, newView) {
toggleViewMenu
:
function
()
{
var
ids
=
[
"
Table
"
,
"
Symbol
"
];
var
view
=
this
.
FileBase
.
workflow
.
currentView
.
type
;
...
...
Write
Preview
Supports
Markdown
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