Pman.Tab.AdminContactsGroupRight.bjs
[Pman.Admin] / Pman.Tab.AdminContactsGroupRight.js
index 164aa3e..3b256e6 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;
@@ -66,16 +59,27 @@ Pman.Tab.AdminContactsGroupRight = new Roo.XComponent({
                                 return;
                             }
                             var rec = _this.grid.ds.getAt(rowIndex);
+                            var fm = rec.data.FullMask.split('');        
                             if(k == 'AA'){
-                                var fm = rec.data.FullMask.split('');
+                    
                                 Roo.each(fm, function(e){
                                     rec.set(i+'_'+e, rec.data[i+'_'+k] ? 0 : 1);
                                 });
                             } 
                             rec.set(i+'_'+k, rec.data[i+'_'+k] ? 0 : 1);
+                            
+                            var newmask = '';
+                            Roo.each(fm, function(e) {
+                                if (rec.data[i+'_'+e] === 1) {
+                            
+                                    newmask += e;
+                                }
+                            
+                            });        
+                            
                             //rec.data.accessmask = rec.data.accessmask + rec
                             //Roo.log(rec);
-                            _this.dataUpdate[rec.data.id] = rec.data.accessmask;
+                            _this.dataUpdate[rec.data.id] = newmask;
                     
                             //rec.commit();
                              
@@ -243,6 +247,7 @@ Pman.Tab.AdminContactsGroupRight = new Roo.XComponent({
                                     new Pman.Request({
                                         url : baseURL + '/Admin/GroupRights.php',
                                         method :'POST',
+                                        mask: "Saving",
                                         params : params,
                                         success : function() {
                                             // do nothing