PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 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 All 508 releases
← All changes | _inc/jetpack-admin.js +56 -0 16.2-beta → 16.3 View file →
@@ -1,0 +1,56 @@
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 );