Passed
Push — master ( cc7767...b0feda )
by Stefan
11:56
created

➔ $(ꞌ#sortable1, #sortable2ꞌ).sortable.out   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
/*
2
 * ******************************************************************************
3
 * Copyright 2011-2017 DANTE Ltd. and GÉANT on behalf of the GN3, GN3+, GN4-1 
4
 * and GN4-2 consortia
5
 *
6
 * License: see the web/copyright.php file in the file structure
7
 * ******************************************************************************
8
 */
9
10
$(function () {
11
    $("#sortable1, #sortable2").sortable({
12
        connectWith: "ol.eapmethods",
13
        tolerance: 'pointer',
14
        out: function (event, ui) {
15
            ui.item.toggleClass("eap1");
16
        },
17
        stop: function (event, ui) {
0 ignored issues
show
Unused Code introduced by
The parameter event is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
Unused Code introduced by
The parameter ui is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
18
            $(".eapm").removeAttr('value');
19
            $(".eapmv").removeAttr('value');
20
            $("#sortable1").children().each(function (index) {
21
                var v = $(this).html();
22
                $("#EAP-" + v).val(v);
23
                $("#EAP-" + v + "-priority").val(index + 1);
24
            });
25
        }
26
    }).disableSelection();
27
});
28