PDA

View Full Version : Button on paging toolbar removes BasicDialog animation



DrZog
6 Apr 2007, 10:34 AM
I've added a button onto the paging toolbar that brings up a BasicDialog when clicked. Everything works except the cool dialog render animation that one sees on the examples.


The code to add the button to the paging toolbar is:


var btnNewclient = Ext.get(paging.addDom({
tag: 'input'
, type: 'button'
, size: '10'
, value: 'New client'
}).el);

btnNewclient.on('click', NewTrademark.NewClient);

and the event handler to render it is:


NewClient: function(){

if(!dlgNewclient){
dlgNewclient = new Ext.BasicDialog("dlgNewclient", {
title: 'Create a new client',
autoTabs: true,
modal: true,
resizable: false,
width:600,
height:425,
shadow:true

});

dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Create', dialog.hide, dialog);
dialog.addButton('Cancel', dialog.hide, dialog);
}

dlgNewclient.show(myGrid.btnNewclient);

},


Is this a bug, or am I missing something?

mikegiddens
6 Apr 2007, 11:00 AM
I think you are asking about the

animateTarget: null, // (no animation) This is the id or element to animate from

From the basicdialog config.
http://extjs.com/deploy/ext/docs/index.html

DrZog
6 Apr 2007, 11:36 AM
Cheers Mike, I hadn't explcity declared it before while testing in a single JS file, but now that I've split it over two I have too. Works great now, thanks again