concord-consortium/rigse

View on GitHub
rails/app/assets/javascripts/jquery.paging.js

Summary

Maintainability
D
2 days
Test Coverage

Function setPage has 165 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            "setPage": function(page) {

    if (Paging.opts["lock"]) {
                    Paging.opts["onSelect"](0, self);
        return Paging;
Severity: Major
Found in rails/app/assets/javascripts/jquery.paging.js - About 6 hrs to fix

    Function setOptions has 105 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                "setOptions": function(opts) {
    
                    var parseFormat = function(format) {
    
                        var gndx = 0, group = 0, num = 1, res = {
    Severity: Major
    Found in rails/app/assets/javascripts/jquery.paging.js - About 4 hrs to fix

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

      /**
       * @license jQuery paging plugin v1.2.0 23/06/2014
       * http://www.xarg.org/2011/09/jquery-pagination-revised/
       *
       * Copyright (c) 2011, Robert Eisele (robert@xarg.org)
      Severity: Minor
      Found in rails/app/assets/javascripts/jquery.paging.js - About 2 hrs to fix

        Function parseFormat has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        var parseFormat = function(format) {
        
                            var gndx = 0, group = 0, num = 1, res = {
                                fstack:         [], // format stack
                                asterisk:       0, // asterisk?
        Severity: Major
        Found in rails/app/assets/javascripts/jquery.paging.js - About 2 hrs to fix

          Avoid deeply nested control flow statements.
          Open

                                              if (!(res.current = 1 + tok.indexOf("c"))) {
                                                  res.current = (1 + res.blockwide) >> 1;
                                              }
          Severity: Major
          Found in rails/app/assets/javascripts/jquery.paging.js - About 45 mins to fix

            There are no issues that match your filters.

            Category
            Status