Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-mendonca committed Feb 1, 2020
2 parents 3382f05 + 2ce1541 commit d501d89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions js/tstats-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jQuery( document ).ready( function( $ ) {
$( 'input.' + id ).parents( 'tr' ).addClass( 'active' ).removeClass( 'inactive' );
}

console.log( 'Clicked single plugin ID #' + id + ' checkbox.' );
console.log( 'Clicked single plugin ID "' + id + '" checkbox.' );
}

/**
Expand All @@ -128,23 +128,23 @@ jQuery( document ).ready( function( $ ) {
var checkboxClass = $( event.target ).attr( 'class' );

// Get plugin row id.
var id = checkboxClass.substring( 'checkbox-subproject plugin_'.length );
var id = checkboxClass.substring( 'checkbox-subproject plugins_'.length );

// Set plugin subprojects count.
pluginSubprojectsCount[ id ] = $( 'input.plugin_' + id + ':checked' ).length;
pluginSubprojectsCount[ id ] = $( 'input.plugins_' + id + ':checked' ).length;

// Check plugin subprojects count.
if ( 0 === pluginSubprojectsCount[ id ] ) {
// Set plugin row as inactive.
$( 'input.plugin_' + id ).parents( 'tr' ).addClass( 'inactive' ).removeClass( 'active' );
$( 'input#plugin_' + id ).prop( 'checked', false );
$( 'input.plugins_' + id ).parents( 'tr' ).addClass( 'inactive' ).removeClass( 'active' );
$( 'input#plugins_' + id ).prop( 'checked', false );
} else {
// Set plugin row as active.
$( 'input.plugin_' + id ).parents( 'tr' ).addClass( 'active' ).removeClass( 'inactive' );
$( 'input#plugin_' + id ).prop( 'checked', true );
$( 'input.plugins_' + id ).parents( 'tr' ).addClass( 'active' ).removeClass( 'inactive' );
$( 'input#plugins_' + id ).prop( 'checked', true );
}

console.log( 'Clicked single plugin ID #' + id + ' subproject checkbox.' );
console.log( pluginSubprojectsCount[ id ] + ' subproject(s) of plugin ID#' + id + ' selected.' );
console.log( 'Clicked single plugin ID "' + id + '" subproject checkbox.' );
console.log( pluginSubprojectsCount[ id ] + ' subproject(s) of plugin ID "' + id + '" selected.' );
}
} );
2 changes: 1 addition & 1 deletion js/tstats-settings.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d501d89

Please sign in to comment.