*/
Roo.BLANK_IMAGE_URL = "../../images/default/s.gif";
- \r
+
+
+
+HelloWorld = {
+
+ dialog : false,
+ callback: false,
+
+ show : function(data, cb)
+ {
+ // standard code example..
+ if (!this.dialog) {
+ this.create();
+ }
+
+ this.callback = cb;
+ this.data = data;
+ this.dialog.show(data._el ? data._el : false);
+ if (this.form) {
+ this.form.reset();
+ this.form.setValues(data);
+ this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
+ }
+
+ },
+
+ create : function()
+ {
+ var _this = this;
+ this.dialog = Roo.factory({
+ xns : Roo,
+ xtype : 'BasicDialog',
+ autoTabs:true,
+ width:500,
+ height:300,
+ shadow:true,
+ minWidth:300,
+ minHeight:250,
+ proxyDrag: true,
+ buttons : [
+ {
+ xtype : 'Button',
+ xns : Roo,
+ text : 'Submit',
+ listeners : {
+ click : function () {
+ _this.dialog.hide()
+ }
+ }
+ }
+ buttons : [
+ {
+ xtype : 'Button',
+ xns : Roo,
+ text : 'Close',
+ listeners : {
+ click : function () {
+ _this.dialog.hide()
+ }
+ }
+ }
+ ],
+ listeners : {
+ keydown : function(dlg, e) {
+ var k = e.getKey();
+ if(k == 27){ _this.dialog.hide(); }
+ }
+ }
+
+ });
+
+ }
+}
+
+\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