app/assets/javascripts/controllers/need_criteria.js
Function edit
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MASLOW.need_criteria.edit = function () {
var form = document.querySelector('form.need_criteria')
var list = form.querySelector('ul')
var baseTemplate = list.querySelector('li:first-child').cloneNode(true)
Function buildCriteria
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var buildCriteria = function () {
var item = baseTemplate.cloneNode(true)
var index = getIndex()
item.setAttribute('data-index', index)