fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up: removing unused template
[fnpeditor.git]
/
views
/
tabs
/
tabs.js
diff --git
a/views/tabs/tabs.js
b/views/tabs/tabs.js
index
dcd3e96
..
43df1c1
100644
(file)
--- a/
views/tabs/tabs.js
+++ b/
views/tabs/tabs.js
@@
-29,8
+29,13
@@
define([
}
\r
\r
if(this.options.stacked) {
\r
}
\r
\r
if(this.options.stacked) {
\r
- this.nodes.tabBar.addClass('nav-stacked nav-pills');
\r
+ this.nodes.tabBar.addClass('nav-stacked nav-pills')
.removeClass('nav-tabs')
;
\r
}
\r
}
\r
+ if(this.options.position === 'right') {
\r
+ this.$el.addClass('tabs-right');
\r
+ this.nodes.content.addClass('tab-content');
\r
+ }
\r
+ return this;
\r
},
\r
\r
addTab: function(title, slug, content) {
\r
},
\r
\r
addTab: function(title, slug, content) {
\r
@@
-56,11
+61,20
@@
define([
this.nodes.tabBar.find('.active').removeClass('active');
\r
this.nodes.tabBar.find('a[href="#'+slug+'"]').parent().addClass('active');
\r
\r
this.nodes.tabBar.find('.active').removeClass('active');
\r
this.nodes.tabBar.find('a[href="#'+slug+'"]').parent().addClass('active');
\r
\r
+ var prevSlug = this.selectedTab;
\r
this.selectedTab = slug;
\r
this.selectedTab = slug;
\r
- this.trigger('tabSelected',
slug
);
\r
+ this.trigger('tabSelected',
{slug: slug, prevSlug: prevSlug}
);
\r
}
\r
},
\r
\r
}
\r
},
\r
\r
+ getAsView: function() {
\r
+ return this.$el;
\r
+ },
\r
+
\r
+ getCurrentSlug: function() {
\r
+ return this.selectedTab;
\r
+ },
\r
+
\r
/* Events */
\r
\r
_onTabTitleClicked: function(e) {
\r
/* Events */
\r
\r
_onTabTitleClicked: function(e) {
\r