Skip to content

Commit

Permalink
products: tabbing
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Ovsyanko committed Feb 26, 2012
1 parent 1b4848a commit 59400e4
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 92 deletions.
104 changes: 12 additions & 92 deletions docroot/int/view/products/edit.js
@@ -1,3 +1,5 @@
Ext.require ('UI.view.products.edit_main', function () {

Ext.define ('UI.view.products.edit', {

extend: 'Ext.window.Window',
Expand All @@ -7,100 +9,18 @@ Ext.define ('UI.view.products.edit', {
title : 'Номенклатурная единица',
layout: 'fit',
autoShow: true,
width: 300,
height: 210,
width: 600,
height: 400,
defaultFocus : 'label',

initComponent: function() {

this.items = [

{
xtype: 'form',
layout: 'fit',
bodyPadding: 10,
// bodyStyle: 'padding:5px; border:0px; _border-bottom:1px;',
waitMsgTarget: true,

baseParams: {
type: 'products',
action: 'update'
},

items: [
{
xtype : 'hiddenfield',
name : 'id',
hidden: true,
value : ':NEW'
},
{
xtype: 'textfield',
tabIndex: 0,
size: 23,
name : 'label',
itemId: 'label',
allowBlank : false,
msgTarget : 'side',
fieldLabel: 'Наименование',
blankText: 'Вы забыли ввести наименование'
},
{
xtype: 'checkboxfield',
name: 'is_multiple_pages',
fieldLabel: 'Много листов',
boxLabel: '',
inputValue: '1',
uncheckedValue: '1'
},




{
xtype: 'fieldset',
autoRender: true,
layout: {
type: 'anchor'
},
// collapsed: true,
// collapsible: true,
title: 'Последнее изменение',
weight: 1,
items: [
{
xtype: 'displayfield',
name: 'log.dt',
fieldLabel: 'Дата'
},
{
xtype: 'displayfield',
name: 'user.label',
fieldLabel: 'Автор'
}
]
}



],


buttons: [
{
xtype: 'savebutton'
},
{
xtype: 'cancelbutton'
}
]

}

];

this.callParent(arguments);
items: [{
xtype: 'tabpanel',
items: [
Ext.create ('UI.view.products.edit_main')
// , Ext.create ('UI.view.products.search')
]
}]

}
});

});
136 changes: 136 additions & 0 deletions docroot/int/view/products/edit_main.js
@@ -0,0 +1,136 @@
Ext.define ('UI.view.products.edit_main', {

extend: 'Ext.form.Panel',
layout:'column',

tabConfig: {
title: 'Общие',
tooltip: 'A button tooltip'
},

bodyStyle:'padding:5px 5px 0',

fieldDefaults: {
labelAlign: 'top'
},

items: [

{
xtype: 'container',
layout: 'anchor',
columnWidth: .5,

items: [
{
xtype: 'textfield',
fieldLabel: 'Наименование',
name: 'name',
anchor: '96%'
}
, {
xtype: 'textfield',
fieldLabel: 'Обозначение чертежа, марка',
name: 'short_label',
anchor: '96%'
}
, {
xtype: 'textfield',
fieldLabel: 'ГОСТ, ОСТ, ТУ',
name: 'gost_ost_tu',
anchor: '96%'
}
, {
xtype: 'textfield',
fieldLabel: 'Сорт, размер',
name: 'part_size',
anchor: '96%'
}
, {
xtype: 'textfield',
fieldLabel: 'Первичное применение',
name: 'primary_application',
anchor: '96%'
}
, {
xtype: 'textfield',
fieldLabel: 'Код группы',
name: 'ord_src',
anchor: '96%'
}
]

}
, {
xtype: 'container',
columnWidth: .5,

items: [

{
xtype:'staticvocfield',


forceSelection: true,
allowBlank: false,
editable: false,
typeAhead: false,
multiSelect: false,


fieldLabel: 'Статус',
name: 'id_voc_product_status',
type: 'voc_product_status',
anchor:'100%'
}
, {
xtype:'combobox',
fieldLabel: 'Тип номенклатуры',
name: 'id_voc_product_type',
type: 'voc_product_types',
anchor:'100%'
}
, {
xtype:'combobox',
fieldLabel: 'ЕИ',
name: 'id_voc_unit',
type: 'voc_units',
anchor:'100%'
}
, {
xtype:'combobox',
fieldLabel: 'Входит в ограничительный перечень',
name: 'in_list',
anchor:'100%',
store: Ext.create ('Ext.data.ArrayStore', {
autoDestroy: true,
idIndex: 0,
fields: ['id','label'],
data: [
['', 'Не важно'],
['1', 'Входит'],
['0', 'Не входит']
]
})
}
, {
xtype:'textfield',
fieldLabel: 'Изделие',
name: 'email',
vtype:'email',
anchor:'100%'
}
, {
xtype: 'textfield',
fieldLabel: 'Масса',
name: 'weight',
anchor:'100%'
}

]

}

]

});

0 comments on commit 59400e4

Please sign in to comment.