4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
12 Roo.BLANK_IMAGE_URL = "../../images/default/s.gif";
14 // create the HelloWorld application (single instance)
\r
15 var HelloWorld = function(){
\r
16 // everything in this space is private and only accessible in the HelloWorld block
\r
18 // define some private variables
\r
19 var dialog, showBtn;
\r
21 // return a public interface
\r
24 showBtn = Roo.get('show-dialog-btn');
\r
25 // attach to click event
\r
26 showBtn.on('click', this.showDialog, this);
\r
29 showDialog : function(){
\r
30 if(!dialog){ // lazy initialize the dialog and only create it once
\r
31 dialog = new Roo.BasicDialog("hello-dlg", {
\r
40 dialog.addKeyListener(27, dialog.hide, dialog);
\r
41 dialog.addButton('Submit', dialog.hide, dialog).disable();
\r
42 dialog.addButton('Close', dialog.hide, dialog);
\r
44 dialog.show(showBtn.dom);
\r
49 // using onDocumentReady instead of window.onload initializes the application
\r
50 // when the DOM is ready, without waiting for images and other resources to load
\r
51 Roo.onReady(HelloWorld.init, HelloWorld, true);