mambax7/alumni-26x

View on GitHub
media/jquery/tablesorter-master/js/widgets/widget-resizable.js

Summary

Maintainability
C
1 day
Test Coverage

File widget-resizable.js has 330 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! Widget: resizable - updated 12/13/2017 (v2.29.1) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
    'use strict';
    var ts = $.tablesorter || {};
Severity: Minor
Found in media/jquery/tablesorter-master/js/widgets/widget-resizable.js - About 3 hrs to fix

    Function bindings has 57 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            bindings : function( c, wo ) {
                var namespace = c.namespace + 'tsresize';
                wo.$resizable_container.children().bind( 'mousedown', function( event ) {
                    // save header cell and mouse position
                    var column,
    Severity: Major
    Found in media/jquery/tablesorter-master/js/widgets/widget-resizable.js - About 2 hrs to fix

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

              init : function( c, wo ) {
                  if ( c.$table.hasClass( 'hasResizable' ) ) { return; }
                  c.$table.addClass( 'hasResizable' );
      
                  var noResize, $header, column, storedSizes, tmp,
      Severity: Minor
      Found in media/jquery/tablesorter-master/js/widgets/widget-resizable.js - About 2 hrs to fix

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

                setHandlePosition : function( c, wo ) {
                    var startPosition,
                        tableHeight = c.$table.height(),
                        $handles = wo.$resizable_container.children(),
                        handleCenter = Math.floor( $handles.width() / 2 );
        Severity: Minor
        Found in media/jquery/tablesorter-master/js/widgets/widget-resizable.js - About 1 hr to fix

          Function mouseMove has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  mouseMove : function( c, wo, event ) {
                      if ( wo.resizable_vars.mouseXPosition === 0 || !wo.resizable_vars.$target ) { return; }
                      // resize columns
                      var column,
                          total = 0,
          Severity: Minor
          Found in media/jquery/tablesorter-master/js/widgets/widget-resizable.js - About 1 hr to fix

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

                ts.resizableReset = function( table, refreshing ) {
                    $( table ).each(function(){
                        var index, $t,
                            c = this.config,
                            wo = c && c.widgetOptions,
            Severity: Minor
            Found in media/jquery/tablesorter-master/js/widgets/widget-resizable.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status