-define(['views/tabs/tabs'], function(tabsView) {\r
-\r
-return function(sandbox) {\r
- \r
- var view = new tabsView.View();\r
- view.on('leaving', function(slug) {\r
- sandbox.publish('leaving', slug);\r
- });\r
- view.on('tabSelected', function(slug) {\r
- sandbox.publish('showed', slug);\r
- });\r
- \r
- return {\r
- start: function() {\r
- view.render();\r
- sandbox.publish('ready');\r
- },\r
- \r
- getView: function() {\r
- return view.$el;\r
- },\r
- \r
- addTab: function(title, slug, contentView) {\r
- view.addTab(title, slug, contentView);\r
- \r
- },\r
- getCurrentSlug: function() {\r
- return view.selectedTab;\r
- }\r
- }\r
-};\r
-\r
-});
\ No newline at end of file