assets/js/sortable.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1

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 3
mnd 0
bc 0
fnc 3
bpm 0
cpm 1
noi 4
1
// Jquery function for order fields
2
// When the page is loaded define the current order and items to reorder
3
$(document).ready( function(){
4
	/* Call the container items to reorder directories */
5
	$("#dir-list").sortable({ 
6
			opacity: 0.6, 
7
			cursor: "move",
8
			connectWith: "#dir-list",
9
			update: 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...
10
				var list = $(this).sortable("serialize");
11
				$.post("directories.php?op=order", list );
12
			},
13
			receive: 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...
14
				var list = $(this).sortable("serialize");                    
15
				$.post("directories.php?op=order", list );                      
16
			}
17
		}
18
	).disableSelection();
19
});