diff --git a/www/misc.js b/www/misc.js index 9fe890a..799e175 100644 --- a/www/misc.js +++ b/www/misc.js @@ -131,6 +131,11 @@ var config = { }, networkBlacklist: ['NL', 'X5'], }, + tab: { + active: 0, + disabled: [2], + max: 4, + }, }; var networkURL = { GE: 'http://dx.doi.org/10.14470/TR560404', @@ -175,6 +180,11 @@ $(document).ready(function() { if ( Number(parameters['timespan']) ) { config['map']['timespan'] = Number(parameters['timespan']); }; + if ( Number(parameters['tab']) ) { + if ( Number(parameters['tab']) < config['tab']['max'] ) { + config['tab']['active'] = Number(parameters['tab']); + }; + }; // AJAX setup $.ajaxSetup({timeout: config['ajax']['timeout']}); @@ -184,8 +194,8 @@ $(document).ready(function() { // create tabs $('#tabs').tabs({ - active: 0, - disabled: [2], + active: config['tab']['active'], + disabled: config['tab']['disabled'], activate: function( event, ui ) { ui['newPanel'].find('table').trigger("update", [true]); }, }); // create accordions