DiscussMenu.getGooglePlusItem

Syntax

getGooglePlusItem ()

Description

The getGooglePlusItem method returns the Google+ menu item.

Comments

To show the Google+ menu item, in the DiscussMenu constructor for the GooglePlusItem property set a JSON object with the Visible property set to true.

Example

To execute the example, add links to the PP.js and PP.Metabase.js libraries, visual styles PP.css and PP.Metabase, and resources file resources.en.js. In the BODY tag add DIV items with the btn1 and check1 identifiers. In the SCRIPT tag add the following code:

PP.setCurrentCulture(PP.setCurrentCulture(PP.Cultures.ru))//current culture
var shareMenu = new PP.Ui.DiscussMenu(
{
    ImagePath: "PP_img/",
    GooglePlusItem: {//Google+ item is displayed
        Visible: true
    }
});
var btn = new PP.Ui.Button(//menu button
{
    ParentNode: document.getElementById("btn1"),
    Content: "Share",
    Menu: shareMenu
})
var check = new PP.Ui.CheckBox(//checkbox on selecting which the Google+ item is shown from right to left
{
    ParentNode: document.getElementById("check1"),
    Content: "isRTL GooglePlus",
    CheckedChanged: function (sender, args)
    {
        if (check.getCheckedState() == true)
        {
            shareMenu.getGooglePlusItem().setIsRTL(true)
        }
        else
        {
            shareMenu.getGooglePlusItem().setIsRTL(false)
        }
    }
})

After executing the example the Share button and the isRTL GooglePlus checkbox are added to the page. Clicking the Share button opens a menu with the GooglePlus item:

On selecting the isRTL GooglePlus checkbox the Google+ item is shown from right to left:

See also:

DiscussMenu