view app/view/zusatzwerte/CreateForm.js @ 280:1afccc0cab90

Issue55: Added ignoreFields parameter to the setReadonly function to be able to ignore some fields when setting the form into read only state.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 08 Aug 2013 11:11:55 +0200
parents d6d74718a102
children 8cb393ffe844
line wrap: on
line source
Ext.define('Lada.view.zusatzwerte.CreateForm', {
    extend: 'Lada.view.widgets.LadaForm',
    requires : [
        'Lada.view.widgets.Probenzusatzwert'
    ],
    model: 'Lada.model.Zusatzwert',
    initComponent: function() {
        this.items = [
            {
                xtype: 'probenzusatzwert',
                name: 'pzsId',
                fieldLabel: 'PZW-Größe',
                listeners: {
                    scope: this,
                    'change': function (field, newv, oldv, opts) {
                        console.log(field, oldv, newv, opts);
                        var ffield = this.getForm().findField("messeinheit");
                        pzsId = newv;
                        if (pzsId == undefined) {
                            pzsId = oldv;
                        }
                        ffield.setValue(this.model.getMesseinheit(pzsId));
                    }
                }
            },
            {
                layout: "column",
                border: 0,
                items: [
                    {
                        xtype: 'numberfield',
                        name: 'messwertPzs',
                        fieldLabel: 'Messwert'
                    },
                    {
                        xtype: 'displayfield',
                        name: 'messeinheit'
                    }
                ]
            },
            {
                xtype: 'numberfield',
                name: 'messfehler',
                fieldLabel: 'rel. Unsich.[%]'
            },
            {
                xtype: 'numberfield',
                name: 'nwgZuMesswert',
                fieldLabel: 'Nachweisgrenze'
            }
        ];
        this.callParent();
    }
});

http://lada.wald.intevation.org