view app/view/proben/Edit.js @ 130:747d488b9203

Added function getEidi which returns the part of the id of an item which needs to be appended to the store base URL for PUT and DELETE and GET Requests. This function is used to build a custom id. On default it returns the value of getId.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 25 Jun 2013 17:29:17 +0200
parents a7bfaeb1655d
children 7b1140bd8b3d
line wrap: on
line source
Ext.define('Lada.view.proben.Edit', {
    extend: 'Ext.window.Window',
    alias: 'widget.probenedit',

    title: 'Maske für §3-Proben',
    // Make size of the dialog dependend of the available space.
    // TODO: Handle resizing the browser window.
    width: Ext.getBody().getViewSize().width - 30,
    height: Ext.getBody().getViewSize().height - 30,
    autoShow: true,
    autoScroll: true,
    modal: true,

    initComponent: function() {
        // InitialConfig is the config object passed to the constructor on
        // creation of this window. We need to pass it throuh to the form as
        // we need the "modelId" param to load the correct item.
        var form = Ext.create('Lada.view.proben.EditForm', this.initialConfig);
        /// Load kommentare
        ////var record = form.getRecord();
        //var kommentare = form.down('kommentarelist'); //form.down('kommentare');
        //var kstore = kommentare.getStore();
        //kstore.load({
        //    params: {
        //        probe: this.initialConfig['modelId']
        //        //probe: record.data['probeId']
        //    }
        //});
        //// Load Orte
        //var orte = form.down('ortelist');
        //var ostore = orte.getStore();
        //ostore.load({
        //    params: {
        //        probe: this.initialConfig['modelId']
        //        //probe: record.data['probeId']
        //    }
        //});
        //// Load Messungen 
        //var messungen = form.down('messungenlist');
        //var mstore = messungen.getStore();
        //mstore.load({
        //    params: {
        //        probe: this.initialConfig['modelId']
        //        //probe: record.data['probeId']
        //    }
        //});
        this.items = [form];
        this.buttons = [
            {
                text: 'Speichern',
                handler: form.commit,
                scope: form
            }
        ];
        this.callParent();
    }
});

http://lada.wald.intevation.org