2015-04-10 20:17:03 +00:00
|
|
|
'use strict';
|
|
|
|
|
2015-04-12 22:41:09 +00:00
|
|
|
define([
|
2015-05-09 20:19:25 +00:00
|
|
|
'react',
|
|
|
|
'react-router',
|
|
|
|
'templates/app/index', 'app/components/index',
|
2015-05-09 19:53:19 +00:00
|
|
|
'app/actions/project', 'app/actions/build'
|
2015-04-12 22:41:09 +00:00
|
|
|
], function(
|
2015-05-09 20:19:25 +00:00
|
|
|
React,
|
|
|
|
Router,
|
|
|
|
template, Components,
|
2015-05-09 19:53:19 +00:00
|
|
|
ProjectActions, BuildActions
|
2015-04-12 22:41:09 +00:00
|
|
|
) {
|
2015-05-09 20:19:25 +00:00
|
|
|
var Route = React.createFactory(Router.Route),
|
|
|
|
DefaultRoute = React.createFactory(Router.DefaultRoute);
|
|
|
|
|
|
|
|
var routes = (
|
|
|
|
Route({name: 'dashboard', path: '/', handler: Components.App},
|
|
|
|
Route({name: 'projects', path: '/projects', handler: Components.ProjectsComponents.List})
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
Router.run(routes, Router.HistoryLocation, function(Handler) {
|
|
|
|
React.render(template({
|
|
|
|
Component: Handler
|
|
|
|
}), document.getElementById('content'));
|
|
|
|
});
|
2015-05-03 15:23:01 +00:00
|
|
|
|
2015-05-03 23:04:51 +00:00
|
|
|
ProjectActions.readAll();
|
2015-05-09 19:53:19 +00:00
|
|
|
BuildActions.readAll();
|
2015-04-10 20:17:03 +00:00
|
|
|
});
|