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}",
39 "load": "function (_self, records, options)\n{\n Roo.each(records, function(e){\n var k = e.data.accessmask.split('');\n Roo.each(k, function(ee){\n \n e.set('accessmask_'+ee, 1);\n });\n });\n}"
41 "*prop": "dataSource",
44 "|sortInfo": "{ field : 'id', direction: 'ASC' }",
51 "|url": "baseURL + '/Admin/GroupRights.php'",
58 "totalProperty": "total",
59 "xtype": "JsonReader",
60 "|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]",
67 "xtype": "PagingToolbar",
70 "displayMsg": "Displaying Person{0} - {1} of {2}",
71 "emptyMsg": "No Person found",
75 "text": "Drag person to add or remove from group",
93 "render": "function (_self)\n{\n _this.searchBox = _self;\n}",
94 "show": "function (_self,e)\n{\n if (e.getCharCode() != 13) {\n return;\n }\n _this.grid.footer.onClick('first');\n}",
95 "specialkey": "function (_self, e)\n{\n if (e.getKey() == 13) {\n _this.grid.footer.onClick('first');\n }\n}"
102 "render": "function (_self)\n{\n _this.companyCombo = _self;\n}",
103 "select": "function (combo, record, index)\n{\n _this.grid.footer.onClick.defer(300,_this.grid.footer,[ 'first'] );\n}"
105 "displayField": "name",
107 "emptyText": "Select Company",
108 "forceSelection": true,
109 "hiddenName": "company_id",
111 "loadingText": "Searching...",
113 "name": "company_name",
115 "qtip": "Select Companies",
116 "queryParam": "query[name]",
117 "selectOnFocus": true,
118 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
119 "triggerAction": "all",
128 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
133 "|sortInfo": "{ direction : 'ASC', field: 'name' }",
138 "xtype": "HttpProxy",
141 "|url": "baseURL + '/Roo/Companies.php'"
145 "xtype": "JsonReader",
149 "totalProperty": "total",
150 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"code\",\"type\":\"string\"}]"
157 "|xns": "Roo.Toolbar",
163 "*prop": "colModel[]",
164 "dataIndex": "accessmask_AA",
168 "xtype": "ColumnModel",
169 "|renderer": "function(v,x,r) {\n \n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n}",
173 "*prop": "colModel[]",
174 "dataIndex": "rightname",
178 "xtype": "ColumnModel",
179 "|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}",
183 "*prop": "colModel[]",
184 "dataIndex": "descript",
185 "header": "Permission",
188 "xtype": "ColumnModel",
189 "|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}",
193 "*prop": "colModel[]",
194 "dataIndex": "accessmask_A",
197 "xtype": "ColumnModel",
198 "|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 }",
202 "*prop": "colModel[]",
203 "dataIndex": "accessmask_E",
206 "xtype": "ColumnModel",
207 "|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 }",
211 "*prop": "colModel[]",
212 "dataIndex": "accessmask_D",
215 "xtype": "ColumnModel",
216 "|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 }",
220 "*prop": "colModel[]",
221 "dataIndex": "accessmask_S",
222 "header": "List/View",
224 "xtype": "ColumnModel",
225 "|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 }",
229 "*prop": "colModel[]",
230 "dataIndex": "accessmask_P",
231 "header": "Print/Export",
233 "xtype": "ColumnModel",
234 "|renderer": "function(v,x,r) { \n \n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",