shadowproject/shadow

View on GitHub
src/qt/res/assets/plugins/footable/footable.sort.js

Summary

Maintainability
C
1 day
Test Coverage

Function Sort has 130 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Sort() {
        var p = this;
        p.name = 'Footable Sortable';
        p.init = function (ft) {
            p.footable = ft;
Severity: Major
Found in src/qt/res/assets/plugins/footable/footable.sort.js - About 5 hrs to fix

    Function init has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            p.init = function (ft) {
                p.footable = ft;
                if (ft.options.sort === true) {
                    $(ft.table)
                        .unbind('.sorting')
    Severity: Major
    Found in src/qt/res/assets/plugins/footable/footable.sort.js - About 2 hrs to fix

      Function footable_initialized.sorting has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                              'footable_initialized.sorting': function (e) {
                                  var $table = $(ft.table),
                                      $tbody = $table.find('> tbody'),
                                      cls = ft.options.classes.sort,
                                      column, $th;
      Severity: Minor
      Found in src/qt/res/assets/plugins/footable/footable.sort.js - About 1 hr to fix

        Function doSort has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                p.doSort = function(columnIndex, ascending) {
                    var ft = p.footable;
                    if ($(ft.table).data('sort') === false) return;
        
                    var $table = $(ft.table),
        Severity: Minor
        Found in src/qt/res/assets/plugins/footable/footable.sort.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if (ft.options.sort === true) {
                          $(ft.table)
                              .unbind('.sorting')
                              .bind({
                                  'footable_initialized.sorting': function (e) {
          Severity: Major
          Found in src/qt/res/assets/plugins/footable/footable.sort.js - About 40 mins to fix

            There are no issues that match your filters.

            Category
            Status