PDA

View Full Version : How to display minimize.. buttons in Ext.Window without the use of css



PercyJackson
9 Nov 2012, 12:07 AM
How to display minimize,maximize,restore and close buttons in Ext.Window without the use of css. In Ext.Window initTools : function(){ if(this.minimizable){
this.addTool({
id: 'minimize',
handler: this.minimize.createDelegate(this, [])
});
}
if(this.maximizable){
this.addTool({
id: 'maximize',
handler: this.maximize.createDelegate(this, [])
});
this.addTool({
id: 'restore',
handler: this.restore.createDelegate(this, []),
hidden:true
});
}
if(this.closable){
this.addTool({
id: 'close',
handler: this[this.closeAction].createDelegate(this, [])
});
}
},

here the buttons are displayed based on css classes on the respective ids. but How to display these buttons without using css.
This is required as i am trying to make it 508 compliant. That is , buttons viewable when css are disabled.

redraid
9 Nov 2012, 1:40 AM
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.window.Window-cfg-maximizable
(http://docs.sencha.com/ext-js/4-1/#!/api/Ext.window.Window-cfg-maximizable)http://docs.sencha.com/ext-js/4-1/#!/api/Ext.window.Window-cfg-maximizable

Ext.onReady(function(){
Ext.create('Ext.window.Window', {
height: 300,
width: 300,
minimizable: true,
maximizable: true,
title: 'Test Minimize',
listeners: {
"minimize": function( window, opts ) {
window.collapse();
window.setWidth( 150 );
window.alignTo( Ext.getBody(), 'bl-bl')
}
},
tools: [
{
type: 'restore',
handler: function( evt,toolEl,owner,tool ) {
var window = owner.up( 'window' );
window.setWidth( 300 );
window.expand('',false);
window.center();
}
}
]

}).show()
});‚Äč

PercyJackson
9 Nov 2012, 4:13 AM
Hi,
Thank you, for the reply.
How would the page work when css are disabled in the browser?
How to display close,minimize,restore buttons viewable when css is disabled.
In IE, internet options --> accessibility --> check firsh 3 check boxes and apply.

redraid
9 Nov 2012, 4:41 AM
http://jsfiddle.net/3dGsD/1/

39946

PercyJackson
13 Nov 2012, 11:15 PM
when you de select the css class then it does not display