throrin19/materialBootstrap

View on GitHub

Showing 16 of 70 total issues

File slider.js has 679 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Material Slider
 *
 * $.materialSlider(options)
 *
Severity: Major
Found in js/libs/materialbootstrap/slider.js - About 1 day to fix

    Function events has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Range.prototype.events = function events() {
            this.$selector1.on('mousedown', function () {
                this.mouseDown(1);
            }.bind(this));
            this.$selector2.on('mousedown', function () {
    Severity: Minor
    Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

      Function toggle has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Dropdown.prototype.toggle = function (e) {
              var $this = $(this);
      
              if ($this.is('.disabled, :disabled')) return;
      
      
      Severity: Minor
      Found in js/libs/materialbootstrap/dropdown.js - About 1 hr to fix

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

            Range.prototype.init = function init(opts) {
                opts = $.extend({}, opts, this.roundValues(opts.value1, opts.value2, opts));
        
                if (!materialColors[opts.color]) {
                    this.color = 'indigo';
        Severity: Minor
        Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

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

              Selector.prototype.events = function events() {
                  this.$selector.bind('mousedown', function () {
                      this.mouseDown();
                  }.bind(this));
                  $(document).bind('mousemove', function (e) {
          Severity: Minor
          Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

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

                Slider.prototype.init = function init(opts) {
                    var color = opts.color;
                    // controls on value
                    if (!opts.value) {
                        opts.value = opts.min;
            Severity: Minor
            Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

              Function Element has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function Element(options) {
                      var defaultOptions = {
                              min         : 0,
                              max         : 100,
                              value       : 0,
              Severity: Minor
              Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

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

                    Tab.prototype.activate = function (element, container, callback) {
                        var $active    = container.find('> .active');
                        var transition = callback
                            && $.support.transition
                            && $active.hasClass('fade');
                Severity: Minor
                Found in js/libs/materialbootstrap/tab.js - About 1 hr to fix

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

                      Range.prototype.resizeSlider = function resizeSlider() {
                          var originalWidth   = this.$element.width(),
                              width           = originalWidth;
                  
                          // placement
                  Severity: Minor
                  Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

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

                        Selector.prototype.create = function create() {
                            this.$element.addClass('material-slider ' + this.color);
                    
                            if (this.opts.disabled === true) {
                                this.$element.addClass('disabled');
                    Severity: Minor
                    Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

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

                          function InputGroupFocus(options) {
                              return this.each(function () {
                                  var $this = $(this),
                                      $addon = $this.find('.text-field-group-addon'),
                                      $input = $this.find('input');
                      Severity: Minor
                      Found in js/libs/materialbootstrap/input.js - About 1 hr to fix

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

                            Tab.prototype.show = function () {
                                var $this    = this.element;
                                var $ul      = $this.closest('ul:not(.dropdown-menu)');
                                var selector = $this.data('target');
                        
                        
                        Severity: Minor
                        Found in js/libs/materialbootstrap/tab.js - About 1 hr to fix

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

                              Range.prototype.mouseMoveRight = function mouseMoveRight(e) {
                                  if (this.pressed2 === true && this.opts.disabled !== true) {
                                      if (this.prevX2 == 0) {
                                          this.prevX2 = e.pageX;
                                          this.left2  = +this.$selector2.css('left').replace('px', '');
                          Severity: Minor
                          Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

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

                                Slider.prototype.events = function events() {
                                    this.$selector.bind('mousedown', function () {
                                        this.mouseDown();
                                    }.bind(this));
                                    $(document).bind('mousemove', function (e) {
                            Severity: Minor
                            Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

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

                                  Range.prototype.mouseMoveLeft = function mouseMoveLeft(e) {
                                      if (this.pressed1 === true && this.opts.disabled !== true) {
                                          if (this.prevX1 == 0) {
                                              this.prevX1 = e.pageX;
                                              this.left1  = +this.$selector1.css('left').replace('px', '');
                              Severity: Minor
                              Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix

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

                                    Selector.prototype.init = function init(opts) {
                                        opts.value = common.roundValue(opts.value, opts);
                                
                                        if (!materialColors[opts.color]) {
                                            this.color = 'indigo';
                                Severity: Minor
                                Found in js/libs/materialbootstrap/slider.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language