Ext js 7 modern panel.Resizer Splitter Config - extjs

I have a panel.Resizer Layout like this:
https://examples.sencha.com/extjs/7.3.0/examples/kitchensink/?modern#panel-splitresize
Now I'm trien to config the splitter, I found this classic docs:
https://docs.sencha.com/extjs/7.0.0/classic/Ext.resizer.Splitter.html#cfg-collapseOnDblClick
But I can't find collapseOnDblClick nor collapsible on modern docs. Is there a way to achive a similar behaviour so resizer and collapser is combined?
And how do I change resizer size (width)?

You can override the 'Ext.panel.Resizer' to add this feature. Something like:
Ext.define('override.panel.Resizer', {
override: 'Ext.panel.Resizer',
privates: {
onTargetCollapse: function () {
var me = this,
map = me.edgeMap,
key;
me.disabled = true;
me.dragListeners = Ext.destroy(me.dragListeners);
me.setupCollapsedDragListeners();
for (key in map) {
map[key].addCls(me.disabledCls);
}
},
onTargetExpand: function () {
var me = this,
map = me.edgeMap,
key;
me.disabled = false;
me.setupDragListeners();
for (key in map) {
map[key].removeCls(me.disabledCls);
}
},
setupDragListeners: function () {
var me = this,
delegate = me.edgeDelegateSelector;
me.dragListeners = me.getTarget().element.on({
scope: me,
destroyable: true,
delegate: delegate,
dragstart: {
// Higher priority so that we run before any draggable component handlers.
priority: 1000,
delegate: delegate,
fn: 'handleDragStart'
},
drag: 'handleDrag',
dragend: 'handleDragEnd',
dragcancel: 'handleDragCancel',
touchstart: 'handleTouchStart',
doubletap: 'handleDoubleTap'
});
},
setupCollapsedDragListeners: function () {
var me = this,
delegate = me.edgeDelegateSelector;
me.dragListeners = me.getTarget().element.on({
scope: me,
destroyable: true,
delegate: delegate,
doubletap: 'handleDoubleTap'
});
}
},
handleDoubleTap: function () {
if (!this.getTarget()._collapsible) {
return;
}
if (this.getTarget().collapsed) {
this.getTarget().expand();
} else {
this.getTarget().collapse();
}
}
});
Ext.define('KitchenSink.view.panels.SplitResizable', {
extend: 'Ext.container.Container',
xtype: 'panel-splitresize',
requires: [
'Ext.panel.Resizer',
'Ext.Toolbar'
],
layout: {
type: 'vbox',
align: 'stretch'
},
defaultType: 'panel',
items: [{
title: 'Dock Left',
docked: 'left',
minWidth: 200,
collapsible: 'left',
resizable: {
split: true,
edges: 'east'
},
html: "Content"
}, {
title: 'Dock Right',
docked: 'right',
minWidth: 200,
resizable: {
split: true,
edges: 'west'
}
}, {
title: 'Dock Top',
docked: 'top',
minHeight: 150,
resizable: {
split: true,
edges: 'south'
}
}, {
title: 'Unresizable region',
flex: 1
}, {
title: 'Dock Bottom',
docked: 'bottom',
minHeight: 150,
resizable: {
split: true,
edges: 'north'
}
}]
});
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('KitchenSink.view.panels.SplitResizable', {
renderTo: Ext.getBody(),
fullscreen: true
})
}
});

Related

Disable tbar button based on grid data extjs 6.2

