|
Lines 8-14
Link Here
|
| 8 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
8 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
| 9 |
<script type="text/javascript"> |
9 |
<script type="text/javascript"> |
| 10 |
//<![CDATA[ |
10 |
//<![CDATA[ |
| 11 |
var MSG_CONFIRM_DELETE_HISTORY = _("Are you sure you want to delete selected search history entries?"); |
|
|
| 12 |
$(document).ready(function() { |
11 |
$(document).ready(function() { |
| 13 |
// We show table ordered by descending dates by default |
12 |
// We show table ordered by descending dates by default |
| 14 |
// (so that the more recent query is shown first) |
13 |
// (so that the more recent query is shown first) |
|
Lines 75-81
$(document).ready(function() {
Link Here
|
| 75 |
if ( $(ids).length < 1 ) { |
74 |
if ( $(ids).length < 1 ) { |
| 76 |
return false; |
75 |
return false; |
| 77 |
} |
76 |
} |
| 78 |
if ( confirm(MSG_CONFIRM_DELETE_HISTORY) ) { |
77 |
|
|
|
78 |
var msg; |
| 79 |
if (ids.length == 1) { |
| 80 |
msg = _("Are you sure you want to delete the selected search history entry?"); |
| 81 |
} else { |
| 82 |
msg = _("Are you sure you want to delete the %s selected search history entries?").format(ids.length); |
| 83 |
} |
| 84 |
|
| 85 |
if ( confirm(msg) ) { |
| 79 |
form.submit(); |
86 |
form.submit(); |
| 80 |
} |
87 |
} |
| 81 |
return false; |
88 |
return false; |
|
Lines 86-94
$(document).ready(function() {
Link Here
|
| 86 |
function enableCheckboxActions(form){ |
93 |
function enableCheckboxActions(form){ |
| 87 |
// Enable/disable controls if checkboxes are checked |
94 |
// Enable/disable controls if checkboxes are checked |
| 88 |
var table = form.find('table').dataTable(); |
95 |
var table = form.find('table').dataTable(); |
| 89 |
var checkedBoxes = table.$("input:checkbox:checked"); |
96 |
var checked_count = table.$("input:checkbox:checked").length; |
| 90 |
if (checkedBoxes.size()) { |
97 |
if (checked_count) { |
| 91 |
form.find(".selections").html(_("With selected searches: ")); |
98 |
if (checked_count == 1) { |
|
|
99 |
form.find(".selections").html(_("With selected search: ")); |
| 100 |
} else { |
| 101 |
form.find(".selections").html(_("With %s selected searches: ").format(checked_count)); |
| 102 |
} |
| 92 |
form.find(".selections-toolbar .links a").removeClass("disabled"); |
103 |
form.find(".selections-toolbar .links a").removeClass("disabled"); |
| 93 |
} else { |
104 |
} else { |
| 94 |
form.find(".selections").html(_("Select searches to: ")); |
105 |
form.find(".selections").html(_("Select searches to: ")); |
| 95 |
- |
|
|