Dialog sizes for SendEmail button being ignored

4 posts, 0 answers
  1. Lee
    Lee avatar
    5 posts
    Member since:
    Jul 2008

    Posted 23 Jan 2012 Link to this post

    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


  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 24 Jan 2012 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lee
    Lee avatar
    5 posts
    Member since:
    Jul 2008

    Posted 24 Jan 2012 Link to this post

    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
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 25 Jan 2012 Link to this post

    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
Back to Top