Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Make previewed real torrent hidden (50% opacity) and remove any link they have to avoid painful missclicks (#1222)

* Update upload.jet.html

* Add files via upload
Cette révision appartient à :
kilo 2017-07-17 21:54:06 +02:00 révisé par akuma06
Parent e98ce1d318
révision 5eb56a4ea1
2 fichiers modifiés avec 43 ajouts et 1 suppressions

Voir le fichier

@ -0,0 +1,42 @@
{{ range _, cat := GetCategories(false, true) }}
T.Add("{{ cat.ID }}", "{{ T(cat.Name) }}")
{{end}}
{{ range _, language := GetTorrentLanguages() }}
T.Add("{{ language.Code }}", "{{ LanguageName(language, T) }}")
{{ if language.Tag != language.Code }}
T.Add("{{ language.Tag }}", "{{ LanguageName(language, T) }}")
{{end}}
{{end}}
Templates.Add("torrents.item", function(torrent) {
return "<tr id=\"torrent_" + torrent.id + "\" class=\"torrent-info hidden"+ ((torrent.status == 2) ? " remake" : ((torrent.status == 3) ? " trusted" : ((torrent.status == 3) ? " aplus" : "" )))+"\">"+
{{ if User.HasAdmin() }}
"<td class=\"tr-cb\""+ ((TorrentsMod.enabled) ? "style=\"display:table-cell;\"" : "") +">"+
"<input data-name=\""+Templates.EncodeEntities(torrent.name)+"\" type=\"checkbox\" id=\"torrent_cb_"+torrent.id+"\" name=\"torrent_id\" value=\""+torrent.id+"\">"+
"</td>"+
{{ end }}
"<td class=\"tr-cat home-td\">"+
{{ if Sukebei() }}
"<div class=\"nyaa-cat sukebei-cat-"+ torrent.category + torrent.sub_category +"\">"+
{{else}}
"<div class=\"nyaa-cat nyaa-cat-"+ torrent.sub_category +"\">"+
{{end}}
"<a class=\"category\">"+
((torrent.languages[0] != "") ? "<a><img src=\"img/blank.gif\" class=\"flag flag-"+ ((torrent.languages.length == 1) ? flagCode(torrent.languages[0]) : "multiple") +"\" title=\""+torrent.languages.map(function (el, i) { return T.r(el)}).join(",")+"\"></a>" : "") +
"</a>"+
"</div></td>"+
"<td class=\"tr-name home-td\"><a>"+Templates.EncodeEntities(torrent.name) +"</a></td>"+
"<td class=\"tr-cs home-td hide-xs\">"+
((torrent.comments.length > 0) ? "<i class=\"comment-icon\" title=\"{{ T("comments") }}\">" + torrent.comments.length + "</i>" : "")+
"</td>"+
"<td class=\"tr-links home-td\">"+
"<a title=\"{{ T("magnet_link") }}\">"+
"<div class=\"icon-magnet\"></div>"+
"</a>"+(torrent.torrent != "" ? " <a><div class=\"icon-floppy\"></div></a>" : "") +
"</td>"+
"<td class=\"tr-size home-td hide-xs\">"+humanFileSize(torrent.filesize)+"</td>"+
"<td class=\"tr-se home-td hide-xs\">"+torrent.seeders+"</td>"+
"<td class=\"tr-le home-td hide-xs\">"+torrent.leechers+"</td>"+
"<td class=\"tr-dl home-td hide-xs\">"+torrent.completed+"</td>"+
"<td class=\"tr-date home-td date-short hide-xs\">"+torrent.date+"</td>"+
"</tr>";
});

Voir le fichier

@ -112,7 +112,7 @@
<script type="text/javascript" src="/js/kilo.js?v={{ Config.Version}}{{ Config.Build }}"></script>
<script type="text/javascript" src="/js/simplemde.min.js?v={{ Config.Version}}{{ Config.Build }}"></script>
<script type="text/javascript">
{{ include "layouts/partials/torrent_item" }}
{{ include "layouts/partials/torrent_item_upload" }}
var preview = new Kilo({
userTrusted: {{User.IsTrusted()}},
listContext: true,