Skip to content

Instantly share code, notes, and snippets.

@haigopi
Last active April 25, 2020 22:11
Show Gist options
  • Save haigopi/f09466b3199d630c1588b0313dac6d8e to your computer and use it in GitHub Desktop.
Save haigopi/f09466b3199d630c1588b0313dac6d8e to your computer and use it in GitHub Desktop.
Center Tabs Creation
Ext.define("AlliBilli.view.main.center.Center", {
extend: "Ext.tab.Panel",
requires: ["Ext.ux.TabReorderer"],
xtype: "reorderable-tabs",
region: "center",
activeTab: 0,
width: "100%",
header: false,
plugins: {
tabreorderer: true,
},
defaults: {
bodyPadding: 10,
scrollable: true,
closable: true,
},
items: [
{
title: "Think Special",
iconCls: 'fas fa-cat',
html:
"The tabs in this example are reorderable. Drag any tab to change the order.",
reorderable: false,
closable: false
},
{
title: "Shout At Me",
reorderable: false,
iconCls: 'far fa-clock',
closable: false
},
{
title: "Tab 3",
},
{
title: "Non Reorderable",
html: "I can't be moved",
reorderable: true
},
{
title: "Tab 4",
reorderable: true
},
],
dockedItems: {
dock: "bottom",
xtype: "toolbar",
items: [
{
text: "Add a Tab",
glyph: 43,
listeners: {
click: "onAddTabClick",
},
},
],
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment