Discuss: function (sender, args);
sender. Event source.
args. Event information.
The Discuss event occurs when the Share item is selected in the workbook's main menu.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), open the document by means of the openDocumentfunction, also add the following code to the document open event handler:
//Return the Main tab in the view mode
var readonlyCat = workbookBox.getRibbonView().getReadonlyCategory();
//Return the Discuss in SharePoint button
var sharePointButton = readonlyCat.getSharePointButton();
var state = True;
//Make the Discuss in SharePoint button visible
sharePointButton.show();
//Get the component for displaying a menu of the Ribbon type
var ribbonView = workbookBox.getRibbonView();
//Subscribe to the event of clicking the Discuss in SharePoint ribbon button
ribbonView.Discuss.add(function()
{
alert('The Discuss in SharePoint ribbon button is pressed');
});
To execute the example, select the Discuss in SharePoint or Share items in workbook menu, after that the following message appears in the screen: The Discuss in SharePoint button is clicked on the ribbon.
See also: