PDA

View Full Version : [DEFER-1088]preventBodyReset has no effect on Windows



Animal
29 Jun 2010, 4:49 AM
Since a Window is a Panel, logically, the preventBodyReset config should be available and work for Window.

But it doesn't.

Drop this into examples/<anywhere>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all.js"></script>
<script language="javascript">
Ext.onReady(function() {
new Ext.Window({
title: 'Contents are reset',
preventBodyeset: true,
height: 400,
width: 600,
html: '<p>Para1</p><p>Para 2</p><ul><li>List item 1</li><li>List item 2</li></ul>'
}).show();
});
</script>
<body>
</body>
</html>


The classes which apply recommended styling use the "x-panel" base CSS class for the selectors.

There a a few ways round this, so I'll leave it up to the dev team to select the best.

The reason its needed is that sometimes you want to display "decorative" HTML that is not part of an Ext widget. eg, a help or instructional Window, or splash screen or login screen.

Here you see my login Window and the help Window both contain "decorative" HTML:

http://i131.photobucket.com/albums/p286/TimeTrialAnimal/loggingIn.jpg

(I used a workaround of adding "x-panel-reset x-panel-noborder" to the Window's outer el, and "x-panel-body x-panel-body-noborder" to the body to get that help popup styled!)

Animal
30 Jun 2010, 2:56 AM
Same goes for FieldSets which are also Panels.

My boss calls FieldSets "containers" bless him. He likes the way they look (I've used CSS border-radius to make them look kewl on modern browsers). He often wants to post decorative HTML in ... "containers":

http://i131.photobucket.com/albums/p286/TimeTrialAnimal/fieldset-not-reset.jpg

evant
30 Jun 2010, 3:05 AM
I'd prefer to genericize it, instead of adding x-panel-foo, it would just add something like x-content-reset or something of that nature.

Animal
30 Jun 2010, 3:33 AM
Yes, that would be best.

evant
30 Jun 2010, 3:44 AM
In fact, now that the html option has been moved up to component, it should really be applicable there as well. But then it messes with the name "preventBodyReset" etc. So the full solution might need to wait til 4.0.