app/assets/javascripts/spine/tabs.js in spine-rails-0.0.7 vs app/assets/javascripts/spine/tabs.js in spine-rails-0.0.8

- old
+ new

@@ -13,39 +13,39 @@ } $ = Spine.$; Spine.Tabs = (function() { __extends(Tabs, Spine.Controller); Tabs.prototype.events = { - "click [data-name]": "click" + 'click [data-name]': 'click' }; function Tabs() { this.change = __bind(this.change, this); Tabs.__super__.constructor.apply(this, arguments); - this.bind("change", this.change); + this.bind('change', this.change); } Tabs.prototype.change = function(name) { if (!name) { return; } this.current = name; - this.children().removeClass("active"); - return this.children("[data-name='" + this.current + "']").addClass("active"); + this.children().removeClass('active'); + return this.children("[data-name=" + this.current).addClass('active'); }; Tabs.prototype.render = function() { this.change(this.current); - if (!(this.children(".active").length || this.current)) { - return this.children(":first").click(); + if (!(this.children('.active').length || this.current)) { + return this.children(':first').click(); } }; Tabs.prototype.children = function(sel) { return this.el.children(sel); }; Tabs.prototype.click = function(e) { var name; - name = $(e.target).attr("data-name"); - return this.trigger("change", name); + name = $(e.target).attr('data-name'); + return this.trigger('change', name); }; Tabs.prototype.connect = function(tabName, controller) { - return this.bind("change", function(name) { + return this.bind('change', function(name) { if (name === tabName) { return controller.active(); } }); };