GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 637491...478ef7 )
by Liuta
08:06 queued 05:23
created

admin/js/xcloner-admin.js   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 45

Duplication

Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
B $(document).ready 0 40 2
1
(function( $ ) {
0 ignored issues
show
Unused Code introduced by
The parameter $ 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...
2
	'use strict';
3
4
	jQuery(document).ready(function(){
5
	
6
		jQuery("span.shorten_string").click(function(){
7
			jQuery(this).toggleClass("full");
8
			doShortText(jQuery(this));
9
			})
10
			
11
		jQuery("span.shorten_string").each(function(){
12
			doShortText(jQuery(this));
13
		})
14
		
15
		jQuery("#xcloner_regex_exclude").on("focus", function(){
16
			jQuery("ul.xcloner_regex_exclude_limit li").fadeIn();
17
			})
18
		
19
		jQuery(".regex_pattern").click(function(){
20
			jQuery(this).select();
21
		})
22
		
23
		jQuery(".btn.system_info_toggle").click(function(){
24
			jQuery(".additional_system_info").toggle();
25
		})
26
		
27
		jQuery(".nav-tab-wrapper.content li").click(function(e){
28
				jQuery(".nav-tab-wrapper li a").removeClass("nav-tab-active");
29
				jQuery(this).find('a').addClass("nav-tab-active");
30
				jQuery(".nav-tab-wrapper-content .tab-content").removeClass('active');
31
				jQuery(".nav-tab-wrapper-content "+jQuery(this).find('a').attr('href')).addClass('active');
32
				
33
				e.preventDefault();
34
				
35
				location.hash = jQuery(this).find('a').attr('href')+"_hash";
36
				
37
		})
38
	
39
		var hash = window.location.hash;
40
		if(hash){
41
			next_tab(hash.replace("_hash",""));
42
		}
43
	})
44
	
45
})( jQuery );
46
47
48
49
50
//jQuery( document ).ajaxError(function(err, request) {
51
		//show_ajax_error("dd", "dd12", request)
52
//});
53
54
function next_tab(hash){
55
		jQuery(".nav-tab-wrapper").find("li a[href='"+hash+"']").trigger('click');
56
		location.hash = hash;
57
	}
58
	
59
function doShortText(elem)
60
{
61
	if(elem.hasClass("full")){
62
		elem.text(elem.attr("data-text"));
63
		return;
64
	}
65
	var text = elem.text()
66
	var text_lenght = text.length;
67
	var first = text.substr(0, 10);
68
	var last = text.substr(text_lenght-20, text_lenght);
69
	
70
	elem.attr("data-text", text).text(first+"..."+last);
71
}
72
73
/** global: xcloner_backup */
74
function show_ajax_error(title, msg, json){
75
	
76
	//var json = jQuery.parseJSON( body )
77
	
78
	if(typeof xcloner_backup !== 'undefined')
79
	{
80
		xcloner_backup.cancel_backup();
81
	}
82
	
83
	if(json.responseText)
84
	{
85
		msg = msg+": "+json.responseText;
86
	}
87
		
88
	jQuery("#error_modal .title").text(title);
89
	jQuery("#error_modal .msg").text(msg);
90
	
91
	if(json.status)
92
	{
93
		jQuery("#error_modal .status").text(json.status+" "+json.statusText);
94
	}
95
		
96
	jQuery("#error_modal .body").text(JSON.stringify(json));
97
	var error_modal = jQuery("#error_modal").modal();
98
	error_modal.modal('open');
99
}
100
101
var ID = function () {
102
  // Math.random should be unique because of its seeding algorithm.
103
  // Convert it to base 36 (numbers + letters), and grab the first 9 characters
104
  // after the decimal.
105
  return '_' + Math.random().toString(36).substr(2, 9);
106
};
107
108
109
110