Open patricklx opened 10 years ago
Make the TooltipBoxController internal and some mixins for route and view. Then Instead of doing
//Create some controller in your app that references _Bootstrap.TooltipBoxController_ App.TooltipBoxController = Bootstrap.TooltipBoxController //Application route App.ApplicationRoute = Ember.Route.extend({ renderTemplate: function() { // Render default outlet this.render(); // render extra outlets var controller = this.controllerFor('tooltip-box'); this.render("bs-tooltip-box", { outlet: "bs-tooltip-box", controller: controller, into: "application" // important when using at root level }); } });
We can just do
var ApplicationRoute = Ember.Route.extend(Bootstrap.BsTooltipRouteMixin, {});
or for views
Ember.View.extend(Bootstrap.BsTooltipViewMixin, { bsTooltipData: function () { return Ember.Object.create({ item: this.get('item'), titleBinding: 'item.attributes.description' }); }.property(), bsTooltipType: 'tooltip', }
Make the TooltipBoxController internal and some mixins for route and view. Then Instead of doing
We can just do
or for views