Passed
Pull Request — master (#238)
by René
02:32
created

$(document).ready   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 24
rs 8.9713
cc 1
nc 1
nop 0

4 Functions

Rating   Name   Duplication   Size   Complexity  
A 0 3 1
A 0 3 1
A 0 3 1
A 0 3 1
1
2
3
$(document).ready(function () {
4
	new Clipboard('.copy-link');
0 ignored issues
show
Bug introduced by
The variable Clipboard seems to be never declared. If this is a global, consider adding a /** global: Clipboard */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Unused Code Best Practice introduced by
The object created with new Clipboard(".copy-link") is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...
Coding Style introduced by
Do not use 'new' for side effects.
Loading history...
Bug introduced by
Clipboard does not seem to be defined.
Loading history...
5
	$('.alt-tooltip').tooltip();
6
	
7
    $('.delete-poll').click(function(){
8
		deletePoll(this);
0 ignored issues
show
Bug introduced by
deletePoll does not seem to be defined.
Loading history...
9
    });
10
 
11
/*     $('.copy-link').click(function(){
12
		copyToClipboard(this);
13
    });
14
 */ 
15
	$('.table-body .avatardiv').each(function(i, obj) {
16
		$(obj).avatar(obj.title, 32);
17
	});
18
	
19
	$('.popupmenu').each(function() {
20
		OC.registerMenu($('#expand_' + $(this).attr('value')), $('#expanddiv_' + $(this).attr('value')) ); 
21
	});
22
	
23
	$('.copy_link').click(function() {
24
		window.prompt(t('polls','Copy to clipboard: Ctrl+C, Enter'), $(this).data('url'));
25
	});
26
});
27
28