3 "name": "Pman.Tab.AdminContactsGroupRight",
4 "parent": "Pman.Tab.AdminContactsManager",
6 "path": "/home/chris/gitlive/Pman.Admin/Pman.Tab.AdminContactsGroupRight.bjs",
10 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}"
17 "tableName": "Person",
24 "|render": "function() \n{\n _this.grid = this; \n if (!_this.dialog) {\n _this.dialog = Pman.Dialog.PersonEdit;\n \n }\n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}",
25 "|rowdblclick": "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {\n _this.grid.footer.onClick('first');\n }); \n}\n",
26 "cellclick": "function (_self, rowIndex, columnIndex, e)\n{\n\n var di = this.colModel.getDataIndex(columnIndex);\n var i = di.split('_').shift();\n var k = di.split('_').pop();\n if (i != 'accessmask') {\n return;\n }\n var rec = _this.grid.ds.getAt(rowIndex);\n if(k == 'AA'){\n var fm = rec.data.FullMask.split('');\n Roo.each(fm, function(e){\n rec.set(i+'_'+e, rec.data[i+'_'+k] ? 0 : 1);\n });\n } \n rec.set(i+'_'+k, rec.data[i+'_'+k] ? 0 : 1);\n \n //rec.commit();\n \n \n}"
37 "beforeload": "function (_self, o)\n{\n if (!o.params) {\n o.params = {}\n }\n var s = Pman.Tab.Groups.grid.getSelectionModel().getSelections();\n if (!s.length) {\n o.params.group_id = -1;\n } else {\n o.params.group_id = s[0].data.id;\n }\n if (o.params.group_id < 0) {\n _this.grid.getView().el.mask(\"You can not set permissions for that group\");\n return false;\n }\n _this.grid.getView().el.unmask();\n return true;\n \n}",
38 "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/GroupRights.php',\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 _this.grid.ds.remove(record);\n \n },\n failure : function() \n {\n Roo.MessageBox.alert(\"Error\", \"saving failed\", function() {\n _this.grid.footer.onClick('first');\n });\n }\n });\n}"
40 "*prop": "dataSource",
43 "|sortInfo": "{ field : 'id', direction: 'ASC' }",
50 "|url": "baseURL + '/Admin/GroupRights.php'",
57 "totalProperty": "total",
58 "xtype": "JsonReader",
59 "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'rightname',\n 'type': 'string'\n },\n {\n 'name': 'descript',\n 'type': 'string'\n },\n {\n 'name': 'accessmask',\n 'type': 'string'\n },\n {\n 'name': 'FullMask',\n 'type': 'string'\n },\n {\n 'name': 'group_id',\n 'type': 'int'\n }\n]",
66 "xtype": "PagingToolbar",
69 "displayMsg": "Displaying Person{0} - {1} of {2}",
70 "emptyMsg": "No Person found",
74 "text": "Drag person to add or remove from group",
92 "render": "function (_self)\n{\n _this.searchBox = _self;\n}",
93 "show": "function (_self,e)\n{\n if (e.getCharCode() != 13) {\n return;\n }\n _this.grid.footer.onClick('first');\n}",
94 "specialkey": "function (_self, e)\n{\n if (e.getKey() == 13) {\n _this.grid.footer.onClick('first');\n }\n}"
101 "render": "function (_self)\n{\n _this.companyCombo = _self;\n}",
102 "select": "function (combo, record, index)\n{\n _this.grid.footer.onClick.defer(300,_this.grid.footer,[ 'first'] );\n}"
104 "displayField": "name",
106 "emptyText": "Select Company",
107 "forceSelection": true,
108 "hiddenName": "company_id",
110 "loadingText": "Searching...",
112 "name": "company_name",
114 "qtip": "Select Companies",
115 "queryParam": "query[name]",
116 "selectOnFocus": true,
117 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
118 "triggerAction": "all",
127 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
132 "|sortInfo": "{ direction : 'ASC', field: 'name' }",
137 "xtype": "HttpProxy",
140 "|url": "baseURL + '/Roo/Companies.php'"
144 "xtype": "JsonReader",
148 "totalProperty": "total",
149 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"code\",\"type\":\"string\"}]"
156 "|xns": "Roo.Toolbar",
162 "*prop": "colModel[]",
163 "dataIndex": "accessmask_AA",
167 "xtype": "ColumnModel",
168 "|renderer": "function(v,x,r) {\n var k = r.data.accesmask.split('');\n Roo.each(k, function(e){\n \n });\n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n}",
172 "*prop": "colModel[]",
173 "dataIndex": "rightname",
177 "xtype": "ColumnModel",
178 "|renderer": "function(v,x,r) {\n if(!v){\n return;\n }\n return String.format('<span qtip=\"{1}\">{0}</span>', v.split('.').shift(), v);\n}",
182 "*prop": "colModel[]",
183 "dataIndex": "descript",
184 "header": "Permission",
187 "xtype": "ColumnModel",
188 "|renderer": "function(v,x,r)\n{\n if (r.json.descript && r.json.descript.length) {\n return String.format('{0}',r.json.descript);\n }\n \n return '???' + v;\n}",
192 "*prop": "colModel[]",
193 "dataIndex": "accessmask_A",
196 "xtype": "ColumnModel",
197 "|renderer": "function(v) { \n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
201 "*prop": "colModel[]",
202 "dataIndex": "accessmask_E",
205 "xtype": "ColumnModel",
206 "|renderer": "function(v) { \n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
210 "*prop": "colModel[]",
211 "dataIndex": "accessmask_D",
214 "xtype": "ColumnModel",
215 "|renderer": "function(v) { \n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
219 "*prop": "colModel[]",
220 "dataIndex": "accessmask_S",
221 "header": "List/View",
223 "xtype": "ColumnModel",
224 "|renderer": "function(v) { \n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
228 "*prop": "colModel[]",
229 "dataIndex": "accessmask_P",
230 "header": "Print/Export",
232 "xtype": "ColumnModel",
233 "|renderer": "function(v,x,r) { \n Roo.log(x);\n Roo.log(r);\n r.data.accesmask\n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",