public/themes/winry/assets/js/edit-entities.js   A
last analyzed

Complexity

Total Complexity 5
Complexity/F 1.67

Size

Lines of Code 17
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 5
mnd 2
bc 2
fnc 3
bpm 0.6666
cpm 1.6666
noi 0
1
jQuery(document).ready(function($) {
2
    $('.bulk-actions').hide();
3
    $('#cb-select-all').change(function() {
4
        if ($(this).prop('checked')) {
5
            $('.cb-select').prop('checked', true).trigger('change');
6
        } else {
7
            $('.cb-select').prop('checked', false).trigger('change');
8
        }
9
    });
10
    $('.cb-select').change(function() {
11
        if ($('.cb-select').filter(':checked').length >= 1) {
12
            $('.bulk-actions').show();
13
        } else {
14
            $('.bulk-actions').hide();
15
        }
16
    });
17
});