Pman.Dialog.CoreAutoSavePreview.bjs
authorEdward <edward@roojs.com>
Thu, 8 May 2014 08:58:26 +0000 (16:58 +0800)
committerEdward <edward@roojs.com>
Thu, 8 May 2014 08:58:26 +0000 (16:58 +0800)
Pman.Dialog.CoreAutoSavePreview.js

Pman.Dialog.CoreAutoSavePreview.bjs
Pman.Dialog.CoreAutoSavePreview.js

index 1b49971..03b8286 100644 (file)
                 {
                     "*prop": "west",
                     "split": true,
+                    "width": 300,
                     "xtype": "LayoutRegion",
                     "|xns": "Roo"
                 },
-                {
-                    "listeners": {
-                        "|activate": "function() {\n    _this.wpanel = this;\n    if (_this.wgrid) {\n        _this.wgrid.footer.onClick('first');\n    }\n}"
-                    },
-                    "background": true,
-                    "fitContainer": true,
-                    "fitToframe": true,
-                    "region": "west",
-                    "tableName": "clipping_journalist",
-                    "title": "Publication Lists",
-                    "xtype": "GridPanel",
-                    "|xns": "Roo",
-                    "items": [
-                        {
-                            "listeners": {
-                                "|render": "function() \n{\n    _this.wgrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.wpanel.active) {\n       this.footer.onClick('first');\n    }\n}"
-                            },
-                            "*prop": "grid",
-                            "autoExpandColumn": "publication",
-                            "loadMask": true,
-                            "xtype": "Grid",
-                            "|xns": "Roo.grid",
-                            "items": [
-                                {
-                                    "listeners": {
-                                        "beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    o.params._list = 1;\n}"
-                                    },
-                                    "*prop": "dataSource",
-                                    "remoteSort": true,
-                                    "xtype": "Store",
-                                    "|sortInfo": "{ field : 'publication', direction: 'ASC' }",
-                                    "|xns": "Roo.data",
-                                    "items": [
-                                        {
-                                            "*prop": "proxy",
-                                            "xtype": "HttpProxy",
-                                            "method": "GET",
-                                            "|url": "baseURL + '/Roo/Groups.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': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'type',\n        'type': 'int'\n    },\n    {\n        'name': 'leader',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_id',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_name',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_email',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_role',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_active',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_deleted_dt',\n        'type': 'date'\n    },\n    {\n        'name': 'leader_firstname',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_lastname',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_name_facebook',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_url_blog',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_url_twitter',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_url_linkedin',\n        'type': 'string'\n    },\n    {\n        'name': 'leader_crm_lead_percentage',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_crm_industry_id',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_crm_updated_action_id',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_crm_created_action_id',\n        'type': 'int'\n    },\n    {\n        'name': 'leader_crm_type_id',\n        'type': 'int'\n    }\n]"
-                                        }
-                                    ]
-                                },
-                                {
-                                    "*prop": "footer",
-                                    "displayInfo": true,
-                                    "displayMsg": "Displaying Publication{0} - {1} of {2}",
-                                    "emptyMsg": "Nothing found",
-                                    "pageSize": 25,
-                                    "xtype": "PagingToolbar",
-                                    "|xns": "Roo"
-                                },
-                                {
-                                    "*prop": "colModel[]",
-                                    "dataIndex": "publication",
-                                    "header": "Publication Lists",
-                                    "width": 200,
-                                    "xtype": "ColumnModel",
-                                    "|renderer": "function(v) { return String.format('{0}', v); }",
-                                    "|xns": "Roo.grid"
-                                }
-                            ]
-                        }
-                    ]
-                },
-                {
-                    "listeners": {
-                        "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
-                    },
-                    "background": true,
-                    "fitContainer": true,
-                    "fitToframe": true,
-                    "region": "center",
-                    "tableName": "clipping_journalist",
-                    "title": "Journalist",
-                    "xtype": "GridPanel",
-                    "|xns": "Roo",
-                    "items": [
-                        {
-                            "listeners": {
-                                "|render": "function() \n{\n    _this.grid = this; \n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
-                            },
-                            "*prop": "grid",
-                            "autoExpandColumn": "name",
-                            "clicksToEdit": 1,
-                            "loadMask": true,
-                            "xtype": "EditorGrid",
-                            "|xns": "Roo.grid",
-                            "items": [
-                                {
-                                    "listeners": {
-                                        "beforeload": "function (_self, o)\n{\n    o.params = o.params || {};\n    if (!_this.data.campaign_id) {\n        Roo.log('Missing campaign id!?');\n        return false;\n    }\n    o.params.campaign_id = _this.data.campaign_id;\n}"
-                                    },
-                                    "*prop": "dataSource",
-                                    "remoteSort": true,
-                                    "xtype": "Store",
-                                    "|sortInfo": "{ field : 'name', direction: 'ASC' }",
-                                    "|xns": "Roo.data",
-                                    "items": [
-                                        {
-                                            "*prop": "proxy",
-                                            "method": "GET",
-                                            "xtype": "HttpProxy",
-                                            "|url": "baseURL + '/Roo/clipping_journalist.php'",
-                                            "|xns": "Roo.data"
-                                        },
-                                        {
-                                            "*prop": "reader",
-                                            "id": "id",
-                                            "root": "data",
-                                            "totalProperty": "total",
-                                            "xtype": "JsonReader",
-                                            "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'name',\n        'type': 'string'\n    },\n    {\n        'name': 'publication',\n        'type': 'string'\n    }\n]",
-                                            "|xns": "Roo.data"
-                                        }
-                                    ]
-                                },
-                                {
-                                    "*prop": "footer",
-                                    "displayInfo": true,
-                                    "displayMsg": "Displaying Journalist {0} - {1} of {2}",
-                                    "emptyMsg": "Nothing found",
-                                    "pageSize": 25,
-                                    "xtype": "PagingToolbar",
-                                    "|xns": "Roo"
-                                },
-                                {
-                                    "*prop": "colModel[]",
-                                    "dataIndex": "name",
-                                    "header": "Name",
-                                    "width": 100,
-                                    "xtype": "ColumnModel",
-                                    "|renderer": "function(v,x,r) \n{ \n    return String.format('{0}', v ? v : ''); \n}",
-                                    "|xns": "Roo.grid"
-                                },
-                                {
-                                    "*prop": "colModel[]",
-                                    "dataIndex": "publication",
-                                    "header": "Publication",
-                                    "width": 300,
-                                    "xtype": "ColumnModel",
-                                    "|renderer": "function(v,x,r) \n{ \n    return String.format('{0}', v ? v : ''); \n}",
-                                    "|xns": "Roo.grid",
-                                    "items": [
-                                        {
-                                            "|xns": "Roo.grid",
-                                            "xtype": "GridEditor",
-                                            "*prop": "editor"
-                                        }
-                                    ]
-                                }
-                            ]
-                        }
-                    ]
-                },
                 {
                     "listeners": {
                         "|click": "function() {\n    _this.dialog.hide();\n}"
index 998466e..d1e1307 100644 (file)
@@ -38,334 +38,6 @@ Pman.Dialog.CoreAutoSavePreview = {
             resizable : false,
             title : "Saved Version",
             width : 800,
-            items : [
-                {
-                    xtype: 'GridPanel',
-                    xns: Roo,
-                    listeners : {
-                        activate : function() {
-                            _this.wpanel = this;
-                            if (_this.wgrid) {
-                                _this.wgrid.footer.onClick('first');
-                            }
-                        }
-                    },
-                    background : true,
-                    fitContainer : true,
-                    fitToframe : true,
-                    region : 'west',
-                    tableName : 'clipping_journalist',
-                    title : "Publication Lists",
-                    grid : {
-                        xtype: 'Grid',
-                        xns: Roo.grid,
-                        listeners : {
-                            render : function() 
-                            {
-                                _this.wgrid = this; 
-                                //_this.dialog = Pman.Dialog.FILL_IN
-                                if (_this.wpanel.active) {
-                                   this.footer.onClick('first');
-                                }
-                            }
-                        },
-                        autoExpandColumn : 'publication',
-                        loadMask : true,
-                        dataSource : {
-                            xtype: 'Store',
-                            xns: Roo.data,
-                            listeners : {
-                                beforeload : function (_self, o)
-                                {
-                                    o.params = o.params || {};
-                                    o.params._list = 1;
-                                }
-                            },
-                            remoteSort : true,
-                            sortInfo : { field : 'publication', direction: 'ASC' },
-                            proxy : {
-                                xtype: 'HttpProxy',
-                                xns: Roo.data,
-                                method : 'GET',
-                                url : baseURL + '/Roo/Groups.php'
-                            },
-                            reader : {
-                                xtype: 'JsonReader',
-                                xns: Roo.data,
-                                totalProperty : 'total',
-                                root : 'data',
-                                id : 'id',
-                                fields : [
-                                    {
-                                        'name': 'id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'name',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'type',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_office_id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_name',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_phone',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_fax',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_email',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_company_id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_role',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_active',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_remarks',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_passwd',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_owner_id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_lang',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_no_reset_sent',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_action_type',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_project_id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_deleted_by',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_deleted_dt',
-                                        'type': 'date'
-                                    },
-                                    {
-                                        'name': 'leader_firstname',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_lastname',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_name_facebook',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_url_blog',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_url_twitter',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_url_linkedin',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'leader_crm_lead_percentage',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_crm_industry_id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_crm_updated_action_id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_crm_created_action_id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'leader_crm_type_id',
-                                        'type': 'int'
-                                    }
-                                ]
-                            }
-                        },
-                        footer : {
-                            xtype: 'PagingToolbar',
-                            xns: Roo,
-                            displayInfo : true,
-                            displayMsg : "Displaying Publication{0} - {1} of {2}",
-                            emptyMsg : "Nothing found",
-                            pageSize : 25
-                        },
-                        colModel : [
-                            {
-                                xtype: 'ColumnModel',
-                                xns: Roo.grid,
-                                dataIndex : 'publication',
-                                header : 'Publication Lists',
-                                width : 200,
-                                renderer : function(v) { return String.format('{0}', v); }
-                            }
-                        ]
-                    }
-                },
-                {
-                    xtype: 'GridPanel',
-                    xns: Roo,
-                    listeners : {
-                        activate : function() {
-                            _this.panel = this;
-                            if (_this.grid) {
-                                _this.grid.footer.onClick('first');
-                            }
-                        }
-                    },
-                    background : true,
-                    fitContainer : true,
-                    fitToframe : true,
-                    region : 'center',
-                    tableName : 'clipping_journalist',
-                    title : "Journalist",
-                    grid : {
-                        xtype: 'EditorGrid',
-                        xns: Roo.grid,
-                        listeners : {
-                            render : function() 
-                            {
-                                _this.grid = this; 
-                                if (_this.panel.active) {
-                                   this.footer.onClick('first');
-                                }
-                            }
-                        },
-                        autoExpandColumn : 'name',
-                        clicksToEdit : 1,
-                        loadMask : true,
-                        dataSource : {
-                            xtype: 'Store',
-                            xns: Roo.data,
-                            listeners : {
-                                beforeload : function (_self, o)
-                                {
-                                    o.params = o.params || {};
-                                    if (!_this.data.campaign_id) {
-                                        Roo.log('Missing campaign id!?');
-                                        return false;
-                                    }
-                                    o.params.campaign_id = _this.data.campaign_id;
-                                }
-                            },
-                            remoteSort : true,
-                            sortInfo : { field : 'name', direction: 'ASC' },
-                            proxy : {
-                                xtype: 'HttpProxy',
-                                xns: Roo.data,
-                                method : 'GET',
-                                url : baseURL + '/Roo/clipping_journalist.php'
-                            },
-                            reader : {
-                                xtype: 'JsonReader',
-                                xns: Roo.data,
-                                id : 'id',
-                                root : 'data',
-                                totalProperty : 'total',
-                                fields : [
-                                    {
-                                        'name': 'id',
-                                        'type': 'int'
-                                    },
-                                    {
-                                        'name': 'name',
-                                        'type': 'string'
-                                    },
-                                    {
-                                        'name': 'publication',
-                                        'type': 'string'
-                                    }
-                                ]
-                            }
-                        },
-                        footer : {
-                            xtype: 'PagingToolbar',
-                            xns: Roo,
-                            displayInfo : true,
-                            displayMsg : "Displaying Journalist {0} - {1} of {2}",
-                            emptyMsg : "Nothing found",
-                            pageSize : 25
-                        },
-                        colModel : [
-                            {
-                                xtype: 'ColumnModel',
-                                xns: Roo.grid,
-                                dataIndex : 'name',
-                                header : 'Name',
-                                width : 100,
-                                renderer : function(v,x,r) 
-                                { 
-                                    return String.format('{0}', v ? v : ''); 
-                                }
-                            },
-                            {
-                                xtype: 'ColumnModel',
-                                xns: Roo.grid,
-                                dataIndex : 'publication',
-                                header : 'Publication',
-                                width : 300,
-                                renderer : function(v,x,r) 
-                                { 
-                                    return String.format('{0}', v ? v : ''); 
-                                },
-                                editor : {
-                                    xtype: 'GridEditor',
-                                    xns: Roo.grid
-                                }
-                            }
-                        ]
-                    }
-                }
-            ],
             center : {
                 xtype: 'LayoutRegion',
                 xns: Roo,
@@ -374,7 +46,8 @@ Pman.Dialog.CoreAutoSavePreview = {
             west : {
                 xtype: 'LayoutRegion',
                 xns: Roo,
-                split : true
+                split : true,
+                width : 300
             },
             buttons : [
                 {