Pman.Dialog.ImageUpload.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 4 Nov 2010 03:41:53 +0000 (11:41 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 4 Nov 2010 03:41:53 +0000 (11:41 +0800)
Pman.Dialog.ImageUpload.js

index 27c5d3a..359d33c 100644 (file)
@@ -30,6 +30,15 @@ Pman.Dialog.ImageUpload = {
         this.dialog = Roo.factory({
             xtype: 'LayoutDialog',
             xns: Roo,
+            listeners : {
+                show : function (_self)
+                {
+                    if (this.keylistener) {
+                        return;
+                    }
+                    this.keylistener = this.addKeyListener(27, this.hide, this);
+                }
+            },
             closable : false,
             collapsible : false,
             haveProgress : false,
@@ -80,12 +89,6 @@ Pman.Dialog.ImageUpload = {
                 })
                 
             },
-            listeners : {
-                show : function (_self)
-                {
-                
-                }
-            },
             items : [
                 {
                     xtype: 'ContentPanel',