[CLOSED] Problem with applying themes

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Problem with applying themes

    Hi,

    We are not able to apply themes in the iframe....
    and also we are not able to apply default theme.....

    Please find the attached files...you just add the files to a project and run the Themes.aspx page...

    Try to change the theme from the menu...you can see the theme is applied to all parts except the iframe....and once you try to change back to default it not happening

    Please let us know whats the problem...


  2. #2

    RE: [CLOSED] Problem with applying themes

    Hi,

    Before testing your attachemnt I want to know what version do you use? 0.7? Just as I remember 0.7 version has some problems with themes which was fixed in 0.8 version
  3. #3

    RE: [CLOSED] Problem with applying themes

    hi ,

    We are using 0.8 version.
  4. #4

    RE: [CLOSED] Problem with applying themes

    Hi,

    Your succes handler for AJaxMethod doesn't set theme for tabs pages
    Please see the following sample
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Theme.aspx.cs" Inherits="Theme" %>
    
    <%@ Import Namespace="Coolite.Utilities" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Ext.IsAjaxRequest)
            {
                #region "functionality"
    
    
                Hashtable htLF = new Hashtable();
                htLF.Add(0, "My Addresses");
                htLF.Add(1, "Some Folder");
                htLF.Add(2, "a");
                htLF.Add(3, "dffdsf");
                htLF.Add(4, "For Sai");
                htLF.Add(5, "Link");
                htLF.Add(6, "Link Folder");
                htLF.Add(7, "My links");
                htLF.Add(8, "new link");
                htLF.Add(9, "temp folder");
                htLF.Add(10, "Testttt");
                htLF.Add(11, "xvcx");
    
                Coolite.Ext.Web.TreeNode linkNodes = new Coolite.Ext.Web.TreeNode("LinkFolders");
    
                string nodeText;
    
                for (int i = 0; i < htLF.Count; i++)
                {
                    Coolite.Ext.Web.TreeNode linkNode = new Coolite.Ext.Web.TreeNode(htLF[i].ToString());
                    if (i == 0)
                    {
    
    
                        //linkNode = "nodeBackground";
                    }
                    nodeText = linkNode.Text.Replace("'", "\\'");
                    // linkNode.Listeners.Click.Handler = "addTab(#{tbpnlContent}, 'idClt', 'LinkFolders.aspx?lFolderid=" + htLF[i].ToString() + "','" + htLF[i].ToString() + "\\\\" + nodeText + "',1)";
                    linkNode.IconCls = "LinkFolder-icon";
                    linkNodes.Nodes.Add(linkNode);
    
                }
    
                TreeLinkFolder.Root.Add(linkNodes);
                TreeLinkFolder.RootVisible = false;
    
    
    
                Hashtable htQF = new Hashtable();
                htQF.Add(0, "ab");
                htQF.Add(1, "cd");
                htQF.Add(2, "ef");
                htQF.Add(3, "gh");
                htQF.Add(4, "ij");
                htQF.Add(5, "kl");
                htQF.Add(6, "mn");
                htQF.Add(7, "op");
                htQF.Add(8, "qr");
                htQF.Add(9, "st");
                htQF.Add(10, "uv");
                htQF.Add(11, "wx");
    
                Coolite.Ext.Web.TreeNode linkNodesQF = new Coolite.Ext.Web.TreeNode("QueryFolders");
                linkNodes.Listeners.CheckChange.Handler = "findtab()";
                for (int i = 0; i < htQF.Count; i++)
                {
                    Coolite.Ext.Web.TreeNode linkNodeQF = new Coolite.Ext.Web.TreeNode(htQF[i].ToString());
    
                    nodeText = linkNodeQF.Text.Replace("'", "\\'");
                    // linkNodeQF.Listeners.Click.Handler = "addTab(#{tbpnlContent}, 'idClt', 'QueryFolders.aspx?lFolderid=" + htQF[i].ToString() + "','" + htQF[i].ToString() + "\\\\" + nodeText + "',1)";
                    linkNodeQF.IconCls = "QueryFolder-icon";
                    linkNodesQF.Nodes.Add(linkNodeQF);
    
                }
    
                TreeQueryFolder.Root.Add(linkNodesQF);
                TreeQueryFolder.RootVisible = false;
    
    
                Hashtable htTF = new Hashtable();
                htTF.Add(0, "vasu");
                htTF.Add(1, "hema");
                htTF.Add(2, "mohan");
                htTF.Add(3, "koti");
                htTF.Add(4, "arun");
    
                Coolite.Ext.Web.TreeNode linkNodesTF = new Coolite.Ext.Web.TreeNode("TestFolders");
    
                for (int i = 0; i < htTF.Count; i++)
                {
                    Coolite.Ext.Web.TreeNode linkNodeTF = new Coolite.Ext.Web.TreeNode(htTF[i].ToString());
    
                    nodeText = linkNodeTF.Text.Replace("'", "\\'");
                    //linkNodeTF.Listeners.Click.Handler = "addTab(#{tbpnlContent}, 'idClt', 'TestFolders.aspx?lFolderid=" + htTF[i].ToString() + "','" + htTF[i].ToString() + "\\\\" + nodeText + "',1)";
                    linkNodeTF.IconCls = "LinkFolder-icon";
                    linkNodesTF.Nodes.Add(linkNodeTF);
    
                }
    
                TreeTestFolder.Root.Add(linkNodesTF);
                TreeTestFolder.RootVisible = false;
    
                #endregion
            }
    
    
        }
    
    
        [AjaxMethod]
        public string GetThemeUrl(string theme)
        {
            Theme temp = (Theme)Enum.Parse(typeof(Theme), theme);
    
            this.Session["Coolite.Theme"] = temp;
    
            return (temp == Coolite.Ext.Web.Theme.Default) ? "Default" : this.ScriptManager1.GetThemeUrl(temp);
        }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Portal in TabPanel - Coolite Toolkit Examples</title>
        <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" />
        <ext:ViewPort ID="ViewPort1" runat="server">
            <Body>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <West MinWidth="175" MaxWidth="400" Split="true" Collapsible="true">
                        <ext:Panel ID="WestPanel" runat="server" Title="" Width="175">
                            <Body>
                                <ext:Accordion ID="Accordion1" runat="server" Animate="true">
                                    <ext:Panel ID="LinkFolders" runat="server" Title="LinkFolders" IconCls="LinkFolder-icon"
                                        Border="false" BodyStyle="padding:6px;">
                                        <Body>
                                            <ext:TreePanel ID="TreeLinkFolder" runat="server" BodyBorder="false" UseArrows="True">
                                            </ext:TreePanel>
                                        </Body>
                                    </ext:Panel>
                                    <ext:Panel ID="QueryFolders" runat="server" Title="QueryFolders" IconCls="QueryFolder-icon"
                                        Border="false" BodyStyle="padding:6px;">
                                        <Body>
                                            <ext:TreePanel ID="TreeQueryFolder" runat="server" BodyBorder="false" UseArrows="True">
                                            </ext:TreePanel>
                                        </Body>
                                    </ext:Panel>
                                    <ext:Panel ID="TestFolders" runat="server" Title="TestFolders" IconCls="LinkFolder-icon"
                                        Border="false" BodyStyle="padding:6px;">
                                        <Body>
                                            <ext:TreePanel ID="TreeTestFolder" runat="server" BodyBorder="false" UseArrows="True">
                                            </ext:TreePanel>
                                        </Body>
                                    </ext:Panel>
                                </ext:Accordion>
                            </Body>
                        </ext:Panel>
                    </West>
                    <Center>
                        <ext:Panel ID="pnlContent" runat="server">
                            <Body>
                                <ext:FitLayout ID="fl" runat="server">
                                    <ext:TabPanel ID="tbpnlContent" runat="Server"
                                        MinTabWidth="1500" ResizeTabs="true">
                                        <Tabs>
                                            <ext:Tab ID="idClt" Title="Messages">
                                                <AutoLoad Url="Messages.aspx" ShowMask="true" NoCache="false" MaskMsg="Loading..."
                                                    Mode="IFrame" />
                                            </ext:Tab>
                                        </Tabs>
                                        <LoadMask Msg="Loading..." ShowMask="true" />
                                    </ext:TabPanel>
                                </ext:FitLayout>
                            </Body>
                        </ext:Panel>
                    </Center>
                    <North>
                        <ext:Toolbar ID="Toolbar1" runat="Server">
                            <Items>
                                <ext:ToolbarFill />
                                <ext:ToolbarButton ID="tbThemes" runat="server" Text="Themes" Icon="Theme">
                                    <Menu>
                                        <ext:Menu ID="Menu1" runat="server">
                                            <Items>
                                                <ext:MenuItem ID="MenuItem1" runat="server" Text="Default">
                                                   
                                                </ext:MenuItem>
                                                <ext:MenuItem ID="MenuItem2" runat="server" Text="Gray">
                                                    
                                                </ext:MenuItem>
                                                <ext:MenuItem ID="MenuItem3" runat="server" Text="Slate">
                                                    
                                                </ext:MenuItem>
                                            </Items>
                                            
                                            <Listeners>
                                                <ItemClick Handler="Coolite.AjaxMethods.GetThemeUrl(menuItem.text,{
                                                                    success: function (result) {
                                                                        Coolite.Ext.setTheme(result);
                                                                        tbpnlContent.items.each(function (el) {
                                                                           if (!Ext.isEmpty(el.iframe)) {
                                                                                el.iframe.dom.contentwindow.Coolite.Ext.setTheme(result);
                                                                            }
                                                                        });
                                                                    }
                                                                });" />
                                            </Listeners>
                                        </ext:Menu>
                                    </Menu>
                                </ext:ToolbarButton>
                            </Items>
                        </ext:Toolbar>
                    </North>
                </ext:BorderLayout>
            </Body>
        </ext:ViewPort>
        </form>
    </body>
    </html>
  5. #5

    RE: [CLOSED] Problem with applying themes

    Hi,

    It is giving the fallowing java script error,

    Microsoft JScript runtime error: 'iframe.dom.contentwindow.Coolite' is null or not an object
  6. #6

    RE: [CLOSED] Problem with applying themes

    Hi,

    Use 'contentWindow' (big W letter, just forum change that word)
  7. #7

    RE: [CLOSED] Problem with applying themes

    Hi,

    I theme is applying for iframe.If u change the theme for Gray,Slate is ok, but default is not appling for tree properly.Default is working fine in page load.

    See the screenshot.
  8. #8

    RE: [CLOSED] Problem with applying themes

    Hi,

    Under what browser do you have such problem? For me it works fine. Can you create solution with your local assemblies?
  9. #9

    RE: [CLOSED] Problem with applying themes

    Hi,

    Or try to update from SVN and retest
  10. #10

    RE: [CLOSED] Problem with applying themes

    Hi,

    We are using IE 7.0.

    I am sending the entire application.
Page 1 of 2 12 LastLast

Similar Threads

  1. Applying jQuery in I.E. is a hit and miss
    By sfedorov in forum 1.x Help
    Replies: 1
    Last Post: Jun 04, 2012, 5:50 PM
  2. [CLOSED] Problem applying grid filters programmatically
    By anup in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 01, 2011, 5:03 PM
  3. [CLOSED] applying styles to label in toolbar
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 29, 2010, 12:34 PM
  4. Applying Custom Theme
    By fabiomarcos in forum 1.x Help
    Replies: 10
    Last Post: Oct 09, 2009, 4:20 AM
  5. [CLOSED] Problem in applying theme to web page in Tab Panel
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 03, 2009, 11:59 PM

Posting Permissions