Showing 35 of 60 total issues

Function ajaxSubmit has 492 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.fn.ajaxSubmit = function(options) {
    /*jshint scripturl:true */

    // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
    if (!this.length) {
Severity: Major
Found in app/assets/javascripts/plugins/jquery.form.js - About 2 days to fix

    File jquery.form.js has 767 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * jQuery Form Plugin
     * version: 3.14 (30-JUL-2012)
     * @requires jQuery v1.3.2 or later
     *
    Severity: Major
    Found in app/assets/javascripts/plugins/jquery.form.js - About 1 day to fix

      Function populate has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
      Open

      jQuery.fn.populate = function(obj, options) {
          
          
          // ------------------------------------------------------------------------------------------
          // JSON conversion function
      Severity: Minor
      Found in app/assets/javascripts/plugins/jquery.populate.js - About 1 day to fix

      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 fileUploadIframe has 337 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function fileUploadIframe(a) {
              var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
              var useProp = !!$.fn.prop;
      
              if ($(':input[name=submit],:input[id=submit]', form).length) {
      Severity: Major
      Found in app/assets/javascripts/plugins/jquery.form.js - About 1 day to fix

        Function populate has 175 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jQuery.fn.populate = function(obj, options) {
            
            
            // ------------------------------------------------------------------------------------------
            // JSON conversion function
        Severity: Major
        Found in app/assets/javascripts/plugins/jquery.populate.js - About 7 hrs to fix

          Function cb has 125 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function cb(e) {
                      if (xhr.aborted || callbackProcessed) {
                          return;
                      }
                      try {
          Severity: Major
          Found in app/assets/javascripts/plugins/jquery.form.js - About 5 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
                    (t == 'checkbox' || t == 'radio') && !el.checked ||
                    (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
                    tag == 'select' && el.selectedIndex == -1)) {
                        return null;
            Severity: Critical
            Found in app/assets/javascripts/plugins/jquery.form.js - About 3 hrs to fix

              Function jtextarea has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  $.fn.jtextarea = function(opt) {
                      
                      var hmin=0;
                                  
                      var settings = {
              Severity: Major
              Found in app/assets/javascripts/plugins/jtextarea.js - About 3 hrs to fix

                File bootstrap-tour.js has 298 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                // Generated by CoffeeScript 1.6.1
                
                /* ============================================================
                # bootstrap-tour.js v0.1
                # http://pushly.github.com/bootstrap-tour/
                Severity: Minor
                Found in app/assets/javascripts/plugins/bootstrap-tour.js - About 3 hrs to fix

                  Function doSubmit has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function doSubmit() {
                              // make sure form attrs are set
                              var t = $form.attr('target'), a = $form.attr('action');
                  
                              // update form attrs in IE friendly way
                  Severity: Major
                  Found in app/assets/javascripts/plugins/jquery.form.js - About 2 hrs to fix

                    Function populateFormElement has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function populateFormElement(form, name, value)
                            {
                    
                                // check that the named element exists in the form
                                    var name    = getElementName(name); // handle non-php naming
                    Severity: Major
                    Found in app/assets/javascripts/plugins/jquery.populate.js - About 2 hrs to fix

                      Function formToArray has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      $.fn.formToArray = function(semantic, elements) {
                          var a = [];
                          if (this.length === 0) {
                              return a;
                          }
                      Severity: Major
                      Found in app/assets/javascripts/plugins/jquery.form.js - About 2 hrs to fix

                        Function deparam has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                        Open

                          deparam: function(params){
                        
                            if(! params) {
                              return {};
                            } 
                        Severity: Minor
                        Found in app/assets/javascripts/plugins/jquerymx.deparam.js - About 2 hrs to fix

                        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 getParams has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                getParams: function( convert ) {
                                    var data = {},
                                        current;
                        
                                    convert = convert === undefined ? false : convert;
                        Severity: Minor
                        Found in app/assets/javascripts/plugins/jquerymx-3.2.custom.js - About 1 hr to fix

                          Function initialize has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            Filter.prototype.initialize = function() {
                              var _this = this;
                          
                              this.form = _this.$target.find("form");
                          
                          
                          Severity: Minor
                          Found in app/assets/javascripts/cells/filter.js - About 1 hr to fix

                            Function fileUploadXhr has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function fileUploadXhr(a) {
                                    var formdata = new FormData();
                            
                                    for (var i=0; i < a.length; i++) {
                                        formdata.append(a[i].name, a[i].value);
                            Severity: Minor
                            Found in app/assets/javascripts/plugins/jquery.form.js - About 1 hr to fix

                              Function parseJSON has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          function parseJSON(obj, path)
                                          {
                                              // prepare
                                                  path = path || '';
                                              
                              Severity: Minor
                              Found in app/assets/javascripts/plugins/jquery.populate.js - About 1 hr to fix

                                Function _showPopover has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      Tour.prototype._showPopover = function(step, i) {
                                        var content, nav, options, tip,
                                          _this = this;
                                        content = "" + step.content + "<br /><p>";
                                        options = $.extend({}, this._options);
                                Severity: Minor
                                Found in app/assets/javascripts/plugins/bootstrap-tour.js - About 1 hr to fix

                                  Function fieldValue has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  $.fieldValue = function(el, successful) {
                                      var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
                                      if (successful === undefined) {
                                          successful = true;
                                      }
                                  Severity: Minor
                                  Found in app/assets/javascripts/plugins/jquery.form.js - About 1 hr to fix

                                    Function refresh has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      Backlog.prototype.refresh = function(updateHistory, data) {
                                        var _this = this;
                                    
                                        var sorting = Sorting.instances[0];
                                        var filter = Filter.instances[0];
                                    Severity: Minor
                                    Found in app/assets/javascripts/cells/backlog.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language