Mathias Weisheit
24 Feb 2010, 7:04 AM
How can I add a preview like in the Notesclient?
My current code is:
var bcNorth=new Ext.BoxComponent({
region: 'north',
height: 32, // give north and south regions a height
contentEl: 'north',
});
var bcSouth={
region: 'south',
id: 'oPreview',
split: true,
height: 200,
minSize: 100,
maxSize: 200,
collapsible: true,
title: 'Vorschau',
autoEl: {
tag: 'div',
html:''
}
};
var bcWest = {
region: 'west',
title: Ext.nd.Session.currentDatabase.title,
collapsible: true,
split: true,
width: 200,
minSize : 150,
maxSize : 400,
items : [Ext.apply({
id: 'xnd-outline-panel',
xtype: 'xnd-uioutline',
border : false,
target: 'xnd-center-panel',
viewTarget: 'xnd-grid-panel'
}, uiOutline)
]};
var bcCenter = {
region: 'center',
id: 'xnd-center-panel',
xtype: 'tabpanel',
target: 'xnd-center-panel',
defaults : {
target : 'xnd-center-panel',
border : true
},
enableTabScroll: true,
activeTab: 0,
items: [Ext.apply({
id: 'xnd-grid-panel',
layout: 'fit',
xtype: 'xnd-uiview',
target: 'xnd-center-panel',
closable: false
}, uiView)
]};
Ext.onReady(function() {
var viewport = new Ext.Viewport({
layout: 'border',
items: [bcNorth,bcSouth,bcWest,bcCenter]
});
})
My current code is:
var bcNorth=new Ext.BoxComponent({
region: 'north',
height: 32, // give north and south regions a height
contentEl: 'north',
});
var bcSouth={
region: 'south',
id: 'oPreview',
split: true,
height: 200,
minSize: 100,
maxSize: 200,
collapsible: true,
title: 'Vorschau',
autoEl: {
tag: 'div',
html:''
}
};
var bcWest = {
region: 'west',
title: Ext.nd.Session.currentDatabase.title,
collapsible: true,
split: true,
width: 200,
minSize : 150,
maxSize : 400,
items : [Ext.apply({
id: 'xnd-outline-panel',
xtype: 'xnd-uioutline',
border : false,
target: 'xnd-center-panel',
viewTarget: 'xnd-grid-panel'
}, uiOutline)
]};
var bcCenter = {
region: 'center',
id: 'xnd-center-panel',
xtype: 'tabpanel',
target: 'xnd-center-panel',
defaults : {
target : 'xnd-center-panel',
border : true
},
enableTabScroll: true,
activeTab: 0,
items: [Ext.apply({
id: 'xnd-grid-panel',
layout: 'fit',
xtype: 'xnd-uiview',
target: 'xnd-center-panel',
closable: false
}, uiView)
]};
Ext.onReady(function() {
var viewport = new Ext.Viewport({
layout: 'border',
items: [bcNorth,bcSouth,bcWest,bcCenter]
});
})