Dogfalo/materialize

View on GitHub

Showing 101 of 181 total issues

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

    init : function(options) {
      var defaults = {
        onShow: null,
        swipeable: false,
        responsiveThreshold: Infinity, // breakpoint for swipeable
Severity: Major
Found in js/tabs.js - About 6 hrs to fix

    Function autocomplete has 129 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn.autocomplete = function (options) {
          // Defaults
          var defaults = {
            data: {},
            limit: Infinity,
    Severity: Major
    Found in js/forms.js - About 5 hrs to fix

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

        init: function (options) {
          return this.each(function() {
          var origin = $('#'+$(this).attr('data-activates'));
          var screen = $('body');
      
      
      Severity: Major
      Found in js/tapTarget.js - About 5 hrs to fix

        Function collapsible has 117 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          $.fn.collapsible = function(options, methodParam) {
            var defaults = {
              accordion: undefined,
              onOpen: undefined,
              onClose: undefined
        Severity: Major
        Found in js/collapsible.js - About 4 hrs to fix

          Function scroll has 104 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function scroll(x) {
                    // Track scrolling state
                    scrolling = true;
                    if (!view.hasClass('scrolling')) {
                      view.addClass('scrolling');
          Severity: Major
          Found in js/carousel.js - About 4 hrs to fix

            Function handleEvents has 102 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                this.handleEvents = function() {
                  var SELS = self.SELS;
            
                  self.$document.off('click.chips-focus', SELS.CHIPS).on('click.chips-focus', SELS.CHIPS, function(e){
                    $(e.target).find(SELS.INPUT).focus();
            Severity: Major
            Found in js/chips.js - About 4 hrs to fix

              File sideNav.js has 320 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              (function ($) {
              
                var methods = {
                  init : function(options) {
                    var defaults = {
              Severity: Minor
              Found in js/sideNav.js - About 3 hrs to fix

                Function mouseenter.tooltip has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        origin.on({'mouseenter.tooltip': function(e) {
                          var showTooltip = function() {
                            setAttributes();
                            started = true;
                            tooltipEl.velocity('stop');
                Severity: Major
                Found in js/tooltip.js - About 3 hrs to fix

                  Function showTooltip has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                            var showTooltip = function() {
                              setAttributes();
                              started = true;
                              tooltipEl.velocity('stop');
                              backdrop.velocity('stop');
                  Severity: Major
                  Found in js/tooltip.js - About 3 hrs to fix

                    Function placeDropdown has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          function placeDropdown(eventType) {
                            // Check for simultaneous focus and click events.
                            if (eventType === 'focus') {
                              isFocused = true;
                            }
                    Severity: Major
                    Found in js/dropdown.js - About 3 hrs to fix

                      Function testOptions has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function testOptions ( options ) {
                      
                              // To prove a fix for #537, freeze options here.
                              // If the object is modified, an error will be thrown.
                              // Object.freeze(options);
                      Severity: Major
                      Found in extras/noUiSlider/nouislider.js - About 3 hrs to fix

                        Function DatePicker has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function DatePicker( picker, settings ) {
                        
                            var calendar = this,
                                element = picker.$node[ 0 ],
                                elementValue = element.value,
                        Severity: Major
                        Found in js/date_picker/picker.date.js - About 3 hrs to fix

                          File search.js has 299 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          (function ($) {
                            $(document).ready(function() {
                              window.index = lunr(function () {
                                this.field('title', {boost: 10});
                                this.field('body');
                          Severity: Minor
                          Found in jade/search.js - About 3 hrs to fix

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

                                ClockPicker.prototype.show = function(e){
                                    // Not show again
                                    if (this.isShown) {
                                        return;
                                    }
                            Severity: Major
                            Found in js/date_picker/picker.time.js - About 3 hrs to fix

                              Function FABtoToolbar has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                var FABtoToolbar = function(btn) {
                                  if (btn.attr('data-open') === "true") {
                                    return;
                                  }
                              
                              
                              Severity: Major
                              Found in js/buttons.js - About 2 hrs to fix

                                Function scrollSpy has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    $.scrollSpy = function(selector, options) {
                                      var defaults = {
                                            throttle: 100,
                                            scrollOffset: 200, // offset - 200 allows elements near bottom of page to scroll
                                            activeClass: 'active',
                                Severity: Major
                                Found in js/scrollspy.js - About 2 hrs to fix

                                  Function setHand has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      ClockPicker.prototype.setHand = function(x, y, roundBy5, dragging) {
                                          var radian = Math.atan2(x, - y),
                                                  isHours = this.currentView === 'hours',
                                                  unit = Math.PI / (isHours || roundBy5? 6 : 30),
                                                  z = Math.sqrt(x * x + y * y),
                                  Severity: Major
                                  Found in js/date_picker/picker.time.js - About 2 hrs to fix

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

                                        var calculateTapTarget = function() {
                                          // Element or parent is fixed position?
                                          var isFixed = origin.css('position') === 'fixed';
                                          if (!isFixed) {
                                            var parents = origin.parents();
                                    Severity: Major
                                    Found in js/tapTarget.js - About 2 hrs to fix

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

                                      DatePicker.prototype.activate = function( type, datesToEnable ) {
                                      
                                          var calendar = this,
                                              disabledItems = calendar.item.disable,
                                              disabledItemsCount = disabledItems.length
                                      Severity: Major
                                      Found in js/date_picker/picker.date.js - About 2 hrs to fix

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

                                          var toolbarToFAB = function(btn) {
                                            if (btn.attr('data-open') !== "true") {
                                              return;
                                            }
                                        
                                        
                                        Severity: Major
                                        Found in js/buttons.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language