jetfuel-blackbox
Version:
Currently, BlackBox is a boilerplate client-side application framework, built on top of the JetFuel build system and Grunt, Backbone, RequireJS, JetRunner unit test server (Mocha BDD/TDD test framework + PhantomJS + SauceLabs cloud integration), Dust (and Plate Django port) for templating (both client and server-side), Sass, Express dynamic web server, etc. BlackBox is the template used for JetFuel's basic `init` command.
43 lines (36 loc) • 1.01 kB
JavaScript
define('view/todos/Detail', ['view/Base', 'model/Todo'], function(Base, Todo) {
'use strict';
var config = {
template: 'todos/detail',
i18n: true,
css: true
};
/**
* @lends blackbox.web.view.todos.Detail.prototype
*/
return Base.extend({
/**
* @constructs
* @version 2.0
* @augments blackbox.web.view.Base
*/
initialize: function() {
return Base.prototype.initialize.call(this, config);
},
/**
* @overridden
* @param {String} id
* @returns {manero.web.view.todos.Detail}
*/
load: function(id) {
var self = this;
new Todo({ id: id }).fetch({
success: function(todo) {
self.config({ data: { data: todo.toJSON() } });
Base.prototype.load.call(self);
}
});
return this;
}
});
});