drhenner/ror_ecommerce

View on GitHub
app/assets/javascripts/foundation/foundation.placeholder.js

Summary

Maintainability
B
4 hrs
Test Coverage

File foundation.placeholder.js has 273 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* 
 * The MIT License
 *
 * Copyright (c) 2012 James Allardice
 *
Severity: Minor
Found in app/assets/javascripts/foundation/foundation.placeholder.js - About 2 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                            if (placeholder !== elem.getAttribute(ATTR_CURRENT_VAL) || (elem.type === "password" && !elem.getAttribute(ATTR_INPUT_TYPE))) {
    
                                // Attempt to change the type of password inputs (fails in IE < 9)
                                if (elem.type === "password" && !elem.getAttribute(ATTR_INPUT_TYPE) && Utils.changeType(elem, "text")) {
                                    elem.setAttribute(ATTR_INPUT_TYPE, "password");
    Severity: Major
    Found in app/assets/javascripts/foundation/foundation.placeholder.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if (!elem.getAttribute(ATTR_EVENTS_BOUND)) {
                                  newElement(elem);
                              }
      Severity: Major
      Found in app/assets/javascripts/foundation/foundation.placeholder.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status