Pman.Dialog.CoreMailingListMessage.bjs
authorEdward <edward@roojs.com>
Wed, 19 Feb 2014 07:33:54 +0000 (15:33 +0800)
committerEdward <edward@roojs.com>
Wed, 19 Feb 2014 07:33:54 +0000 (15:33 +0800)
Pman.Dialog.CoreMailingListMessage.js

Pman.Dialog.CoreMailingListMessage.bjs
Pman.Dialog.CoreMailingListMessage.js

index e91cc2f..c6ba490 100644 (file)
                                         }
                                     ]
                                 },
+                                {
+                                    "allowBlank": false,
+                                    "displayField": "bankaccnt_name",
+                                    "editable": false,
+                                    "emptyText": "Select Bank Accnt",
+                                    "fieldLabel": "Post to",
+                                    "forceSelection": true,
+                                    "hiddenName": "checkhead_bankaccnt_id",
+                                    "listWidth": 400,
+                                    "loadingText": "Searching...",
+                                    "minChars": 2,
+                                    "name": "checkhead_bankaccnt_id_name",
+                                    "pageSize": 20,
+                                    "qtip": "Select Bank Accnt",
+                                    "queryParam": "query[bankaccnt_name]",
+                                    "selectOnFocus": true,
+                                    "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{bankaccnt_name} - {bankaccnt_descrip}</b> </div>",
+                                    "triggerAction": "all",
+                                    "typeAhead": true,
+                                    "valueField": "bankaccnt_id",
+                                    "width": 200,
+                                    "xtype": "ComboBox",
+                                    "|xns": "Roo.form",
+                                    "items": [
+                                        {
+                                            "listeners": {
+                                                "|beforeload": "function (_self, o){\n    o.params = o.params || {};\n    // set more here\n   \n}\n"
+                                            },
+                                            "*prop": "store",
+                                            "remoteSort": true,
+                                            "xtype": "Store",
+                                            "|sortInfo": "{ direction : 'DESC', field: 'bankaccnt_id' }",
+                                            "|xns": "Roo.data",
+                                            "items": [
+                                                {
+                                                    "*prop": "proxy",
+                                                    "method": "GET",
+                                                    "xtype": "HttpProxy",
+                                                    "|url": "baseURL + '/Roo/bankaccnt.php'",
+                                                    "|xns": "Roo.data"
+                                                },
+                                                {
+                                                    "*prop": "reader",
+                                                    "id": "bankaccnt_id",
+                                                    "root": "data",
+                                                    "totalProperty": "total",
+                                                    "xtype": "JsonReader",
+                                                    "|fields": "[{\"name\":\"bankaccnt_id\",\"type\":\"int\"},\"bankaccnt_name\"]",
+                                                    "|xns": "Roo.data"
+                                                }
+                                            ]
+                                        }
+                                    ]
+                                },
                                 {
                                     "|xns": "Roo.Toolbar",
                                     "xtype": "Fill"
index 1ca4cc5..152f40f 100644 (file)
@@ -161,6 +161,57 @@ Pman.Dialog.CoreMailingListMessage = {
                                     ]
                                 }
                             },
+                            {
+                                xtype: 'ComboBox',
+                                xns: Roo.form,
+                                allowBlank : false,
+                                displayField : 'bankaccnt_name',
+                                editable : false,
+                                emptyText : "Select Bank Accnt",
+                                fieldLabel : 'Post to',
+                                forceSelection : true,
+                                hiddenName : 'checkhead_bankaccnt_id',
+                                listWidth : 400,
+                                loadingText : "Searching...",
+                                minChars : 2,
+                                name : 'checkhead_bankaccnt_id_name',
+                                pageSize : 20,
+                                qtip : "Select Bank Accnt",
+                                queryParam : 'query[bankaccnt_name]',
+                                selectOnFocus : true,
+                                tpl : '<div class="x-grid-cell-text x-btn button"><b>{bankaccnt_name} - {bankaccnt_descrip}</b> </div>',
+                                triggerAction : 'all',
+                                typeAhead : true,
+                                valueField : 'bankaccnt_id',
+                                width : 200,
+                                store : {
+                                    xtype: 'Store',
+                                    xns: Roo.data,
+                                    listeners : {
+                                        beforeload : function (_self, o){
+                                            o.params = o.params || {};
+                                            // set more here
+                                           
+                                        }
+                                    },
+                                    remoteSort : true,
+                                    sortInfo : { direction : 'DESC', field: 'bankaccnt_id' },
+                                    proxy : {
+                                        xtype: 'HttpProxy',
+                                        xns: Roo.data,
+                                        method : 'GET',
+                                        url : baseURL + '/Roo/bankaccnt.php'
+                                    },
+                                    reader : {
+                                        xtype: 'JsonReader',
+                                        xns: Roo.data,
+                                        id : 'bankaccnt_id',
+                                        root : 'data',
+                                        totalProperty : 'total',
+                                        fields : [{"name":"bankaccnt_id","type":"int"},"bankaccnt_name"]
+                                    }
+                                }
+                            },
                             {
                                 xtype: 'Fill',
                                 xns: Roo.Toolbar