{
    "type": "Ext.form.Panel",
    "reference": {
        "name": "items",
        "type": "array"
    },
    "codeClass": null,
    "userConfig": {
        "bodyPadding": 10,
        "cls": [
            "formpanel"
        ],
        "container|align": "stretch",
        "designer|userAlias": "syncform",
        "designer|userClassName": "SyncForm",
        "height": null,
        "initialTitle": "Sincronizacion",
        "itemId": "sincronizar",
        "layout": "vbox",
        "scrollable": true,
        "title": null,
        "width": null
    },
    "configAlternates": {
        "bodyPadding": "auto",
        "container|align": "string",
        "designer|userAlias": "string",
        "designer|userClassName": "string",
        "height": "auto",
        "itemId": "string",
        "layout": "string",
        "scrollable": "auto",
        "title": "string",
        "width": "auto",
        "cls": "typedarray",
        "initialTitle": "string"
    },
    "name": "LoginForm1",
    "designerId": "d5faffa4-b549-4026-9ced-bd7f03ec0f93",
    "customConfigs": [
        {
            "group": "(Custom Properties)",
            "name": "initialTitle",
            "type": "string"
        }
    ],
    "viewControllerInstanceId": "83c22bcc-fdbc-4577-ad2e-6d20863ad048",
    "viewModelInstanceId": "bc7a2a82-68df-4d0c-9251-15ecac25754d",
    "cn": [
        {
            "type": "Ext.form.FieldSet",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "layout|flex": 1,
                "title": "Sincronizando tablas"
            },
            "configAlternates": {
                "layout|flex": "number",
                "title": "string"
            },
            "name": "MyFieldSet",
            "designerId": "7bcbfa73-9c44-4eb1-935d-8d76842d7518",
            "cn": [
                {
                    "type": "Ext.form.field.Text",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "blankText": "Este campo es obligatorio",
                        "editable": false,
                        "enableKeyEvents": true,
                        "fieldLabel": "Tabla",
                        "itemId": "tabla",
                        "name": null,
                        "width": "100%"
                    },
                    "configAlternates": {
                        "blankText": "string",
                        "editable": "boolean",
                        "fieldLabel": "string",
                        "itemId": "string",
                        "name": "string",
                        "width": "auto",
                        "enableKeyEvents": "boolean"
                    },
                    "name": "MyTextField11",
                    "designerId": "a1063d8a-32a1-4041-92de-57830b178a70"
                }
            ]
        },
        {
            "type": "Ext.container.Container",
            "reference": {
                "name": "dockedItems",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "container|align": "stretch",
                "container|pack": "center",
                "dock": "bottom",
                "layout": "hbox",
                "layout|flex": null
            },
            "configAlternates": {
                "container|align": "string",
                "container|pack": "string",
                "dock": "string",
                "layout": "string",
                "layout|flex": "number"
            },
            "name": "MyContainer1",
            "designerId": "35c914b9-8f13-49c3-b509-2cf99cced1b9",
            "cn": [
                {
                    "type": "Ext.button.Button",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "iconCls": "x-fa fa-check",
                        "itemId": "iniciar",
                        "layout|flex": null,
                        "layout|margins": "",
                        "margin": 10,
                        "text": "Aceptar"
                    },
                    "configAlternates": {
                        "iconCls": "string",
                        "itemId": "string",
                        "layout|flex": "number",
                        "layout|margins": "string",
                        "margin": "auto",
                        "text": "string"
                    },
                    "name": "MyButton6",
                    "designerId": "c899888d-b3c7-4d54-9ccc-af48aee6ec3e",
                    "cn": [
                        {
                            "type": "fixedfunction",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "designer|params": [
                                    "button",
                                    "e"
                                ],
                                "fn": "handler",
                                "implHandler": [
                                    "var panel = this.up('#sincronizar');",
                                    "",
                                    "if (button.getText() === 'Cerrar') {",
                                    "    MyApp.screen_count-- ;",
                                    "    MyApp.main.setActiveItem( MyApp.screen_name[MyApp.screen_count] );",
                                    "    return;",
                                    "}",
                                    "button.setText('Cerrar');",
                                    "panel.down('#tabla').setValue('Descargando...');",
                                    "",
                                    "panel.f_sincronizar();",
                                    "panel.down('#iniciar').setDisabled(true);",
                                    "panel.down('#cancelar').setDisabled(true);"
                                ]
                            },
                            "configAlternates": {
                                "designer|params": "typedarray",
                                "fn": "string",
                                "implHandler": "code"
                            },
                            "name": "handler",
                            "designerId": "0a052484-293e-4377-8514-034aebc25705"
                        }
                    ]
                },
                {
                    "type": "Ext.button.Button",
                    "reference": {
                        "name": "items",
                        "type": "array"
                    },
                    "codeClass": null,
                    "userConfig": {
                        "iconCls": "x-fa fa-remove",
                        "itemId": "cancelar",
                        "layout|flex": null,
                        "margin": 10,
                        "text": "Cancelar"
                    },
                    "configAlternates": {
                        "iconCls": "string",
                        "itemId": "string",
                        "layout|flex": "number",
                        "margin": "auto",
                        "text": "string"
                    },
                    "name": "MyButton7",
                    "designerId": "a99f80ab-e29c-4c07-8d53-a0b8bffa7e8c",
                    "cn": [
                        {
                            "type": "fixedfunction",
                            "reference": {
                                "name": "items",
                                "type": "array"
                            },
                            "codeClass": null,
                            "userConfig": {
                                "designer|params": [
                                    "button",
                                    "e"
                                ],
                                "fn": "handler",
                                "implHandler": [
                                    "f_crud.close_form(this.up(\"#form\"));"
                                ]
                            },
                            "configAlternates": {
                                "designer|params": "typedarray",
                                "fn": "string",
                                "implHandler": "code"
                            },
                            "name": "handler",
                            "designerId": "b88cfec6-d6f1-49b6-b124-51fe466f24aa"
                        }
                    ]
                }
            ]
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onFormActivate",
                "implHandler": [
                    "f_crud.setFormTitle(component);"
                ],
                "name": "activate",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onFormActivate",
            "designerId": "f24dcd03-fc1c-4542-bb1f-bf6255f05e17"
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onFormRender",
                "implHandler": [
                    "var panel = this;",
                    "var button = this.down('#iniciar');",
                    "if (MyApp.sinc_type === 'SILENT') {",
                    "",
                    "  if (button.getText() === 'Cerrar') {",
                    "    MyApp.screen_count-- ;",
                    "    MyApp.main.setActiveItem( MyApp.screen_name[MyApp.screen_count] );",
                    "    return;",
                    "  }",
                    "  button.setText('Cerrar');",
                    "  panel.down('#tabla').setValue('Descargando...');",
                    "",
                    "  panel.f_sincronizar();",
                    "",
                    "}"
                ],
                "name": "render",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onFormRender",
            "designerId": "5d8f15ef-f8af-4550-a9d9-6072542e670a"
        },
        {
            "type": "basiceventbinding",
            "reference": {
                "name": "listeners",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "onFormHide",
                "implHandler": [
                    "/*",
                    "// below code should refresh the panel-grid",
                    "var panel = MyApp.main.getActiveItem();",
                    "var grid = panel.down('#grid');",
                    "if (grid){ grid.refresh(); }*/"
                ],
                "name": "hide",
                "scope": "me"
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code",
                "name": "string",
                "scope": "string"
            },
            "name": "onFormHide",
            "designerId": "76236bf6-21cd-460e-9bbc-a13ed45386f7"
        },
        {
            "type": "basicfunction",
            "reference": {
                "name": "items",
                "type": "array"
            },
            "codeClass": null,
            "userConfig": {
                "fn": "f_sincronizar",
                "implHandler": [
                    "f_sinc.agregar_todas();",
                    "f_sinc.sincronizar(this);"
                ]
            },
            "configAlternates": {
                "fn": "string",
                "implHandler": "code"
            },
            "name": "f_sincronizar",
            "designerId": "e7d5d692-9ca9-45d4-93f5-13e57dd611a4"
        }
    ]
}