Conditionally i need to disable the toolbar button based on the grid json data, if status not "New"
tbarItems.push(
"->",
{
text: t('import'),
id: 'masterdata_import',
iconCls: 'pimcore_icon_import',
disabled: false,
scale: 'small',
handler: this.importJob.bind(this),
dataIndex: 'status',
renderer: function (value, rowIndex, record) {
if (value !== 'New') {
tbar.disable();
}
},
}
);
https://i.stack.imgur.com/8hVmN.png
Any idea how to do this?
Thanks
i made an example at sencha fiddle. Take a look:
https://fiddle.sencha.com/#view/editor&fiddle/2qs3
You can bind disabled parameter to parameter from viewModel, while viewModel can be updated e.g when data in store changed (event datachanged is fired).
getLayout: function () {
if (this.layout == null) {
var itemsPerPage = pimcore.helpers.grid.getDefaultPageSize(70);
this.store = pimcore.helpers.grid.buildDefaultStore(
'/admin/referenceapp/import/get-import-files?processed=0',
['date','time','sourceFileLocation','sizeReadable','status','jobReference'],
itemsPerPage,
{autoLoad: true}
);
// only when used in element context
if(this.inElementContext) {
var proxy = this.store.getProxy();
proxy.extraParams["folderDate"] = this.element.folderDate;
} else {
}
this.pagingtoolbar = pimcore.helpers.grid.buildDefaultPagingToolbar(this.store);
var tbarItems = [];
tbarItems.push(
"->",
{
text: t('import'),
id: 'masterdata_import',
iconCls: 'pimcore_icon_import',
//disabled: false,
scale: 'small',
bind: {
disabled: "{one_different_than_new}"
},
handler: this.importJob.bind(this)
}
);
var tbar = Ext.create('Ext.Toolbar', {
cls: 'main-toolbar',
items: tbarItems
});
var columns = [
{text: t("date"), sortable: true, dataIndex: 'date', flex: 100, filter: 'date'},
{text: t("time"), sortable: true, dataIndex: 'time', flex: 100, filter: 'string'},
{text: t("source_file_location"), sortable: true, dataIndex: 'sourceFileLocation', filter: 'string', flex: 200},
{text: t("size"), sortable: true, dataIndex: 'sizeReadable', filter: 'string', flex: 200},
{text: t("status"), sortable: true, dataIndex: 'status', filter: 'string', flex: 200},
{text: t("jobReference"), sortable: true, dataIndex: 'jobReference', filter: 'string', flex: 200},
];
columns.push({
xtype: 'actioncolumn',
menuText: t('delete'),
width: 40,
dataIndex: 'status',
renderer: function (value, rowIndex, record) {
if (value !== 'New') {
rowIndex.tdCls = 'importnotdelete'
}
},
disabled:false,
items: [{
tooltip: t('icon_delete_import'),
icon: "/bundles/pimcoreadmin/img/flat-color-icons/delete.svg",
handler: this.removeVersion.bind(this)
}]
});
var plugins = [];
this.grid = new Ext.grid.GridPanel({
frame: false,
title: t('plugin_referenceapp_masterdataname_importview'),
store: this.store,
region: "center",
columns: columns,
columnLines: true,
bbar: Ext.create('Ext.PagingToolbar', {
pageSize: 0,
store: this.store,
displayInfo: true,
limit:0
}),
tbar: tbar,
stripeRows: true,
autoScroll: true,
plugins: plugins,
viewConfig: {
forceFit: true
},
viewModel: {
data: {
"one_different_than_new": false
}
},
//listeners: {
// afterrender : function(model) {
// console.log(model.store.data.items);
//
// for(i = 0; i<model.store.data.items.length; i++){
//
// if (model.store.data.items[i].status !== 'New') {
// tbar.disable();
// //console.log('test');
// }
//
// else{
// //console.log('no new');
// }
// }
//
// }
//}
});
this.grid.on("rowclick", this.showDetail.bind(this));
this.detailView = new Ext.Panel({
region: "east",
minWidth: 350,
width: 350,
split: true,
layout: "fit"
});
var layoutConf = {
items: [this.grid, this.detailView],
layout: "border",
//closable: !this.inElementContext
};
if(!this.inElementContext) {
//layoutConf["title"] = t('product_versions');
}
this.layout = new Ext.Panel(layoutConf);
this.layout.on("activate", function () {
this.store.load();
var check = function () {
var isDifferentThanNew = false;
this.store.each(function (r) {
if (r.get('status') != 'New') {
isDifferentThanNew = true;
}
});
this.grid.getViewModel().set('one_different_than_new', isDifferentThanNew);
}
// Listen on datachanged and update
this.store.on('update', function (s) {
check();
});
this.store.on('datachanged', function (s) {
check();
});
check();
}.bind(this));
}
return this.layout;
},

extjs grid column renderer not calling

