|
Lines 12-17
$.tablesorter.addParser({
Link Here
|
| 12 |
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, |
12 |
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, |
| 13 |
type: 'text' |
13 |
type: 'text' |
| 14 |
}); |
14 |
}); |
|
|
15 |
[% IF ( loggedinusername ) %]function enableCheckboxActions(){ |
| 16 |
// Enable/disable controls if checkboxes are checked |
| 17 |
var checkedBoxes = $(".checkboxed input:checkbox:checked"); |
| 18 |
if ($(checkedBoxes).size()) { |
| 19 |
$("#selections").html(_("With selected suggestions: ")); |
| 20 |
$("#selections-toolbar .links a").removeClass("disabled"); |
| 21 |
} else { |
| 22 |
$("#selections").html(_("Select suggestions to: ")); |
| 23 |
$("#selections-toolbar .links a").addClass("disabled"); |
| 24 |
} |
| 25 |
}[% END %] |
| 15 |
|
26 |
|
| 16 |
$(function() { |
27 |
$(function() { |
| 17 |
$("#suggestt").tablesorter({ |
28 |
$("#suggestt").tablesorter({ |
|
Lines 32-48
$.tablesorter.addParser({
Link Here
|
| 32 |
[% END %] |
43 |
[% END %] |
| 33 |
[% END %] |
44 |
[% END %] |
| 34 |
} |
45 |
} |
| 35 |
}); |
46 |
}); |
| 36 |
$("#CheckAll").click(function(){ |
47 |
[% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_('Clear all')+"<\/a>"); |
| 37 |
$(".checkboxed").checkCheckboxes(); |
48 |
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_('Select all')+"<\/a>"); |
| 38 |
return false; |
49 |
$("#CheckAll").click(function(){ |
| 39 |
}); |
50 |
$(".checkboxed").checkCheckboxes(); |
| 40 |
$("#CheckNone").click(function(){ |
51 |
enableCheckboxActions(); |
| 41 |
$(".checkboxed").unCheckCheckboxes(); |
52 |
return false; |
| 42 |
return false; |
53 |
}); |
| 43 |
}); |
54 |
$("#CheckNone").click(function(){ |
|
|
55 |
$(".checkboxed").unCheckCheckboxes(); |
| 56 |
enableCheckboxActions(); |
| 57 |
return false; |
| 58 |
}); |
| 59 |
$(".cb").click(function(){ |
| 60 |
enableCheckboxActions(); |
| 61 |
}); |
| 62 |
$("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Delete")+"</a>") |
| 63 |
.click(function(){ |
| 64 |
$("#myform").submit(); |
| 65 |
return false; |
| 66 |
});[% END %] |
| 44 |
}); |
67 |
}); |
| 45 |
|
68 |
|
| 46 |
function Check(f) { |
69 |
function Check(f) { |
| 47 |
var _alertString=""; |
70 |
var _alertString=""; |
| 48 |
var alertString2; |
71 |
var alertString2; |
|
Lines 115-121
$.tablesorter.addParser({
Link Here
|
| 115 |
[% END %] |
138 |
[% END %] |
| 116 |
|
139 |
|
| 117 |
[% IF ( op_else ) %] |
140 |
[% IF ( op_else ) %] |
| 118 |
<h1>[% UNLESS ( OPACViewOthersSuggestions ) %][% IF ( loggedinusername ) %]My [% END %][% END %]Purchase suggestions</h1> |
141 |
<h1>[% IF ( OPACViewOthersSuggestions ) %]Purchase suggestions[% ELSE %][% IF ( loggedinusername ) %]My purchase suggestions[% ELSE %]Purchase suggestions[% END %][% END %]</h1> |
| 119 |
|
142 |
|
| 120 |
[% IF ( deleted ) %]<div class="dialog message">The selected suggestions have been deleted.</div>[% END %] |
143 |
[% IF ( deleted ) %]<div class="dialog message">The selected suggestions have been deleted.</div>[% END %] |
| 121 |
[% IF ( submitted ) %]<div class="dialog message">Your suggestion has been submitted.</div>[% END %] |
144 |
[% IF ( submitted ) %]<div class="dialog message">Your suggestion has been submitted.</div>[% END %] |
|
Lines 146-156
$.tablesorter.addParser({
Link Here
|
| 146 |
</tr> |
169 |
</tr> |
| 147 |
</table> |
170 |
</table> |
| 148 |
</form>[% END %] |
171 |
</form>[% END %] |
| 149 |
<form action="/cgi-bin/koha/opac-suggestions.pl" method="post"> |
172 |
<form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="myform"> |
| 150 |
<input type="hidden" name="op" value="delete_confirm" /> |
173 |
<input type="hidden" name="op" value="delete_confirm" /> |
| 151 |
<div id="toolbar"><span class="checkall"><a href="#" id="CheckAll">Select all</a></span> |
174 |
<div id="toolbar" class="list-actions">[% IF ( loggedinusername ) %]<a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>[% ELSE %][% IF ( AnonSuggestions ) %]<a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>[% END %][% END %] |
| 152 |
<span class="clearall"><a href="#" id="CheckNone">Clear all</a></span> | [% IF ( loggedinusername ) %]<a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>[% ELSE %][% IF ( AnonSuggestions ) %]<a class="new" href="/cgi-bin/koha/opac-suggestions.pl?op=add">New purchase suggestion</a>[% END %][% END %] |
|
|
| 153 |
</div> |
175 |
</div> |
|
|
176 |
[% IF ( loggedinusername ) %]<div id="selections-toolbar" class="list-actions"> |
| 177 |
<span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span> |
| 178 |
<span class="links"><span id="selections">Select suggestions to: </span> |
| 179 |
<span id="removeitems"></span> |
| 180 |
</div>[% END %] |
| 154 |
<table id="suggestt" class="checkboxed"> |
181 |
<table id="suggestt" class="checkboxed"> |
| 155 |
<thead><tr> |
182 |
<thead><tr> |
| 156 |
[% IF ( loggedinusername ) %]<th> </th>[% END %] |
183 |
[% IF ( loggedinusername ) %]<th> </th>[% END %] |
|
Lines 164-170
$.tablesorter.addParser({
Link Here
|
| 164 |
[% IF ( suggestions_loo.even ) %]<tr>[% ELSE %]<tr class="highlight">[% END %] |
191 |
[% IF ( suggestions_loo.even ) %]<tr>[% ELSE %]<tr class="highlight">[% END %] |
| 165 |
[% IF ( loggedinusername ) %]<td> |
192 |
[% IF ( loggedinusername ) %]<td> |
| 166 |
[% IF ( suggestions_loo.showcheckbox ) %] |
193 |
[% IF ( suggestions_loo.showcheckbox ) %] |
| 167 |
<input type="checkbox" name="delete_field" value="[% suggestions_loo.suggestionid %]" /> |
194 |
<input type="checkbox" class="cb" name="delete_field" value="[% suggestions_loo.suggestionid %]" /> |
| 168 |
[% END %] |
195 |
[% END %] |
| 169 |
</td>[% END %] |
196 |
</td>[% END %] |
| 170 |
<td> |
197 |
<td> |
|
Lines 199-205
$.tablesorter.addParser({
Link Here
|
| 199 |
[% END %] |
226 |
[% END %] |
| 200 |
</tbody> |
227 |
</tbody> |
| 201 |
</table> [% IF ( loggedinusername ) %]<fieldset class="action"> |
228 |
</table> [% IF ( loggedinusername ) %]<fieldset class="action"> |
| 202 |
<input type="submit" value="Delete Checked Items" /> |
229 |
<input type="submit" value="Delete selected" /> |
| 203 |
</fieldset> |
230 |
</fieldset> |
| 204 |
[% END %] |
231 |
[% END %] |
| 205 |
</form> |
232 |
</form> |
| 206 |
- |
|
|