|
Lines 1376-1381
Link Here
|
| 1376 |
} |
1376 |
} |
| 1377 |
|
1377 |
|
| 1378 |
$(document).ready(function(){ |
1378 |
$(document).ready(function(){ |
|
|
1379 |
|
| 1380 |
var activeTab = Cookies.get("sql_reports_activetab"); |
| 1381 |
|
| 1379 |
$("body").on('click',".fetch_chart_data",function(){ |
1382 |
$("body").on('click',".fetch_chart_data",function(){ |
| 1380 |
if( [% unlimited_total || 0 | $raw %] > 1000 ){ |
1383 |
if( [% unlimited_total || 0 | $raw %] > 1000 ){ |
| 1381 |
if( confirm("Fetching full chart data for reports with many rows can cause performance issues. Are you sure you with to chart this report?") ){ |
1384 |
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 1563-1601
Link Here
|
| 1563 |
}, |
1566 |
}, |
| 1564 |
}, columns_settings); |
1567 |
}, columns_settings); |
| 1565 |
|
1568 |
|
| 1566 |
var rtabs = $("#tabs").tabs(); |
1569 |
var rtabs = $("#tabs").tabs({ |
| 1567 |
rtabs.on("tabsactivate", function(e, ui) { |
1570 |
create: function( e, ui ){ |
| 1568 |
$("#subgroup_filter option").each(function() { |
1571 |
tabsInit( ui, rtable ); |
| 1569 |
if($(this).val().length > 0) { |
1572 |
}, |
| 1570 |
$(this).remove(); |
1573 |
activate: function( e, ui ){ |
| 1571 |
} |
1574 |
tabsInit( ui, rtable ); |
| 1572 |
}); |
|
|
| 1573 |
rtable.fnFilter('', 4); |
| 1574 |
rtable.fnFilter('', 5); |
| 1575 |
rtable.fnSetColumnVis(4, true); |
| 1576 |
rtable.fnSetColumnVis(5, true); |
| 1577 |
|
| 1578 |
var g_id = $(ui.newTab).children().attr('id'); |
| 1579 |
var g_name = $(ui.newTab).text(); |
| 1580 |
if ( g_name == _("All") ) { |
| 1581 |
g_id = ""; |
| 1582 |
g_name = ""; |
| 1583 |
} |
| 1584 |
|
| 1585 |
if (g_id && g_id.length > 0) { |
| 1586 |
rtable.fnFilter('^' + g_name + '$', 4, true, true, true, false); |
| 1587 |
rtable.fnSetColumnVis(4, false); |
| 1588 |
for(var i in group_subgroups[g_id]) { |
| 1589 |
$("#subgroup_filter").append( |
| 1590 |
'<option value="' + group_subgroups[g_id][i][0] + '">' |
| 1591 |
+ group_subgroups[g_id][i][1] + '</option>' |
| 1592 |
); |
| 1593 |
} |
| 1594 |
$("#subgroup_filter_block").show(); |
| 1595 |
} else { |
| 1596 |
$("#subgroup_filter_block").hide(); |
| 1597 |
} |
1575 |
} |
| 1598 |
}); |
1576 |
}); |
|
|
1577 |
if( activeTab ){ |
| 1578 |
$("#tabs").tabs("option","active", activeTab ); |
| 1579 |
} |
| 1599 |
$("#subgroup_filter_block").hide(); |
1580 |
$("#subgroup_filter_block").hide(); |
| 1600 |
|
1581 |
|
| 1601 |
$("#subgroup_filter").change(function() { |
1582 |
$("#subgroup_filter").change(function() { |
|
Lines 1808-1813
Link Here
|
| 1808 |
}); |
1789 |
}); |
| 1809 |
}); |
1790 |
}); |
| 1810 |
|
1791 |
|
|
|
1792 |
function tabsInit( ui, rtable ){ |
| 1793 |
console.log( "tabsInit" ); |
| 1794 |
$("#subgroup_filter option").each(function() { |
| 1795 |
if($(this).val().length > 0) { |
| 1796 |
$(this).remove(); |
| 1797 |
} |
| 1798 |
}); |
| 1799 |
rtable.fnFilter('', 4); |
| 1800 |
rtable.fnFilter('', 5); |
| 1801 |
rtable.fnSetColumnVis(4, true); |
| 1802 |
rtable.fnSetColumnVis(5, true); |
| 1803 |
|
| 1804 |
var g_id = $(ui.newTab).children().attr('id'); |
| 1805 |
var g_name = $(ui.newTab).text(); |
| 1806 |
if ( g_name == _("All") ) { |
| 1807 |
g_id = ""; |
| 1808 |
g_name = ""; |
| 1809 |
} |
| 1810 |
|
| 1811 |
if (g_id && g_id.length > 0) { |
| 1812 |
rtable.fnFilter('^' + g_name + '$', 4, true, true, true, false); |
| 1813 |
rtable.fnSetColumnVis(4, false); |
| 1814 |
for(var i in group_subgroups[g_id]) { |
| 1815 |
$("#subgroup_filter").append( |
| 1816 |
'<option value="' + group_subgroups[g_id][i][0] + '">' |
| 1817 |
+ group_subgroups[g_id][i][1] + '</option>' |
| 1818 |
); |
| 1819 |
} |
| 1820 |
$("#subgroup_filter_block").show(); |
| 1821 |
} else { |
| 1822 |
$("#subgroup_filter_block").hide(); |
| 1823 |
} |
| 1824 |
} |
| 1825 |
|
| 1811 |
function addColumn() { |
1826 |
function addColumn() { |
| 1812 |
$("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected"); |
1827 |
$("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected"); |
| 1813 |
} |
1828 |
} |
| 1814 |
- |
|
|