Hi,
Before to implement something i have a question to ask abour my architecture.
Indeed, i wanna know if i can declare an object for my titlebar :
Code:
var topbar = Ext.create('Ext.Panel',{
fullscreen: true,
styleHtmlContent: true,
items: [{
xtype: 'titlebar',
docked: 'top',
title: 'Panel title',
items: [{
xtype: 'button',
align: 'left',
iconCls: 'arrow_left',
iconMask: true,
ui: 'plain',
handler: function () {
Ext.Msg.alert('You clicked the left button');
} // handler
}, {
xtype: 'button',
align: 'right',
iconCls: 'arrow_right',
iconMask: true,
ui: 'plain',
handler: function () {
Ext.Msg.alert('You clicked the right button');
} // handler
}] // items
}, {
html: 'This is the body of the panel'
}] // items
});
Then use it as item of all the several view of my navigation's view :
Code:
var _liveview = Ext.create('Ext.navigation.View',
{
fullscreen: true,
items:
[
{
title : _strings_live[dmngConfig.device.LanguageID],
layout: 'card',
id : 'live_newliveprofile',
items :
[
topbar,
{
xtype: 'textfield',
id: 'live_newliveprofilename',
name: 'live_newliveprofilename',
label: _strings_live_name[dmngConfig.device.LanguageID],
labelAlign: 'left',
labelWidth: '45%',
value: '',
maxLength: 10,
allowBlank: false
},
]
}
]
});
Thus, i can factorize the topbar for all views and make it unique.
Is it possible ? can i inject the previous "topbar" object (previously defined) into the navigation's view as describe before ?
Thanks in advance of your reply.
Regards