Pman.Tab.BuilderTop.bjs
authorAlan Knowles <alan@akbkhome.com>
Fri, 4 Nov 2011 02:53:36 +0000 (10:53 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 4 Nov 2011 02:53:36 +0000 (10:53 +0800)
Pman.Tab.BuilderTop.bjs
Pman.Tab.BuilderTop.js
Pman.Tab.BuilderTop.js

Pman.Tab.BuilderTop.bjs
Pman.Tab.BuilderTop.js

index 3d73ea2..fb3a6ad 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "id": "roo-file-83",
+    "id": "roo-file-96",
     "name": "Pman.Tab.BuilderTop",
     "parent": "Pman.Tab.BuilderTab",
     "title": "Pman.Tab.BuilderTop",
                                             "|xns": "Roo.menu"
                                         },
                                         {
+                                            "listeners": {
+                                                "click": "function (_self, e)\n{\n    Roo.MessageBox.confirm(\"Confirm\", \"Are you sure you want to delete it?\", function(a) {\n        if (a != 'yes') {\n            return;\n        }\n            \n\n       new Pman.Request({\n            url : baseURL + '/Roo/Builder_part',\n            method : 'POST',\n            params : {\n                _delete : -1\n            },\n            success : function() {\n                _this.partCombo.setValue('');\n                // unload stuff..\n            \n            }\n       \n       \n       });\n   });\n}"
+                                            },
                                             "text": "Delete",
                                             "xtype": "Item",
                                             "|xns": "Roo.menu"
index f2edeef..01de749 100644 (file)
@@ -230,6 +230,32 @@ Pman.Tab.BuilderTop = new Roo.util.Observable({
                                 {
                                     xtype: 'Item',
                                     xns: Roo.menu,
+                                    listeners : {
+                                        click : function (_self, e)
+                                        {
+                                            Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete it?", function(a) {
+                                                if (a != 'yes') {
+                                                    return;
+                                                }
+                                                    
+                                        
+                                               new Pman.Request({
+                                                    url : baseURL + '/Roo/Builder_part',
+                                                    method : 'POST',
+                                                    params : {
+                                                        _delete : -1
+                                                    },
+                                                    success : function() {
+                                                        _this.partCombo.setValue('');
+                                                        // unload stuff..
+                                                    
+                                                    }
+                                               
+                                               
+                                               });
+                                           });
+                                        }
+                                    },
                                     text : "Delete"
                                 }
                             ]