cannot find answer (
Ext.define('Cabinet.view.main.Main', {
extend: 'Ext.Container',
...
items: [
{
xtype: 'toolbar',
docked: 'top',
title: 'Sliding Menu',
items: [
{
xtype: 'button',
id: 'listButton',
iconCls: 'x-fa fa-bars',//list //x-fa fa-mortar-board
ui: 'plain',
listeners : {
tap: 'OnToggle'
}
}
]
},
{
xtype: 'container',
flex: 1,
itemId: 'contentPanel',
reference: 'mainCardPanel',
scrollable: 'y',
layoutConfig:{layoutOnCardChange:true},
layout: {
type: 'card',
anchor: '100%'
}
}
],
,
initialize: function(){
Ext.Viewport.setMenu(this.createMenu(),{
side: 'left',
reveal: true
});
this.callParent();
},
createMenu: function(){
var menu = Ext.create('Ext.Menu', {
width: 250,
defaultListenerScope: true,
scrollable: 'vertical',
controller: 'main',
ViewModel :
{
},
items: [
{
xtype: 'button',
text: 'asd',
viewName: 'acadPerf',
controller: 'main',
listeners : {
tap: function ()
{
if (Ext.Viewport.down('#contentPanel').getActiveItem() != 0) {
Ext.Viewport.down('#contentPanel').getActiveItem().destroy();
}
newView = Ext.create({xtype: this.viewName});
Ext.suspendLayouts();
Ext.Viewport.down('#contentPanel').setActiveItem(newView);
Ext.resumeLayouts(true);
load store
Ext.define('Cabinet.view.charts.acadPerf', {
extend: 'Ext.container.Container',
xtype: 'acadPerf',
viewModel: {
// type: 'charts'
},
layout: 'fit', //responsivecolumn
defaults: {
defaults: {
animation : !Ext.isIE9m && Ext.os.is.Desktop
}
},
listeners: {
render: function () {
this.down('grid').getStore().reload();
}
},
items: [
{
xtype: 'panel',
cls: 'faq-left-sidebar shadow',
header: false,
ui: 'light',
layout: 'fit',
responsiveConfig: {
'width < 1000': {
width: 0,
visible: false
},
'width >= 1000 && width < 1600': {
width: 230,
visible: true
},
'width >= 1600': {
width: 300,
visible: true
}
},
items: [
{
xtype:'grid',
reference: 'mainCardPanel',
store: 'acadPerfStore',
hideHeaders: true,
columns: [
{
text: 'asd',
xtype: 'gridcolumn',
flex: 1,
dataIndex: 'CONTROL_FORM',
cell: {
encodeHtml: false
},
renderer: 'renderTitleColumnAcademPerf'
},
]
}
]
}
],
...
when i at first time click to show menu and then tap on first button - all ok.
renderer work. I see all records.
but when i click once again to show menu and click on first button - i see only content of one record from store. but the size of verical scroll of grid is like all records rendered. in html i see only one record.
What's wrong?

Routing Extjs deeper navigation

I'm writing a Extjs app in the 6.2.0 version, I’ve got a routing situation.
My problem is when we enter on the NavigateDeep if I enter the Url ok it catches but it doesn’t render.
I define the routes on the main Controller like:
Ext.define('App.view.main.MainController', {
extend: 'Ext.app.ViewController',
alias: 'controller.main',
listen : {
controller : {
'*' : {
unmatchedroute : 'onRouteChange1',
changeroute: 'changeRoute'
}
}
},
routes: {
':node': 'onNavigate',
':node/:id' : 'onNavigateDeep',
':node/:id/:tabid' : 'onNavigateDeepTab'
},
lastView: null,
onRouteChange1: function(){
console.log("hier unmatched route");
},
setCurrentView: function(hashTag) {
hashTag = (hashTag || '').toLowerCase();
console.log("hash:" + hashTag);
var me = this,
refs = me.getReferences(),
mainCard = refs.mainCardPanel,
mainLayout = mainCard.getLayout(),
navigationList = refs.navigationTreeList,
store = navigationList.getStore(),
node = store.findNode('routeId', hashTag) ||
store.findNode('viewType', hashTag),
view = (node && node.get('viewType')) || 'page404',
lastView = me.lastView,
existingItem = mainCard.child('component[routeId=' + hashTag + ']'),
newView;
// Kill any previously routed window
if (lastView && lastView.isWindow) {
lastView.destroy();
}
lastView = mainLayout.getActiveItem();
if (!existingItem) {
newView = Ext.create({
xtype: view,
routeId: hashTag, // for existingItem search later
hideMode: 'offsets'
});
}
if (!newView || !newView.isWindow) {
// !newView means we have an existing view, but if the newView isWindow
// we don't add it to the card layout.
if (existingItem) {
// We don't have a newView, so activate the existing view.
if (existingItem !== lastView) {
mainLayout.setActiveItem(existingItem);
}
newView = existingItem;
}
else {
// newView is set (did not exist already), so add it and make it the
// activeItem.
Ext.suspendLayouts();
mainLayout.setActiveItem(mainCard.add(newView));
Ext.resumeLayouts(true);
}
}
navigationList.setSelection(node);
if (newView.isFocusable(true)) {
newView.focus();
}
me.lastView = newView;
},
onNavigationTreeSelectionChange: function (tree, node) {
var to = node && (node.get('routeId') || node.get('viewType'));
if (to) {
console.log("to;:" + to);
this.redirectTo(to);
}
},
onToggleNavigationSize: function () {
var me = this,
refs = me.getReferences(),
navigationList = refs.navigationTreeList,
wrapContainer = refs.mainContainerWrap,
collapsing = !navigationList.getMicro(),
new_width = collapsing ? 64 : 250;
if (Ext.isIE9m || !Ext.os.is.Desktop) {
Ext.suspendLayouts();
refs.logo.setWidth(new_width);
navigationList.setWidth(new_width);
navigationList.setMicro(collapsing);
Ext.resumeLayouts(); // do not flush the layout here...
// No animation for IE9 or lower...
wrapContainer.layout.animatePolicy = wrapContainer.layout.animate = null;
wrapContainer.updateLayout(); // ... since this will flush them
}
else {
if (!collapsing) {
// If we are leaving micro mode (expanding), we do that first so that the
// text of the items in the navlist will be revealed by the animation.
navigationList.setMicro(false);
}
// Start this layout first since it does not require a layout
refs.logo.animate({dynamic: true, to: {width: new_width}});
// Directly adjust the width config and then run the main wrap container layout
// as the root layout (it and its chidren). This will cause the adjusted size to
// be flushed to the element and animate to that new size.
navigationList.width = new_width;
wrapContainer.updateLayout({isRoot: true});
navigationList.el.addCls('nav-tree-animating');
// We need to switch to micro mode on the navlist *after* the animation (this
// allows the "sweep" to leave the item text in place until it is no longer
// visible.
if (collapsing) {
navigationList.on({
afterlayoutanimation: function () {
navigationList.setMicro(true);
navigationList.el.removeCls('nav-tree-animating');
},
single: true
});
}
}
},
onMainViewRender:function() {
if (!window.location.hash) {
this.redirectTo("dashboard");
}
},
changeRoute: function(controller,route){
this.redirectTo(route,true);
console.log("change route fired");
},
onClickLogoutButton: function () {
// Remove the localStorage key/value
localStorage.removeItem('LoggedIn');
// Remove Main View
this.getView().destroy();
// Add the Login Window
Ext.create({
xtype: 'login'
});
},
onClickShareButton: function(){
var text = window.location;
window.prompt("Copy to clipboard:", text);
},
onNavigate:function(node){
console.log("on route change");
this.setCurrentView(node);
},
onNavigateDeep: function (node, id) {
console.log("Tab");
console.log(node + '/' + id);
var route = node+'/'+id;
this.setCurrentView(route);
},
onNavigateDeepTab: function (node, id, tabid) {
console.log("navigate Tab");
}
});
My main view is:
Ext.define('App.view.main.Main', {
extend: 'Ext.container.Viewport',
xtype: 'app-main',
requires: [
'App.view.Dashboard',
'App.view.immo.List',
'App.view.settings.Settings',
'App.view.news.News',
'App.view.help.Help'
],
controller: 'main',
viewModel: 'main',
cls: 'sencha-dash-viewport',
itemId: 'mainView',
layout: {
type: 'vbox',
align: 'stretch'
},
listeners: {
render: 'onMainViewRender'
},
items: [{
xtype: 'toolbar',
cls: 'dash-dash-headerbar shadow',
height: 64,
itemId: 'headerBar',
items: [{
xtype: 'component',
reference: 'logo',
cls: 'logo',
html: '<div class="main-logo"><img src="resources/images/logo.png">App</div>',
width: 250
}, {
margin: '0 0 0 8',
ui: 'header',
iconCls:'x-fa fa-navicon',
id: 'main-navigation-btn',
handler: 'onToggleNavigationSize',
tooltip: 'Navigation umschalten'
},
'->',
{
xtype: 'button',
ui: 'header',
iconCls: 'x-fa fa-share-alt',
handler: 'onClickShareButton',
tooltip: 'Share'
},
{
iconCls:'x-fa fa-question',
ui: 'header',
href: '#help',
hrefTarget: '_self',
tooltip: 'Hilfe'
}, {
iconCls:'x-fa fa-th-large',
ui: 'header',
href: '#Dashboard',
hrefTarget: '_self',
tooltip: 'Zum Dashboard'
}, {
xtype: 'button',
ui: 'header',
iconCls: 'x-fa fa-power-off',
handler: 'onClickLogoutButton',
tooltip: 'Logout'
}]
}, {
xtype: 'maincontainerwrap',
id: 'main-view-detail-wrap',
reference: 'mainContainerWrap',
flex: 1,
items: [{
xtype: 'treelist',
reference: 'navigationTreeList',
itemId: 'navigationTreeList',
ui: 'navigation',
store: 'NavigationTree',
width: 250,
expanderFirst: false,
expanderOnly: false,
listeners: {
selectionchange: 'onNavigationTreeSelectionChange'
}
}, {
xtype: 'container',
flex: 1,
reference: 'mainCardPanel',
cls: 'sencha-dash-right-main-container',
itemId: 'contentPanel',
layout: {
type: 'card',
anchor: '100%'
}
}]
}]
});
When we click on the tree I change the container but one of them has the route if the :id where I have a Tab:
Ext.define('App.view.settings.Settings',{
extend: 'Ext.tab.Panel',
xtype: 'settings',
itemId:'settings',
requires: [
'App.view.settings.SettingsController',
'App.view.settings.SettingsModel',
'App.view.settings.property.Property',
'App.view.settings.user.User'
],
controller: 'settings-settings',
viewModel: {
type: 'settings-settings'
},
reference: 'tab',
tabPosition: 'left',
tabBar:{
flex: 1,
tabRotation: 0,
tabStretchMax: true,
cls: 'immoNavi'
},
layout: 'Container',
defaults: {
padding: 0,
textAlign: 'left'
},
listeners: {
tabchange: 'onTabChange'
},
items: [{
xtype: 'component',
tabConfig:{
hidden: true
}
},{
title: 'Property',
itemId: 'property',
xtype: 'property',
cls: 'container'
},{
title: 'User',
itemId: 'user',
xtype: 'user'
}]
});
I went through the documentation but didn't find any tip that might help me with it. What am I missing here? Should I take care the rendering on the tab controller? Or How?
Thanks in advance for the help

get active tab on button click in extjs

I just want to get active tab on 'save' button click in extjs code.
my code is given below:
Ext.require([
'Ext.tab.*',
'Ext.window.*',
'Ext.tip.*',
'Ext.layout.container.Border'
]);
Ext.define('WebCare.UI.RoleManagerAdminWindow', {
extend: 'Ext.window.Window',
id: 'rolemanageradminwindow',
modal: true,
title: 'Manage Role & Permission',
closable: true,
closeAction: 'hide',
width: 600,
height: 550,
minWidth: 700,
minHeight: 200,
layout: 'border',
bodyStyle: 'padding: 5px;',
listeners: {
show: function (sender, eOpts) {
var self = sender;
vent.trigger("WindowLoad");
}
},
items: [
{
id: 'rolemanageradmintab',
region: 'center',
xtype: 'tabpanel',
constructor: function (config) {
var self = this;
self.callParent(config);
},
items: [
{
xtype: 'rolemanagereditor',
id:'1'
},
{
xtype: 'agencyeditor',
id: '2'
}
],
listeners: {
'tabchange': function (tabPanel, tab) {
}
}
}
],
dockedItems: [
{
xtype: 'toolbar',
dock: 'bottom',
ui: 'footer',
defaults: { minWidth: 70 },
style: {
background: "#d6e3f3"//, "#d9ebff",
},
height: 40,
items: [
{ xtype: 'component', flex: 1 },
Ext.create('Ext.button.Button', {
height: 25,
text: 'Close',
disabled: false,
handler: function () {
this.up('.window').close();
}
}),
Ext.create('Ext.button.Button', {
height: 25,
text: 'Save',
disabled: false,
handler: function () {
}
})
]
}
]
});
A simple example to get the active tab in the tabpanel when you click Save button.
Ext.onReady(function() {
var tabPanel = Ext.create('Ext.tab.Panel', {
width: 300,
height: 200,
activeTab: 0,
items: [
{
title: 'Tab 1',
bodyPadding: 10,
html: 'A simple tab'
},
{
title: 'Tab 2',
html: 'Another one'
},
{
title: 'Tab 3',
html: 'Another one'
}
],
buttons: [
{
text: 'Save',
handler: function() {
var activeTab = tabPanel.getActiveTab();
alert("The active tab in the panel is " + activeTab.title);
}
}
],
renderTo: Ext.getBody()
});
});

how can i add spinner to tree column?

I have following code:
function selectClassWindow() {
classes = Ext.create('Ext.tree.Panel', {
store: Ext.create('Ext.data.TreeStore', {
autoLoad: true,
autoSync: true,
fields: ['id','name', 'description','cost'],
proxy: {
type: 'ajax',
api: {
read: '/otp/getClass/'
}
},
root: {
name: 'Name1',
id: 0,
expanded: true
},
listeners: {
load: function (tree, node, records) {
node.eachChild(function (childNode){
childNode.set('checked',false);
});
}
}
}),
border: false,
rootVisible: false,
useArrows: true,
hideHeaders: true,
height: window.MaxHeightWindows,
xtype: 'listTree',
columns: [
{
xtype: 'treecolumn',
text: 'Name2',
flex: 1,
sortable: true,
dataIndex: 'name'
},</code>
Want to add here!
{
xtype: 'customspinner',
fieldLabel: 'How Much Beer?',
step: 6
}
]
})
classes.on('itemdblclick', function() {
selectedNode = classes.getSelectionModel().getSelection()
if (selectedNode[0] && selectedNode[0].isLeaf()) {
selectedClass = selectedNode[0].data.id
selectWindow.close()
if((window.selectedNode[0].parentNode&&selectedNode[0].parentNode.data.name == 'Text1')||
(window.selectedNode[0].parentNode.parentNode&&selectedNode[0].parentNode.parentNode.data.name == 'Text1')||
(window.selectedNode[0].parentNode.parentNode.parentNode&&selectedNode[0].parentNode.parentNode.parentNode.data.name == 'Text1')){
selectReasonWindow()
}else{
Ext.Ajax.request({
url: '/defect/updateDeparture/'+rec.data.id,
params: {
class_id: selectedClass,
reason_id: 0
},
success: function(result,response) {
if (window.departureGrid) {
departureGrid.store.load()
}
if (window.departureFullList) {
departureFullList.store.load()
}
if(window.logs){
logs.setValue(result.responseText)
}
if (window.crashDepartureList) {
crashDepartureList.store.load()
}
}
})
}
}
})
emptyPanel = Ext.create('Ext.panel.Panel', {
border: false,
flex: 1,
items: [classes]
})
selectWindow = Ext.create('Ext.window.Window', {
title: 'Name3',
width: 750,
border: false,
layout: {
type: 'hbox',
},
resizable:false,
collapsible: false,
constrain: true,
modal:true,
plain:true,
items: [emptyPanel],
buttons: [{
text: 'Ok',
handler: function() {
selectedNode = classes.getSelectionModel().getSelection()
if (selectedNode[0] && selectedNode[0].isLeaf()) {
selectedClass = selectedNode[0].data.id
selectWindow.close()
if((window.selectedNode[0].parentNode&&selectedNode[0].parentNode.data.name == 'Text1')||
(window.selectedNode[0].parentNode.parentNode&&selectedNode[0].parentNode.parentNode.data.name == 'Text1')||
(window.selectedNode[0].parentNode.parentNode.parentNode&&selectedNode[0].parentNode.parentNode.parentNode.data.name == 'Text1')){
selectReasonWindow()
}else{
Ext.Ajax.request({
url: '/defect/updateDeparture/'+rec.data.id,
params: {
class_id: selectedClass,
reason_id: 0
},
success: function(result,response) {
if (window.departureGrid) {
departureGrid.store.load()
}
if (window.departureFullList) {
departureFullList.store.load()
}
if(window.logs){
logs.setValue(result.responseText)
}
if (window.crashDepartureList) {
crashDepartureList.store.load()
}
}
})
}
}
}
},{
text: 'Close',
handler: function() {selectWindow.close()}
}]
}).show();
}
and i want add column "customspinner" to Ext.tree.Panel, but i get Uncaught TypeError: Object [object Object] has no method 'setSortState'. What's wrong?
In finally need something like this
There are a couple of things that are getting in your way:
grids do not support components in the cells (yet), they will soon.
For now you can use http://skirtlesden.com/ux/component-column
Tree already has a loading mask that is triggered by default on node load.
If you just want to add a spinner somewhere in your page just follow the Loading Mask component docs. Essentially any dom element can be targeted with mask/unmask calls.

Resources