Pman.Tab.AdminNotify.bjs
[Pman.Admin] / Pman.Tab.AdminNotify.bjs
index c18457c..d107577 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "id": "roo-file-157",
+    "id": "roo-file-210",
     "name": "Pman.Tab.AdminNotify",
     "parent": "Pman.Tab.AdminWatchNotify",
     "title": "Pman.Tab.AdminNotify",
                             "|xns": "Roo",
                             "items": [
                                 {
-                                    "allowBlank": false,
+                                    "allowBlank": true,
                                     "displayField": "person_id_name",
-                                    "editable": false,
+                                    "editable": true,
                                     "emptyText": "Select person",
                                     "forceSelection": true,
-                                    "hiddenName": "",
+                                    "hiddenName": "id",
                                     "listWidth": 400,
                                     "loadingText": "Searching...",
                                     "minChars": 2,
-                                    "name": "",
+                                    "name": "name",
                                     "pageSize": 20,
                                     "qtip": "Select core_notify",
-                                    "queryParam": "",
+                                    "queryParam": "query[person_id_name]",
                                     "selectOnFocus": true,
-                                    "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
+                                    "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{person_id_name}</b> {person_id_email}</div>",
                                     "triggerAction": "all",
-                                    "typeAhead": true,
-                                    "valueField": "id",
+                                    "valueField": "person_id",
                                     "width": 300,
                                     "xtype": "ComboBox",
                                     "|xns": "Roo.form",
                                     "items": [
                                         {
+                                            "listeners": {
+                                                "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    o.params._distinct='person_id';\n    o.params._columns='person_id,person_id_name,person_id_email';\n    o.params['!person_id_name'] = '';\n    \n    // set more here\n}\n"
+                                            },
                                             "*prop": "store",
+                                            "remoteSort": true,
                                             "xtype": "Store",
+                                            "|sortInfo": "{ direction : 'ASC', field: 'person_id_name' }",
                                             "|xns": "Roo.data",
-                                            "remoteSort": true,
-                                            "|sortInfo": "{ direction : 'ASC', field: 'id' }",
-                                            "listeners": {
-                                                "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n}\n"
-                                            },
                                             "items": [
                                                 {
                                                     "*prop": "proxy",
                                     "|xns": "Roo.Toolbar",
                                     "xtype": "Fill"
                                 },
+                                {
+                                    "listeners": {
+                                        "|click": "function()\n        {\n        Pman.genericDelete(_this, 'core_notify'); \n        }\n        "
+                                    },
+                                    "cls": "x-btn-text-icon",
+                                    "text": "Delete",
+                                    "xtype": "Button",
+                                    "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
+                                    "|xns": "Roo.Toolbar"
+                                },
                                 {
                                     "listeners": {
                                         "render": "function (_self)\n{\n    _this.toggleBtn = _self;\n}",
                             "*prop": "colModel[]",
                             "dataIndex": "person_id_name",
                             "header": "Who to notify",
-                            "width": 200,
+                            "width": 100,
+                            "xtype": "ColumnModel",
+                            "|renderer": "function(v,x,r) {\n     return String.format('{0} <u>&lt;{1}&gt;</u>', v, r.data.person_id_email); \n }",
+                            "|xns": "Roo.grid"
+                        },
+                        {
+                            "*prop": "colModel[]",
+                            "dataIndex": "trigger_event_id",
+                            "header": "Triggered by",
+                            "width": 100,
                             "xtype": "ColumnModel",
                             "|renderer": "function(v,x,r) {\n     return String.format('{0} <u>&lt;{1}&gt;</u>', v, r.data.person_id_email); \n }",
                             "|xns": "Roo.grid"
                             "header": "Event",
                             "width": 300,
                             "xtype": "ColumnModel",
-                            "|renderer": "function(v) { return String.format('{0}', v); }",
+                            "|renderer": "function(v) { return String.format('<span qtip=\"{0}\">{0}</span>', v); }",
                             "|xns": "Roo.grid"
                         }
                     ]