nukomeet/coworfing

View on GitHub

Showing 29 of 60 total issues

File jquery-ui-timepicker-addon.js has 1027 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
* jQuery timepicker addon
* By: Trent Richardson [http://trentrichardson.com]
* Version 1.0.0
* Last Modified: 02/05/2012
Severity: Major
Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 2 days to fix

    Function _injectTimePicker has 268 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _injectTimePicker: function() {
            var $dp = this.inst.dpDiv,
                o = this._defaults,
                tp_inst = this,
                // Added by Peter Medeiros:
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 day to fix

      Function _limitMinMaxDateTime has 90 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _limitMinMaxDateTime: function(dp_inst, adjustSliders){
              var o = this._defaults,
                  dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
      
              if(!this._defaults.showTimepicker) return; // No time so nothing to check here
      Severity: Major
      Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 3 hrs to fix

        File jquery.masonry.min.js has 296 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * jQuery Masonry v2.1.03
         * A dynamic layout plugin for jQuery
         * The flip-side of CSS Floats
         * http://masonry.desandro.com
        Severity: Minor
        Found in lib/assets/javascripts/jquery.masonry.min.js - About 3 hrs to fix

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

              _newInst: function($input, o) {
                  var tp_inst = new Timepicker(),
                      inlineSettings = {};
          
                  for (var attrName in this._defaults) {
          Severity: Major
          Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 2 hrs to fix

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

                _parseTime: function(timeString, withDate) {
                    var regstr = this._defaults.timeFormat.toString()
                            .replace(/h{1,2}/ig, '(\\d?\\d)')
                            .replace(/m{1,2}/ig, '(\\d?\\d)')
                            .replace(/s{1,2}/ig, '(\\d?\\d)')
            Severity: Major
            Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 2 hrs to fix

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

              function Timepicker() {
                  this.regional = []; // Available regional settings, indexed by language code
                  this.regional[''] = { // Default regional settings
                      currentText: 'Now',
                      closeText: 'Done',
              Severity: Major
              Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 2 hrs to fix

                Method initialize has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def initialize(user)
                    # guest user (not logged in)
                    user = user
                    unless user
                      user = User.new
                Severity: Minor
                Found in app/models/ability.rb - About 1 hr to fix

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

                  $.datepicker._optionDatepicker = function(target, name, value) {
                      var inst = this._getInst(target),
                          tp_inst = this._get(inst, 'timepicker');
                      if (tp_inst) {
                          var min = null, max = null, onselect = null;
                  Severity: Minor
                  Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

                    Function formatTime has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.datepicker.formatTime = function(format, time, options) {
                        options = options || {};
                        options = $.extend($.timepicker._defaults, options);
                        time = $.extend({hour:0, minute:0, second:0, millisec:0, timezone:'+0000'}, time);
                    
                    
                    Severity: Minor
                    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

                      Function _onTimeChange has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _onTimeChange: function() {
                              var hour   = (this.hour_slider) ? this.hour_slider.slider('value') : false,
                                  minute = (this.minute_slider) ? this.minute_slider.slider('value') : false,
                                  second = (this.second_slider) ? this.second_slider.slider('value') : false,
                                  millisec = (this.millisec_slider) ? this.millisec_slider.slider('value') : false,
                      Severity: Minor
                      Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax) || (millisec < defaults.millisecMin || millisec > defaults.millisecMax)) {
                                    hour = defaults.hourMin;
                                    minute = defaults.minuteMin;
                                    second = defaults.secondMin;
                                    millisec = defaults.millisecMin;
                        Severity: Critical
                        Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

                          Method all has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def all
                              auth = request.env['omniauth.auth']
                            
                              # Find an identity here
                              @identity = Identity.find_with_omniauth(auth)
                          Severity: Minor
                          Found in app/controllers/omniauth_callbacks_controller.rb - About 1 hr to fix

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

                                _placeBrick: function( brick ) {
                                  var $brick = $(brick),
                                      colSpan, groupCount, groupY, groupColY, j;
                            
                                  //how many columns does this brick span
                            Severity: Minor
                            Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

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

                                  layout : function( $bricks, callback ) {
                              
                                    // place each brick
                                    for (var i=0, len = $bricks.length; i < len; i++) {
                                      this._placeBrick( $bricks[i] );
                              Severity: Minor
                              Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

                                Function _create has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _create : function( options ) {
                                      
                                      this.options = $.extend( true, {}, $.Mason.settings, options );
                                      this.styleQueue = [];
                                
                                
                                Severity: Minor
                                Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

                                  Function _updateDateTime has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      _updateDateTime: function(dp_inst) {
                                          dp_inst = this.inst || dp_inst;
                                          var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
                                              dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
                                              formatCfg = $.datepicker._getFormatConfig(dp_inst),
                                  Severity: Minor
                                  Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

                                    Function imagesLoaded has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      $.fn.imagesLoaded = function( callback ) {
                                        var $this = this,
                                            $images = $this.find('img').add( $this.filter('img') ),
                                            len = $images.length,
                                            blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==',
                                    Severity: Minor
                                    Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

                                      Function masonry has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        $.fn.masonry = function( options ) {
                                          if ( typeof options === 'string' ) {
                                            // call method
                                            var args = Array.prototype.slice.call( arguments, 1 );
                                      
                                      
                                      Severity: Minor
                                      Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

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

                                        $.datepicker._doKeyPress = function(event) {
                                            var inst = $.datepicker._getInst(event.target),
                                                tp_inst = $.datepicker._get(inst, 'timepicker');
                                        
                                            if (tp_inst) {
                                        Severity: Minor
                                        Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language