summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/_inc/jetpack-modules.js')
-rw-r--r--plugins/jetpack/_inc/jetpack-modules.js25
1 files changed, 10 insertions, 15 deletions
diff --git a/plugins/jetpack/_inc/jetpack-modules.js b/plugins/jetpack/_inc/jetpack-modules.js
index d4321d1c..99a8824c 100644
--- a/plugins/jetpack/_inc/jetpack-modules.js
+++ b/plugins/jetpack/_inc/jetpack-modules.js
@@ -1,4 +1,4 @@
-( function( window, $, items, models, views, i18n, modalinfo, nonces ) {
+( function ( window, $, items, models, views, i18n, modalinfo, nonces ) {
'use strict';
var modules,
@@ -29,7 +29,7 @@
modules.trigger( 'change' );
// Handle the filtering of modules.
- handle_module_tag_click = function( event ) {
+ handle_module_tag_click = function ( event ) {
// Switch the item in the subsubsub list that's flagged as current.
$( '.subsubsub' )
.find( 'a[data-title="' + $( this ).data( 'title' ) + '"]' )
@@ -45,16 +45,13 @@
$( '.subsubsub a' ).on( 'click', { modules: modules }, handle_module_tag_click );
- $the_filters.on( 'click', '.button-group .button', { modules: modules }, function( event ) {
+ $the_filters.on( 'click', '.button-group .button', { modules: modules }, function ( event ) {
event.preventDefault();
- $( this )
- .addClass( 'active' )
- .siblings( '.active' )
- .removeClass( 'active' );
+ $( this ).addClass( 'active' ).siblings( '.active' ).removeClass( 'active' );
modules.trigger( 'change' );
} );
- $the_search.on( 'keyup search', function( e ) {
+ $the_search.on( 'keyup search', function ( e ) {
// Don't trigger change on tab, since it's only used for accessibility
// anyway, and will remove all checked boxes
if ( e.keyCode !== 9 ) {
@@ -64,11 +61,9 @@
$the_search.prop( 'placeholder', i18n.search_placeholder );
- $bulk_button.on( 'click', function( event ) {
+ $bulk_button.on( 'click', function ( event ) {
var selectedModules = $( '.jetpack-modules-list-table-form' ).serialize(),
- selectedAction = $( this )
- .siblings( 'select' )
- .val(),
+ selectedAction = $( this ).siblings( 'select' ).val(),
url;
if ( selectedModules.length && '-1' !== selectedAction ) {
@@ -84,11 +79,11 @@
event.preventDefault();
} );
} )(
- this,
+ window,
jQuery,
window.jetpackModulesData.modules,
- this.jetpackModules.models,
- this.jetpackModules.views,
+ window.jetpackModules.models,
+ window.jetpackModules.views,
window.jetpackModulesData.i18n,
window.jetpackModulesData.modalinfo,
window.jetpackModulesData.nonces