Bug 12432 - Saved reports tabs not working
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 28 Jul 2014 15:18:59 +0000 (10:18 -0500)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 8 Dec 2014 13:25:33 +0000 (14:25 +0100)
In release 3.14.05.000 the tabs on the Saved Reports page worked
correctly but after upgrading to 3.16.00.000 the tabs stop working.
Visually the tabs change but the table of reports is not filtered. There
are no errors reported in the browser console.

Test Plan:
1) Attempt to filter saved reports by group tabs
2) Note no matter the tab you select, all reports appear
3) Apply this patch
4) Repeat step 1
5) Note the reports are now filtered correctly

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described with the
second patch applied as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 273e86c045ad7e34a3eedeee0c5d3328af8a7605)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

index 63608f7..aa0f8e6 100644 (file)
@@ -76,7 +76,7 @@ $(document).ready(function(){
     }));
 
     var rtabs = $("#tabs").tabs();
-    rtabs.bind("tabsshow", function(e, ui) {
+    rtabs.on("tabsactivate", function(e, ui) {
         $("#subgroup_filter option").each(function() {
             if($(this).val().length > 0) {
                 $(this).remove();
@@ -87,8 +87,9 @@ $(document).ready(function(){
         rtable.fnSetColumnVis(4, true);
         rtable.fnSetColumnVis(5, true);
 
-        var g_id = $(ui.tab).attr('id')
-        var g_name = $(ui.tab).text();
+        var g_id = $(ui.newTab).children().attr('id');
+        var g_name = $(ui.newTab).text();
+
         if (g_id && g_id.length > 0) {
             rtable.fnFilter('^' + g_name + '$', 4, true, true, true, false);
             rtable.fnSetColumnVis(4, false);