Pman.Tab.AdminContacts.bjs
authorChris <chris@roojs.com>
Tue, 3 Jul 2012 03:05:26 +0000 (11:05 +0800)
committerChris <chris@roojs.com>
Tue, 3 Jul 2012 03:05:26 +0000 (11:05 +0800)
Pman.Tab.AdminContacts.js

Pman.Tab.AdminContacts.bjs
Pman.Tab.AdminContacts.js

index 30896e9..61738d5 100644 (file)
@@ -1,9 +1,9 @@
 {
-    "id": "roo-file-88",
+    "id": "roo-file-97",
     "name": "Pman.Tab.AdminContacts",
     "parent": "Pman.Tab.AdminContactsManager",
     "title": "Pman.Tab.AdminContacts",
-    "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminContacts.bjs",
+    "path": "/home/chris/gitlive/Pman.Admin/Pman.Tab.AdminContacts.bjs",
     "items": [
         {
             "listeners": {
                                     "xtype": "Button",
                                     "|xns": "Roo.Toolbar"
                                 },
+                                {
+                                    "listeners": {
+                                        "toggle": "function (_self, pressed)\n{\n   _this.grid.footer.onClick('first');\n   this.setText(pressed ? \"Show Active\" : \"Show Removed\");\n   \n   \n}",
+                                        "render": "function (_self)\n{\n  _this.activeButton = _self;\n}"
+                                    },
+                                    "enableToggle": true,
+                                    "text": "Show Removed",
+                                    "xtype": "Button",
+                                    "|xns": "Roo.Toolbar"
+                                },
                                 {
                                     "|xns": "Roo.Toolbar",
                                     "xtype": "Fill"
index 31036c9..85c3082 100644 (file)
@@ -2,36 +2,19 @@
 
 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
 
-
-
-// register the module first
-Pman.on('beforeload', function()
-{
-    Pman.register({
-        part :  ["Admin","Contacts"],
-        modKey : '001-Pman.Tab.AdminContacts',
-        module : Pman.Tab.AdminContacts,
-        region : 'center',
-        parent : Pman.Tab.AdminContactsManager,
-        name : "Pman.Tab.AdminContacts",
-        disabled : false, 
-        permname: 'Core.Person' 
-    });
-});
-
-Pman.Tab.AdminContacts = new Roo.util.Observable({
-
-    panel : false,
-    disabled : false,
-    parentLayout:  false,
-
-    add : function(parentLayout, region)
+Pman.Tab.AdminContacts = new Roo.XComponent({
+    part     :  ["Admin","Contacts"],
+    order    : '001-Pman.Tab.AdminContacts',
+    region   : 'center',
+    parent   : 'Pman.Tab.AdminContactsManager',
+    name     : "Pman.Tab.AdminContacts",
+    disabled : false, 
+    permname : 'Core.Person', 
+    _tree : function()
     {
-
         var _this = this;
-        this.parentLayout = parentLayout;
-
-        this.panel = parentLayout.addxtype({
+        var MODULE = this;
+        return {
             xtype: 'GridPanel',
             xns: Roo,
             listeners : {
@@ -620,6 +603,25 @@ Pman.Tab.AdminContacts = new Roo.util.Observable({
                                    this.setText(pressed ? "Show Active" : "Show Removed");
                                    
                                    
+                                },
+                                render : function (_self)
+                                {
+                                  _this.activeButton = _self;
+                                }
+                            },
+                            enableToggle : true,
+                            text : "Show Removed"
+                        },
+                        {
+                            xtype: 'Button',
+                            xns: Roo.Toolbar,
+                            listeners : {
+                                toggle : function (_self, pressed)
+                                {
+                                   _this.grid.footer.onClick('first');
+                                   this.setText(pressed ? "Show Active" : "Show Removed");
+                                   
+                                   
                                 },
                                 render : function (_self)
                                 {
@@ -805,8 +807,6 @@ Pman.Tab.AdminContacts = new Roo.util.Observable({
                     }
                 ]
             }
-        });
-        this.layout = this.panel.layout;
-
+        };
     }
 });