X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/app/view/cls/TabPanel.js diff --git a/docs/app/view/cls/TabPanel.js b/docs/app/view/cls/TabPanel.js new file mode 100644 index 00000000..316a494d --- /dev/null +++ b/docs/app/view/cls/TabPanel.js @@ -0,0 +1,26 @@ +/** + * The documentation panel. + * TODO: Source code tab, Examples, Q&A + */ +Ext.define('Docs.view.cls.TabPanel', { + extend: 'Ext.tab.Panel', + alias: 'widget.classtabpanel', + requires: [ + 'Docs.view.cls.Overview' + ], + + plain: true, + + // Remember tab scroll position on Webkit + listeners: { + beforetabchange: function(tabPanel, newCard, oldCard) { + oldCard.prevScroll = oldCard.body.getScroll()['top']; + }, + tabchange: function(tabPanel, newCard, oldCard) { + if (newCard.prevScroll) { + newCard.body.scrollTo('top', newCard.prevScroll); + } + } + } + +});