Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

better background color for mod tools, torrents don't move around when you show the checkboxes 🐤, fix auto-updating JS for mods (#1224)

* preliminary CSS work

* only apply button rule to #show_actions

* forgot the JS

* fix auto-updating for mods

* woops wrong file

* there
Cette révision appartient à :
kilo 2017-07-17 22:05:24 +02:00 révisé par akuma06
Parent 0b16ec43f7
révision 68780a6652
3 fichiers modifiés avec 13 ajouts et 9 suppressions

Voir le fichier

@ -728,7 +728,7 @@ input.filelist-checkbox:checked + table.table-filelist {
padding: 5px 10px;
max-width: 1060px;
width: 100%;
background: #e6eff4;
background-color: #F7F8F9;
border: 1px solid #cbbdd7;
height: 50px;
border-radius: 5px;
@ -746,6 +746,10 @@ input.filelist-checkbox:checked + table.table-filelist {
.modtools .cb_action, .toolbar .cb_action {
height: 100%;
}
.modtools #show_actions { margin-top: 4px; }
.mod-open .tr-cat { width: 73px; }
.mod-open .th, .mod-open .home-td, .mod-open .user-td { padding: 2px 2px; }
/* Modal box */
/* The Modal (background) */
.modal {

Voir le fichier

@ -53,8 +53,10 @@ var TorrentsMod = {
var divActions = this.nextElementSibling;
if (divActions.style.display == "inline") {
TorrentsMod.enabled = false;
} else {
TorrentsMod.enabled = true;
document.getElementsByClassName("results box mod-open")[0].className = "results box";
} else {
TorrentsMod.enabled = true;
document.getElementsByClassName("results box")[0].className = "results box mod-open";
}
divActions.style.display = (TorrentsMod.enabled) ? "inline" : "none";
var td_cbs = document.getElementsByClassName("tr-cb")

Voir le fichier

@ -10,7 +10,7 @@ T.Add("{{ language.Tag }}", "{{ LanguageName(language, T) }}")
Templates.Add("torrents.item", function(torrent) {
return "<tr id=\"torrent_" + torrent.id + "\" class=\"torrent-info"+ ((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;\"" : "") +">"+
(( TorrentsMod.enabled ) ? "<td class=\"tr-cb\">" : "<td class=\"tr-cb hide\"" + ((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 }}
@ -24,10 +24,8 @@ Templates.Add("torrents.item", function(torrent) {
((torrent.languages[0] != "") ? "<a href=\"{{URL.Parse("/search?c=") }}"+ torrent.category + "_" + torrent.sub_category +"&lang=" + torrent.languages.join(",") +"\"><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 href=\"/view/"+torrent.id+"\">"+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-name home-td\""+ (torrent.comments.length == 0 ? "colspan=\"2\"" : "" ) +"><a href=\"/view/"+torrent.id+"\">"+Templates.EncodeEntities(torrent.name) +"</a></td>"+
((torrent.comments.length > 0) ? "<td class=\"tr-cs home-td\"><span>"+ torrent.comments.length + "</span></td>" : "")+
"<td class=\"tr-links home-td\">"+
"<a href=\""+torrent.magnet +"\" title=\"{{ T("magnet_link") }}\">"+
"<div class=\"icon-magnet\"></div>"+
@ -39,4 +37,4 @@ Templates.Add("torrents.item", function(torrent) {
"<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>";
});
});