Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Tab.XtupleTerms.js
index 645191f..70d1c37 100644 (file)
@@ -127,17 +127,25 @@ Pman.Tab.XtupleTerms = new Roo.XComponent({
                                                           return;
                                                       }
                                                       
-                                                      
-                                                      new Pman.Request({
-                                                          url : baseURL + '/Roo/bomitem.php',
-                                                          method : 'POST',
-                                                          params : {
-                                                              _delete : d.data.bomitem_id
-                                                          }, 
-                                                          success : function(res) {
-                                                              _this.partsgrid.footer.onClick('first');
+                                                      Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete the terms?",
+                                                          function(r) {
+                                                              if (r != 'yes') {
+                                                                  return;
+                                                              }
+                                                             new Pman.Request({
+                                                                  url : baseURL + '/Roo/terms.php',
+                                                                  method : 'POST',
+                                                                  params : {
+                                                                      _delete : sel.data.terms_id * 1
+                                                                  }, 
+                                                                  success : function(res) {
+                                                                      _this.grid.footer.onClick('first');
+                                                                  }
+                                                              }); 
+                                                              
+                                                              return;
                                                           }
-                                                      }); 
+                                                      );
                                                       
                                                   }
                                         }