';
// // nHead.getElementsByTagName('th')[j].innerHTML += '
';
// }
// }
// }
},
"fnInitComplete": function(oSettings, json) {
prep_graph();
$('#ajax_loading').hide();
$('#datatable_content').show();
},
"fnDrawCallback": function( oSettings ) {
//prep_graph();
var oSettings = oTable.fnSettings();
$('#datatable_content_filter input').removeClass('input_filtering');
oSettings.bFilter = false;
if (!moreLevels && !showDetails){
$('.datatable tbody tr').css( 'cursor', 'default' );
}
if (columns_visable){
show_hide_columns(columns_visable);
}
//$('#datatable_content th:nth-child(10) div span').removeClass('ui-icon-carat-2-n-s');
setupQtip();
}
}).fnSetFilteringDelay(500);
// function create_tooltip(element){
//
// }
/**
* Handle which columns should be visibile
*/
function show_hide_columns(columns_visable){
for (var i = 0; i 0 ){
$('#glossarydiv').show();
// }
$('.download_button_choice').qtip(
{
content: $('#download_options_qtip'),
position: {
my: 'bottom middle',
at: 'top middle', // Position the tooltip above the link
//viewport: $(window), // Keep the tooltip on-screen at all times
effect: true, // Disable positioning animation
adjust: {y : -13}
},
show: {
event: 'click',
solo: true // Only show one tooltip at a time
},
hide: {
event: 'unfocus'
},
style: {
classes: 'ui-tooltip-wiki ui-tooltip-dark ui-tooltip-shadow',
width: 150
}
})
});
function clear_search(){
$('#datatable_content_filter input').val('');
oTable.fnFilterClear();
showDetails = false;
}
function setupQtip(){
$('.qtipdef').each(function()
{
// We make use of the .each() loop to gain access to each element via the "this" keyword...
$(this).qtip(
{
content: {
text: 'Loading...',
ajax: {
url: 'https://www.ark.org/dfa/transparency/ajax.php?ina_sec_csrf=82dc46125ebc134209eddf60579331d2&do:GetDefinition=1&term=' + escape(this.rel) // Use the rel attribute of each element for the url to load
},
title: {
text: this.rel, // Give the tooltip a title using each elements text
button: true
}
},
position: {
my: 'top center',
at: 'top center', // Position the tooltip above the link
viewport: $(window), // Keep the tooltip on-screen at all times
effect: false // Disable positioning animation
},
show: {
event: 'click',
solo: true // Only show one tooltip at a time
},
hide: 'unfocus',
style: {
classes: 'ui-tooltip-wiki ui-tooltip-dark ui-tooltip-shadow'
}
})
})
// Make sure it doesn't follow the link when we click it
.click(function(event) { event.preventDefault(); });
}
$(function(){
// Bind the event.
$(window).hashchange( function(){
// Alerts every time the hash changes!
//alert( location.hash );
var parts = location.hash.split("_");
var report = parts[0];
var level = parts[1] ? parts[1] : 1;
var id = parts[2] ? parts[2] : 'all';
var type = parts[3];
if (level != get_level() || id != get_id() || type != get_type()){
//alert(level + " : " + get_level() + ";" + id + ":" + get_id() + ";" + type + " : " + get_type());
//alert("Hash changed, Reload");
window.load_data(id, level, type);
//alert("Need to load new data");
}
})
// Trigger the event (useful on page load).
//$(window).hashchange();
});