mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 20:30:05 +02:00
improve sort
This commit is contained in:
@@ -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) => {
|
||||
|
@@ -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>
|
||||
`)
|
||||
};
|
||||
|
Reference in New Issue
Block a user