Dogfalo/materialize

View on GitHub

Showing 101 of 181 total issues

Function prepareElementRoot has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function prepareElementRoot() {

        P.$root.

            on({
Severity: Major
Found in js/date_picker/picker.js - About 2 hrs to fix

    Function generateSpread has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function generateSpread ( density, mode, group ) {
    
                function safeIncrement(value, increment) {
                    // Avoid floating point variance by dropping the smallest decimal places.
                    return (value + increment).toFixed(7) / 1;
    Severity: Major
    Found in extras/noUiSlider/nouislider.js - About 2 hrs to fix

      Function returnToOriginal has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function returnToOriginal() {
      
              doneAnimating = false;
      
              var placeholder = origin.parent('.material-placeholder');
      Severity: Major
      Found in js/materialbox.js - About 2 hrs to fix

        File chips.js has 252 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        (function ($) {
          var materialChipsDefaults = {
            data: [],
            placeholder: '',
            secondaryPlaceholder: '',
        Severity: Minor
        Found in js/chips.js - About 2 hrs to fix

          Function formats has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          DatePicker.prototype.formats = (function() {
          
              // Return the length of the first word in a collection.
              function getWordLengthFromCollection( string, collection, dateObject ) {
          
          
          Severity: Major
          Found in js/date_picker/picker.date.js - About 2 hrs to fix

            Function pushpin has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              $.fn.pushpin = function (options) {
                // Defaults
                var defaults = {
                  top: 0,
                  bottom: Infinity,
            Severity: Major
            Found in js/pushpin.js - About 2 hrs to fix

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

                        onKeyDown = function(e){
                          // TAB - switch to another input
                          if(e.which == 9){
                            $newSelect.trigger('close');
                            return;
              Severity: Minor
              Found in js/forms.js - About 2 hrs to fix

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

                DatePicker.prototype.validate = function( type, dateObject, options ) {
                
                    var calendar = this,
                
                        // Keep a reference to the original date.
                Severity: Minor
                Found in js/date_picker/picker.date.js - About 2 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                      if ( !options || !options.nav ) if (
                          /* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) ||
                          /* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) ||
                          /* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) )
                      ) {
                  Severity: Critical
                  Found in js/date_picker/picker.date.js - About 2 hrs to fix

                    Function mousedown has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function mousedown(e, space) {
                                var offset = plate.offset(),
                                        isTouch = /^touch/.test(e.type),
                                        x0 = offset.left + dialRadius,
                                        y0 = offset.top + dialRadius,
                    Severity: Minor
                    Found in js/date_picker/picker.time.js - About 1 hr to fix

                      Function item has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      item: function( rowCounter ) {
                      
                                          // If Monday is the first day and the month starts on Sunday, shift the date back a week.
                                          var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0
                      
                      
                      Severity: Minor
                      Found in js/date_picker/picker.date.js - About 1 hr to fix

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

                                    open: function( dontGiveFocus ) {
                        
                                        // If it’s already open, do nothing.
                                        if ( STATE.open ) return P
                        
                        
                        Severity: Minor
                        Found in js/date_picker/picker.js - About 1 hr to fix

                          Function defaults has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          DatePicker.defaults = (function( prefix ) {
                          
                              return {
                          
                                  // The title label to use for the month nav buttons
                          Severity: Minor
                          Found in js/date_picker/picker.date.js - About 1 hr to fix

                            Function removeMenu has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    var removeMenu = function(restoreNav) {
                                      panning = false;
                                      menuOut = false;
                                      // Reenable scrolling
                                      $('body').css({
                            Severity: Minor
                            Found in js/sideNav.js - About 1 hr to fix

                              Function parallax has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                $.fn.parallax = function () {
                                  var window_width = $(window).width();
                                  // Parallax Scripts
                                  return this.each(function(i) {
                                    var $this = $(this);
                              Severity: Minor
                              Found in js/parallax.js - About 1 hr to fix

                                Function addMarking has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        function addMarking ( spread, filterFunc, formatter ) {
                                
                                            var element = document.createElement('div'),
                                                out = '',
                                                valueSizeClasses = [
                                Severity: Minor
                                Found in extras/noUiSlider/nouislider.js - About 1 hr to fix

                                  Function hide has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          hide: function(e) {
                                              TouchHandler.touchup(e);
                                  
                                              var el = this;
                                              var width = el.clientWidth * 1.4;
                                  Severity: Minor
                                  Found in js/waves.js - About 1 hr to fix

                                    Function createYearLabel has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            createYearLabel = function(override) {
                                    
                                                var focusedYear = viewsetObject.year,
                                    
                                                // If years selector is set to a literal "true", set it to 5. Otherwise
                                    Severity: Minor
                                    Found in js/date_picker/picker.date.js - About 1 hr to fix

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

                                              show: function(e, element) {
                                      
                                                  // Disable right click
                                                  if (e.button === 2) {
                                                      return false;
                                      Severity: Minor
                                      Found in js/waves.js - About 1 hr to fix

                                        Function start has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                    start: function() {
                                        
                                                        // If it’s already started, do nothing.
                                                        if ( STATE && STATE.start ) return P
                                        
                                        
                                        Severity: Minor
                                        Found in js/date_picker/picker.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language