Skip to content

Instantly share code, notes, and snippets.

@dave-jay
Created June 30, 2014 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dave-jay/773d2deee1d56f82faba to your computer and use it in GitHub Desktop.
Save dave-jay/773d2deee1d56f82faba to your computer and use it in GitHub Desktop.
MainPanel = function(){
this.preview = new Ext.Panel({
id: 'myPanel',
region: 'south',
cls:'preview',
tbar: [{
id:'tab',
text: 'Register New User',
iconCls: 'new-tab',
disabled:true,
handler : this.openTab,
scope: this
},
'->',
{
id:'login',
text: 'Do Login',
iconCls: 'user',
disabled:true,
scope: this
}],
});
this.grid = new FeedGrid(this, {
tbar:[{
text:'Open All',
tooltip: {title:'Open All',text:'Opens all item in tabs'},
iconCls: 'tabs',
handler: this.openAll,
scope:this
},
'-',
{
split:true,
text:'Reading Pane',
tooltip: {title:'Reading Pane',text:'Show, move or hide the Reading Pane'},
iconCls: 'preview-bottom',
handler: this.movePreview.createDelegate(this, []),
menu:{
id:'reading-menu',
cls:'reading-menu',
width:100,
items: [{
text:'Bottom',
checked:true,
group:'rp-group',
checkHandler:this.movePreview,
scope:this,
iconCls:'preview-bottom'
},{
text:'Right',
checked:false,
group:'rp-group',
checkHandler:this.movePreview,
scope:this,
iconCls:'preview-right'
},{
text:'Hide',
checked:false,
group:'rp-group',
checkHandler:this.movePreview,
scope:this,
iconCls:'preview-hide'
}]
}
},
'-',
{
pressed: true,
enableToggle:true,
text:'Summary',
tooltip: {title:'Post Summary',text:'View a short summary of each item in the list'},
iconCls: 'summary',
scope:this,
toggleHandler: function(btn, pressed){
this.grid.togglePreview(pressed);
}
}]
});
};
Ext.reg('appmainpanel', MainPanel);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment