Bug 17899 - Show only mine does not work in newordersuggestion.pl
Bug 12775 added a link "Show only mine" in newordersuggestion.pl. This does not work, no results. Also corrects the fact that click must not do default action by adding e.preventDefault(). Test plan : - You must have suggestions you have accepted - Create a new order from suggestion : /cgi-bin/koha/acqui/newordersuggestion.pl - Click on Show only mine => Without patch the table is empty showing "No matching records found" => With patch you see only suggestions you have accpeted Signed-off-by: Zoe Schoeler <crazy.mental.onion@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
7401d9422b
commit
1104e61635
1 changed files with 5 additions and 3 deletions
|
@ -8,15 +8,17 @@
|
|||
$(document).ready(function() {
|
||||
var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||||
"aoColumnDefs": [
|
||||
{ "aTargets": [ 0 ], "bVisible": false, "bSearchable": false },
|
||||
{ "aTargets": [ 0 ], "bVisible": false, "bSearchable": true }, // must be searchable for fnFilter
|
||||
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
|
||||
],
|
||||
"sPaginationType": "four_button"
|
||||
} ) );
|
||||
$("#show_only_mine").on('click', function(){
|
||||
$("#show_only_mine").on('click', function(e){
|
||||
e.preventDefault();
|
||||
suggestionst.fnFilter('^[% loggedinuser %]$', 0, true);
|
||||
});
|
||||
$("#show_all").on('click', function(){
|
||||
$("#show_all").on('click', function(e){
|
||||
e.preventDefault();
|
||||
suggestionst.fnFilter('', 0 );
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue