PDA

View Full Version : [CLOSED] All my Absolute Layouts appears that have the space between the fields changed



supera
Jan 24, 2012, 12:26 PM
After upgrade the ext.net to 2.x, my Absolute Layouts have the space between the fields changed...

1 - It seems that the position in X is greater than in version 1.x (yellow arrow)
2 - It seems that the position in Y is greater than in version 1.x (red arrow)
3 - The component fset is bigger .. but I do not know if it has changed the size or padding of fset Panel containing these objects. I've changed the Paggind for BodyPadding...

3757

I'm set new size and positions screen by screen... I am doing right or should try another approach? At the risk of having to redo this work in the next update?

Thanks for any help

supera
Jan 24, 2012, 12:28 PM
Follows the code of one of the windows, if help...



<ext:Window
ID="wndEmpresasSGE"
runat="server"
Icon="UserAdd"
Title="Cadastro de Empresas"
Width="700"
Height="550"
AutoShow="false"
Modal="true"
Resizable="false"
PaddingSummary="5px 5px 5px 5px"
Hidden="true"
ButtonAlign="Right"
Layout="FitLayout">
<Items>
<ext:Panel ID="Panel1" runat="server" Border="true" BodyPadding="3" Header="false">
<Items>
<ext:FieldSet runat="server" ID="fsInformacoesGerais" Title="Informações Gerais" Layout="AbsoluteLayout" Height="265px" PaddingSummary="5px 5px 5px 5px">
<Defaults>
<ext:Parameter Name="LabelAlign" Value="Top" Mode="Value" />
</Defaults>
<Items>
<ext:TextField runat="server" ID="txtNome" MaxLength="200" FieldLabel="Nome" X="5" Y="5" Width="310px" />
<ext:TextField runat="server" ID="txtNomeFantasia" MaxLength="100" FieldLabel="Nome fantasia" X="325" Y="5" Width="310px" />
<ext:TextField runat="server" ID="txtFone" FieldLabel="Telefone" MaxLength="12" X="5" Y="50" Width="205px" EnableKeyEvents="true">
<Listeners>
<KeyUp Fn="KeyUpHandler_Fone" />
</Listeners>
</ext:TextField>
<ext:TextField runat="server" ID="txtCelular" FieldLabel="Celular" MaxLength="12" X="220" Y="50" Width="205px" EnableKeyEvents="true">
<Listeners>
<KeyUp Fn="KeyUpHandler_Fone" />
</Listeners>
</ext:TextField>
<ext:TextField runat="server" ID="txtFax" FieldLabel="Fax" MaxLength="12" X="435" Y="50" Width="200px" EnableKeyEvents="true">
<Listeners>
<KeyUp Fn="KeyUpHandler_Fone" />
</Listeners>
</ext:TextField>
<ext:TextField runat="server" ID="txtEmail" FieldLabel="E-mail" MaxLength="200" X="5" Y="95" Width="205px" />
<ext:TextField runat="server" ID="txtEmailCobranca" FieldLabel="E-mail de cobrança" MaxLength="200" X="220" Y="95" Width="205px" />
<ext:TextField runat="server" ID="txtEmailExtras" FieldLabel="E-mail extras" X="435" Y="95" Width="200px" />
<ext:TextArea runat="server" ID="txtObs" FieldLabel="Observações" MaxLength="250" X="5" Y="140" Width="630" Height="80px" />
<ext:DisplayField runat="server" ID="dsMsg" X="5" Y="215" Width="630" StyleSpec="font-size:9px" text="Prezado associado: Os dados encaminhados acima podem interferir no êxito da cobrança dos títulos. Dessa forma, para um melhor resultado, faz-se necessário que estes dados nos levem até o seu inadimplente." />
</Items>
</ext:FieldSet>
<ext:FieldSet runat="server" ID="fsEndereco" Title="Endereço" Layout="AbsoluteLayout" Height="115px" PaddingSummary="5px 5px 5px 5px">
<Defaults>
<ext:Parameter Name="LabelAlign" Value="Top" Mode="Value" />
</Defaults>
<Items>
<ext:TriggerField runat="server" ID="txtCep" FieldLabel="Cep" MaxLength="10" X="5" Y="5" Width="120px" EnableKeyEvents="true">
<Triggers>
<ext:FieldTrigger Icon="Search" Tag="Search" />
</Triggers>
<Listeners>
<KeyUp Fn="KeyUpHandler_CEP" />
</Listeners>
<DirectEvents>
<TriggerClick OnEvent="TriggerClick_Cep">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{wndEmpresasSGE}.body}" />
</TriggerClick>
<Blur OnEvent="TriggerClick_Cep">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{wndEmpresasSGE}.body}" />
</Blur>
</DirectEvents>
</ext:TriggerField>
<ext:TextField runat="server" ID="txtEndereco" FieldLabel="Endereço" MaxLength="100" X="135" Y="5" Width="390px" />
<ext:TextField runat="server" ID="txtNumero" FieldLabel="Número" MaxLength="10" X="535" Y="5" Width="100px" />
<ext:TextField runat="server" ID="txtBairro" FieldLabel="Bairro" MaxLength="50" X="5" Y="50" Width="180px" />
<ext:TextField runat="server" ID="txtComplemento" FieldLabel="Complemento" MaxLength="50" X="195" Y="50" Width="190px" />
<ext:TriggerField runat="server" ID="txtCidade" FieldLabel="Cidade" MaxLength="40" X="395" Y="50" Width="190px">
<Triggers>
<ext:FieldTrigger Icon="Search" Tag="Search" />
</Triggers>
<DirectEvents>
<TriggerClick OnEvent="TriggerClick_Cidade"/>
</DirectEvents>
</ext:TriggerField>
<ext:TextField runat="server" ID="txtUF" FieldLabel="UF" X="595" Y="02" Width="40px" />
</Items>
</ext:FieldSet>
<ext:FieldSet runat="server" ID="fsDocumentos" Title="Documentação" Layout="AbsoluteLayout" Height="70px" PaddingSummary="5px 5px 5px 5px">
<Defaults>
<ext:Parameter Name="LabelAlign" Value="Top" Mode="Value" />
</Defaults>
<Items>
<ext:TextField runat="server" ID="txtCPF" FieldLabel="CPF" X="5" Y="5" Width="120px" EnableKeyEvents="true" Validator="ValidaCPF_CNPJ" ValidateOnBlur="true">
<Listeners>
<KeyUp Fn="KeyUpHandler_CPF" />
</Listeners>
</ext:TextField>
<ext:TextField runat="server" ID="txtIdentidade" FieldLabel="Identidade" MaxLength="25" X="135" Y="5" Width="120px" />
<ext:DateField runat="server" ID="dtNascimento" FieldLabel="Data de Nascimento" X="265" Y="5" Width="120px" AltFormats="d/m/Y|j/n/Y|j/n/y|j/m/y|d/n/y|j/m/Y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|d-m-Y" Format="dd/MM/yyyy"/>
</Items>
</ext:FieldSet>
</Items>
</ext:Panel>
</Items>
<Buttons>
<ext:Button runat="server" id="btnOk" text="Ok" Width="80px" Icon="Tick">
<DirectEvents>
<Click OnEvent="SaveEmpresa" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{wndEmpresasSGE}.body}" />
</Click>
</DirectEvents>
</ext:Button>
<ext:Button runat="server" id="btnCancel" text="Cancelar" Width="80px" Icon="Cancel">
<Listeners>
<Click Handler="#{wndEmpresasSGE}.hide(null);" />
</Listeners>
</ext:Button>
</Buttons>
<DirectEvents>
<Hide OnEvent="OnHide" Failure="Ext.MessageBox.alert('Load failed', 'Error during ajax event!');">
</Hide>
</DirectEvents>
</ext:Window>

Daniil
Jan 24, 2012, 3:07 PM
Hi,

I have run two pages with the window you posted - the first one under Ext.NET v1, another under Ext.NET v2 and compared the results.



1 - It seems that the position in X is greater than in version 1.x (yellow arrow)


It appears to be the same on my side.



2 - It seems that the position in Y is greater than in version 1.x (red arrow)


Confirmed. But I was unable to determine the reason. "top" and "left" CSS rules appears to be the same as they are in Ext.NET v1.

Needs more time to investigate.



3 - The component fset is bigger .. but I do not know if it has changed the size or padding of fset Panel containing these objects. I've changed the Paggind for BodyPadding...


Not 100% sure that I correctly understand, but you, seems, tells that a space on the right became bigger, isn't that so?

Well, as far as I can see an entire container became a bit bigger. So, I can't see any way to fix apart from to increase the sizes of the fields.

supera
Jan 24, 2012, 3:36 PM
Thanks for your attention, Daniil

All my window, panel, fset, etc. in my test project display any difference in layout...

There are few pages, I am changing them manually.

Probably I did something wrong...
If you have any tips for me to pass, would be very grateful

For my part, I believe that this case has been closed.

Thanks!

Daniil
Jan 25, 2012, 7:57 AM
If you have any tips for me to pass, would be very grateful

The main advice is no rush. Carefully looking at CHANGELOG, then on API docs.

Then, if you don't get a solution, please feel free to ask us. We will do our best to help.



I'm set new size and positions screen by screen... I am doing right or should try another approach?

Well, I've discovered that FieldLabels are not aligned the same way under v1 and v2. I would look into it at the first of all.

The following thing:

<Defaults>
<ext:Parameter Name="LabelAlign" Value="Top" Mode="Value" />
</Defaults>
doesn't affect in v1, it does affect when it is set up for a container.

But it does affect in v2, LabelAlign property might be set up for a separate field.

The related CHANGELOG item is #64 one.
http://examples2.ext.net/#/Getting_Started/Release_Documents/CHANGELOG/


At the risk of having to redo this work in the next update?

Hopefully, not, there should not be required a big work with the next releases, but some tune-up might be required.

supera
Jan 25, 2012, 10:55 AM
Ok...

thanks for your clarification, Daniil

Daniil
Jan 25, 2012, 10:59 AM
Please clarify can we mark the thread as closed?

supera
Jan 25, 2012, 11:25 AM
Yes, you can mark this thread as closed

thanks a lot