Showing 4,652 of 306,333 total issues
Function preSaveValidation
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
preSaveValidation(form) {
const aDeferred = $.Deferred();
let formData = new FormData(form.get(0));
formData.append('mode', 'preSaveValidation');
if (formData.get('name')) {
Function registerFieldDetailsChange
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerFieldDetailsChange: function (contents) {
contents.find('[name="mandatory"]').on('change', function (e) {
let currentTarget = $(e.currentTarget);
if (currentTarget.attr('readonly') !== 'readonly') {
var form = currentTarget.closest('.fieldDetailsForm');
Function setDefaultPreferences
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setDefaultPreferences: function (e) {
var thisInstance = this;
var container = this.getForm();
var progressIndicatorElement = $.progressIndicator({
message: app.vtranslate('JS_SAVE_LOADER_INFO'),
Function registerSaveTaskSubmitEvent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerSaveTaskSubmitEvent(taskType) {
$('#saveTask').on('submit', (e) => {
let form = $(e.currentTarget);
if (form.validationEngine('validate') === true) {
let customValidationFunctionName = taskType + 'CustomValidation';
Function registerBasicEvents
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerBasicEvents() {
this.container.on('change', 'select[name="tabid"]', (e) => {
if (!e.currentTarget.value) {
this.fieldsContainer.html('');
this.graphContainer.html('');
Function onValidationComplete
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onValidationComplete: function (form, valid) {
if (valid) {
//To prevent multiple click on save
jQuery("[name='saveButton']", wizardContainer).attr('disabled', 'disabled');
var notePadName = form.find('[name="notePadName"]').val();
Function registerEventForScheduledWorkflow
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerEventForScheduledWorkflow: function () {
let container = $('.js-wf-executions-container');
$('input[name="execution_condition"]').on('click', function (e) {
let element = $(e.currentTarget),
itemBox = element.closest('.js-wf-execution-container').find('.js-wf-execution-item');
Function getDataCharts
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDataCharts: function (shortages, max) {
let container = $('.LangManagement'),
data = [],
chartData = {
labels: [],
Function registerConfigModal
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerConfigModal(container) {
container.find('.js-show-config-modal').on('click', (e) => {
const providerName = e.currentTarget.dataset.provider;
app.showModalWindow({
Function getRecordsCount
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getRecordsCount: function () {
if (app.getViewName() != 'Detail') {
return this._super();
}
var detailInstance = Vtiger_Detail_Js.getInstance();
Function registerScrollEvent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerScrollEvent() {
this.gutter.addClass('js-fixed-scroll');
let scrollContainer = App.Components.Scrollbar.page.element;
let listOffsetTop = this.list.offset().top - this.headerH;
let initialH = this.sideBlocks.height();
Function registerRelatedModulesRecordCount
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerRelatedModulesRecordCount(tabContainer) {
const moreList = $('.related .nav .dropdown-menu');
let relationContainer = tabContainer;
if (!relationContainer || typeof relationContainer.length === 'undefined') {
relationContainer = $(
Function triggerRecordEditEvents
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
triggerRecordEditEvents: function (data) {
const self = this,
form = this.getForm();
if (typeof data['changeValues'] == 'object') {
$.each(data['changeValues'], function (_, field) {
Function confirmedCallback
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
confirmedCallback: () => {
let params = { ...listInstance.getSearchParams() };
let deleteMessage = app.vtranslate('JS_LOADING_PLEASE_WAIT');
let progressIndicatorElement = $.progressIndicator({
message: deleteMessage,
Function registerSummationEvent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerSummationEvent: function () {
let self = this;
let listContainer = this.getListViewContentContainer();
listContainer.on('click', '.listViewSummation button', function () {
let button = $(this);
Function registerSelect2Event
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerSelect2Event() {
const self = this;
$('.siteBarRight .js-calendar__filter__select').each(function () {
let element = $(this);
let name = element.data('cache');
Function imagePreviewLoad
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function imagePreviewLoad(s) {
/* no preview */
if (typeof s != 'string' || !s) {
imgPreview.getElement().setHtml('');
return;
Function get_top_checked
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.get_top_checked = function (full) {
if (this.settings.checkbox.tie_selection) {
return this.get_top_selected(full);
}
var tmp = this.get_checked(true),
Function registerCopyClipboard
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerCopyClipboard: function (container, key = '.clipboard') {
if (typeof container !== 'object' || $(container).length === 0) {
return;
}
container = $(container).get(0);
Function registerDataTables
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
registerDataTables: function (table, options = {}) {
if ($.fn.dataTable == undefined) {
return false;
}
if (table.length == 0) {