[CLOSED] Problem in the view of the tablet portrait

  1. #1

    [CLOSED] Problem in the view of the tablet portrait

    Hello to all!

    I have a very strange problem in my code.
    In my start page i apply at the Page_Load method this code:

            protected void Page_Load(object sender, EventArgs e)
            {
                try
                {
                    if (!X.IsAjaxRequest)
                    {
                        if (RequestManager.IsDesktop)
                        {
                            ResourceManager.GetInstance().Theme = Ext.Net.Theme.Crisp;
                        }
                        else
                        {
                            ResourceManager.GetInstance().Theme = Ext.Net.Theme.CrispTouch;
                        }
                    }
                }
                catch (Exception err)
                {
                    Log.WriteLog(err);
                    BNCatchErrorService.Catch(err, true);
                }
            }
    that way I can change my theme based on the device I use. and this is ok.
    I noticed , however, that when I am in the tablet mode , with it placed in portrait , my page is not sized properly , and the result is a page unusable . If my tablet is in position Landscape I have no problem . Why? you know help me ?
    thank you to everyone!!
    Last edited by Daniil; Oct 27, 2015 at 2:42 PM. Reason: [CLOSED]
  2. #2
    Hi @bluenext,

    I could not reproduce.

    Could you, please, provide a full test case? Please simplify as much as you can.
  3. #3
    Hi Daniil. I hope not to be too confusing.
    This is an example of my code.
    To simplify the javascript code I have included in the view, but in reality the javascript files are outside the view.
    Thanks again for the help



    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestCNDC.aspx.cs" Inherits="BN.WebCNDC.TestCNDC" MasterPageFile="~/CNDC.Master" %>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        <script>
            Ext.onReady(function () {
                Ext.EventManager.onWindowResize(function () {
                    eventResizeForm();
                });
    
                Ext.onReady(function () {
                    initHomeMenu();
    
    
                    createMenuAmministratore("");
                    initTileAmministrazione();
                });
            });
    
            var createMenuAmministratore = function (keyMenu) {
    
                var htmlMenu = "<div id='cssmenu'>";
                var htmlIconMenu = "fa-Arrows_Arrowscopy13";
    
                htmlMenu += "<ul>";
                var tagNew = "";
                if (keyMenu == 'sedute_commissione')
                    tagNew = "class='custom_open'";
                else
                    tagNew = "";
                htmlMenu += "<li><a href='#' rel='9' " + tagNew + " onclick='loadSeduteCommissione();'><span class='fa fa-Files_Files-01 fa-Toolbar-left'></span><span>Sedute commissione</span></a></li>";
    
                if (keyMenu == 'gestione_rimborsi')
                    tagNew = "class='custom_open'";
                else
                    tagNew = "";
                htmlMenu += "<li><a href='#' rel='9' " + tagNew + " onclick='loadGestioneRimborsoTrasferte();'><span class='fa fa-Files_Files-19 fa-Toolbar-left'></span><span>Gestione rimborso trasferte</span></a></li>";
    
                if ((keyMenu == 'commissari') || (keyMenu == 'commissioni')) {
                    htmlIconMenu = "fa-Arrows_Arrowscopy15";
                }
                htmlMenu += "<li id ='div_tabella_menu' class='has-sub'><a rel='0' href='#'><span class='fa fa-Edition_Edition-15 fa-Toolbar-left'></span><span>Tabelle</span><span class='fa fatext " + htmlIconMenu + " fa-Toolbar1'></span></a>";
    
    
                htmlMenu += "<ul>";
    
                if (keyMenu == 'commissari') {
                    tagNew = "class='custom_open'";
                    idSubMenuOpen = "div_tabella_menu";
                }
                htmlMenu += "<li class='has-sub'><a rel='1' href='#' " + tagNew + " onclick='loadCommissari();'><span>Commissari</span></a>";
    
                htmlMenu += "</li>";
                tagNew = "";
                if (keyMenu == 'commissioni') {
                    tagNew = "class='custom_open'";
                    idSubMenuOpen = "div_tabella_menu";
                }
                htmlMenu += "<li class='has-sub'><a rel='1' href='#' " + tagNew + " onclick='loadCommissioni();'><span>Commissioni</span></a>";
                htmlMenu += "</li>";
                htmlMenu += "<li class='has-sub'><a rel='1' href='#' onclick='loadSpeseRimborsabili();'><span>Spese rimborsabili</span></a>";
                htmlMenu += "</li>";
                htmlMenu += "</ul>";
                htmlMenu += "</li>";
                htmlMenu += "</ul>";
                htmlMenu += "</div>";
    
                $("#homemenu").html(htmlMenu);
            };
    
            var initTileAmministrazione = function () {
                var h = Ext.getBody().getViewSize().height * .99 - 35;
    
                var htmlTile = "<div id='elementiStart' class='elementiStart-view' style='height : " + h + "px'>";
                ////////////// TILE
                htmlTile += "<div class='elementoStart'>";
                htmlTile += "<div class='elementoStartTitolo' style='background-color:#299E98;' > ";
                htmlTile += "<strong onclick='loadSeduteCommissione();'>Pianifica le sedute delle commissioni</strong>";
                htmlTile += "</div>";
                htmlTile += "</div>";
    
                ////////////// TILE
    
                htmlTile += "<div class='elementoStart'>";
                htmlTile += "<div class='elementoStartTitolo' style='background-color:#BDA210;' > ";
                htmlTile += "<strong onclick='loadGestioneRimborsoTrasferte();'>Gestisci le richieste di rimborso delle trasferte</strong>";
                htmlTile += "</div>";
                htmlTile += "</div>";
                ////////////// TILE
                htmlTile += "<div class='elementoStart'>";
                htmlTile += "<div class='elementoStartTitolo' style='background-color:#29a433;' > ";
                htmlTile += "<strong onclick='loadCommissioniTile();'>Aggiungi un commissario ad una commissione</strong>";
                htmlTile += "</div>";
                htmlTile += "</div>";
    
                // chiusura div principale
                htmlTile += "</div>";
    
                Ext.getCmp('Main_pnlContainerCenter').add(Ext.create('Ext.Panel', {
                    id: 'pnlElementiStart',
                    html: htmlTile,
                    renderTo: Ext.getBody(),
                    cls: 'classFormEmpty',
                    bodyCls: 'classFormEmpty'
                }));
    
    
            };
        </script>
    </asp:Content>
    <%--height: 44px; vertical-align: middle;margin: 0;float: none;--%>
    <asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="server">
        <ext:Panel ID="pnlMenu2"
            runat="server"
            Region="West"
            Width="220"
            Height="577"
            Collapsible="false"
            Border="false"
            BodyCls="background-color: #4c5763;color: #FFFFFF;"
            Split="false">
            <Content>
                <div id='homemenu'>
                </div>
            </Content>
        </ext:Panel>
        <ext:Panel ID="pnlCenter2" runat="server" Region="Center" Border="false" Cls="my-header" Height="577" Width="780" OverflowY="Auto" OverflowX="Auto">
            <Content>
                <div id="containerDiv2" style="text-align: center; background: #e7ebee; text-align: center; border: transparent; background: url('img/bg.jpg') repeat scroll 0 0 #fff; background-size: 220px 220px; border-style: hidden; border: 0px;">
                    <div id="centerDiv2" style="width: 850px; margin: auto; text-align: left; padding-top: 0px; padding-left: 0px; padding-bottom: 0px; background-color: transparent; border-style: hidden; border: 0px;">
                        <ext:Panel ID="pnlContainerCenter2" runat="server" Cls="my-header" Collapsible="false" Split="true" Border="false" OverflowX="Auto" OverflowY="Hidden">
                            <Content>
                            </Content>
                        </ext:Panel>
                    </div>
                </div>
            </Content>
        </ext:Panel>
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="MainWin" runat="server">
    </asp:Content>
  4. #4
    I am afraid I cannot run it without the MasterPage.

    Ideally, could you, please, get rid of the MasterPage making a standalone .aspx page that could be copied, pasted and ran without any changes?

Similar Threads

  1. [CLOSED] What is the Tablet support?
    By HansWapenaar in forum 3.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 03, 2016, 8:23 PM
  2. Replies: 9
    Last Post: Sep 25, 2015, 8:42 AM
  3. [CLOSED] Detect tablet or mobile phone
    By matt in forum 3.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 16, 2015, 11:24 AM
  4. Tablet and mobile devices friendly UI?
    By Dimitris in forum Open Discussions
    Replies: 2
    Last Post: Dec 24, 2014, 5:54 AM
  5. Numeric keyboard on Tablet
    By ADV in forum 3.x Help
    Replies: 3
    Last Post: Dec 16, 2014, 9:09 PM

Posting Permissions