Pman.Tab.AdminContacts.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 12 May 2011 10:15:25 +0000 (18:15 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 12 May 2011 10:15:25 +0000 (18:15 +0800)
Pman.Tab.AdminContacts.js

index 3e6032a..11c8e90 100644 (file)
@@ -626,6 +626,44 @@ Pman.Tab.AdminContacts = new Roo.util.Observable({
                             text : "Add",
                             icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
                         },
+                        {
+                            xtype: 'Button',
+                            xns: Roo.Toolbar,
+                            listeners : {
+                                click : function()
+                                {
+                                    
+                                    Pman.Dialog.PersonBulkAdd.show( { id : 0 } , function() {
+                                        _this.grid.footer.onClick('first');
+                                   }); 
+                                }
+                            },
+                            cls : 'x-btn-text-icon',
+                            text : "Bulk Add",
+                            icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
+                        },
+                        {
+                            xtype: 'Button',
+                            xns: Roo.Toolbar,
+                            listeners : {
+                                click : function()
+                                {
+                                    var s = _this.grid.getSelectionModel().getSelections();
+                                    if (!s.length || (s.length > 1))  {
+                                        Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
+                                        return;
+                                    }
+                                  
+                                    _this.dialog.show(s[0].data, function() {
+                                        _this.grid.footer.onClick('first');
+                                    }); 
+                                    
+                                }
+                            },
+                            cls : 'x-btn-text-icon',
+                            text : "Edit",
+                            icon : Roo.rootURL + 'images/default/tree/leaf.gif'
+                        },
                         {
                             xtype: 'Button',
                             xns: Roo.Toolbar,