devcows/hugo-universal-theme

View on GitHub

Showing 28 of 69 total issues

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

function utils () {
  /* tooltips */
  $('[data-toggle="tooltip"]').tooltip()

  /* click on the box activates the radio */
Severity: Minor
Found in static/js/front.js - About 1 hr to fix

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

    GMaps.prototype.drawPolygon = function(options) {
      var useGeoJSON = false;
    
      if(options.hasOwnProperty("useGeoJSON")) {
        useGeoJSON = options.useGeoJSON;
    Severity: Minor
    Found in static/js/hpneo.gmaps.js - About 1 hr to fix

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

          var buildContextMenuHTML = function(control, e) {
            var html = '',
                options = window.context_menu[self.el.id][control];
      
            for (var i in options){
      Severity: Minor
      Found in static/js/hpneo.gmaps.js - About 1 hr to fix

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

            this.setContextMenu = function(options) {
              window.context_menu[self.el.id][options.control] = {};
        
              var i,
                  ul = doc.createElement('ul');
        Severity: Minor
        Found in static/js/hpneo.gmaps.js - About 1 hr to fix

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

            Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
                "use strict";
                if (this == null) {
                    throw new TypeError();
                }
          Severity: Minor
          Found in static/js/hpneo.gmaps.js - About 1 hr to fix

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

            function productDetailGallery (confDetailSwitch) {
              $('.thumb:first').addClass('active')
              var timer = setInterval(autoSwitch, confDetailSwitch)
            
              $('.thumb').click(function (e) {
            Severity: Minor
            Found in static/js/front.js - About 1 hr to fix

              Avoid deeply nested control flow statements.
              Open

                        if (vertex1.lat() + (latLng.lng() - vertex1.lng()) / (vertex2.lng() - vertex1.lng()) * (vertex2.lat() - vertex1.lat()) < latLng.lat()) {
                          inPoly = !inPoly;
                        }
              Severity: Major
              Found in static/js/hpneo.gmaps.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                          if (p == 'hue' || p == 'color') {
                            ruleArg = '0x' + ruleArg.substring(1);
                          }
                Severity: Major
                Found in static/js/hpneo.gmaps.js - About 45 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language