Skip to content

Commit a8769e2

Browse files
committed
Fix the layout of the metadata listing for long file names on the browse tab
1 parent 59c25f5 commit a8769e2

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@ CMD ["python", "/opt/ethoscope_metadata_server/metadata_db_server.py", "--refres
3030
# -e LETSENCRYPT_HOST="metadata.lab.gilest.ro" \
3131
# -e LETSENCRYPT_EMAIL="giorgio@gilest.ro" \
3232
# ethoscope_metadata_server-lab.gilest.ro
33+
34+
35+
# Update git repo without regenerating the Docker:
36+
# sudo docker exec ethoscope-metadata-server bash -c 'cd /opt/ethoscope_metadata_server && git pull'
37+
# sudo docker restart ethoscope-metadata-server

static/css/style.css

+9
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,13 @@ nav{
6969
left: 50%;
7070
top: 50%;
7171
transform: translate(-50%, -50%);
72+
}
73+
74+
.metadata_name {
75+
overflow: hidden;
76+
text-overflow: ellipsis;
77+
display: -webkit-box;
78+
-webkit-line-clamp: 2; /* number of lines to show */
79+
line-clamp: 2;
80+
-webkit-box-orient: vertical;
7281
}

static/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ <h4 class='header'>Browse</h4>
150150
</div>
151151

152152
<div class="row col s12">
153-
<ul class="collection col s6" id="project-list" style="border:0px;">
153+
<ul class="collection col s12" id="project-list" style="border:0px;">
154154
</ul>
155155
</div>
156156

static/js/script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function refresh_info () {
104104
$('#project-list').html('');
105105
let prj_name = $("#project-select").val();
106106
$.each(data[prj_name], function (filename, identifier) {
107-
$('#project-list').append($('<a href="#" class="collection-item" onclick="update_browser(\''+identifier+'\');return false;" style="display:inline-block">'+filename+'</a><a class="fa fa-trash" style="color:grey;float:right;margin-top:15px;" onclick="delete_metadata(\''+identifier+'\');"></a>'));
107+
$('#project-list').append($('<li><a href="#" class="collection-item metadata_name" onclick="update_browser(\''+identifier+'\');return false;" style="display:inline-block">'+filename+'</a><a class="fa fa-trash" style="color:grey;float:right;margin-top:15px;" onclick="delete_metadata(\''+identifier+'\');"></a></li>'));
108108
})
109109
})
110110
}

0 commit comments

Comments
 (0)