fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
canvas manager wip - splitting node
[fnpeditor.git]
/
views
/
tabs
/
tabs.js
diff --git
a/views/tabs/tabs.js
b/views/tabs/tabs.js
index
7c94938
..
bc14083
100644
(file)
--- a/
views/tabs/tabs.js
+++ b/
views/tabs/tabs.js
@@
-57,9
+57,16
@@
define([
if(slug !== this.selectedTab && this.contents[slug]) {
\r
this.trigger('leaving', this.selectedTab);
\r
\r
if(slug !== this.selectedTab && this.contents[slug]) {
\r
this.trigger('leaving', this.selectedTab);
\r
\r
- if(this.selectedTab)
\r
- this.contents[this.selectedTab].detach();
\r
+ if(this.selectedTab) {
\r
+ var toDetach = this.contents[this.selectedTab];
\r
+ if(toDetach.onHide)
\r
+ toDetach.onHide();
\r
+ toDetach.detach();
\r
+ }
\r
this.nodes.content.append(this.contents[slug]);
\r
this.nodes.content.append(this.contents[slug]);
\r
+ if(this.contents[slug].onShow) {
\r
+ this.contents[slug].onShow();
\r
+ }
\r
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