Pman.Dialog.XtupleItem.bjs
authorEdward <edward@roojs.com>
Fri, 10 Oct 2014 07:12:11 +0000 (15:12 +0800)
committerEdward <edward@roojs.com>
Fri, 10 Oct 2014 07:12:11 +0000 (15:12 +0800)
Pman.Dialog.XtupleItem.js

Pman.Dialog.XtupleItem.bjs
Pman.Dialog.XtupleItem.js

index 1a17e8a..bebdf7a 100644 (file)
                                         {
                                             "listeners" : {
                                                 "render" : "function (_self)\n{\n    _this.partsBox = _self;\n}",
-                                                "select" : "function (combo, record, index)\n{\n    Roo.log('record');\n    Roo.log(record);\n   /* var event_id = _this.form.findField('id').getValue() * 1;\n    \n    if(typeof(record) == 'undefined' || !record || record.data.id * 1 < 1 || event_id < 1){\n        return;\n    }\n    \n    var err = false;\n\n    _this.fgrid.ds.each(function(d){\n        if(record.data.id == d.data.interest_id){\n            err = true;\n        }\n    });\n\n    if(err){\n        Roo.MessageBox.alert('Error', record.data.display_name + ' already exists!');\n        _this.focusBox.reset();\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/cal_event_focus.php',\n        method : 'POST',\n        params : {\n            cal_event_id : event_id,\n            interest_id : record.data.id\n        }, \n        success : function(res) {\n            _this.focusBox.reset();\n            _this.fgrid.footer.onClick('first');\n        }\n    }); */\n}"
+                                                "select" : "function (combo, record, index)\n{\n    Roo.log('record');\n    Roo.log(record);\n    var id = _this.form.findField('id').getValue() * 1;\n    \n    if(typeof(record) == 'undefined' || !record || record.data.id * 1 < 1 || id < 1){\n        return;\n    }\n    \n    var err = false;\n\n    _this.fgrid.ds.each(function(d){\n        if(record.data.id == d.data.interest_id){\n            err = true;\n        }\n    });\n\n    if(err){\n        Roo.MessageBox.alert('Error', record.data.display_name + ' already exists!');\n        _this.focusBox.reset();\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/cal_event_focus.php',\n        method : 'POST',\n        params : {\n            cal_event_id : event_id,\n            interest_id : record.data.id\n        }, \n        success : function(res) {\n            _this.focusBox.reset();\n            _this.fgrid.footer.onClick('first');\n        }\n    }); \n}"
                                             },
                                             "alwaysQuery" : true,
                                             "triggerAction" : "all",
index 6269437..b2f2bd9 100644 (file)
@@ -1018,9 +1018,9 @@ Pman.Dialog.XtupleItem = {
                                           {
                                               Roo.log('record');
                                               Roo.log(record);
-                                             /* var event_id = _this.form.findField('id').getValue() * 1;
+                                              var id = _this.form.findField('id').getValue() * 1;
                                               
-                                              if(typeof(record) == 'undefined' || !record || record.data.id * 1 < 1 || event_id < 1){
+                                              if(typeof(record) == 'undefined' || !record || record.data.id * 1 < 1 || id < 1){
                                                   return;
                                               }
                                               
@@ -1049,7 +1049,7 @@ Pman.Dialog.XtupleItem = {
                                                       _this.focusBox.reset();
                                                       _this.fgrid.footer.onClick('first');
                                                   }
-                                              }); */
+                                              }); 
                                           }
                                     },
                                     items : [