[CLOSED] add cls class to Window created in javascript ext 2.5.2

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] add cls class to Window created in javascript ext 2.5.2

    I am trying to add a cls class to a window created via javascript. Please see below, if I add a cls to window, it does not display. Can you please point me in the right direction to add a custom css to the window. Thanks

    
            label {
    	        font-size: .7em;
    	        display: block;
            }
    
     .chartPopup {
    	        font-size : 1em;
    	        color:#111010;
    	        padding-top: 8px;
    	        position : absolute;
    	        text-align : left;
    	        vertical-align : middle;
    	        visibility : hidden;
    	        z-index : 9999999;
            }
     var config = { title: 'Additional Summary', height: popupHeight, width: 900}
    
                var win = new Ext.Window(Ext.apply({
                    renderTo: Ext.getBody(),
                    resizable: true,
                    frame: true,
                    modal: true,
                    closable: true,
                    cls: "label chartPopup", // ==> this line causes the window to not display
                    closeAction: "close",
                    html: "HELLO",
                }, config));
    
                win.componentCls = "label chartPopup"; // ==> This does not do anything
                win.show();
    Last edited by fabricio.murta; Feb 17, 2015 at 11:21 PM. Reason: [CLOSED]
  2. #2
    I found the problem with the class. Please close.
    Thank you
  3. #3
    Glad you could fix it so quickly! I'm sure nobody visiting this thread would mind if you shared your outcome with us. (what was wrong and how you fixed it)
    Fabrício Murta
    Developer & Support Expert
  4. #4
    Sure. This is a conversion from 1.x project to 2.5.2

    The problem was my actual css. I am not sure why it worked with 1.x - see class below - The popup was loading but blank. it was hidden by the class. removing visibility: hidden and everything works.

    .chartPopup {
    	        font-size : 1em;
    	        color:#111010;
    	        padding-top: 8px;
    	        position : absolute;
    	        text-align : left;
    	        vertical-align : middle;
    	        visibility : hidden; ==> THI IS THE PROBLEM LINE
    	        z-index : 9999999;
            }

Similar Threads

  1. Replies: 0
    Last Post: Aug 01, 2012, 1:20 AM
  2. Replies: 8
    Last Post: Mar 13, 2012, 5:54 PM
  3. [CLOSED] Minimize window created in another desktop window
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 03, 2011, 1:46 PM
  4. [CLOSED] Creating a c# component that generates a JavaScript class
    By PLoch in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 04, 2011, 5:11 PM
  5. [CLOSED] Is it possible to return a class from JavaScript to .NET
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 03, 2011, 12:26 PM

Posting Permissions