|
Lines 25-31
$(document).ready(function() {
Link Here
|
| 25 |
// DataTables removes hidden rows from the DOM, so we can't expect a |
25 |
// DataTables removes hidden rows from the DOM, so we can't expect a |
| 26 |
// "regular" submit to work and we need to build another form containing |
26 |
// "regular" submit to work and we need to build another form containing |
| 27 |
// all form elements, and then submit this form. |
27 |
// all form elements, and then submit this form. |
| 28 |
$('form').submit(function(e) { |
28 |
$('#tabs form').submit(function(e) { |
| 29 |
e.preventDefault(); |
29 |
e.preventDefault(); |
| 30 |
|
30 |
|
| 31 |
var form = $(this); |
31 |
var form = $(this); |
|
Lines 49-67
$(document).ready(function() {
Link Here
|
| 49 |
$(".CheckNone").click(function(e){ |
49 |
$(".CheckNone").click(function(e){ |
| 50 |
e.preventDefault(); |
50 |
e.preventDefault(); |
| 51 |
var form = $(this).parents("form").first(); |
51 |
var form = $(this).parents("form").first(); |
| 52 |
var table = form.find('table').dataTable(); |
52 |
form.find('table input[type="checkbox"]').prop('checked', false); |
| 53 |
table.$('input[type="checkbox"]').attr('checked', false); |
|
|
| 54 |
enableCheckboxActions(form); |
53 |
enableCheckboxActions(form); |
| 55 |
}); |
54 |
}); |
| 56 |
$(".CheckAll").click(function(e){ |
55 |
$(".CheckAll").click(function(e){ |
| 57 |
e.preventDefault(); |
56 |
e.preventDefault(); |
| 58 |
var form = $(this).parents("form").first(); |
57 |
var form = $(this).parents("form").first(); |
| 59 |
var table = form.find('table').dataTable(); |
58 |
form.find('table input[type="checkbox"]').prop('checked', true); |
| 60 |
table.$('input[type="checkbox"]').attr('checked', true); |
|
|
| 61 |
enableCheckboxActions(form); |
59 |
enableCheckboxActions(form); |
| 62 |
}); |
60 |
}); |
| 63 |
|
61 |
|
| 64 |
$("input:checkbox").click(function(){ |
62 |
$('#tabs table').on('click', 'input:checkbox', function() { |
| 65 |
var form = $(this).parents("form").first(); |
63 |
var form = $(this).parents("form").first(); |
| 66 |
enableCheckboxActions(form); |
64 |
enableCheckboxActions(form); |
| 67 |
}); |
65 |
}); |
|
Lines 88-93
$(document).ready(function() {
Link Here
|
| 88 |
return false; |
86 |
return false; |
| 89 |
}); |
87 |
}); |
| 90 |
|
88 |
|
|
|
89 |
$('#tabs form').each(function() { |
| 90 |
enableCheckboxActions($(this)); |
| 91 |
}); |
| 91 |
}); |
92 |
}); |
| 92 |
|
93 |
|
| 93 |
function enableCheckboxActions(form){ |
94 |
function enableCheckboxActions(form){ |
|
Lines 136-143
function enableCheckboxActions(form){
Link Here
|
| 136 |
<h2>Current session</h2> |
137 |
<h2>Current session</h2> |
| 137 |
<form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> |
138 |
<form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> |
| 138 |
<div class="selections-toolbar"> |
139 |
<div class="selections-toolbar"> |
| 139 |
<a class="CheckAll" href="#">Select all</a> |
140 |
<a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
| 140 |
<a class="CheckNone" href="#">Clear all</a> |
141 |
<span class="sep">|</span> |
|
|
142 |
<a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
| 141 |
<span class="sep">|</span> |
143 |
<span class="sep">|</span> |
| 142 |
<span class="links"> |
144 |
<span class="links"> |
| 143 |
<span class="selections">Select searches to: </span> |
145 |
<span class="selections">Select searches to: </span> |
|
Lines 172-179
function enableCheckboxActions(form){
Link Here
|
| 172 |
<h2>Previous sessions</h2> |
174 |
<h2>Previous sessions</h2> |
| 173 |
<form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> |
175 |
<form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> |
| 174 |
<div class="selections-toolbar"> |
176 |
<div class="selections-toolbar"> |
| 175 |
<a class="CheckAll" href="#">Select all</a> |
177 |
<a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
| 176 |
<a class="CheckNone" href="#">Clear all</a> |
178 |
<span class="sep">|</span> |
|
|
179 |
<a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
| 177 |
<span class="sep">|</span> |
180 |
<span class="sep">|</span> |
| 178 |
<span class="links"> |
181 |
<span class="links"> |
| 179 |
<span class="selections">Select searches to: </span> |
182 |
<span class="selections">Select searches to: </span> |
|
Lines 214-221
function enableCheckboxActions(form){
Link Here
|
| 214 |
<h2>Current session</h2> |
217 |
<h2>Current session</h2> |
| 215 |
<form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> |
218 |
<form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> |
| 216 |
<div class="selections-toolbar"> |
219 |
<div class="selections-toolbar"> |
| 217 |
<a class="CheckAll" href="#">Select all</a> |
220 |
<a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
| 218 |
<a class="CheckNone" href="#">Clear all</a> |
221 |
<span class="sep">|</span> |
|
|
222 |
<a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
| 219 |
<span class="sep">|</span> |
223 |
<span class="sep">|</span> |
| 220 |
<span class="links"> |
224 |
<span class="links"> |
| 221 |
<span class="selections">Select searches to: </span> |
225 |
<span class="selections">Select searches to: </span> |
|
Lines 250-257
function enableCheckboxActions(form){
Link Here
|
| 250 |
<h2>Previous sessions</h2> |
254 |
<h2>Previous sessions</h2> |
| 251 |
<form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> |
255 |
<form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> |
| 252 |
<div class="selections-toolbar"> |
256 |
<div class="selections-toolbar"> |
| 253 |
<a class="CheckAll" href="#">Select all</a> |
257 |
<a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a> |
| 254 |
<a class="CheckNone" href="#">Clear all</a> |
258 |
<span class="sep">|</span> |
|
|
259 |
<a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> |
| 255 |
<span class="sep">|</span> |
260 |
<span class="sep">|</span> |
| 256 |
<span class="links"> |
261 |
<span class="links"> |
| 257 |
<span class="selections">Select searches to: </span> |
262 |
<span class="selections">Select searches to: </span> |
| 258 |
- |
|
|