getSharePointButton ();
The getSharePointButton method returns the Discuss in SharePoint button.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Open the express report source for view by means of the openDocument method, and add the following code in the document open event handler:
//Return the Home ribbon tab in the view mode var readonlyCat = workbookBox.getRibbonView().getReadonlyCategory(); //Return the Discuss in SharePoint button var sharePointButton = readonlyCat.getSharePointButton(); var state = True; var sharePointToggle = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Show/Hide button", //text Click: PP.Delegate(toggleSharePointButton) }); function toggleSharePointButton() { //Show or hide the Discuss in SharePoint button state ? sharePointButton.hide() : sharePointButton.show(); state = !state; }
After executing the example the WorkbookBox component and a button named Show/Hide Button are placed in the HTML page. Clicking the button will show or hide the Discuss in SharePoint button:
or:
See also: