Pman.Tab.AdminNotify.bjs
[Pman.Admin] / Pman.Tab.AdminNotify.js
index 2e2d093..e266b83 100644 (file)
@@ -240,9 +240,9 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                         {
                             xtype: 'ComboBox',
                             xns: Roo.form,
-                            allowBlank : false,
+                            allowBlank : true,
                             displayField : 'person_id_name',
-                            editable : false,
+                            editable : true,
                             emptyText : "Select person",
                             forceSelection : true,
                             hiddenName : 'id',
@@ -256,20 +256,23 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                             selectOnFocus : true,
                             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,
                             store : {
                                 xtype: 'Store',
                                 xns: Roo.data,
-                                remoteSort : true,
-                                sortInfo : { direction : 'ASC', field: 'id' },
                                 listeners : {
                                     beforeload : function (_self, o){
                                         o.params = o.params || {};
+                                        o.params._distinct='person_id';
+                                        o.params._columns='person_id,person_id_name,person_id_email';
+                                        o.params['!person_id_name'] = '';
+                                        
                                         // set more here
                                     }
                                 },
+                                remoteSort : true,
+                                sortInfo : { direction : 'ASC', field: 'person_id_name' },
                                 proxy : {
                                     xtype: 'HttpProxy',
                                     xns: Roo.data,
@@ -290,6 +293,19 @@ Pman.Tab.AdminNotify = new Roo.XComponent({
                             xtype: 'Fill',
                             xns: Roo.Toolbar
                         },
+                        {
+                            xtype: 'Button',
+                            xns: Roo.Toolbar,
+                            listeners : {
+                                click : function()
+                                        {
+                                        Pman.genericDelete(_this, 'core_notify'); 
+                                        }
+                            },
+                            cls : 'x-btn-text-icon',
+                            text : "Delete",
+                            icon : rootURL + '/Pman/templates/images/trash.gif'
+                        },
                         {
                             xtype: 'Button',
                             xns: Roo.Toolbar,