Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ui-tabs component to be more event driven #5

Open
miphe opened this issue Oct 5, 2016 · 0 comments
Open

Refactor ui-tabs component to be more event driven #5

miphe opened this issue Oct 5, 2016 · 0 comments
Milestone

Comments

@miphe
Copy link
Owner

miphe commented Oct 5, 2016

It's too complicated at the moment, to create a tabbed interface. I would like to do something like this:

# Example of a tab ui component
tab1View = new Some.View
  model: Some.Model

tab2View = new Some.Other.View
  model: Some.Other.Model
  collection: Some.Collection

tab3View = new Yet.Another.View
  model: Yet.Another.Model

tabUICollection = new UI.Collection.Navigation
tabUICollection.add { label: 'Number one!',  view: tag1View }
tabUICollection.add { label: 'Second here',  view: tag2View, active: true }
tabUICollection.add { label: 'And the last', view: tag3View }

tabNav = new UI.View.NavigationList
  collection: tabUICollection

tabContent = new UI.View.TabContentList
  collection: tabUICollection

Radio.channel('app').trigger 'show:view:area1', tabNav
Radio.channel('app').trigger 'show:view:area2', tabContent
@miphe miphe modified the milestones: 0.1.0, 0.1.1 Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant