YetiForceCompany/YetiForceCRM

View on GitHub

Showing 4,652 of 306,333 total issues

Function preSaveValidation has 33 lines of code (exceeds 25 allowed). Consider refactoring.
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

            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

              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

                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

              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

                                        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

                      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

                    getDataCharts: function (shortages, max) {
                        let container = $('.LangManagement'),
                            data = [],
                            chartData = {
                                labels: [],

                  Function registerConfigModal has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  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

                            getRecordsCount: function () {
                                if (app.getViewName() != 'Detail') {
                                    return this._super();
                                }
                                var detailInstance = Vtiger_Detail_Js.getInstance();
                    Severity: Minor
                    Found in public_html/layouts/basic/modules/Campaigns/resources/List.js - About 1 hr to fix

                      Function registerScrollEvent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      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();
                      Severity: Minor
                      Found in public_html/layouts/basic/modules/Vtiger/resources/RelatedList.js - About 1 hr to fix

                        Function registerRelatedModulesRecordCount has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                registerRelatedModulesRecordCount(tabContainer) {
                                    const moreList = $('.related .nav .dropdown-menu');
                                    let relationContainer = tabContainer;
                                    if (!relationContainer || typeof relationContainer.length === 'undefined') {
                                        relationContainer = $(
                        Severity: Minor
                        Found in public_html/layouts/basic/modules/Vtiger/resources/Detail.js - About 1 hr to fix

                          Function triggerRecordEditEvents has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  triggerRecordEditEvents: function (data) {
                                      const self = this,
                                          form = this.getForm();
                                      if (typeof data['changeValues'] == 'object') {
                                          $.each(data['changeValues'], function (_, field) {
                          Severity: Minor
                          Found in public_html/layouts/basic/modules/Vtiger/resources/Edit.js - About 1 hr to fix

                            Function confirmedCallback has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                                confirmedCallback: () => {
                                                    let params = { ...listInstance.getSearchParams() };
                                                    let deleteMessage = app.vtranslate('JS_LOADING_PLEASE_WAIT');
                                                    let progressIndicatorElement = $.progressIndicator({
                                                        message: deleteMessage,
                            Severity: Minor
                            Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

                              Function registerSummationEvent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      registerSummationEvent: function () {
                                          let self = this;
                                          let listContainer = this.getListViewContentContainer();
                                          listContainer.on('click', '.listViewSummation button', function () {
                                              let button = $(this);
                              Severity: Minor
                              Found in public_html/layouts/basic/modules/Vtiger/resources/List.js - About 1 hr to fix

                                Function registerSelect2Event has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    registerSelect2Event() {
                                        const self = this;
                                        $('.siteBarRight .js-calendar__filter__select').each(function () {
                                            let element = $(this);
                                            let name = element.data('cache');
                                Severity: Minor
                                Found in public_html/layouts/resources/Calendar.js - About 1 hr to fix

                                  Function imagePreviewLoad has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  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

                                            this.get_top_checked = function (full) {
                                                if (this.settings.checkbox.tie_selection) {
                                                    return this.get_top_selected(full);
                                                }
                                                var tmp = this.get_checked(true),
                                    Severity: Minor
                                    Found in public_html/layouts/resources/libraries/jstree.checkbox.js - About 1 hr to fix

                                      Function registerCopyClipboard has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              registerCopyClipboard: function (container, key = '.clipboard') {
                                                  if (typeof container !== 'object' || $(container).length === 0) {
                                                      return;
                                                  }
                                                  container = $(container).get(0);
                                      Severity: Minor
                                      Found in public_html/layouts/resources/Fields.js - About 1 hr to fix

                                        Function registerDataTables has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            registerDataTables: function (table, options = {}) {
                                                if ($.fn.dataTable == undefined) {
                                                    return false;
                                                }
                                                if (table.length == 0) {
                                        Severity: Minor
                                        Found in public_html/layouts/resources/app.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language