Server IP : 162.0.232.140 / Your IP : 18.216.67.249 Web Server : LiteSpeed System : Linux premium139.web-hosting.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64 User : micrcvoy ( 740) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/micrcvoy/microleess-uae.store/controlPanel/assets/plugins/tablesaw/src/ |
Upload File : |
/* * tablesaw: A set of plugins for responsive tables * minimap: a set of dots to show which columns are currently visible. * Copyright (c) 2013 Filament Group, Inc. * MIT License */ ;(function( win, $, undefined ){ var MM = { attr: { init: 'data-tablesaw-minimap' } }; function createMiniMap( $table ){ var $btns = $( '<div class="tablesaw-advance minimap">' ), $dotNav = $( '<ul class="tablesaw-advance-dots">' ).appendTo( $btns ), hideDot = 'tablesaw-advance-dots-hide', $headerCells = $table.find( 'thead th' ); // populate dots $headerCells.each(function(){ $dotNav.append( '<li><i></i></li>' ); }); $btns.appendTo( $table.prev().filter( '.tablesaw-bar' ) ); function showMinimap( $table ) { var mq = $table.attr( MM.attr.init ); return !mq || win.matchMedia && win.matchMedia( mq ).matches; } function showHideNav(){ if( !showMinimap( $table ) ) { $btns.hide(); return; } $btns.show(); // show/hide dots var dots = $dotNav.find( "li" ).removeClass( hideDot ); $table.find( "thead th" ).each(function(i){ if( $( this ).css( "display" ) === "none" ){ dots.eq( i ).addClass( hideDot ); } }); } // run on init and resize showHideNav(); $( win ).on( "resize", showHideNav ); $table .bind( "tablesawcolumns.minimap", function(){ showHideNav(); }) .bind( "tablesawdestroy.minimap", function(){ var $t = $( this ); $t.prev().filter( '.tablesaw-bar' ).find( '.tablesaw-advance' ).remove(); $( win ).off( "resize", showHideNav ); $t.unbind( ".minimap" ); }); } // on tablecreate, init $( document ).on( "tablesawcreate", function( e, Tablesaw ){ if( ( Tablesaw.mode === 'swipe' || Tablesaw.mode === 'columntoggle' ) && Tablesaw.$table.is( '[ ' + MM.attr.init + ']' ) ){ createMiniMap( Tablesaw.$table ); } } ); }( this, jQuery ));