Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

rollback wrongfully comitted changes

Cette révision appartient à :
kilo 2017-11-09 16:06:58 +01:00 révisé par GitHub
Parent 7f480bd9f5
révision 5cb6a9a362
Aucune clé n'a été trouvée pour cette signature dans la base de données
ID de la clé GPG: 4AEE18F83AFDEB23

Voir le fichier

@ -52,7 +52,7 @@
</tr>
<tr class="torrent-info-row">
<td class="torrent-info-td torrent-info-label">{{ T("size")}}:</td>
<td class="torrent-view-td torrent-info-data torrent-info-size">{{ fileSize(Torrent.Filesize, T, true) }}</td>
<td class="torrent-view-td torrent-info-data">{{ fileSize(Torrent.Filesize, T, true) }}</td>
</tr>
{{ if len(Torrent.Languages) > 0 && Torrent.Languages[0] != "" }}
<tr class="torrent-info-row">
@ -188,14 +188,10 @@
<p>{{ T("no_description") }}</p>
{{end}}
<input type="checkbox" id="show-filelist" {{if len(Torrent.FileList) < 4 && len(Torrent.FileList) > 0}}checked{{end}}/>
<label class="torrent-hr filelist-control{{if len(Torrent.FileList) == 0}} hidden{{end}}" for="show-filelist">
{{ if len(Torrent.FileList) == 0 }}
<a href="/files/{{Torrent.ID}}">{{ T("files")}}</a>
{{else}}
{{ T("files")}}
{{end}}
</label>
<label class="torrent-hr filelist-control{{if len(Torrent.FileList) == 0}} hidden{{end}}" for="show-filelist">{{ T("files")}}</label>
<div class="torrent-info-box{{if len(Torrent.FileList) == 0}} hidden{{end}}" id="filelist">
{{ if len(Torrent.FileList) > 0 }}
{* how do i concat lol *}
<table class="table-filelist">
<thead>
<tr>
@ -204,13 +200,12 @@
</tr>
</thead>
<tbody>
{{ if len(Torrent.FileList) > 0 }}
{{ yield make_treeview(treeviewData=makeTreeViewData(RootFolder, 0, "root")) }}
{{else}}
<tr class="tr-filelist"><td colspan="2">{{ T("no_files") }}</td></tr>
{{end}}
{{ yield make_treeview(treeviewData=makeTreeViewData(RootFolder, 0, "root")) }}
</tbody>
</table>
{{ else }}
<p>{{ T("no_files") }}</p>
{{ end }}
</div>
<p class="torrent-hr" id="comments">{{ T("comments")}}</p>
@ -341,36 +336,9 @@ Modal.Init({
// order of apparition of the modals
button: ["#reportPopup", "#tagPopup"]
});
{{ if len(Torrent.FileList) == 0 }}
var FileListContainer = document.querySelector("#filelist tbody"),
FileListLabel = document.getElementsByClassName("filelist-control")[0],
FileListOldHtml = FileListContainer.innerHTML
FileListLabel.innerHTML = FileListLabel.innerText
FileListLabel.addEventListener("click", function (e) {
FileListContainer.innerHTML = "<tr class='tr-filelist'><td>{{T("loading_file_list")}}</td></tr>"
Query.Get('/stats/{{Torrent.ID}}?files', function (data) {
if(data.filelist != null) {
FileListContainer.innerHTML = ""
FileListLabel.style.opacity = 1
document.getElementById("filelist").style.opacity = 1
if(data.totalsize != "0.0 B") document.getElementsByClassName("torrent-info-size")[0].innerHTML = data.totalsize
for(var i = 0; i < data.filelist.length; i++) {
var file = data.filelist[i]
if(file.filesize == "0.0 B") file.filesize = "{{T("unknown")}}"
FileListContainer.innerHTML = FileListContainer.innerHTML + '<tr class="tr-filelist '+ file.class +'"><td>'+ file.path +'</td><td>'+ file.filesize +'</td></tr>'
}
} else {
FileListContainer.innerHTML = FileListOldHtml
}
})
})
{{end}}
</script>
{{ if !torrentFileExists(Torrent.Hash, Torrent.TorrentLink)}}
<script type="text/javascript">
var torrentLink = document.getElementById("torrent-download-link"),
oldDownloadHtml = torrentLink.innerHTML,
downloadIconHtml = torrentLink.innerHTML.substring(0, torrentLink.innerHTML.indexOf("</div>") + 6),
@ -410,8 +378,10 @@ Modal.Init({
}
});
}
</script>
{{end}}
{{if Torrent.StatsObsolete[1] }}
<script type="text/javascript">
var seeders = document.querySelector(".tr-se"),
leechers = document.querySelector(".tr-le"),
downloads = document.querySelector(".tr-dl"),
@ -438,8 +408,9 @@ Modal.Init({
}
})
{{end}}
</script>
{{end}}
{{ if User.ID > 0 }}
<script type="text/javascript" src="{{ URL.Parse("/js/template.js") }}"></script>
<script type="text/javascript" src="{{ URL.Parse("/js/modal.js") }}"></script>