examples/dialog/hello.js
authorAlan Knowles <alan@akkbhome.com>
Sun, 12 Sep 2010 07:20:47 +0000 (15:20 +0800)
committerAlan Knowles <alan@akkbhome.com>
Sun, 12 Sep 2010 07:20:47 +0000 (15:20 +0800)
examples/dialog/hello.js

index 378c30f..11ac90a 100644 (file)
@@ -59,8 +59,7 @@ HelloWorld = {
                             _this.dialog.hide()
                         }   
                     }
-                }
-                buttons : [
+                },
                 {
                     xtype : 'Button',
                     xns : Roo,
@@ -83,42 +82,7 @@ HelloWorld = {
             
     }
 };                
-
-\r
-// create the HelloWorld application (single instance)\r
-var HelloWorld = function(){\r
-    // everything in this space is private and only accessible in the HelloWorld block\r
-    \r
-    // define some private variables\r
-    var dialog, showBtn;\r
-    \r
-    // return a public interface\r
-    return {\r
-        init : function(){\r
-             showBtn = Roo.get('show-dialog-btn');\r
-             // attach to click event\r
-             showBtn.on('click', this.showDialog, this);\r
-        },\r
-       \r
-        showDialog : function(){\r
-            if(!dialog){ // lazy initialize the dialog and only create it once\r
-                dialog = new Roo.BasicDialog("hello-dlg", { \r
-                        autoTabs:true,\r
-                        width:500,\r
-                        height:300,\r
-                        shadow:true,\r
-                        minWidth:300,\r
-                        minHeight:250,\r
-                        proxyDrag: true\r
-                });\r
-                dialog.addKeyListener(27, dialog.hide, dialog);\r
-                dialog.addButton('Submit', dialog.hide, dialog).disable();\r
-                dialog.addButton('Close', dialog.hide, dialog);\r
-            }\r
-            dialog.show(showBtn.dom);\r
-        }\r
-    };\r
-}();\r
\r
 \r
 // using onDocumentReady instead of window.onload initializes the application\r
 // when the DOM is ready, without waiting for images and other resources to load\r