PDA

View Full Version : [3.0.0/2.2] window show/hide breaks



jamoville
21 Jul 2009, 1:38 PM
I've included code for this in an attachment. This is ext 2.2 but also happens in 3.0

I've added an animation to the show button and modified the button to only hide and not close the window so the button acts as a toggle. If you click on the button quickly (three or four times) the window stays hidden and never comes back. This only happens in Firefox and doesn't happen in IE. If you remove the animation then the problem goes away. Can't figure this one out. Any help would be appreciated.

Thanks

jay@moduscreate.com
6 Aug 2009, 7:39 AM
Not opening any zip files - why not just include it inline??

That said, are you sure you're makeing the shadow hide?

I do this with no problem with my JSMag article.
http://tdg-i.com/162/a-quick-demo-of-my-js-magazine-article-writing-plugins-for-ext-js

jamoville
18 Aug 2009, 10:22 AM
Inline

HTML page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Hello World Window Example</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />

<!-- GC -->
<!-- LIBS -->
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<!-- ENDLIBS -->

<script type="text/javascript" src="../../ext-all.js"></script>

<script language="javascript" src="hello.js"></script>

<!-- Common Styles for the examples -->
<link rel="stylesheet" type="text/css" href="../shared/examples.css" />

<style type="text/css">
.x-panel-body p {
margin:10px;
font-size:12px;
}
</style>
</head>
<body>
<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES -->

<h1>Hello World Window</h1>
<p>This example shows how to create a very simple modal Window with "autoTabs" from existing markup.</p>
<input type="button" id="show-btn" value="Hello World" /><br /><br />
<p>Note that the js is not minified so it is readable. See <a href="hello.js">hello.js</a> for the full source code.</p>

<div id="hello-win" class="x-hidden">
<div class="x-window-header">Hello Dialog</div>
<div id="hello-tabs">
<!-- Auto create tab 1 -->
<div class="x-tab" title="Hello World 1">
<p>Hello...</p>
</div>
<!-- Auto create tab 2 -->
<div class="x-tab" title="Hello World 2">
<p>... World!</p>
</div>
</div>
</div>
</body>
</html>


JS PAGE

/*
* Ext JS Library 3.0 Pre-alpha
* Copyright(c) 2006-2008, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/

Ext.onReady(function(){
var win;
var button = Ext.get('show-btn');

button.on('click', function(){
// create the window on the first click and reuse on subsequent clicks
if(!win){
win = new Ext.Window({
el:'hello-win',
layout:'fit',
width:500,
height:300,
closeAction:'hide',
plain: true,

items: new Ext.TabPanel({
el: 'hello-tabs',
autoTabs:true,
activeTab:0,
deferredRender:false,
border:false
}),

buttons: [{
text:'Submit',
disabled:true
},{
text: 'Close',
handler: function(){
win.hide();
}
}]
});
}
if (win.isVisible()){
win.hide();
}
else
win.show(button);
});
});

tryanDLS
18 Aug 2009, 7:26 PM
http://extjs.com/learn/Ext_Forum_Help#How_to_post_code_properly

You're not still using a pre-release version of 3.0 are you?

jamoville
18 Aug 2009, 8:21 PM
why waste the time seems like no one can do simple cut and paste here so once again I'll just solve this on my own

evant
18 Aug 2009, 8:39 PM
The point Tim was making is that you're still using a pre-alpha version of 3.0, which is at least a few months old. The final version (3.0) has been released. Why don't you grab the latest version and try it with that? I just ran your test case against the SVN version and wasn't able to see any problem.

Animal
18 Aug 2009, 9:40 PM
why waste the time seems like no one can do simple cut and paste here so once again I'll just solve this on my own

Why should we waste our time?

jamoville
19 Aug 2009, 4:44 AM
As I've paid for support it would be nice for some feedback. As for the older version issue I'm sure you all are aware that there are production systems that can't simply upgrade to a major version.

Thanks

Animal
19 Aug 2009, 4:46 AM
99.9% of people looking here (including me) are not on the Ext payroll, but just turn up here when they have time to try to help out.

No formatting your code is just asking not to be helped.

jay@moduscreate.com
19 Aug 2009, 4:48 AM
I'm looking into this now Jamoville.

First thing: Don't use el and items.

jay@moduscreate.com
19 Aug 2009, 4:50 AM
The following (modified) Example works:


var button = new Ext.Button({
renderTo : Ext.getBody(),
text : 'window'
});
var win;
button.on('click', function () {

// create the window on the first click and reuse on subsequent clicks
if (!win) {
win = new Ext.Window({
layout: 'fit',
width: 500,
height: 300,
closeAction: 'hide',
plain: true,

items: new Ext.TabPanel({

//autoTabs: true,
activeTab: 0,
deferredRender: false,
border: false,
items : { title : 'blah', html : 'blah'}
}),

buttons: [{
text: 'Submit',
disabled: true
},
{
text: 'Close',
handler: function () {
win.hide();
}
}]
});
}
if (win.isVisible()) {
win.hide();
}
else win.show(button);
});

jay@moduscreate.com
19 Aug 2009, 4:50 AM
Also, be sure to use CODE tags in the future.

And if you want to get the support you paid for, you need to post in the premium forums :)

jay@moduscreate.com
19 Aug 2009, 5:12 AM
On more thing: if you have a support subscription, you can use the Online ticketing system:

http://support.extjs.com/login.php

tryanDLS
19 Aug 2009, 8:59 AM
As I've paid for support it would be nice for some feedback. As for the older version issue I'm sure you all are aware that there are production systems that can't simply upgrade to a major version.

Thanks
People here are more than happy to offer assistance, but you have help us help you, by at least posting code in the requested format.

I would say that you're asking for serious issues if you're using the pre-alpha code as opposed to the final release. Paid support or not, that code base isn't supported. There were significant changes from that to the final release and most people here offering assistance aren't going to have that version around to compare, much less be willing to spend time debugging it. It's pointless to spend dev resources on that considering how many issues were fixed.