+<html>\r
+<head>\r
+ <title>The source code</title>\r
+ <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+ <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body onload="prettyPrint();">\r
+ <pre class="prettyprint lang-js">Ext.onReady(function(){\r
+ var win;\r
+ var button = Ext.get('show-btn');\r
+\r
+ button.on('click', function(){\r
+ // create the window on the first click and reuse on subsequent clicks\r
+ if(!win){\r
+ win = new Ext.Window({\r
+ applyTo:'hello-win',\r
+ layout:'fit',\r
+ width:500,\r
+ height:300,\r
+ closeAction:'hide',\r
+ plain: true,\r
+\r
+ items: new Ext.TabPanel({\r
+ applyTo: 'hello-tabs',\r
+ autoTabs:true,\r
+ activeTab:0,\r
+ deferredRender:false,\r
+ border:false\r
+ }),\r
+\r
+ buttons: [{\r
+ text:'Submit',\r
+ disabled:true\r
+ },{\r
+ text: 'Close',\r
+ handler: function(){\r
+ win.hide();\r
+ }\r
+ }]\r
+ });\r
+ }\r
+ win.show(this);\r
+ });\r
+});</pre> \r
+</body>\r
+</html>
\ No newline at end of file