pepiscms/js/ajaxfilemanager.js
Function FileManagerUI
has 341 lines of code (exceeds 25 allowed). Consider refactoring. Invalid
Invalid
function FileManagerUI(transtlation_map, is_intranet) {
var current_path = '/';
var parent_path = '';
var allowed_extensions = []; // Must be an array
Function FileManagerUI
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
Open
function FileManagerUI(transtlation_map, is_intranet) {
var current_path = '/';
var parent_path = '';
var allowed_extensions = []; // Must be an array
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function redrawTable
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function redrawTable(_path) {
window.location.hash = '#' + _path;
//$(".path").html('<strong>'+label_loading_list_of_files+'</strong>');
$("#filemanager_grid").attr('disabled', 'disabled');
File ajaxfilemanager.js
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
function FileManagerUI(transtlation_map, is_intranet) {
var current_path = '/';
var parent_path = '';
var allowed_extensions = []; // Must be an array
Function init
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.init = function () {
if (transtlation_map instanceof Object) {
if (transtlation_map.label_new_folder_name) {
dialog.new_folder_name = transtlation_map.label_new_folder_name;