You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/TruckMng/Viewsjs/WlTruck/Edit.js

81 lines
2.1 KiB
JavaScript

Ext.BLANK_IMAGE_URL = '../../Truck/Scripts/extjs/resources/images/default/s.gif';
var panelTest = null;
Ext.onReady(function () {
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'side';
panelTest = new window.DsTruck.WlTruckEdit({
region: 'center',
layout: 'border'
});
var samplePanel = new Ext.Panel({
collapsible: true,
region: 'west',
width: 80,
frame: true,
layout: 'accordion',
title: '详细信息',
margins: '5 0 5 5',
split: true,
lbar: [
{
text: '基本信息',
textAlign: 'left',
handler: function (button, event) {
tabs.setActiveTab(0);
}
}, '-', {
text: '其他信息',
textAlign: 'left',
handler: function (button, event) {
tabs.setActiveTab(1);
},
scope: this
}
]
});
var tabs = Ext.create('Ext.tab.Panel', {
region: 'center', // a center region is ALWAYS required for border layout
deferredRender: false,
activeTab: 0, // first tab initially active
items: [panelTest, {
title: 'Close Me',
closable: true,
autoScroll: true
}]
// ,
// dockedItems: {
// dock: 'left',
// xtype: 'toolbar',
// margins: '30',
// items: [{
// text: '基本信息',
// handler: function (button, event) {
// tabs.setActiveTab(0);
// }
// },{
// text: '其他信息',
// handler: function (button, event) {
// tabs.setActiveTab(1);
// }
// }]
// }
});
tabs.getTabBar().setVisible(false);
var view = new Ext.Viewport({
layout: 'border',
renderTo: 'viewport',
border: false,
items: [
samplePanel, tabs
// tabs
]
});
});