Pman.Tab.AdminContactsGroupRight.bjs
[Pman.Admin] / Pman.Tab.AdminContactsGroupRight.js
index 092fad9..771dfdb 100644 (file)
@@ -48,13 +48,6 @@ Pman.Tab.AdminContactsGroupRight = new Roo.XComponent({
                            this.footer.onClick('first');
                         }
                     },
-                    rowdblclick : function (_self, rowIndex, e)
-                    {
-                        if (!_this.dialog) return;
-                        _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
-                            _this.grid.footer.onClick('first');
-                        }); 
-                    },
                     cellclick : function (_self, rowIndex, columnIndex, e)
                     {
                             _this.dataUpdate = typeof(_this.dataUpdate) =='undefined' ?  {} : _this.dataUpdate;
@@ -94,7 +87,9 @@ Pman.Tab.AdminContactsGroupRight = new Roo.XComponent({
                             if (!o.params) {
                                 o.params = {}
                             }
+                                _this.group_id = -1;
                             var s = Pman.Tab.AdminContactsGroup.grid.getSelectionModel().getSelections();
+                        
                             if (!s.length) {
                                 o.params.group_id = -1;
                             } else {
@@ -104,6 +99,7 @@ Pman.Tab.AdminContactsGroupRight = new Roo.XComponent({
                                 _this.grid.getView().el.mask("You can not set permissions for that group");
                                 return false;
                             }
+                            _this.group_id = id;    
                             _this.grid.getView().el.unmask();
                             return true;
                           
@@ -231,13 +227,17 @@ Pman.Tab.AdminContactsGroupRight = new Roo.XComponent({
                                 click : function (_self, e)
                                 {
                                     
+                                    var params = { group_id : _this.group_id };
+                                    for(var i in _this.dataUpdate) {
+                                        params['dataUpdate[' + i + ']'] = _this.dataUpdate[i];
+                                    }
+                                    //Roo.log(params);return;
+                                    
                                     new Pman.Request({
-                                        url : baseURL + '/GroupRights.php',
+                                        url : baseURL + '/Admin/GroupRights.php',
                                         method :'POST',
-                                        params : {
-                                            dataUpdate : _this.dataUpdate
-                                             
-                                        },
+                                        mask: "Saving",
+                                        params : params,
                                         success : function() {
                                             // do nothing