AceoffixCtrlAddCustomMenuItem Method |
Namespace: Aceoffix
The following code example shows how to use the AddCustomMenuItem method.
AceoffixCtrl1.CustomMenuCaption = "My &Tools"; AceoffixCtrl1.AddCustomMenuItem("&Show revisions", "OnCustomMenuClick()", true); AceoffixCtrl1.AddCustomMenuItem("&Hide revisions", "OnCustomMenuClick()", true); AceoffixCtrl1.AddCustomMenuItem("-", "", true); AceoffixCtrl1.AddCustomMenuItem("&Accept all revisions", "DoAcceptAll()", false);
And then, you should define the JavaScript functions in the aspx file of current page.
<script language="javascript" type="text/javascript"> function OnCustomMenuClick(iIndex, sCaption) { var AceoffixCtrl1 = document.getElementById("AceoffixCtrl1"); if (iIndex == 0) AceoffixCtrl1.ShowRevisions = true; if (iIndex == 1) AceoffixCtrl1.ShowRevisions = false; } function DoAcceptAll() { document.getElementById("AceoffixCtrl1").AcceptAllRevisions(); } </script>