Created
June 17, 2016 13:33
-
-
Save d3chapma/5e4e87ab0244d2a5c86d532e13a99137 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Show.LineItemGroup extends App.Views.Layout | |
template: 'quote/show/line_item_group' | |
className: 'line-item-group' | |
regions: | |
footerRegion: '.quote-group-footer-region' | |
lineItemRegion: '.quote-group-item-region' | |
class Show.LineItems extends App.Views.CollectionView | |
childView: Show.LineItem | |
onAttach: -> | |
# this is to get rid of the parent div on the collectionview | |
@$el.children().unwrap() | |
@$el = @$el.parent() | |
@setElement(@$el) | |
filter: (child, index, collection) -> | |
child.get('line_item_group_id') == @model.id | |
viewComparator: 'position' | |
class Show.NewLineItemForm extends App.Views.ItemView | |
template: 'quote/show/new_line_item_form' | |
tagName: 'tr' | |
className: 'quote-group-footer-form' | |
class Show.NewLineItemTrigger extends App.Views.ItemView | |
template: 'quote/show/new_line_item_trigger' | |
tagName: 'tr' | |
className: 'quote-group-footer-trigger' | |
triggers: | |
'click' : 'show:form' | |
class Show.LineItem extends App.Views.ItemView | |
template: 'quote/show/line_item' | |
tagName: "tr" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment