|
Lines 23-29
Link Here
|
| 23 |
|
23 |
|
| 24 |
<h1>Checkout notes</h1> |
24 |
<h1>Checkout notes</h1> |
| 25 |
|
25 |
|
| 26 |
<div class="dialog alert" id="error"></div> |
26 |
<div class="dialog alert" id="error" style="display:none;"></div> |
| 27 |
|
27 |
|
| 28 |
[% IF ( selected_count ) %] |
28 |
[% IF ( selected_count ) %] |
| 29 |
<div class="dialog message"> |
29 |
<div class="dialog message"> |
|
Lines 38-49
Link Here
|
| 38 |
[% END %] |
38 |
[% END %] |
| 39 |
|
39 |
|
| 40 |
[% IF ( notes.count ) %] |
40 |
[% IF ( notes.count ) %] |
| 41 |
<fieldset class="action"> |
41 |
<fieldset class="action" style="cursor:pointer;"> |
| 42 |
<a class="SelectAll"><i class="fa fa-check"></i> Select all</a> | <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> |
42 |
<a class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
|
|
43 |
| <a class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> |
| 44 |
| <a class="HideSeen"><i class="fa fa-minus-square"></i> Hide seen</a> |
| 45 |
| <a class="ShowAll"><i class="fa fa-bars"></i> Show all</a> |
| 43 |
</fieldset> |
46 |
</fieldset> |
| 44 |
|
47 |
|
| 45 |
<form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl"> |
48 |
<form id="mark_selected" method="post" action="/cgi-bin/koha/circ/checkout-notes.pl"> |
| 46 |
|
49 |
|
|
|
50 |
<fieldset class="action"> |
| 51 |
<button type="submit" class="btn btn-default btn-sm" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> |
| 52 |
<button type="submit" class="btn btn-default btn-sm" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button> |
| 53 |
</fieldset> |
| 54 |
|
| 47 |
<table id="notestable"> |
55 |
<table id="notestable"> |
| 48 |
<thead> |
56 |
<thead> |
| 49 |
<tr> |
57 |
<tr> |
|
Lines 64-70
Link Here
|
| 64 |
<td>[% note.note | html %]</td> |
72 |
<td>[% note.note | html %]</td> |
| 65 |
<td>[% note.notedate | $KohaDates %]</td> |
73 |
<td>[% note.notedate | $KohaDates %]</td> |
| 66 |
<td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td> |
74 |
<td>[% INCLUDE 'patron-title.inc' patron => note.patron hide_patron_infos_if_needed=1 %]</td> |
| 67 |
<td> |
75 |
<td class="seen[% note.noteseen %]"> |
| 68 |
[% IF ( note.noteseen == 0 ) %] |
76 |
[% IF ( note.noteseen == 0 ) %] |
| 69 |
<span id="status_[% note.issue_id %]">Not seen</span> |
77 |
<span id="status_[% note.issue_id %]">Not seen</span> |
| 70 |
[% ELSIF ( note.noteseen == 1 ) %] |
78 |
[% ELSIF ( note.noteseen == 1 ) %] |
|
Lines 83-93
Link Here
|
| 83 |
</tbody> |
91 |
</tbody> |
| 84 |
</table> |
92 |
</table> |
| 85 |
|
93 |
|
| 86 |
<fieldset class="action"> |
|
|
| 87 |
<button type="submit" class="btn btn-default btn-sm" name="mark_selected-seen" value="seen" disabled="disabled"><i class="fa fa-eye"></i> Mark seen</button> |
| 88 |
<button type="submit" class="btn btn-default btn-sm" name="mark_selected-notseen" value="notseen" disabled="disabled"><i class="fa fa-eye-slash"></i> Mark not seen</button> |
| 89 |
</fieldset> |
| 90 |
|
| 91 |
</form> |
94 |
</form> |
| 92 |
|
95 |
|
| 93 |
[% ELSE %] |
96 |
[% ELSE %] |
|
Lines 131-136
Link Here
|
| 131 |
$(".btn-sm").prop("disabled", true); |
134 |
$(".btn-sm").prop("disabled", true); |
| 132 |
}); |
135 |
}); |
| 133 |
|
136 |
|
|
|
137 |
$(".HideSeen").on("click", function(){ |
| 138 |
$(".seen1").parent().hide(); |
| 139 |
}); |
| 140 |
|
| 141 |
$(".ShowAll").on("click", function(){ |
| 142 |
$("tr").show(); |
| 143 |
}); |
| 144 |
|
| 134 |
$("#error").hide(); |
145 |
$("#error").hide(); |
| 135 |
|
146 |
|
| 136 |
$("input[type='checkbox']").click(function(event){ |
147 |
$("input[type='checkbox']").click(function(event){ |
|
Lines 141-147
Link Here
|
| 141 |
} |
152 |
} |
| 142 |
}); |
153 |
}); |
| 143 |
|
154 |
|
| 144 |
$(".btn-xs").click(function(event){ |
155 |
$("button.seen, button.notseen").click(function(event){ |
| 145 |
event.preventDefault(); // prevent form submission |
156 |
event.preventDefault(); // prevent form submission |
| 146 |
var $action = $(this).attr("name"); |
157 |
var $action = $(this).attr("name"); |
| 147 |
var $issue_id = $(this).data('issue_id'); |
158 |
var $issue_id = $(this).data('issue_id'); |
|
Lines 161-170
Link Here
|
| 161 |
if (data.status == 'success'){ |
172 |
if (data.status == 'success'){ |
| 162 |
if ( $action == 'notseen' ){ |
173 |
if ( $action == 'notseen' ){ |
| 163 |
$("#status_" + $issue_id).text(_("Not seen")); |
174 |
$("#status_" + $issue_id).text(_("Not seen")); |
|
|
175 |
$(event.target).parent().siblings(".seen1").removeClass("seen1").addClass("seen0"); |
| 164 |
$(event.target).siblings(".seen").prop("disabled", false); |
176 |
$(event.target).siblings(".seen").prop("disabled", false); |
| 165 |
$(event.target).prop("disabled", true); |
177 |
$(event.target).prop("disabled", true); |
| 166 |
} else { |
178 |
} else { |
| 167 |
$("#status_" + $issue_id).text(_("Seen")); |
179 |
$("#status_" + $issue_id).text(_("Seen")); |
|
|
180 |
$(event.target).parent().siblings(".seen0").removeClass("seen0").addClass("seen1"); |
| 168 |
$(event.target).siblings(".notseen").prop("disabled", false); |
181 |
$(event.target).siblings(".notseen").prop("disabled", false); |
| 169 |
$(event.target).prop("disabled", true); |
182 |
$(event.target).prop("disabled", true); |
| 170 |
} |
183 |
} |