Permalink
Browse files

build v0.11.0 pre-release w/ commands request/response

  • Loading branch information...
1 parent 3e494fc commit eb3883070673cbc41ea620a37dc874bdd068fbfa @derickbailey derickbailey committed Oct 4, 2012
@@ -630,7 +630,8 @@
var container;
if (containerView.itemViewContainer){
- container = containerView.$(_.result(containerView, "itemViewContainer"));
+ var selector = _.result(containerView, "itemViewContainer");
+ container = containerView.$(selector);
if (container.length <= 0) {
var err = new Error("The specified `itemViewContainer` was not found: " + containerView.itemViewContainer);
err.name = "ItemViewContainerMissingError";
@@ -943,13 +944,25 @@
Marionette.Application = function(options){
this.initCallbacks = new Marionette.Callbacks();
this.vent = new Marionette.EventAggregator();
+ this.commands = new Backbone.Wreqr.Commands();
+ this.reqres = new Backbone.Wreqr.RequestResponse();
this.submodules = {};
var eventBinder = new Marionette.EventBinder();
_.extend(this, eventBinder, options);
};
_.extend(Marionette.Application.prototype, Backbone.Events, {
+ // Command execution, facilitated by Backbone.Wreqr.Commands
+ execute: function(){
+ this.commands.execute.apply(this.commands, arguments);
+ },
+
+ // Request/response, facilitated by Backbone.Wreqr.RequestResponse
+ request: function(){
+ return this.reqres.request.apply(this.reqres, arguments);
+ },
+
// Add an initializer that is either run at when the `start`
// method is called, or run immediately if added after `start`
// has already been called.
Oops, something went wrong.

0 comments on commit eb38830

Please sign in to comment.