examples/bootstrap/modal.js
authorEdward <edward@roojs.com>
Fri, 21 Mar 2014 03:54:01 +0000 (11:54 +0800)
committerEdward <edward@roojs.com>
Fri, 21 Mar 2014 03:54:01 +0000 (11:54 +0800)
examples/bootstrap/modal.js

index f602783..7d6c892 100644 (file)
@@ -32,6 +32,11 @@ Roo.example.modal = new Roo.XComponent({
             xns: Roo.bootstrap,
             title : "Login",
             buttons : Roo.bootstrap.Modal.OKCANCEL,
+            listeners : {
+                btnclick : function (name, e) {
+                    Roo.log(name)
+                }
+            },
             items : [
                 {
                     xtype: 'Container',
@@ -53,6 +58,13 @@ Roo.example.modal = new Roo.XComponent({
                         {
                             xtype: 'Form',
                             xns: Roo.bootstrap,
+                            listeners : {
+                                actioncomplete : function (_self, action) {
+                                    if (action.type =='submit') {
+                                        _this.loginModal.hide();
+                                    }
+                                }
+                            },
                             items : [
                                 {
                                     xtype: 'Input',