{
"listeners" : {
"update" : "function (_self, record, operation)\n{\n if (operation != 'commit') {\n return;\n }\n // only used to change active status.\n \n new Pman.Request({\n url : baseURL + '/Roo/core_person',\n method :'POST',\n params : {\n id : record.data.id,\n active: record.data.active\n \n },\n success : function() {\n // do nothing\n \n },\n failure : function() \n {\n /*Roo.bootstrap.MessageBox.alert(\"Error\", \"saving failed\", function() {\n _this.grid.footer.onClick('first');\n });*/\n }\n });\n}",
- "beforeload" : "function (_self, options)\n{\n if (!Pman.buildCompleted) {\n return false;\n }\n options.params = options.params || {};\n \n //options.params['query[type]'] = 0;\n //options.params.active = 1;\n \n if(!_this.group_grid){\n this.removeAll();\n return false;\n }\n \n var group = _this.group_grid.getSelectionModel().getSelected();\n \n if(!group){\n this.removeAll();\n return false;\n }\n \n if(_this.footerActiveBtn && !_this.footerActiveBtn.pressed){\n options.params.active = 1;\n }\n \n options.params._with_group_membership = 1;\n options.params['query[name]'] = _this.searchBox.getValue();\n \n options.params['query[in_group]'] = group.data.id;\n \n}",
+ "beforeload" : "function (_self, options)\n{\n if (!Pman.buildCompleted) {\n return false;\n }\n options.params = options.params || {};\n \n //options.params['query[type]'] = 0;\n //options.params.active = 1;\n \n if(!_this.group_grid){\n this.removeAll();\n return false;\n }\n \n var group = _this.group_grid.getSelectionModel().getSelected();\n \n if(!group){\n this.removeAll();\n return false;\n }\n \n if(_this.footerActiveBtn && !_this.footerActiveBtn.pressed){\n options.params.active = 1;\n } \n \n options.params._with_group_membership = 1;\n options.params['query[name_or_email]'] = _this.searchBox.getValue();\n \n options.params['query[in_group]'] = group.data.id;\n \n}",
"load" : "function (_self, records, options)\n{\n _this.edit_btn.el.hide();\n _this.delete_btn.el.hide();\n _this.addToGroupBtn.el.hide();\n _this.removeFromGroupBtn.el.hide();\n _this.switch_btn.el.hide();\n \n options.params.active = 1;\n \n\n \n}"
},
"xtype" : "Store",
"cellclick" : "function (_self, el, rowIndex, columnIndex, e)\n{\n var di = _this.permission_grid.colModel.getDataIndex(columnIndex);\n \n var r = _this.permission_grid.store.getAt(rowIndex);\n \n if(di == 'rightname' || di == 'descript' || r.data.id * 1 < 1) {\n return;\n }\n \n if(di == 'id'){\n \n var accessmask = r.data.accessmask.split('').sort().join('');\n var fullmask = r.data.FullMask.split('').sort().join('');\n \n r.set('accessmask', (accessmask == fullmask) ? '' : r.data.FullMask);\n \n r.commit();\n \n return;\n }\n \n var mapping = {\n 'add' : 'A',\n 'edit' : 'E',\n 'delete' : 'D',\n 'view' : 'S',\n 'print' : 'P'\n };\n \n var target = mapping[di];\n \n if(r.data.FullMask.indexOf(target) === -1){\n return;\n }\n \n var accessmask = r.data.accessmask.split('');\n \n if(accessmask.indexOf(target) !== -1){\n accessmask.splice(accessmask.indexOf(target), 1);\n } else {\n accessmask.push(target);\n }\n \n r.set('accessmask', accessmask.sort().join(''));\n \n r.commit();\n \n}",
"render" : "function (_self)\n{\n _this.permission_grid = this;\n \n if(_this.permission_panel.active) {\n (function(){\n _this.permission_grid.store.load({});\n }).defer(50);\n }\n}"
},
+ "Boolean cellSelection" : true,
"String cls" : "table-fixed",
"Boolean footerShow" : false,
- "Boolean cellSelection" : true,
"boolean striped" : true,
"boolean hover" : true,
"xtype" : "Table",
if(_this.footerActiveBtn && !_this.footerActiveBtn.pressed){
options.params.active = 1;
- }
+ }
options.params._with_group_membership = 1;
- options.params['query[name]'] = _this.searchBox.getValue();
+ options.params['query[name_or_email]'] = _this.searchBox.getValue();
options.params['query[in_group]'] = group.data.id;
<body class="ytheme-gray">
{if:isDev}
- <script type="text/javascript" src="{rootURL}/roojs1/roojs-core-debug.js"></script>
- <script type="text/javascript" src="{rootURL}/roojs1/roojs-bootstrap-debug.js"></script>
+ <script type="text/javascript" src="{rootURL}/roojs1/roojs-core-debug.js"></script>
+ <script type="text/javascript" src="{rootURL}/roojs1/roojs-bootstrap-debug.js"></script>
<script type="text/javascript" src="{rootURL}/roojs1/roojs-svg-debug.js"></script>
{else:}
<script type="text/javascript" src="{rootURL}/roojs1/roojs-core.js"></script>