View | Details | Raw Unified | Return to bug 24958
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-31 / +49 lines)
Lines 1374-1379 Link Here
1374
        }
1374
        }
1375
1375
1376
        $(document).ready(function(){
1376
        $(document).ready(function(){
1377
1378
            var activeTab = localStorage.getItem("sql_reports_activetab");
1379
1377
            $("body").on('click',".fetch_chart_data",function(){
1380
            $("body").on('click',".fetch_chart_data",function(){
1378
                if( [% unlimited_total || 0 | $raw %] > 1000 ){
1381
                if( [% unlimited_total || 0 | $raw %] > 1000 ){
1379
                    if( confirm("Fetching full chart data for reports with many rows can cause performance issues. Are you sure you with to chart this report?") ){
1382
                    if( confirm("Fetching full chart data for reports with many rows can cause performance issues. Are you sure you with to chart this report?") ){
Lines 1561-1599 Link Here
1561
                    },
1564
                    },
1562
                }, columns_settings);
1565
                }, columns_settings);
1563
1566
1564
                var rtabs = $("#tabs").tabs();
1567
                var rtabs = $("#tabs").tabs({
1565
                rtabs.on("tabsactivate", function(e, ui) {
1568
                    create: function( e, ui ){
1566
                    $("#subgroup_filter option").each(function() {
1569
                        tabsInit( ui, rtable );
1567
                        if($(this).val().length > 0) {
1570
                    },
1568
                            $(this).remove();
1571
                    activate: function( e, ui ){
1569
                        }
1572
                        tabsInit( ui, rtable );
1570
                    });
1571
                    rtable.fnFilter('', 4);
1572
                    rtable.fnFilter('', 5);
1573
                    rtable.fnSetColumnVis(4, true);
1574
                    rtable.fnSetColumnVis(5, true);
1575
1576
                    var g_id = $(ui.newTab).children().attr('id');
1577
                    var g_name = $(ui.newTab).text();
1578
                    if ( g_name == _("All") ) {
1579
                        g_id = "";
1580
                        g_name = "";
1581
                    }
1582
1583
                    if (g_id && g_id.length > 0) {
1584
                        rtable.fnFilter('^' + g_name + '$', 4, true, true, true, false);
1585
                        rtable.fnSetColumnVis(4, false);
1586
                        for(var i in group_subgroups[g_id]) {
1587
                            $("#subgroup_filter").append(
1588
                                '<option value="' + group_subgroups[g_id][i][0] + '">'
1589
                                + group_subgroups[g_id][i][1] + '</option>'
1590
                            );
1591
                        }
1592
                        $("#subgroup_filter_block").show();
1593
                    } else {
1594
                        $("#subgroup_filter_block").hide();
1595
                    }
1573
                    }
1596
                });
1574
                });
1575
                if( activeTab ){
1576
                    $("#tabs").tabs("option","active", activeTab );
1577
                }
1597
                $("#subgroup_filter_block").hide();
1578
                $("#subgroup_filter_block").hide();
1598
1579
1599
                $("#subgroup_filter").change(function() {
1580
                $("#subgroup_filter").change(function() {
Lines 1806-1811 Link Here
1806
            });
1787
            });
1807
        });
1788
        });
1808
1789
1790
        function tabsInit( ui, rtable ){
1791
            var thisTab = ui.newTab ? ui.newTab : ui.tab;
1792
            var activeTab = thisTab.index();
1793
            localStorage.setItem("sql_reports_activetab", activeTab );
1794
1795
            $("#subgroup_filter option").each(function() {
1796
                if($(this).val().length > 0) {
1797
                    $(this).remove();
1798
                }
1799
            });
1800
            rtable.fnFilter('', 4);
1801
            rtable.fnFilter('', 5);
1802
            rtable.fnSetColumnVis(4, true);
1803
            rtable.fnSetColumnVis(5, true);
1804
1805
            var g_id = $(ui.newTab).children().attr('id');
1806
            var g_name = $(ui.newTab).text();
1807
            if ( g_name == _("All") ) {
1808
                g_id = "";
1809
                g_name = "";
1810
            }
1811
1812
            if (g_id && g_id.length > 0) {
1813
                rtable.fnFilter('^' + g_name + '$', 4, true, true, true, false);
1814
                rtable.fnSetColumnVis(4, false);
1815
                for(var i in group_subgroups[g_id]) {
1816
                    $("#subgroup_filter").append(
1817
                        '<option value="' + group_subgroups[g_id][i][0] + '">'
1818
                        + group_subgroups[g_id][i][1] + '</option>'
1819
                    );
1820
                }
1821
                $("#subgroup_filter_block").show();
1822
            } else {
1823
                $("#subgroup_filter_block").hide();
1824
            }
1825
        }
1826
1809
        function addColumn() {
1827
        function addColumn() {
1810
            $("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected");
1828
            $("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected");
1811
        }
1829
        }
(-)a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js (-1 / +1 lines)
Lines 171-176 function logOut(){ Link Here
171
        delBasket('main', true);
171
        delBasket('main', true);
172
    }
172
    }
173
    clearHoldFor();
173
    clearHoldFor();
174
    localStorage.removeItem("sql_reports_activetab");
174
}
175
}
175
176
176
function openHelp(){
177
function openHelp(){
177
- 

Return to bug 24958