reload charts on firefox when tabs are switched
This commit is contained in:
parent
f317d06653
commit
484959298c
@ -1,3 +1,24 @@
|
|||||||
|
// reload all charts on the page
|
||||||
|
function reloadCharts() {
|
||||||
|
// exit if this is not firefox
|
||||||
|
if (navigator.userAgent.toLowerCase().indexOf('firefox') === -1) { return false; }
|
||||||
|
|
||||||
|
// for each iframe that is about to be activated
|
||||||
|
$('.ui-widget-content [aria-expanded="false"]').find('iframe').each(function() {
|
||||||
|
// get the src of the iframe
|
||||||
|
var iframe_src = $(this).attr('src');
|
||||||
|
// if this is a chart
|
||||||
|
if (iframe_src.indexOf('charts') !== -1) {
|
||||||
|
// hide the chart
|
||||||
|
$(this).hide();
|
||||||
|
// reload the src
|
||||||
|
$(this).attr('src', iframe_src);
|
||||||
|
// show the chart
|
||||||
|
$(this).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// update the chart with all the textbox values
|
// update the chart with all the textbox values
|
||||||
function openDialogCenter(element) {
|
function openDialogCenter(element) {
|
||||||
element.dialog("open");
|
element.dialog("open");
|
||||||
|
@ -100,13 +100,14 @@ $(function () {
|
|||||||
else {
|
else {
|
||||||
$("#watchText").text("Watch");
|
$("#watchText").text("Watch");
|
||||||
}
|
}
|
||||||
$("#maincontent").tabs( {
|
$("#maincontent").tabs({
|
||||||
select: function( e, ui)
|
select: function( e, ui) {
|
||||||
{
|
$.cookie('stickyTab', ui.index );
|
||||||
$.cookie('stickyTab', ui.index );
|
},
|
||||||
}
|
activate: function( event, ui ) {
|
||||||
}
|
reloadCharts();
|
||||||
);
|
}
|
||||||
|
});
|
||||||
|
|
||||||
stickyTab = $.cookie( 'stickyTab' );
|
stickyTab = $.cookie( 'stickyTab' );
|
||||||
anchor = window.location.hash;
|
anchor = window.location.hash;
|
||||||
|
File diff suppressed because one or more lines are too long
BIN
public/assets/application-5723d6b7daa178c1fc7743adfaa30049.js.gz
Normal file
BIN
public/assets/application-5723d6b7daa178c1fc7743adfaa30049.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user