_this.dialog.hide()
}
}
- }
- buttons : [
+ },
{
xtype : 'Button',
xns : Roo,
}
};
-
-\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