PDA

View Full Version : How to use extJs plugin in my source code.



vinothbabu
12 Oct 2010, 9:45 PM
I am trying to use uxmedia plugin, how to use this plugin in my source code. If i want to use the plugin in this piece of code, then how to???


var graphPanel = new Ext.Panel({
stateful: false,
id: 'graphPanel',
activeItem:initGraphIdx,
title:text.graphs,
layout:'card',
layoutConfig : {
layoutOnCardChange:true,
deferredRender: true
},
forceLayout: true,
tbar: ['->', text.graphs,
new Ext.form.ComboBox({
triggerAction: 'all',
forceSelection:true,
mode: 'local',
id: 'combo-graph',
store: new Ext.data.ArrayStore({
fields: ['id','desc'],
data: [
[0, 'Days Since Last OSHA Recordable-Non Lost'],
[1, 'Days Since Last OSHA Recordable-Lost'],
[2, 'OSHA Recordables (last 12 months)'],
[3, 'Enterprise Compliance'],
[4, 'Compliance By Location'],
[5, 'Top 5 Encounter Types by Clinic (last 3 Months)'],
[6, 'Top 5 Encounters (last 12 months)']
]
}),
valueField: 'id',
displayField: 'desc',
value: initGraphIdx,
width:250,
listeners: {
select: function(cb, rec, id) {
var lt = graphPanel.getLayout();
if (!lt || !lt.setActiveItem) return;
lt.setActiveItem(rec.data.id);
}
}
})
],
defaults: {
bubbleEvents: ['add', 'remove', 'activate']
},
listeners: {
activate:function(grid){
var lt = this.getLayout();
var store = lt.store;
if (store && !store.lastOptions) {
// Load visible grid, if hasn't already loaded
lt.store.load();
debugger;

}
}
},
items: [daysSinceNON, daysSinceLOST, recordables, enterprise, location, encClinic, top5]
});

Condor
12 Oct 2010, 11:48 PM
Try this:

var nosize = new Ext.ux.plugin.VisibilityMode({hideMode: 'nosize'}) ;
var graphPanel = new Ext.Panel({
defaults: {plugins: nosize},
...
});

vinothbabu
13 Oct 2010, 12:31 AM
Thanks, the code worked but the issue still remains out there. Should i do something more.

Condor
13 Oct 2010, 1:43 AM
I've run out of ideas.

Could you create a stand-alone testcase and post it to the Bugs section?