Created
November 3, 2011 18:49
-
-
Save TrisMcC/1337413 to your computer and use it in GitHub Desktop.
requirejs/ecui kickoff
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
| define([ | |
| 'views/App', | |
| 'views/Loader', | |
| 'views/CountsCollection', | |
| 'views/Menu', | |
| 'views/SearchQuery', | |
| 'collections/Counts', | |
| 'collections/EmailCriteria', | |
| 'Router', | |
| 'jquery', | |
| 'backbone' | |
| ], function(AppView, LoaderView, CountsCollectionView, MenuView, | |
| SearchQueryView, CountsCollection, EmailCriteriaCollection, Router, $, | |
| Backbone) { | |
| return { | |
| initialize: function() { | |
| var loader = new LoaderView({ el: $('.loading') }), | |
| countsCollection = new CountsCollection(null, { loader: loader }), | |
| criteriaCollection = new EmailCriteriaCollection(null, { | |
| countsCollection: countsCollection, | |
| loader: loader | |
| }), | |
| router = new Router, | |
| appView = new AppView({ | |
| countsCollection: countsCollection, | |
| criteriaCollection: criteriaCollection, | |
| el: $('#main'), | |
| footer: $('footer'), | |
| subTitle: $('header .section-heading'), | |
| router: router, | |
| countsCollectionView: new CountsCollectionView({ | |
| router: router, | |
| collection: countsCollection, | |
| el: $('.count-results') | |
| }), | |
| menuView: new MenuView({ | |
| collection: criteriaCollection, | |
| el: $('nav .criteria-menu') | |
| }), | |
| searchQueryView: new SearchQueryView({ | |
| collection: criteriaCollection, | |
| el: $('.search-query') | |
| }) | |
| }); | |
| router.setAppView(appView); | |
| Backbone.history.start(); | |
| } | |
| }; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment