X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b1836c20d64490bf23d3fb12e35dc755e174acd6..e16c2ba3a8b07ced3d7a1c53834985775e9c7c51:/views/tabs/tabs.js diff --git a/views/tabs/tabs.js b/views/tabs/tabs.js index 52c8160..de776c6 100644 --- a/views/tabs/tabs.js +++ b/views/tabs/tabs.js @@ -57,8 +57,9 @@ define([ this.nodes.tabBar.find('.active').removeClass('active'); this.nodes.tabBar.find('a[href="#'+slug+'"]').parent().addClass('active'); + var prevSlug = this.selectedTab; this.selectedTab = slug; - this.trigger('tabSelected', slug); + this.trigger('tabSelected', {slug: slug, prevSlug: prevSlug}); } }, @@ -66,6 +67,10 @@ define([ return this.$el; }, + getCurrentSlug: function() { + return this.selectedTab; + }, + /* Events */ _onTabTitleClicked: function(e) {