lundi 8 décembre 2014

Custom action in Ribbon.PublishTab always disabled



I have a custom action which I want to place at the PUBLISH tab of the page. To do so, I have a following code for custom action.



<CustomAction Id="D7D4B708-783C-4221-8798-6A465C614B57.StartWfsEditMode"
Location="CommandUI.Ribbon"
Title="Start"
Sequence="10005">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.PublishTab.Workflow.Controls._children">
<Button Id="Lofbergs.DocsStartWFEditMode"
Image16by16="/_layouts/15//Images/Approval_16_by_16.jpg"
Image32by32="/_layouts/15//Images/Approval_32_by_32.jpg"
LabelText="Start Workflow"
Sequence="2"
Command="StartWorkflow1"
TemplateAlias="o1"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="StartWorkflow1" CommandAction="javascript:function StartWorkflowEdit()
{
alert('hello');
}
StartWorkflowEdit();">
</CommandUIHandler>
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>


The custom action is getting displayed on the tab but it is always disabled for selection.


What am I missing in my code?








0 commentaires:

Enregistrer un commentaire