Pman.Tab.AdminContactsGroupRight.bjs
[Pman.Admin] / Pman.Tab.AdminContactsGroupRight.bjs
index 8f449b6..ae42f62 100644 (file)
                             "sortable": false,
                             "width": 50,
                             "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) {\n    if (r.data.office_id) {\n        return String.format('{0} - {1}', v, r.data.office_id_name); \n    } \n    return String.format('{0}', v); \n}",
+                            "|renderer": "function(v,x,r) {\n    var state = v> 0 ?  '-checked' : '';\n\n    return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n}",
                             "|xns": "Roo.grid"
                         },
                         {
                             "*prop": "colModel[]",
-                            "dataIndex": "company_id_name",
-                            "header": "Company",
-                            "sortable": true,
+                            "dataIndex": "rightname",
+                            "header": "Module",
+                            "sortable": false,
                             "width": 150,
                             "xtype": "ColumnModel",
-                            "|renderer": "function(v,x,r) {\n    if (r.data.office_id) {\n        return String.format('{0} - {1}', v, r.data.office_id_name); \n    } \n    return String.format('{0}', v); \n}",
+                            "|renderer": "function(v,x,r) {\n    return String.format('<span qtip=\"{1}\">{0}</span>', v.split('.').shift(), v);\n}",
                             "|xns": "Roo.grid"
                         },
                         {
                             "*prop": "colModel[]",
-                            "dataIndex": "name",
-                            "header": "Name",
-                            "sortable": true,
-                            "width": 200,
+                            "dataIndex": "descript",
+                            "header": "Permission",
+                            "sortable": false,
+                            "width": 300,
                             "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
+                            "|renderer": "function(v,x,r)\n{\n    \n    \n    return v;\n}",
                             "|xns": "Roo.grid"
                         },
                         {
                             "*prop": "colModel[]",
-                            "dataIndex": "role",
-                            "header": "Role",
-                            "width": 100,
+                            "dataIndex": "accessmask_A",
+                            "header": "Add",
+                            "width": 75,
                             "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
+                            "|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 }",
                             "|xns": "Roo.grid"
                         },
                         {
                             "*prop": "colModel[]",
-                            "dataIndex": "phone",
-                            "header": "Phone",
-                            "width": 100,
+                            "dataIndex": "accessmask_E",
+                            "header": "Edit",
+                            "width": 75,
                             "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
+                            "|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 }",
                             "|xns": "Roo.grid"
                         },
                         {
                             "*prop": "colModel[]",
-                            "dataIndex": "fax",
-                            "header": "Fax",
-                            "width": 100,
+                            "dataIndex": "accessmask_D",
+                            "header": "Delete",
+                            "width": 75,
                             "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
+                            "|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 }",
                             "|xns": "Roo.grid"
                         },
                         {
                             "*prop": "colModel[]",
-                            "dataIndex": "email",
-                            "header": "Email",
-                            "sortable": true,
-                            "width": 200,
+                            "dataIndex": "accessmask_S",
+                            "header": "List/View",
+                            "width": 75,
                             "xtype": "ColumnModel",
-                            "|renderer": "function(v) {\n   return (v.length && v.indexOf('@') > 0 ) ? \n                    String.format('<a href=\"mailto:{0}\">{0}</a>',v) : v;\n }",
+                            "|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 }",
                             "|xns": "Roo.grid"
                         },
                         {
                             "*prop": "colModel[]",
-                            "dataIndex": "active",
-                            "header": "Active",
+                            "dataIndex": "accessmask_P",
+                            "header": "Print/Export",
                             "width": 75,
                             "xtype": "ColumnModel",
                             "|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 }",