Commit 3f00a3ee authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

Filebrowser (table view): shorten filenames using css

parent 888c752c
......@@ -128,6 +128,21 @@
.file-table-name {
text-align: left;
white-space: nowrap;
}
.file-table-name .filename-root {
display: inline-block;
max-width: 80%;
overflow: hidden;
white-space: nowrap;
vertical-align: middle;
text-overflow: ellipsis;
}
.file-table-name .filename-ext {
white-space: nowrap;
vertical-align: middle;
}
.file-table-size {
......
......@@ -16,7 +16,7 @@
<img data-bind="icon">
<span class="glyphicon glyphicon-new-window" data-bind="syml"></span>
</div>
<div class="col-xs-8 col-sm-5 col-md-4 col-lg-6 file-table-name"><span data-bind="name"></span></div>
<div class="col-xs-8 col-sm-5 col-md-4 col-lg-6 file-table-name"><span class="filename-root" data-bind="root"></span><span class="filename-ext" data-bind="ext"></span></div>
<div class=" col-md-2 col-lg-1 hidden-sm hidden-xs file-table-size"><span data-bind="size"></span> <span data-bind="sizeSuffix"></span></div>
<div class=" col-sm-4 col-md-3 col-lg-2 hidden-xs file-table-time"><span data-bind="mtime"></span></div>
<div class="col-xs-1 col-sm-1 col-md-1 col-lg-1 file-properties file-table-options"><span class="glyphicon glyphicon-cog"></span></div>
......
......@@ -35,14 +35,6 @@ var Tableview = Class.extend({
// render the content
$(".files-table", this.fileContentContainer).render(data.filelist, this.FileBase.view.directives);
var tableContent = $(".file-view-content-container", this.fileContentContainer);
$(".file-table-name", tableContent).ellipsis({
row: 1,
position: "middle"
// onlyFullWords: true
});
// make select-all-checkboc clickable
$(".file-table-select-all", self.fileContentContainer).click(function() {
setTimeout(function() {
......
......@@ -150,8 +150,11 @@ class FileSystem(object):
if filter and bool(filter.search(elem)) != reverse:
continue
root, ext = os.path.splitext(elem)
info = {
'name': elem
'name': elem,
'root': root,
'ext': ext
}
fullpath = os.path.join(path_expand, elem)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment