Forgot the selectAll.js
Cette révision appartient à :
Parent
0223fe1014
révision
1974692480
3 fichiers modifiés avec 6 ajouts et 5 suppressions
|
@ -952,7 +952,7 @@ input.filelist-checkbox:checked + table.table-filelist {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tr-actions {
|
.tr-actions {
|
||||||
width: 130px;
|
width: 140px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
$("[data-selectall='checkbox']").on("change", function(e) {
|
document.querySelector("[data-selectall='checkbox']").addEventListener("change", function(e) {
|
||||||
var form = $(this).parents("form");
|
var cbs = document.querySelectorAll("input[type='checkbox'].selectable");
|
||||||
$(form).find("input[type='checkbox']").prop('checked', $(this).prop('checked'));
|
var l = cbs.length;
|
||||||
|
for (var i=0; i<l; i++) cbs[i].checked = e.target.checked;
|
||||||
});
|
});
|
|
@ -43,7 +43,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
{{ range .Models}}
|
{{ range .Models}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="tr-cb"><input type="checkbox" name="torrent_id" value="{{.ID }}"></td>
|
<td class="tr-cb"><input type="checkbox" class="selectable" name="torrent_id" value="{{.ID }}"></td>
|
||||||
<td class="tr-name"><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> {{ if not .IsDeleted }}(<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}">{{ call $.T "edit"}}</a>){{end}}</td>
|
<td class="tr-name"><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> {{ if not .IsDeleted }}(<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}">{{ call $.T "edit"}}</a>){{end}}</td>
|
||||||
<td class="tr-size home-td">{{ if .Uploader }}<a href="{{ if .IsDeleted }}{{ genRoute "mod_tlist_deleted" }}{{else}}{{ genRoute "mod_tlist" }}{{end}}?userID={{.UploaderID}}">{{ .Uploader.Username }}</a>{{ else }}れんちょん{{end}}</td>
|
<td class="tr-size home-td">{{ if .Uploader }}<a href="{{ if .IsDeleted }}{{ genRoute "mod_tlist_deleted" }}{{else}}{{ genRoute "mod_tlist" }}{{end}}?userID={{.UploaderID}}">{{ .Uploader.Username }}</a>{{ else }}れんちょん{{end}}</td>
|
||||||
<td class="tr-actions home-td">
|
<td class="tr-actions home-td">
|
||||||
|
|
Référencer dans un nouveau ticket