Bugzilla – Attachment 117526 Details for
Bug 24491
Add filters to debit types interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24491: Add optional filtering to debit types
Bug-24491-Add-optional-filtering-to-debit-types.patch (text/plain), 2.63 KB, created by
Martin Renvoize (ashimema)
on 2021-03-02 14:58:41 UTC
(
hide
)
Description:
Bug 24491: Add optional filtering to debit types
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-02 14:58:41 UTC
Size:
2.63 KB
patch
obsolete
>From 3382e23bc9276a819765312bd25ca8abe236fd2a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 2 Mar 2021 14:56:41 +0000 >Subject: [PATCH] Bug 24491: Add optional filtering to debit types > >This patch adds a pair of additional checkbox filtering options to the >debit types page so that you can filter down to just those type that are >available for sale or available for invoicing, or available for both. >--- > .../prog/en/modules/admin/debit_types.tt | 25 ++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >index 5de8f1766f..74dfd7d86f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >@@ -222,7 +222,7 @@ > "iDisplayLength": 20, > "sPaginationType": "full_numbers" > })); >- $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>'); >+ $("#filter_s").html('<p><a href="#" id="filter_system"><i class="fa fa-filter"></i> '+txtActivefilter+'</a><span class="pull-right"><input type="checkbox" id="show_pos" checked="checked"> <i class="fa fa-shopping-cart"></i> Show items for sale</input> <input type="checkbox" id="show_invoice" checked="checked"> <i class="fa fa-id-card-o"></i> Show items for invoicing</input></span></p>'); > $('#filter_system').click(function(e) { > e.preventDefault(); > if ($(this).hasClass('filtered')) { >@@ -238,6 +238,29 @@ > > //Start filtered > $('#filter_system').click(); >+ >+ $('#show_pos').click(function(e){ >+ var filterValue; >+ if($(this).prop("checked") == true){ >+ filterValue = 'Sale' >+ } >+ else if($(this).prop("checked") == false){ >+ filterValue = '^((?<!(Sale)).)*$' >+ } >+ table_debit_types.fnFilter(filterValue, 5, true, false); >+ }); >+ >+ $('#show_invoice').click(function(e){ >+ var filterValue; >+ if($(this).prop("checked") == true){ >+ filterValue = 'Invoicing' >+ } >+ else if($(this).prop("checked") == false){ >+ filterValue = '^((?!(Invoicing)).)*$' >+ } >+ table_debit_types.fnFilter(filterValue, 5, true, false); >+ }); >+ > }); > </script> > [% END %] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24491
: 117526