Problems with Custom Designer Position

Posted by Community Admin on 03-Aug-2018 14:00

Problems with Custom Designer Position

All Replies

Posted by Community Admin on 21-Sep-2011 00:00

I'm using a custom designer that takes up a good amount of space.  As a result, it runs off the right of the visible portion of the page (see screenshot) requiring a user to either move the designer or scroll.  I'd like to move it to the center of the screen.

I've tried overriding existing CSS, but it seems the designer itself is in an iframe and the CSS I need to modify is outside of it.

Is there a way to either override the template or CSS to center the designer on the screen?

Posted by Community Admin on 22-Sep-2011 00:00

Hello Norsenerd,

Did you try this javascript method

dialogBase.resizeToContent();

execute it when the dialog loads - e.g. register a load handler with

this._loadDelegate = Function.createDelegate(this, this._load);
Sys.Application.add_load(this._loadDelegate);

and then create a function named _load()

All the best,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Sep-2011 00:00

Hi Lubomir,
  I tried add the load delegate as you suggested, but it did not resolve the issue I was having.  My understanding of the dialogBase.resizeToContent() method is that it re-sizes the content area itself so that all content can be seen.  The issue I'm having is that I want the dialog base to be further over to the left.

I know the CSS change I need to make, but adding a style block (even when adding an !important on the property) in the design markup file or using jQuery to modify the property does not work.

Do you have any other suggestions?

Posted by Community Admin on 27-Sep-2011 00:00

Hi Norsenerd,

In this case you could try moving the dialog in the onload event handler. First you need to get a reference to the RadWindow in which you have your dialog. Use this function:

get_radWindow: function()
    if (!this._dialog)
        if (typeof window.radWindow !== "undefined")
            this._dialog = window.radWindow;
         else
            if (window.frameElement != null && typeof window.frameElement.radWindow !== "undefined")
                this._dialog = window.frameElement.radWindow;
            
        
    
    return this._dialog;

Then once you get a reference to the RadWindow in a variable named e.g. oWnd you can retrieve its current bounds with var bounds = oWnd.getWindowBounds(); and you can move the window with oWnd.moveTo(x, y) and resize it with oWnd.set_width(width) and oWnd.set_height(height).


Kind regards,

Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 27-Sep-2011 00:00

Thanks, Lubomir!  That was exactly what I needed.

This thread is closed