左右上中下框架界面
2011-11-25 18:13
155 查看
var myData1 = [
['委托下单']
];
var store1 = Ext.create('Ext.data.ArrayStore', {
fields: [
{ name: 'company' }
],
data: myData1
});
var grid1 = Ext.create('Ext.grid.Panel', {
store: store1,
columnLines: false,
preventHeader: true,
columns: [{
// text : 'Company Name',
locked: true,
width: 150,
sortable: false,
dataIndex: 'company'
}
],
height: 350,
width: 150,
//title: 'Locking Grid Column',
//renderTo: 'grid-example',
viewConfig: {
stripeRows: true
} ,
listeners: {
selectionchange: function (model, records)
{
if (records[0])
{
alert(records[0]);
//this.up('form').getForm().loadRecord(records[0]);
}
},
itemclick: function (model, records)
{
if (records[0])
{
alert(records[0]);
//this.up('form').getForm().loadRecord(records[0]);
}
}
}
});
var myData2 = [
['资金查询']
];
var store2 = Ext.create('Ext.data.ArrayStore', {
fields: [
{ name: 'company' }
],
data: myData2
});
var grid2 = Ext.create('Ext.grid.Panel', {
store: store2,
columnLines: false,
preventHeader: true,
columns: [{
// text : 'Company Name',
locked: true,
width: 150,
sortable: false,
dataIndex: 'company'
}
],
height: 350,
width: 150,
//title: 'Locking Grid Column',
//renderTo: 'grid-example',
viewConfig: {
stripeRows: true
},
listeners: {
selectionchange: function (model, records)
{
if (records[0])
{
alert(records[0]);
//this.up('form').getForm().loadRecord(records[0]);
}
}
}
});
function funitemclick()
{
alert('kk');
}
Ext.onReady(function ()
{
//Viewport布局面板,以下布局为南北布局方式
var p = new Ext.container.Viewport({
layout: "border", //布局方式占满整个浏览器
renderTo: Ext.getBody(), //呈现在整个body
items: [
{
//title: "",
frame: true,
region: "center", //呈现在最中间
margin: 3,
xtype: 'tabpanel',
activeTab: 0,
items: [
// { xtype: "textfield" },
// { text: "我是中间儿子里面的按钮1", width: 200, xtype: "button" },
// { text: "我是中间儿子里面的按钮2", width: 200, xtype: "button" },
{title: '下单', html: ' <iframe name="iframeCenter" scrolling="auto" frameborder="0" width="100%" height="650" src="/Order/DoXHOrder"> </iframe>' },
{ title: '使用帮助', html: 'The first tab\'s content. Others may be added dynamically' }
]
},
{
title: "我是上面的儿子",
frame: true,
region: "north", //呈现在北边,即是上边
height: 100,
collapsible: true //是否可以收缩
},
{
title: "导航菜单",
frame: true,
region: "west", //呈现在西边,即是左边
width: 200,
margin: "3 0 3 0",
collapsible: true, //是否可以收缩
resizable: true,
stateId: 'navigation-panel',
id: 'west-panel', // see Ext.getCmp() below
split: true,
minWidth: 175,
maxWidth: 200,
animCollapse: true,
layout: 'accordion',
items: [
//{ html: ' <iframe name="iframeLeftMenu" scrolling="auto" frameborder="0" width="100%" height="600" src="/Home/LeftMenu"> </iframe>' }
{
//contentEl: 'grid-example',
items: [grid1],
title: '下单',
iconCls: 'nav' // see the HEAD section for style used
}, {
items: [grid2],
title: '查询',
html: '<p>Some settings in here.</p>',
//items:[grid1],
iconCls: 'info'
}, {
title: '设置',
html: '<p>Some info in here.</p>',
iconCls: 'settings'
}
]
},
{
// title: "我是右边的儿子",
frame: true,
region: "east", //呈现在东边,即是右边
width: 200,
margin: "3 0 3 0",
items: [
{ html: ' <iframe name="iframeRightMRS" scrolling="auto" frameborder="0" width="100%" height="600" src="/Home/RightMRS"> </iframe>'}]
},
{
//title: "我是下面的儿子",
frame: true,
region: "south", //呈现在南边,即是下边
height: 100,
items: [
{ html: ' <iframe name="iframeBottom" scrolling="auto" frameborder="0" width="100%" height="100" src="/Home/BottomInfo"> </iframe>'}]
}
]
});
// grid2.getSelectionModel().select(0);
// grid2.fireEvent('itemclick', grid2, grid2.getSelectionModel().getLastSelected());
});
['委托下单']
];
var store1 = Ext.create('Ext.data.ArrayStore', {
fields: [
{ name: 'company' }
],
data: myData1
});
var grid1 = Ext.create('Ext.grid.Panel', {
store: store1,
columnLines: false,
preventHeader: true,
columns: [{
// text : 'Company Name',
locked: true,
width: 150,
sortable: false,
dataIndex: 'company'
}
],
height: 350,
width: 150,
//title: 'Locking Grid Column',
//renderTo: 'grid-example',
viewConfig: {
stripeRows: true
} ,
listeners: {
selectionchange: function (model, records)
{
if (records[0])
{
alert(records[0]);
//this.up('form').getForm().loadRecord(records[0]);
}
},
itemclick: function (model, records)
{
if (records[0])
{
alert(records[0]);
//this.up('form').getForm().loadRecord(records[0]);
}
}
}
});
var myData2 = [
['资金查询']
];
var store2 = Ext.create('Ext.data.ArrayStore', {
fields: [
{ name: 'company' }
],
data: myData2
});
var grid2 = Ext.create('Ext.grid.Panel', {
store: store2,
columnLines: false,
preventHeader: true,
columns: [{
// text : 'Company Name',
locked: true,
width: 150,
sortable: false,
dataIndex: 'company'
}
],
height: 350,
width: 150,
//title: 'Locking Grid Column',
//renderTo: 'grid-example',
viewConfig: {
stripeRows: true
},
listeners: {
selectionchange: function (model, records)
{
if (records[0])
{
alert(records[0]);
//this.up('form').getForm().loadRecord(records[0]);
}
}
}
});
function funitemclick()
{
alert('kk');
}
Ext.onReady(function ()
{
//Viewport布局面板,以下布局为南北布局方式
var p = new Ext.container.Viewport({
layout: "border", //布局方式占满整个浏览器
renderTo: Ext.getBody(), //呈现在整个body
items: [
{
//title: "",
frame: true,
region: "center", //呈现在最中间
margin: 3,
xtype: 'tabpanel',
activeTab: 0,
items: [
// { xtype: "textfield" },
// { text: "我是中间儿子里面的按钮1", width: 200, xtype: "button" },
// { text: "我是中间儿子里面的按钮2", width: 200, xtype: "button" },
{title: '下单', html: ' <iframe name="iframeCenter" scrolling="auto" frameborder="0" width="100%" height="650" src="/Order/DoXHOrder"> </iframe>' },
{ title: '使用帮助', html: 'The first tab\'s content. Others may be added dynamically' }
]
},
{
title: "我是上面的儿子",
frame: true,
region: "north", //呈现在北边,即是上边
height: 100,
collapsible: true //是否可以收缩
},
{
title: "导航菜单",
frame: true,
region: "west", //呈现在西边,即是左边
width: 200,
margin: "3 0 3 0",
collapsible: true, //是否可以收缩
resizable: true,
stateId: 'navigation-panel',
id: 'west-panel', // see Ext.getCmp() below
split: true,
minWidth: 175,
maxWidth: 200,
animCollapse: true,
layout: 'accordion',
items: [
//{ html: ' <iframe name="iframeLeftMenu" scrolling="auto" frameborder="0" width="100%" height="600" src="/Home/LeftMenu"> </iframe>' }
{
//contentEl: 'grid-example',
items: [grid1],
title: '下单',
iconCls: 'nav' // see the HEAD section for style used
}, {
items: [grid2],
title: '查询',
html: '<p>Some settings in here.</p>',
//items:[grid1],
iconCls: 'info'
}, {
title: '设置',
html: '<p>Some info in here.</p>',
iconCls: 'settings'
}
]
},
{
// title: "我是右边的儿子",
frame: true,
region: "east", //呈现在东边,即是右边
width: 200,
margin: "3 0 3 0",
items: [
{ html: ' <iframe name="iframeRightMRS" scrolling="auto" frameborder="0" width="100%" height="600" src="/Home/RightMRS"> </iframe>'}]
},
{
//title: "我是下面的儿子",
frame: true,
region: "south", //呈现在南边,即是下边
height: 100,
items: [
{ html: ' <iframe name="iframeBottom" scrolling="auto" frameborder="0" width="100%" height="100" src="/Home/BottomInfo"> </iframe>'}]
}
]
});
// grid2.getSelectionModel().select(0);
// grid2.fireEvent('itemclick', grid2, grid2.getSelectionModel().getLastSelected());
});
相关文章推荐
- 窗体框架 界面控件 窗体分割框架 左右分栏
- CDH管理界面查看各框架的版本(hive为例)
- 用S60操作系统SDK开发NOKIA手机应用程序(4)- 界面层框架及一些特性
- 分享一个漂亮WPF界面框架创作过程及其源码
- iOS开发之静态库(五)—— 图片、界面xib等资源文件封装到静态框架framework
- 分享非常漂亮的WPF界面框架源码及插件化实现原理
- View框架下实现角色的上下左右移动
- [虾扯蛋] android界面框架-Window
- 【Android M】平台方实现三指左右滑动任何应用界面截屏
- ssm框架登录界面验证码功能
- JAVA 中一个非常轻量级只有 200k 左右的 RESTful 路由框架
- 增加App项目界面体验性的几个开源框架
- android app主题UI界面框架搭建 tablayout+Viewpager+fragment 导航栏滑动和点击切换界面
- QtGui界面接收Ice框架回调消息
- RDIFramework.NET ━ .NET快速信息化系统开发框架 V3.2->Web版本模块管理界面新增模块排序功能
- 视频框架 Vitamio 使用教程+部分心得 (五) 左右滑动快进快退 + VideoView部分中文API
- Android中启动界面左右滑动实例
- C# 优化基于插件的开发框架实现Ribbon界面与功能的分离附DEMO
- 5 个界面效果很炫的 JavaScript UI 框架
- 数据库脚本工具 VS2010/2012风格的界面框架