PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 14.4
Jetpack – WP Security, Backup, Speed, & Growth v14.4
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / _inc / jetpack-admin.js

jetpack-admin.js in Jetpack – WP Security, Backup, Speed, & Growth 14.4, at _inc/jetpack-admin.js

57 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 ( function ( $ ) {
2 ///////////////////////////////////////
3 // INIT
4 ///////////////////////////////////////
5
6 $( document ).ready( function () {
7 initEvents();
8 configFixedElements();
9 } );
10
11 ///////////////////////////////////////
12 // FUNCTIONS
13 ///////////////////////////////////////
14
15 function configFixedElements() {
16 var jpTopFrame = $( '.frame.top' ),
17 jpBottomFrame = $( '.frame.bottom' ),
18 $body = $( 'body' );
19
20 $body.scroll( function () {
21 if ( 33 > jpTopFrame.offset().top ) {
22 jpTopFrame.addClass( 'fixed' );
23 $body.addClass( 'jp-frame-top-fixed' );
24 }
25 if ( 120 <= jpBottomFrame.offset().top ) {
26 jpTopFrame.removeClass( 'fixed' );
27 $body.removeClass( 'jp-frame-top-fixed' );
28 }
29 } );
30
31 $( 'table.jetpack-modules', jpBottomFrame ).addClass( 'with-transparency' );
32 $( '.manage-left', jpBottomFrame ).css( 'width', '' );
33 $( '.manage-right', jpBottomFrame ).show();
34 }
35
36 function initEvents() {
37 // toggle search and filters at mobile resolution
38 $( '.filter-search' ).on( 'click', function () {
39 $( this ).toggleClass( 'active' );
40 $( '.manage-right' ).toggleClass( 'show' );
41 $( '.shade' ).toggle();
42 } );
43
44 // Toggle all checkboxes
45 $( '.checkall' ).on( 'click', function () {
46 $( '.table-bordered' ).find( ':checkbox' ).not( ':disabled' ).prop( 'checked', this.checked );
47 } );
48
49 // Clicking outside modal, or close X closes modal
50 $( '.shade, .modal .close' ).on( 'click', function ( event ) {
51 $( '.shade, .modal' ).hide();
52 $( '.manage-right' ).removeClass( 'show' );
53 event.preventDefault();
54 } );
55 }
56 } )( jQuery );
57