Pman.Tab.XtupleItem.bjs
authorEdward <edward@roojs.com>
Thu, 21 Nov 2013 08:36:34 +0000 (16:36 +0800)
committerEdward <edward@roojs.com>
Thu, 21 Nov 2013 08:36:34 +0000 (16:36 +0800)
Pman.Tab.XtupleItem.js

Pman.Tab.XtupleItem.bjs
Pman.Tab.XtupleItem.js

index de0116f..0cb3e13 100644 (file)
                                             "|renderer": "function(v) { return String.format('{0}', v); }",
                                             "|xns": "Roo.grid"
                                         },
-                                        {
-                                            "*prop": "colModel[]",
-                                            "dataIndex": "item_image_id",
-                                            "header": "Image",
-                                            "sortable": true,
-                                            "width": 100,
-                                            "xtype": "ColumnModel",
-                                            "|renderer": "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\" height=\"100\">', baseURL, v, r.data.item_image_filename); }",
-                                            "|xns": "Roo.grid",
-                                            "items": [
-                                                {
-                                                    "|xns": "Roo.grid",
-                                                    "xtype": "GridEditor",
-                                                    "*prop": "editor",
-                                                    "items": [
-                                                        {
-                                                            "*prop": "field",
-                                                            "allowBlank": true,
-                                                            "alwaysQuery": true,
-                                                            "displayField": "charass_value",
-                                                            "editable": true,
-                                                            "forceSelection": false,
-                                                            "listWidth": 300,
-                                                            "loadingText": "Searching...",
-                                                            "minChars": 2,
-                                                            "pageSize": 20,
-                                                            "qtip": "Select Brand",
-                                                            "queryParam": "query[charass_value]",
-                                                            "selectOnFocus": true,
-                                                            "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{charass_value}</b> </div>",
-                                                            "triggerAction": "all",
-                                                            "width": 150,
-                                                            "xtype": "ComboBox",
-                                                            "|xns": "Roo.form",
-                                                            "items": [
-                                                                {
-                                                                    "listeners": {
-                                                                        "|beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    // staff can see all logs, other companies can only see their own.\n    // look for all of the charass 's with the same type= eg. brand.\n    \n    o.params.charass_char_id_char_name = 'BRAND';\n    o.params.charass_target_type ='I';\n    o.params._distinct = 'charass_value';\n        o.params._columns = 'charass_value';\n\n}"
-                                                                    },
-                                                                    "*prop": "store",
-                                                                    "remoteSort": true,
-                                                                    "xtype": "Store",
-                                                                    "|sortInfo": "{ field : 'charass_value' , direction : 'ASC' }",
-                                                                    "|xns": "Roo.data",
-                                                                    "items": [
-                                                                        {
-                                                                            "*prop": "proxy",
-                                                                            "method": "GET",
-                                                                            "xtype": "HttpProxy",
-                                                                            "|url": "baseURL + '/Roo/Charass.php'",
-                                                                            "|xns": "Roo.data"
-                                                                        },
-                                                                        {
-                                                                            "|xns": "Roo.data",
-                                                                            "xtype": "JsonReader",
-                                                                            "totalProperty": "total",
-                                                                            "root": "data",
-                                                                            "*prop": "reader",
-                                                                            "id": "id",
-                                                                            "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]"
-                                                                        }
-                                                                    ]
-                                                                }
-                                                            ]
-                                                        }
-                                                    ]
-                                                }
-                                            ]
-                                        },
                                         {
                                             "*prop": "colModel[]",
                                             "dataIndex": "item_char_brand",
index f1224ae..d3999ea 100644 (file)
@@ -1051,182 +1051,6 @@ Pman.Tab.XtupleItem = new Roo.XComponent({
                                     width : 200,
                                     renderer : function(v) { return String.format('{0}', v); }
                                 },
-                                {
-                                    xtype: 'ColumnModel',
-                                    xns: Roo.grid,
-                                    dataIndex : 'item_image_id',
-                                    header : 'Image',
-                                    sortable : true,
-                                    width : 100,
-                                    renderer : function(v,x,r) { return String.format('<img src="{0}/Images/Thumb/100/{1}/{2}" height="100">', baseURL, v, r.data.item_image_filename); },
-                                    editor : {
-                                        xtype: 'GridEditor',
-                                        xns: Roo.grid,
-                                        field : {
-                                            xtype: 'ComboBox',
-                                            xns: Roo.form,
-                                            allowBlank : true,
-                                            alwaysQuery : true,
-                                            displayField : 'charass_value',
-                                            editable : true,
-                                            forceSelection : false,
-                                            listWidth : 300,
-                                            loadingText : "Searching...",
-                                            minChars : 2,
-                                            pageSize : 20,
-                                            qtip : "Select Brand",
-                                            queryParam : 'query[charass_value]',
-                                            selectOnFocus : true,
-                                            tpl : '<div class="x-grid-cell-text x-btn button"><b>{charass_value}</b> </div>',
-                                            triggerAction : 'all',
-                                            width : 150,
-                                            store : {
-                                                xtype: 'Store',
-                                                xns: Roo.data,
-                                                listeners : {
-                                                    beforeload : function (_self, o)
-                                                    {
-                                                        o.params = o.params || {};
-                                                        // staff can see all logs, other companies can only see their own.
-                                                        // look for all of the charass 's with the same type= eg. brand.
-                                                        
-                                                        o.params.charass_char_id_char_name = 'BRAND';
-                                                        o.params.charass_target_type ='I';
-                                                        o.params._distinct = 'charass_value';
-                                                            o.params._columns = 'charass_value';
-                                                    
-                                                    }
-                                                },
-                                                remoteSort : true,
-                                                sortInfo : { field : 'charass_value' , direction : 'ASC' },
-                                                proxy : {
-                                                    xtype: 'HttpProxy',
-                                                    xns: Roo.data,
-                                                    method : 'GET',
-                                                    url : baseURL + '/Roo/Charass.php'
-                                                },
-                                                reader : {
-                                                    xtype: 'JsonReader',
-                                                    xns: Roo.data,
-                                                    totalProperty : 'total',
-                                                    root : 'data',
-                                                    id : 'id',
-                                                    fields : [
-                                                        {
-                                                            'name': 'id',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_name',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'event_when',
-                                                            'type': 'date',
-                                                            'dateFormat': 'Y-m-d'
-                                                        },
-                                                        {
-                                                            'name': 'action',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'ipaddr',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'on_id',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'on_table',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'remarks',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_id',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_office_id',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_name',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_phone',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_fax',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_email',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_company_id',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_role',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_active',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_remarks',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_passwd',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_owner_id',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_lang',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_no_reset_sent',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_action_type',
-                                                            'type': 'string'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_project_id',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_deleted_by',
-                                                            'type': 'int'
-                                                        },
-                                                        {
-                                                            'name': 'person_id_deleted_dt',
-                                                            'type': 'date'
-                                                        }
-                                                    ]
-                                                }
-                                            }
-                                        }
-                                    }
-                                },
                                 {
                                     xtype: 'ColumnModel',
                                     xns: Roo.grid,