This is a migrated thread and some comments may be shown as answers.

Dialog sizes for SendEmail button being ignored

3 Answers 61 Views
SocialShare
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 24 Jan 2012, 04:45 AM

I have server RadSocialButtons on my RadSocial Share Control.  The dialog sizes are working for all of the buttons except for the SendEmail button.
Here's the mark-up.

<telerik:RadSocialShare runat="server" ID="RadSocialShare1" UrlToShare="http://www.jennalogan.com"
                        TitleToShare="JennaLogan.com, the Internet's premiere fine jewelry lender."
                        DialogHeight="550px" DialogWidth="950px"
                        onprerender="RadSocialShare1_PreRender">
                        <MainButtons>
<telerik:RadSocialButton SocialNetType="ShareOnFacebook" ToolTip="Share on Facebook" DialogHeight="550px" DialogWidth="990px" />
<telerik:RadSocialButton SocialNetType="ShareOnTwitter" DialogHeight="480px" DialogWidth="640px" ToolTip="Tweet about this." />
<telerik:RadSocialButton SocialNetType="Blogger" DialogHeight="660px" DialogWidth="950px" ToolTip="Blog about this." />
 <telerik:RadSocialButton SocialNetType="SendEmail" DialogHeight="550px"  DialogWidth="1000px" ToolTip="Email this to a friend" />
</MainButtons>
</telerik:RadSocialShare>

 

Am I missing something?
Thx,
Lee


3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 24 Jan 2012, 05:07 PM
Hi Lee,

The SendEmail dialog is actually a RadWindow that uses its autosizing functionality to give the best display for the form. Please note that it is a static content and thus changing the popup's size will not cause it to have different dimensions, it would only produce worse visual results. Nevertheless below you can find a simple JavaScript function that will change the dialog's size as you wish it, but I kindly ask that you explain in some greater detail why you need such functionality.

function resizeSendEmailPopup(sender, args)
{
    if (args.get_socialNetType() == "SendEmail")
    {
        var oSendEmailPopup = args.get_dialog();
        oSendEmailPopup.setSize(args._button[3], args._button[4]);
        oSendEmailPopup.center();
    }
}

where this handles the OnSocialButtonClicked event:
<telerik:RadSocialShare runat="server" ID="RadSocialShare1" UrlToShare="http://www.jennalogan.com"
    TitleToShare="JennaLogan.com, the Internet's premiere fine jewelry lender." DialogHeight="550px"
    DialogWidth="950px" OnPreRender="RadSocialShare1_PreRender" OnSocialButtonClicked="resizeSendEmailPopup">
    <MainButtons>
        <telerik:RadSocialButton SocialNetType="ShareOnFacebook" ToolTip="Share on Facebook"
            DialogHeight="550px" DialogWidth="990px" />
        <telerik:RadSocialButton SocialNetType="ShareOnTwitter" DialogHeight="480px" DialogWidth="640px"
            ToolTip="Tweet about this." />
        <telerik:RadSocialButton SocialNetType="Blogger" DialogHeight="660px" DialogWidth="950px"
            ToolTip="Blog about this." />
        <telerik:RadSocialButton SocialNetType="SendEmail" DialogHeight="550px" DialogWidth="1000px"
            ToolTip="Email this to a friend" />
    </MainButtons>
</telerik:RadSocialShare>


Regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Lee
Top achievements
Rank 1
answered on 25 Jan 2012, 03:02 AM
Thanks!  Without the code that you provided, the dialog looks like the image that I've attached.  Not sure why, but it renders that way in both IE9 and Chrome.  With the javascript, I'm able to get it to display without the scrollbars, but the pin and close buttons in the titlebar are stacked vertically as shown in the attached image.  How can I make them appear side by side? Or better yet, how can I hide the pin putton?Thanks!
Lee
0
Marin Bratanov
Telerik team
answered on 25 Jan 2012, 04:48 PM
Hi Lee,

Such appearance from the RadWindow is usually the result from a global CSS rule on the page that also affects The RadControls. This looks ilke an UL or LI element rule,yet I advise that you remove all your custom CSS from the page for testing. If the issue is gone you can start adding your own stylesheets again until the problematic code is found. Then what you can do is to make the selector heavier by adding some cascade to it. Once this is resolved I believe the default behavior will suit your needs (i.e.there will not be any scrollbars). As for the Pin button - you can use the RadWindow's API like in my previous sample to set the desired behaviors (i.e. Move and Close, I believe) instead of the size.


Kind regards,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
SocialShare
Asked by
Lee
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Lee
Top achievements
Rank 1
Share this question
or