Pman.Dialog.XtupleSalesProductList.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 19 Dec 2013 04:56:11 +0000 (12:56 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 19 Dec 2013 04:56:11 +0000 (12:56 +0800)
Pman.Dialog.XtupleSalesProductList.js

Pman.Dialog.XtupleSalesProductList.bjs
Pman.Dialog.XtupleSalesProductList.js

index 23e4c53..1fe0d8f 100644 (file)
                 },
                 {
                     "listeners": {
-                        "click": "function (_self, e)\n{\n\n    if(!_this.callback){\n         _this.dialog.hide();\n        return;\n    }\n    var sels = _this.grid.selModel.getSelections();\n    if (!sels) {\n        Roo.MessageBox.alert(\"Error\", \"Select some items\");\n    }\n     \n    _this.callback.call(_this,sels);\n}",
+                        "click": "function (_self, e)\n{\n\n    if(!_this.callback){\n         _this.dialog.hide();\n        return;\n    }\n    var sels = _this.grid.selModel.getSelections();\n    if (!sels.length) {\n        Roo.MessageBox.alert(\"Error\", \"Select some items\");\n    }\n      _this.dialog.hide();\n    _this.callback.call(_this,sels);\n}",
                         "render": "function (_self)\n{\n    _this.addSelected = _self;\n}"
                     },
                     "*prop": "buttons[]",
index 0382048..95d8328 100644 (file)
@@ -504,10 +504,10 @@ Pman.Dialog.XtupleSalesProductList = {
                                 return;
                             }
                             var sels = _this.grid.selModel.getSelections();
-                            if (!sels) {
+                            if (!sels.length) {
                                 Roo.MessageBox.alert("Error", "Select some items");
                             }
-                             
+                              _this.dialog.hide();
                             _this.callback.call(_this,sels);
                         },
                         render : function (_self)