cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Doclib extension button for certain file extensions

dddrhal123
Champ in-the-making
Champ in-the-making

i have the following extension configuration on my AIO sdk 4.1

<extension>
  <modules>
    <module>
      <id>Signature Action</id>
      <version>1.0</version>
      <auto-deploy>true</auto-deploy>
      <configurations>
        <config evaluator="string-compare" condition="DocLibActions">
          <actions>
            <action id="signature.action"
                   icon="document-signature"
                   type="javascript"
                   label="Add Signature">
              <param name="function">onActionAddSignature</param>
              <param name="failureMessage">Failed to add signature to document.</param>
            </action>
          </actions>
          <actionGroups>
            <actionGroup id="document-details">
              <action index="401" id="signature.action" />
            </actionGroup>
            <actionGroup id="document-browse">
              <action index="401" id="signature.action" />
            </actionGroup>
          </actionGroups>
        </config>
        <config evaluator="string-compare" condition="DocLibCustom">
          <dependencies>
            
          </dependencies>
        </config>
      </configurations>
    </module>
  </modules>
</extension>

,the button is showing all fine, but i want it to only show on pdf files and not all files !

1 REPLY 1

fedorow
Elite Collaborator
Elite Collaborator

I can direct you to an example.

You will find evaluator 'zk.evaluator.doclib.action.onlineEditMimetype' here:

https://github.com/zylklab/alfresco-share-online-edition-addon/blob/master/src/main/amp/config/alfre...

and the bean 'zk.evaluator.doclib.action.onlineEditMimetype' here:

https://github.com/zylklab/alfresco-share-online-edition-addon/blob/master/src/main/amp/config/alfre...

Follow the similar way for your myme type.