Fixed following code smells reported by SonarQube:

1) Remove this redundant jump.
 2) Remove this commented out code.
 3) Variables should not be shadowed.
This commit is contained in:
Akshay Joshi
2022-01-21 18:53:48 +05:30
parent 12d6271b13
commit 343c3ee49c
50 changed files with 130 additions and 161 deletions

View File

@@ -373,8 +373,6 @@ define('misc.bgprocess', [
ev = ev || window.event;
ev.cancelBubble = true;
ev.stopPropagation();
return;
});
// On Click event to stop the process.

View File

@@ -142,9 +142,7 @@ module.exports = Alertify.dialog('fileSelectionDlg', function() {
Alertify.pgDialogBuild.apply(this);
},
hooks: {
onshow: function() {
// $(this.elements.body).addClass('pgadmin-storage-body');
},
onshow: function() {/* This is intentional (SonarQube) */},
},
};
});

View File

@@ -1205,7 +1205,6 @@ define([
});
}
//input_object.set_cap(data_cap);
})
.fail(function() {
$('.storage_dialog #uploader .input-path').prop('disabled', false);
@@ -1448,7 +1447,6 @@ define([
}
// Save it in preference
save_show_hidden_file_option(tmp_data['is_checked'], pgAdmin.FileUtils.transId);
return;
};
}
@@ -1635,14 +1633,12 @@ define([
if (config.options.dialog_type == 'create_file') {
var status = checkPermission(path);
if (status) {
//$('.file_manager').trigger('enter-key');
$('.file_manager_ok').trigger('click');
}
} else if (config.options.dialog_type == 'select_file') {
var file_status = getFileInfo(path);
if (file_status) {
$('.file_manager_ok').trigger('click');
//$('.file_manager').trigger('enter-key');
}
}
}