htdocs/assets/js/app.js

Summary

Maintainability
C
1 day
Test Coverage

File app.js has 377 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";
define(function(require) {
    var $ = require('jquery'),
        _ = require('underscore'),
        Backbone = require('backbone'),
Severity: Minor
Found in htdocs/assets/js/app.js - About 5 hrs to fix

    Function _ajax has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _ajax: function(options) {
                options = options || {};
    
                // Whether we've displayed the results of this request.
                var processed = false;
    Severity: Minor
    Found in htdocs/assets/js/app.js - About 1 hr to fix

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

              changeSelectable: function(down, group) {
                  // Don't do anything if we have no selectables.
                  if(this.selectableGroups.length === 0) {
                      return;
                  }
      Severity: Minor
      Found in htdocs/assets/js/app.js - About 1 hr to fix

        Function App has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var App = function() {
                // Store a global collection of each type. This allows for caching objects between pages.
                this.Data = {
                    Searches: new SearchCollection(),
                    Alerts: new AlertCollection(),
        Severity: Minor
        Found in htdocs/assets/js/app.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if(
                          !('href' in anchor) ||
                          anchor.target === '_blank' ||
                          anchor.href.length === 0 ||
                          anchor.href.indexOf('#') !== -1 ||
          Severity: Critical
          Found in htdocs/assets/js/app.js - About 1 hr to fix

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

                    beforeRoute: function(route) {
                        if(this.View.Current) {
                            var val = this.View.Current.onExit();
                            // onExit returned false, deny.
                            var deny = _.isBoolean(val) && !val;
            Severity: Minor
            Found in htdocs/assets/js/app.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status