mattvanhorn/BJJLife

View on GitHub

Showing 39 of 102 total issues

Function carouFredSel has 1576 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  $.fn.carouFredSel = function(options, configs) {
    if (this.length == 0) {
      debug(true, 'No element found for "'+this.selector+'".');
      return this;
    }
Severity: Major
Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 wk to fix

    File jquery.carouFredSel-5.6.1.js has 2179 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*  
     *  jQuery carouFredSel 5.6.1
     *  Demo's and documentation:
     *  caroufredsel.frebsite.nl
     *  
    Severity: Major
    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 6 days to fix

      Function _cfs_bind_events has 1028 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $cfs._cfs_bind_events = function() {
            $cfs._cfs_unbind_events();
      
            //  stop event
            $cfs.bind(cf_e('stop', conf), function(e, imm) {
      Severity: Major
      Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 5 days to fix

        Function prettyPhoto has 590 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fn.prettyPhoto = function(pp_settings) {
                pp_settings = jQuery.extend({
                    hook: 'rel', /* the attribute tag to use for prettyPhoto hooks. default: 'rel'. For HTML5, use "data-rel" or similar. */
                    animation_speed: 'fast', /* fast/slow/normal */
                    ajaxcallback: function() {},
        Severity: Major
        Found in app/assets/javascripts/jquery.prettyPhoto.js - About 2 days to fix

          File jquery.prettyPhoto.js has 615 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* ------------------------------------------------------------------------
              Class: prettyPhoto
              Use: Lightbox clone for jQuery
              Author: Stephane Caron (http://www.no-margin-for-errors.com)
              Version: 3.1.4
          Severity: Major
          Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 day to fix

            Function _cfs_init has 221 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $cfs._cfs_init = function(o, setOrig, start) {
                  o = go_getObject($tt0, o);
            
                  var obs = ['items', 'scroll', 'auto', 'prev', 'next', 'pagination'];
                  for (var a = 0, l = obs.length; a < l; a++) {
            Severity: Major
            Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 day to fix

              Function _cfs_bind_buttons has 151 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  $cfs._cfs_bind_buttons = function() {
                    $cfs._cfs_unbind_buttons();
                    nv_showNavi(opts, itms.total, conf);
                    nv_enableNavi(opts, itms.first, conf);
              
              
              Severity: Major
              Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 6 hrs to fix

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

                        $.prettyPhoto.open = function(event) {
                            if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables
                                settings = pp_settings;
                                if($.browser.msie && $.browser.version == 6) settings.theme = "light_square"; // Fallback to a supported theme for IE6
                                pp_images = $.makeArray(arguments[0]);
                Severity: Major
                Found in app/assets/javascripts/jquery.prettyPhoto.js - About 5 hrs to fix

                  Function _build_overlay has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          function _build_overlay(caller){
                              // Inject Social Tool markup into General markup
                              if(settings.social_tools)
                                  facebook_like_link = settings.social_tools.replace('{location_href}', encodeURIComponent(location.href)); 
                  
                  
                  Severity: Major
                  Found in app/assets/javascripts/jquery.prettyPhoto.js - About 3 hrs to fix

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

                            var a_complete = function() {
                    
                              var overFill = opts.items.visible+nI-itms.total,
                                new_m = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
                              $cfs.css(opts.d['left'], new_m);
                    Severity: Major
                    Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 2 hrs to fix

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

                              var a_complete = function() {
                      
                                var overFill = opts.items.visible+nI-itms.total;
                                if (overFill > 0) {
                                  $cfs.children().slice(itms.total).remove();
                      Severity: Minor
                      Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 hr to fix

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

                            $cfs._cfs_build = function() {
                              $cfs.data('cfs_isCarousel', true);
                        
                              var orgCSS = {
                                'textAlign'    : $cfs.css('textAlign'),
                        Severity: Minor
                        Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 hr to fix

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

                            function cf_getAdjust(x, o, a, $t) {
                              var v = x;
                              if (typeof a == 'function') {
                                v = a.call($t, v);
                          
                          
                          Severity: Minor
                          Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 hr to fix

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

                                inWords: function(distanceMillis) {
                                  var $l = this.settings.strings;
                                  var prefix = $l.prefixAgo;
                                  var suffix = $l.suffixAgo;
                                  if (this.settings.allowFuture) {
                            Severity: Minor
                            Found in app/assets/javascripts/jquery.timeago.js - About 1 hr to fix

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

                                      function _fitToViewport(width,height){
                                          resized = false;
                              
                                          _getDimensions(width,height);
                                          
                              Severity: Minor
                              Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 hr to fix

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

                                        function _showContent(){
                                            $('.pp_loaderIcon').hide();
                                
                                            // Calculate the opened top position of the pic holder
                                            projectedTop = scroll_pos['scrollTop'] + ((windowHeight/2) - (pp_dimensions['containerHeight']/2));
                                Severity: Minor
                                Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 hr to fix

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

                                    function go_getNaviObject($tt, obj, type) {
                                      if (typeof type != 'string') type = '';
                                  
                                      obj = go_getObject($tt, obj);
                                      if (typeof obj == 'string') {
                                  Severity: Minor
                                  Found in app/assets/javascripts/jquery.carouFredSel-5.6.1.js - About 1 hr to fix

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

                                            function _getDimensions(width,height){
                                                width = parseFloat(width);
                                                height = parseFloat(height);
                                                
                                                // Get the details height, to do so, I need to clone it since it's invisible
                                    Severity: Minor
                                    Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                  if(isSet && settings.overlay_gallery && _getFileType(pp_images[set_position])=="image" && (settings.ie6_fallback && !($.browser.msie && parseInt($.browser.version) == 6))) {
                                                      itemWidth = 52+5; // 52 beign the thumb width, 5 being the right margin.
                                                      navWidth = (settings.theme == "facebook" || settings.theme == "pp_default") ? 50 : 30; // Define the arrow width depending on the theme
                                                      
                                                      itemsPerPage = Math.floor((pp_dimensions['containerWidth'] - 100 - navWidth) / itemWidth);
                                      Severity: Major
                                      Found in app/assets/javascripts/jquery.prettyPhoto.js - About 1 hr to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                        if(!settings.modal)
                                                                        $.prettyPhoto.close();
                                        Severity: Major
                                        Found in app/assets/javascripts/jquery.prettyPhoto.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language