@cypress/core-desktop-gui
Version:
Desktop GUI for managing Cypress projects.
21 lines (15 loc) • 595 B
text/coffeescript
@App.module "Views", (Views, App, Backbone, Marionette, $, _) ->
class Views.CompositeView extends Marionette.CompositeView
constructor: ->
super
options = {}
options.tagName = "tr" if @isTbody()
options.tagName = "li" if @isUl()
@childViewOptions = _.extend {}, _.result(@, "childViewOptions"), options
buildChildView: (item, childViewType, childViewOptions) ->
childViewOptions.tableColumns = @$el.find("th").length if @isTbody()
super
isTbody: ->
@childViewContainer is "tbody"
isUl: ->
@childViewContainer is "ul"