nci/static/js/app/app.js

37 lines
981 B
JavaScript
Raw Normal View History

2015-04-10 20:17:03 +00:00
'use strict';
2015-04-12 22:41:09 +00:00
define([
2015-05-03 23:04:51 +00:00
'react', 'templates/app/index', 'app/components/index',
'app/actions/project'
2015-04-12 22:41:09 +00:00
], function(
2015-05-03 23:04:51 +00:00
React, template, Components, ProjectActions
2015-04-12 22:41:09 +00:00
) {
2015-05-03 23:04:51 +00:00
//var projectsTemplate = _($('#projects-template').html()).template();
//$('#content').on('click', '.js-projects .js-run', function() {
//var projectName = $(this).parent('.js-project').data('name');
//projects.sync('run', {projectName: projectName}, function(err, result) {
//$('#content').append(
//(err && err.message)
//);
//});
//});
2015-04-12 22:41:09 +00:00
2015-05-03 23:04:51 +00:00
//projects.sync('read', function(err, projects) {
//console.log('read complete');
////$('#content').html(
////(err && err.message) ||
////projectsTemplate({projects: projects})
////);
//});
2015-05-03 23:04:51 +00:00
//builds.subscribe(function(data, action) {
//$('#content').append(action.action + ': ' + JSON.stringify(data));
//});
2015-05-03 23:04:51 +00:00
React.render(template({
App: Components.App
}), document.getElementById('react-content'));
2015-05-03 23:04:51 +00:00
ProjectActions.readAll();
2015-04-10 20:17:03 +00:00
});