PDA

View Full Version : [CLOSED] ext:HtmlEditor in ext:Window



haltenberg
Jul 24, 2008, 4:29 PM
I have the following mark-up code:

<asp:UpdatePanel ID="upWinPanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<ext:Window ID="EditorWindow" runat="server" Title="<%$ Resources:LanguageFile, Note %>" MinHeight="600" MinWidth="800" Closable="True" Show&#111;nload="false" CloseAction="Hide" Maximizable="true" Modal="True" Icon="PageWhiteEdit">
<Content>
<ext:AnchorLayout ID="alWin" runat="server">
<ext:Anchor>
<ext:Panel ID="pnlWinMsg" runat="server" Height="0" AutoHeight="true" BodyStyle="background-color:#e4e4e4;" Border="False" AutoScroll="True" BodyBorder="False" Header="True" HideBorders="True">
<Content>
<asp:Label ID="lblErrorMsg" runat="server" CssClass="red" />
</Content>
</ext:Anchor>
<ext:Anchor>
<ext:FieldSet ID="fldsetEditorEmail" runat="server" Icon="EmailGo" Title="<%$ Resources:LanguageFile, SendByEmail %>" Collapsible="True" TitleCollapse="True" Cls="AssignmentFieldset" Collapsed="true" StyleSpec="margin:5px;" Height="135">
<Listeners>
<Collapse Handler="Ext.getCmp('btnSendEmail').hide();" />
<Expand Handler="Ext.getCmp('btnSendEmail').show();" />
</Listeners>
<Content>
... some textboxes with labels here ...
</Content>
</ext:FieldSet>
</ext:Anchor>
<ext:Anchor Horizontal="100%" Vertical="100%">
<ext:HtmlEditor ID="HtmlEditor" runat="server">
</ext:Anchor>
</ext:AnchorLayout>
</Content>
<Buttons>
<ext:Button ID="btnSendEmail" runat="server" Icon="EmailGo" AutoPostBack="false" Text="<%$ Resources:LanguageFile, EmailSend %>" OnClientClick="&#100;ocument.getElementById('hbtnEmail').click();" />
<ext:Button ID="btnSave" runat="server" Icon="Disk" AutoPostBack="false" Text="<%$ Resources:LanguageFile, Save %>" OnClientClick="&#100;ocument.getElementById('hbtnSave').click();" />
<ext:Button ID="btnNoteCancel" runat="server" Icon="Cancel" AutoPostBack="false" Text="<%$ Resources:LanguageFile, Cancel %>" OnClientClick="Editorwindow.hide();" />
</Buttons>
</ext:Window>
</ContentTemplate>
</asp:UpdatePanel>

Two issues that I have with this:

1. This works perfeclty well and as expected when the window is displayed and HtmlEditor content is populated or empty. The fieldset collapses/expands and HtmlEditor's size is changed respectively to fit all the controls inside the window. However, when I start typing in the editor and when I reach the visible bottom of the entry field, the editor grows and occupies 100% of window height, making the fieldset above the editor disappear (scroll beyond visible boundaries of the window, no scrollbars displayed). This does not happen in FireFox, but happens in IE7. Is there any way to prevent editor from "growing" its height?

2. As you might see from the markup code above, the window is not shown on page load, and the fieldset in the window is collapsed by default. When I load the page, for about 1 second I see the fieldset content labels/texboxes on the page, which then disappear. I guess Ext rebuilds dom? When window is displayed, fieldset is collapsed as expected and behaves appropriately. Is there any way to prevent this "flicker" on page load?

Thank you!

Vladimir
Jul 24, 2008, 5:22 PM
Hi haltenberg,

Quick response to the second paragraph
Please see http://forums.ext.net/showthread.php?threadid=952-4-1.aspx (may be it can help you)

haltenberg
Jul 24, 2008, 5:41 PM
Hi Vladimir,

Thanks for your comment. Actually, I have seen the post you mention and even tried to use the code. Frankly speaking, I would like to avoid the things that post suggests: loading indicators with delay of 250ms.

I wonder if that is a known problem with Fieldset control in Ext or does Coolite have something to do with this somehow?

Vladimir
Jul 25, 2008, 3:17 AM
Hi haltenberg,

You misunderstood code (or I misunderstood your response,If so sorry)
The code doing next: indicator showing until DocumentReady event will be fire. The 250 sec delay was added just for ensure. You can remove it. So, loading indicator start showing when page loading and when DocumentReady fired (it's mean all markup loaded) then indicator hide

P.S. Forgot to mention why this occurs: this occurs because ntml markup was loaded (and browser showing it) but ExtJS startup (DocumentReady) scripts doesn't execute yet. Therefore, loading indicator begins immediately and until the script executed (that is, showing
the indicator is based on events and not on temporary delays)

geoffrey.mcgill
Jul 25, 2008, 3:57 AM
Hi haltenberg + Vladimir,

I think the problem with the flicker has to do with something else. I don't think the proper css class is being applied to the content on initial page_load. Although I also think this might have been fixed within the latest code. I just haven't had a chance to run a test. I should be able to provide a temp work-around until the v0.6 release is available. The flicker should not occur, and you should not require the initial page load mask.

Re: the Anchor/HtmlEditor stretching 100%, I have yet to run the sample code you provided.

haltenberg
Aug 05, 2008, 4:18 PM
Hi Geoffrey,

Can you please confirm that fieldset flicker will be fixed in 0.6?

Also, did you have a chance to look at HtmlEditor stretching issue?

Thanks!

geoffrey.mcgill
Aug 05, 2008, 8:43 PM
Hi haltenberg,

I've run a bunch of tests re: the page load "flicker" issue you experienced and can not reproduce in v0.6 using the code you provided. I specifically remember fixing what I think would have been causing the problem. Although... that was a while back and thinking about it now I would have thought that fix made it into one of the v0.5.x releases.

Which version of the Toolkit are you using?

I've reproduced the HtmlEditor stretching issue and I'm actively investigating a fix/workaround.

haltenberg
Aug 05, 2008, 10:28 PM
Hi Geoffrey,

Thank you for your reply!
I'm using 0.5.4 and I see the fieldset "flicker" 90% of the time. I also remember you saying you fixed it, but you never mentioned when :-) If this helps: I first discovered the problem while running 0.5.4 and you said it should be fixed in the next release... Is there any way to get a latest beta for testing to see if the "flicker" is gone?

PS. I sometimes have to use "hacks" for correct width, etc., so I have a WindowResize listener for the script manager, as well as few similar size adjusters. Could they contribute to fieldset flicker issue? (the "hacks" do not touch fieldsets -- mostly tabpanels)

Thank you!

haltenberg
Aug 06, 2008, 12:40 PM
Geoffrey,

Maybe this helps: fieldset "flicker" occurrs mostly on pages where a tabpanel is present.

Thanks!

geoffrey.mcgill
Aug 06, 2008, 2:18 PM
I can't reproduce the flicker with the current code base, but I know exactly what you're talking about. Maybe there's something obvious that I'm missing.

If the problem exists after the v0.6 Beta-1 release and you post a sample demonstrating how you're able to reproduce (including browser version), it will be the first thing we fix.

haltenberg
Aug 06, 2008, 2:53 PM
Thank you, Geoffrey!
Is there an approximate date of '0.6-anything' availability?

geoffrey.mcgill
Sep 07, 2008, 7:42 AM
The following thread has been the main discussion area for the upcoming v0.6 release, see http://forums.ext.net/showthread.php?threadid=1224-7-1.aspx