cbaron / Hazy

A site for a wonderful firm
MIT License
0 stars 0 forks source link

Form CodeReview #24

Closed cbaron closed 6 years ago

cbaron commented 6 years ago

Why did you comment out the following:

 getElementValue( el, attribute ) {
        if( attribute === undefined || ( !attribute.fk && typeof attribute.range === 'string' && attribute.range ) ) return el.value.trim()

        /*      
        if( attribute.fk ) {
            let selectedItem = this.views[ attribute.name ].selectedItem
            return selectedItem
                ? selectedItem._id || selectedItem.id
                : undefined
        } else if( typeof attribute.range === 'object' ) {
            return el.getFormValues()
        } else if( attribute.range === "List" ) { return Array.from( this.views[ attribute.name ].els.list.children ).map( item => this.getElementValue( item, { range: attribute.itemRange } ) ) }
        */    
    },
cbaron commented 6 years ago

In t/Form.js, come up with something more general than displayTotal:

total = opts.displayTotal
            ? `<div class="total"><span>Total: </span><span data-js="total">${this..Currency.format( p.model.total )}</span></div>`
            : ``,  
ScottAP108 commented 6 years ago

The comment is actually yours, stretching all the way back to your initial draft. I just never got around to deleting it, though at this point it is definitely safe to do so.

cbaron commented 6 years ago

Okay, go ahead and delete the code as long as it handles Object and Arrays. I haven't looked at the Hazy models, I prefer that the glide, speed, fade attributes all be under a single property on the disc type, regardless of what Hazy wants.