1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-02 20:30:05 +02:00

improve sort

This commit is contained in:
s2
2018-05-19 18:45:28 +02:00
parent 6e5e119588
commit 31ad7a8f1f
2 changed files with 14 additions and 5 deletions

View File

@@ -8,10 +8,14 @@
//events
ipcRenderer.on('fileList', (event, files) => {
$('.js-container').html(gitlit.templates.main({files: files}));
sorttable.makeSortable($('.js-filestable')[0]);
var myTH = document.getElementsByTagName("th")[0];
sorttable.innerSortFunction.apply(myTH, []);
if (files && files.length > 0) {
$('.js-container').html(gitlit.templates.main({files: files}));
sorttable.makeSortable($('.js-filestable')[0]);
var myTH = document.getElementsByTagName("th")[0];
sorttable.innerSortFunction.apply(myTH, []);
} else {
$('.js-container').html(gitlit.templates.noGitLfsFiles());
}
});
ipcRenderer.on('isNoGitLfsRepo', (event, repoDir) => {

View File

@@ -5,7 +5,7 @@ gitlit.templates = {
<tr>
<th>file</th>
<th>status</th>
<th>action</th>
<th class="sorttable_nosort">action</th>
</tr>
<% files.forEach((file) => { %>
@@ -43,5 +43,10 @@ gitlit.templates = {
<div class="alert alert-danger">
<%= repoDir %> is not a git lfs repo.
</div>
`),
noGitLfsFiles: ejs.compile(`
<div class="alert alert-info">
no files tracked with lfs here.
</div>
`)
};