| 1 |
/*- |
| 2 |
* Author: Alin Marcu |
| 3 |
* Author URI: https://deconf.com |
| 4 |
* Copyright 2013 Alin Marcu |
| 5 |
* License: GPLv2 or later |
| 6 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 7 |
*/ |
| 8 |
|
| 9 |
/* |
| 10 |
* Navigation Tabs |
| 11 |
*/ |
| 12 |
jQuery( document ).ready( function () { |
| 13 |
if ( window.location.href.indexOf( "page=aiwp_" ) != -1 ) { |
| 14 |
var ident = 'basic'; |
| 15 |
|
| 16 |
if ( window.location.hash ) { |
| 17 |
ident = window.location.hash.split( '#' )[ 2 ].split( '-' )[ 1 ]; |
| 18 |
} else if ( window.location.href.indexOf( "page=aiwp_errors_debugging" ) != -1 ) { |
| 19 |
ident = 'errors'; |
| 20 |
} |
| 21 |
|
| 22 |
jQuery( ".nav-tab-wrapper a" ).each( function ( index ) { |
| 23 |
jQuery( this ).removeClass( "nav-tab-active" ); |
| 24 |
jQuery( "#" + this.hash.split( '#' )[ 2 ] ).hide(); |
| 25 |
} ); |
| 26 |
jQuery( "#tab-" + ident ).addClass( "nav-tab-active" ); |
| 27 |
jQuery( "#aiwp-" + ident ).show(); |
| 28 |
} |
| 29 |
|
| 30 |
jQuery( 'a[href^="#"]' ).on("click", function ( e ) { |
| 31 |
if ( window.location.href.indexOf( "page=aiwp_" ) != -1 ) { |
| 32 |
jQuery( ".nav-tab-wrapper a" ).each( function ( index ) { |
| 33 |
jQuery( this ).removeClass( "nav-tab-active" ); |
| 34 |
jQuery( "#" + this.hash.split( '#' )[ 2 ] ).hide(); |
| 35 |
} ); |
| 36 |
jQuery( this ).addClass( "nav-tab-active" ); |
| 37 |
jQuery( "#" + this.hash.split( '#' )[ 2 ] ).show(); |
| 38 |
} |
| 39 |
} ); |
| 40 |
|
| 41 |
jQuery( '#aiwp-autodismiss' ).delay( 2000 ).fadeOut( 'slow' ); |
| 42 |
|
| 43 |
} ); |
| 44 |
|
| 45 |
jQuery(document).ready(function() { |
| 46 |
jQuery("#webstream_jail").select2(); |
| 47 |
jQuery("#ga_target_geomap").select2(); |
| 48 |
jQuery(".network_webstreams").select2(); |
| 49 |
}); |
| 50 |
|