[CLOSED] embedded custom theme

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] embedded custom theme


    hi coolite team;

    i have been using ur library for about 4 months I have been able to find any answer to my questions in your posts, so this is my first post.
    First of all u really made a great job with that coolite. cong! and thank u..

    and my question is:

    is there anyway to set a custom theme with session variables.
         Session["Coolite.Theme"] = Coolite.Ext.Web.Theme.MycustomTheme;
    I put the custom theme in coolite project, added my custom name to enum values so i can actually see my new value for the themes in the Theme enum in my project, I also added all the images to the resource file of the coolite project. I even made my custom theme as a default theme in scriptmanager class in coolite project, and of course I built coolite project and added new dll to my project, but I could not figure out where is the problem.

    Or is there any other easy way to achieve that goal. I have been reading almost all the posts about themes but have not found my answer. I am using alot of iframes in my project, and I wrote one single script that every page can call and set their theme easily but somehow I want to do it in session variable at server so I do not even have to call that script in each page.

    thanx
  2. #2

    RE: [CLOSED] embedded custom theme

    Hi,

    Please note that all themes (except default) are attached as ClientStyle attributes in ScriptManager class (see ScriptManager.cs class attributtes)


    Is it helped?
  3. #3

    RE: [CLOSED] embedded custom theme

    hi;
    thanx for the reply..


    [ClientStyle(Type = typeof(ScriptManager), FilePath = "/extjs/resources/css/xtheme-myCustom-embedded.css", WebResource = "Coolite.Ext.Web.Build.Resources.Coolite.extjs.resources.css.xtheme-myCustom-embedded.css", Theme = Theme.Custom)]
    actually that was the first thing I did, then i search "slate" keyword in entire coolite solution and I added my custom theme and images to places I found for slate theme...still no luck

    thanx


  4. #4

    RE: [CLOSED] embedded custom theme

    Hi maras54,

    I'm just wondering if your custom theme is working now?

    The process (or lack of) adding a new Theme to the project is something I've been unhappy with for a while. We will be improving this functionality during the next release cycle (after v0.8 release).

    Geoffrey McGill
    Founder
  5. #5

    RE: [CLOSED] embedded custom theme

    hi geoffrey
    I was wondering why geoffrey has not replied yet while he is helping to any kind of posts:)

    anyway thanx for asking, but I have not been working on that custom theme stuff for a while so i have not solved my problem yet, but for sure i must find the solution..

    and since you did not suggest anything I am assuming that I have done the right things for that custom theme, so there should be something small i can not see now..so when i have time i will go over every step again and make sure everything at the right place..

    I will update the post if i can find a solution, or any progress

    thanx again..


  6. #6

    RE: [CLOSED] embedded custom theme

    Your code appears correct.

    I would triple check the following items:

    1. If you are trying to access an embedded file, please ensure you select the .css file in Visual Studio, view the Properties of the file, and choose "Embedded Resource" for the "Build Action".

    2. Choose the Theme in the <ext:ScriptManager>, then view the Page in Firefox with Firebug installed. If the .css file has loaded properly the file should show up under the "CSS" tab. Or, you could view the browsers html source for the Page and just try to browse directly to the path rendered in the <link> tag.

    This all said, I would think it would be just easier to manually include your theme by adding the <link href="..."> tag on your (Master)Page.

    Geoffrey McGill
    Founder
  7. #7

    RE: [CLOSED] embedded custom theme


    1.
    If you are trying to access an embedded file, please ensure you select
    the .css file in Visual Studio, view the Properties of the file, and
    choose "Embedded Resource" for the "Build Action".

    that was the issue...and my image references were also wrong in css file..
    now i can get my theme as an embedded source and use one controller to affect all the other pages..
    by the way i am not using master pages..i am loading panels in iframe mode..

     Session["Coolite.Theme"] = Coolite.Ext.Web.Theme.MycustomTheme
    so to finalize the issue..
    in coolite project I added my custom theme enum
    <ul>[*]
    public enum Theme
    
        {
    
            Default,
    
            Slate,
    
            MyCustomTheme
    
        }
    [*]in script manager class attached my theme as ClientStyle attribute
    [ClientStyle(Type = typeof(ScriptManager), FilePath = "/extjs/resources/css/xtheme-myCustom-embedded.css", WebResource = "Coolite.Ext.Web.Build.Resources.Coolite.extjs.resources.css.xtheme-myCustom-embedded.css", Theme = Theme.Custom)]
    [*]and last thing is to choose the "Embedded Resource" for the "Build Action" for each file for my theme[/list]
    thank you geoffrey

  8. #8

    RE: [CLOSED] embedded custom theme

    Hi*maras54,

    Thanks for the update. I'm happy to hear this is working for you now.*


    Geoffrey McGill
    Founder
  9. #9

    RE: [CLOSED] embedded custom theme

    Hi Maras54,

    I would like to ask you a step-by-step of how to make my custon theme embedded so I could use it instead of only default, gray and slate theme.

    Regards

    Fabio
  10. #10

    RE: [CLOSED] embedded custom theme

    Is there a way to do this without changing the source code with the new enum and clientstyle attribute?
Page 1 of 2 12 LastLast

Similar Threads

  1. Custom Theme
    By Rupesh in forum 1.x Help
    Replies: 0
    Last Post: Apr 18, 2012, 7:03 AM
  2. Replies: 4
    Last Post: May 25, 2010, 11:23 AM
  3. Applying Custom Theme
    By fabiomarcos in forum 1.x Help
    Replies: 10
    Last Post: Oct 09, 2009, 4:20 AM
  4. Custom Theme
    By Ben in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 02, 2008, 12:04 PM

Posting Permissions