PHP Code:
Ext.define('mlwd.view.kit.createKit' ,{ extend: 'Ext.window.Window', alias : 'widget.createKit', title : 'Добавить кит', layout: 'fit', autoShow: true, modal: true, initComponent: function() { var kit_combo = Ext.create('Ext.data.Store', { autoLoad: true, fields: ['title','id'], data : [ {"title":"MWD", "id" : 1}, {"title":"LWD", "id" : 2}, {"title":"ADD LWD", "id" : 3}, {"title":"NDT", "id" : 5} ] }); var kit_size_combo = Ext.create('Ext.data.Store', { fields: ['title','id'], data : [ {"title":"4 3/4", "id" : 2}, {"title":"6 3/4", "id" : 3}, {"title":"8 1/2", "id" : 4} ] }); this.items = [ { xtype: 'form', layout : 'form', width : 400, height : 400, bodyPadding: 15, items: [ { xtype: 'textfield', name : 'serial', fieldLabel: 'Серийный номер' },{ xtype: 'combo', fieldLabel: 'Тип кита', name : 'kit_type', store: kit_combo, queryMode: 'local', displayField: 'title', valueField: 'id' },{ xtype: 'tagfield', fieldLabel: 'Размер', store: kit_size_combo, displayField: 'title', valueField: 'id', queryMode: 'local', filterPickList: true, editable : false } ] } ];
this.buttons = [ { text: 'Save', action: 'save' }, { text: 'Cancel', scope: this, handler: this.close } ];
this.callParent(arguments); }});